Class: Dodopayments::Models::CreateNewCustomer

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/create_new_customer.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(email: , name: , create_new_customer: nil, phone_number: nil) ⇒ Object

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

Parameters:

  • email (String) (defaults to: )
  • name (String) (defaults to: )
  • create_new_customer (Boolean) (defaults to: nil)

    When false, the most recently created customer object with the given email is us

  • phone_number (String, nil) (defaults to: nil)


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

Instance Attribute Details

#create_new_customerBoolean?

When false, the most recently created customer object with the given email is used if exists. When true, a new customer object is always created False by default

Returns:

  • (Boolean, nil)


22
# File 'lib/dodopayments/models/create_new_customer.rb', line 22

optional :create_new_customer, Dodopayments::Internal::Type::Boolean

#emailString

Returns:

  • (String)


9
# File 'lib/dodopayments/models/create_new_customer.rb', line 9

required :email, String

#nameString

Returns:

  • (String)


14
# File 'lib/dodopayments/models/create_new_customer.rb', line 14

required :name, String

#phone_numberString?

Returns:

  • (String, nil)


27
# File 'lib/dodopayments/models/create_new_customer.rb', line 27

optional :phone_number, String, nil?: true