Class: Dodopayments::Models::CheckoutSessionFlags

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/checkout_session_flags.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(allow_currency_selection: nil, allow_customer_editing_business_name: nil, allow_customer_editing_city: nil, allow_customer_editing_country: nil, allow_customer_editing_email: nil, allow_customer_editing_name: nil, allow_customer_editing_state: nil, allow_customer_editing_street: nil, allow_customer_editing_tax_id: nil, allow_customer_editing_zipcode: nil, allow_discount_code: nil, allow_phone_number_collection: nil, allow_tax_id: nil, always_create_new_customer: nil, redirect_immediately: nil, require_phone_number: nil) ⇒ Object

Some parameter documentations has been truncated, see Dodopayments::Models::CheckoutSessionFlags for more details.

Parameters:

  • allow_currency_selection (Boolean) (defaults to: nil)

    if customer is allowed to change currency, set it to true

  • allow_customer_editing_business_name (Boolean) (defaults to: nil)

    If true, the customer can supply or edit the business name associated

  • allow_customer_editing_city (Boolean) (defaults to: nil)
  • allow_customer_editing_country (Boolean) (defaults to: nil)
  • allow_customer_editing_email (Boolean) (defaults to: nil)
  • allow_customer_editing_name (Boolean) (defaults to: nil)
  • allow_customer_editing_state (Boolean) (defaults to: nil)
  • allow_customer_editing_street (Boolean) (defaults to: nil)
  • allow_customer_editing_tax_id (Boolean) (defaults to: nil)
  • allow_customer_editing_zipcode (Boolean) (defaults to: nil)
  • allow_discount_code (Boolean) (defaults to: nil)

    If the customer is allowed to apply discount code, set it to true.

  • allow_phone_number_collection (Boolean) (defaults to: nil)

    If phone number is collected from customer, set it to rue

  • allow_tax_id (Boolean) (defaults to: nil)

    If the customer is allowed to add tax id, set it to true

  • always_create_new_customer (Boolean) (defaults to: nil)

    Set to true if a new customer object should be created.

  • redirect_immediately (Boolean) (defaults to: nil)

    If true, redirects the customer immediately after payment completion

  • require_phone_number (Boolean) (defaults to: nil)

    If true, the customer must provide a phone number to complete checkout.



# File 'lib/dodopayments/models/checkout_session_flags.rb', line 116

Instance Attribute Details

#allow_currency_selectionBoolean?

if customer is allowed to change currency, set it to true

Default is true

Returns:

  • (Boolean, nil)


12
# File 'lib/dodopayments/models/checkout_session_flags.rb', line 12

optional :allow_currency_selection, Dodopayments::Internal::Type::Boolean

#allow_customer_editing_business_nameBoolean?

If true, the customer can supply or edit the business name associated with the tax id during checkout. Works independently of ‘allow_customer_editing_tax_id` —either flag (or `allow_tax_id`) is sufficient to let the customer override the session’s business name. Typically set together with ‘allow_customer_editing_tax_id`.

Default is false

Returns:

  • (Boolean, nil)


24
# File 'lib/dodopayments/models/checkout_session_flags.rb', line 24

optional :allow_customer_editing_business_name, Dodopayments::Internal::Type::Boolean

#allow_customer_editing_cityBoolean?

Returns:

  • (Boolean, nil)


29
# File 'lib/dodopayments/models/checkout_session_flags.rb', line 29

optional :allow_customer_editing_city, Dodopayments::Internal::Type::Boolean

#allow_customer_editing_countryBoolean?

Returns:

  • (Boolean, nil)


34
# File 'lib/dodopayments/models/checkout_session_flags.rb', line 34

optional :allow_customer_editing_country, Dodopayments::Internal::Type::Boolean

#allow_customer_editing_emailBoolean?

Returns:

  • (Boolean, nil)


39
# File 'lib/dodopayments/models/checkout_session_flags.rb', line 39

optional :allow_customer_editing_email, Dodopayments::Internal::Type::Boolean

#allow_customer_editing_nameBoolean?

Returns:

  • (Boolean, nil)


44
# File 'lib/dodopayments/models/checkout_session_flags.rb', line 44

optional :allow_customer_editing_name, Dodopayments::Internal::Type::Boolean

#allow_customer_editing_stateBoolean?

Returns:

  • (Boolean, nil)


49
# File 'lib/dodopayments/models/checkout_session_flags.rb', line 49

optional :allow_customer_editing_state, Dodopayments::Internal::Type::Boolean

#allow_customer_editing_streetBoolean?

Returns:

  • (Boolean, nil)


54
# File 'lib/dodopayments/models/checkout_session_flags.rb', line 54

optional :allow_customer_editing_street, Dodopayments::Internal::Type::Boolean

#allow_customer_editing_tax_idBoolean?

Returns:

  • (Boolean, nil)


59
# File 'lib/dodopayments/models/checkout_session_flags.rb', line 59

optional :allow_customer_editing_tax_id, Dodopayments::Internal::Type::Boolean

#allow_customer_editing_zipcodeBoolean?

Returns:

  • (Boolean, nil)


64
# File 'lib/dodopayments/models/checkout_session_flags.rb', line 64

optional :allow_customer_editing_zipcode, Dodopayments::Internal::Type::Boolean

#allow_discount_codeBoolean?

If the customer is allowed to apply discount code, set it to true.

Default is true

Returns:

  • (Boolean, nil)


72
# File 'lib/dodopayments/models/checkout_session_flags.rb', line 72

optional :allow_discount_code, Dodopayments::Internal::Type::Boolean

#allow_phone_number_collectionBoolean?

If phone number is collected from customer, set it to rue

Default is true

Returns:

  • (Boolean, nil)


80
# File 'lib/dodopayments/models/checkout_session_flags.rb', line 80

optional :allow_phone_number_collection, Dodopayments::Internal::Type::Boolean

#allow_tax_idBoolean?

If the customer is allowed to add tax id, set it to true

Default is true

Returns:

  • (Boolean, nil)


88
# File 'lib/dodopayments/models/checkout_session_flags.rb', line 88

optional :allow_tax_id, Dodopayments::Internal::Type::Boolean

#always_create_new_customerBoolean?

Set to true if a new customer object should be created. By default email is used to find an existing customer to attach the session to

Default is false

Returns:

  • (Boolean, nil)


97
# File 'lib/dodopayments/models/checkout_session_flags.rb', line 97

optional :always_create_new_customer, Dodopayments::Internal::Type::Boolean

#redirect_immediatelyBoolean?

If true, redirects the customer immediately after payment completion

Default is false

Returns:

  • (Boolean, nil)


105
# File 'lib/dodopayments/models/checkout_session_flags.rb', line 105

optional :redirect_immediately, Dodopayments::Internal::Type::Boolean

#require_phone_numberBoolean?

If true, the customer must provide a phone number to complete checkout. Requires ‘allow_phone_number_collection` to also be true.

Default is false

Returns:

  • (Boolean, nil)


114
# File 'lib/dodopayments/models/checkout_session_flags.rb', line 114

optional :require_phone_number, Dodopayments::Internal::Type::Boolean