Class: Straddle::Models::CustomerDetails

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/straddle/models/customer_details.rb,
sig/straddle/models/customer_details.rbs

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(id:, customer_type:, email:, name:, phone:) ⇒ Object

Information about the customer associated with the charge or payout.

Parameters:

  • id (String) —

    Unique identifier for the customer.

  • customer_type (Symbol, Straddle::Models::CustomerType) —

    Whether the customer is an individual or a business.

  • email (String) —

    Customer's email address.

  • name (String) —

    Customer's full name or business name.

  • phone (String) —

    Customer's phone number in E.164 format.



# File 'lib/straddle/models/customer_details.rb', line 36

Instance Attribute Details

#customer_type ⇒ Symbol, Straddle::Models::CustomerType

Whether the customer is an individual or a business.

Parameters:

  • value (Straddle::Models::customer_type)

Returns:



16
# File 'lib/straddle/models/customer_details.rb', line 16

required :customer_type, enum: -> { Straddle::CustomerType }

#email ⇒ String

Customer's email address.

Parameters:

  • value (String)

Returns:

  • (String)


22
# File 'lib/straddle/models/customer_details.rb', line 22

required :email, String

#id ⇒ String

Unique identifier for the customer.

Parameters:

  • value (String)

Returns:

  • (String)


10
# File 'lib/straddle/models/customer_details.rb', line 10

required :id, String

#name ⇒ String

Customer's full name or business name.

Parameters:

  • value (String)

Returns:

  • (String)


28
# File 'lib/straddle/models/customer_details.rb', line 28

required :name, String

#phone ⇒ String

Customer's phone number in E.164 format.

Parameters:

  • value (String)

Returns:

  • (String)


34
# File 'lib/straddle/models/customer_details.rb', line 34

required :phone, String

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


31
# File 'sig/straddle/models/customer_details.rbs', line 31

def to_hash: -> {