Class: Dodopayments::Models::CheckoutSessionRequest
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Dodopayments::Models::CheckoutSessionRequest
- Defined in:
- lib/dodopayments/models/checkout_session_request.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#allowed_payment_method_types ⇒ Array<Symbol, Dodopayments::Models::PaymentMethodTypes>?
Customers will never see payment methods that are not in this list.
-
#billing_address ⇒ Dodopayments::Models::CheckoutSessionBillingAddress?
Billing address information for the session.
-
#billing_currency ⇒ Symbol, ...
This field is ingored if adaptive pricing is disabled.
-
#cancel_url ⇒ String?
The URL to redirect the customer if they cancel or go back from the checkout.
-
#confirm ⇒ Boolean?
If confirm is true, all the details will be finalized.
-
#custom_fields ⇒ Array<Dodopayments::Models::CustomField>?
Custom fields to collect from customer during checkout (max 5 fields).
-
#customer ⇒ Dodopayments::Models::AttachExistingCustomer, ...
Customer details for the session.
-
#customization ⇒ Dodopayments::Models::CheckoutSessionCustomization?
Customization for the checkout session page.
- #discount_code ⇒ String?
- #feature_flags ⇒ Dodopayments::Models::CheckoutSessionFlags?
-
#force_3ds ⇒ Boolean?
Override merchant default 3DS behaviour for this session.
-
#metadata ⇒ Hash{Symbol=>String}?
Additional metadata associated with the payment.
-
#minimal_address ⇒ Boolean?
If true, only zipcode is required when confirm is true; other address fields remain optional.
-
#payment_method_id ⇒ String?
Optional payment method ID to use for this checkout session.
- #product_cart ⇒ Array<Dodopayments::Models::ProductItemReq>
-
#product_collection_id ⇒ String?
Product collection ID for collection-based checkout flow.
-
#return_url ⇒ String?
The url to redirect after payment failure or success.
-
#short_link ⇒ Boolean?
If true, returns a shortened checkout URL.
-
#show_saved_payment_methods ⇒ Boolean?
Display saved payment methods of a returning customer False by default.
- #subscription_data ⇒ Dodopayments::Models::SubscriptionData?
-
#tax_id ⇒ String?
Tax ID for the customer (e.g. VAT number).
Instance Method Summary collapse
-
#initialize(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, cancel_url: nil, confirm: nil, custom_fields: nil, customer: nil, customization: nil, discount_code: nil, feature_flags: nil, force_3ds: nil, metadata: nil, minimal_address: nil, payment_method_id: nil, product_collection_id: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil, tax_id: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see CheckoutSessionRequest for more details.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, cancel_url: nil, confirm: nil, custom_fields: nil, customer: nil, customization: nil, discount_code: nil, feature_flags: nil, force_3ds: nil, metadata: nil, minimal_address: nil, payment_method_id: nil, product_collection_id: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil, tax_id: nil) ⇒ Object
Some parameter documentations has been truncated, see Dodopayments::Models::CheckoutSessionRequest for more details.
|
|
# File 'lib/dodopayments/models/checkout_session_request.rb', line 143
|
Instance Attribute Details
#allowed_payment_method_types ⇒ Array<Symbol, Dodopayments::Models::PaymentMethodTypes>?
Customers will never see payment methods that are not in this list. However, adding a method here does not guarantee customers will see it. Availability still depends on other factors (e.g., customer location, merchant settings).
Disclaimar: Always provide ‘credit’ and ‘debit’ as a fallback. If all payment methods are unavailable, checkout session will fail.
20 21 22 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 20 optional :allowed_payment_method_types, -> { Dodopayments::Internal::Type::ArrayOf[enum: Dodopayments::PaymentMethodTypes] }, nil?: true |
#billing_address ⇒ Dodopayments::Models::CheckoutSessionBillingAddress?
Billing address information for the session
28 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 28 optional :billing_address, -> { Dodopayments::CheckoutSessionBillingAddress }, nil?: true |
#billing_currency ⇒ Symbol, ...
This field is ingored if adaptive pricing is disabled
34 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 34 optional :billing_currency, enum: -> { Dodopayments::Currency }, nil?: true |
#cancel_url ⇒ String?
The URL to redirect the customer if they cancel or go back from the checkout. If not provided, the back button will not be displayed.
41 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 41 optional :cancel_url, String, nil?: true |
#confirm ⇒ Boolean?
If confirm is true, all the details will be finalized. If required data is missing, an API error is thrown.
48 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 48 optional :confirm, Dodopayments::Internal::Type::Boolean |
#custom_fields ⇒ Array<Dodopayments::Models::CustomField>?
Custom fields to collect from customer during checkout (max 5 fields)
54 55 56 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 54 optional :custom_fields, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::CustomField] }, nil?: true |
#customer ⇒ Dodopayments::Models::AttachExistingCustomer, ...
Customer details for the session
62 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 62 optional :customer, union: -> { Dodopayments::CustomerRequest }, nil?: true |
#customization ⇒ Dodopayments::Models::CheckoutSessionCustomization?
Customization for the checkout session page
68 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 68 optional :customization, -> { Dodopayments::CheckoutSessionCustomization } |
#discount_code ⇒ String?
73 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 73 optional :discount_code, String, nil?: true |
#feature_flags ⇒ Dodopayments::Models::CheckoutSessionFlags?
78 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 78 optional :feature_flags, -> { Dodopayments::CheckoutSessionFlags } |
#force_3ds ⇒ Boolean?
Override merchant default 3DS behaviour for this session
84 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 84 optional :force_3ds, Dodopayments::Internal::Type::Boolean, nil?: true |
#metadata ⇒ Hash{Symbol=>String}?
Additional metadata associated with the payment. Defaults to empty if not provided.
91 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 91 optional :metadata, Dodopayments::Internal::Type::HashOf[String], nil?: true |
#minimal_address ⇒ Boolean?
If true, only zipcode is required when confirm is true; other address fields remain optional
98 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 98 optional :minimal_address, Dodopayments::Internal::Type::Boolean |
#payment_method_id ⇒ String?
Optional payment method ID to use for this checkout session. Only allowed when ‘confirm` is true. If provided, existing customer id must also be provided.
105 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 105 optional :payment_method_id, String, nil?: true |
#product_cart ⇒ Array<Dodopayments::Models::ProductItemReq>
9 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 9 required :product_cart, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::ProductItemReq] } |
#product_collection_id ⇒ String?
Product collection ID for collection-based checkout flow
111 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 111 optional :product_collection_id, String, nil?: true |
#return_url ⇒ String?
The url to redirect after payment failure or success.
117 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 117 optional :return_url, String, nil?: true |
#short_link ⇒ Boolean?
If true, returns a shortened checkout URL. Defaults to false if not specified.
123 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 123 optional :short_link, Dodopayments::Internal::Type::Boolean |
#show_saved_payment_methods ⇒ Boolean?
Display saved payment methods of a returning customer False by default
129 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 129 optional :show_saved_payment_methods, Dodopayments::Internal::Type::Boolean |
#subscription_data ⇒ Dodopayments::Models::SubscriptionData?
134 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 134 optional :subscription_data, -> { Dodopayments::SubscriptionData }, nil?: true |
#tax_id ⇒ String?
Tax ID for the customer (e.g. VAT number). Requires billing_address with country.
141 |
# File 'lib/dodopayments/models/checkout_session_request.rb', line 141 optional :tax_id, String, nil?: true |