Class: Dodopayments::Models::Customer

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

Overview

See Also:

  • Dodopayments::Resources::Customers#create

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(business_id:, created_at:, customer_id:, email:, name:, blocked_at: nil, blocklist_entry_id: nil, metadata: nil, phone_number: nil) ⇒ Object

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

Parameters:

  • business_id (String)
  • created_at (Time)
  • customer_id (String)
  • email (String)
  • name (String)
  • blocked_at (Time, nil) (defaults to: nil)

    When the merchant blocked this customer. The dashboard shows the

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

    Blocklist entry behind blocked_at, so the dashboard can link to it.

  • metadata (Hash{Symbol=>String, Float, Boolean}) (defaults to: nil)

    Additional metadata for the customer

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


# File 'lib/dodopayments/models/customer.rb', line 57

Instance Attribute Details

#blocked_atTime?

When the merchant blocked this customer. The dashboard shows the "Blocked" badge and the unblock action from it. The list route leaves it empty; only the single-customer route resolves it.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


38
# File 'lib/dodopayments/models/customer.rb', line 38

optional :blocked_at, Time, nil?: true

#blocklist_entry_idString?

Blocklist entry behind blocked_at, so the dashboard can link to it.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :blocklist_entry_id, String, nil?: true

#business_idString

Parameters:

  • value (String)

Returns:

  • (String)


10
# File 'lib/dodopayments/models/customer.rb', line 10

required :business_id, String

#created_atTime

Parameters:

  • value (Time)

Returns:

  • (Time)


15
# File 'lib/dodopayments/models/customer.rb', line 15

required :created_at, Time

#customer_idString

Parameters:

  • value (String)

Returns:

  • (String)


20
# File 'lib/dodopayments/models/customer.rb', line 20

required :customer_id, String

#emailString

Parameters:

  • value (String)

Returns:

  • (String)


25
# File 'lib/dodopayments/models/customer.rb', line 25

required :email, String

#metadataHash{Symbol=>String, Float, Boolean}?

Additional metadata for the customer

Returns:

  • (Hash{Symbol=>String, Float, Boolean}, nil)


50
# File 'lib/dodopayments/models/customer.rb', line 50

optional :metadata, -> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] }

#nameString

Parameters:

  • value (String)

Returns:

  • (String)


30
# File 'lib/dodopayments/models/customer.rb', line 30

required :name, String

#phone_numberString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


55
# File 'lib/dodopayments/models/customer.rb', line 55

optional :phone_number, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


51
# File 'sig/dodopayments/models/customer.rbs', line 51

def to_hash: -> {