Class: Straddle::Models::BusinessCustomerRepresentative

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/straddle/models/business_customer_representative.rb,
sig/straddle/models/business_customer_representative.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(name:, email: nil, phone: nil) ⇒ BusinessCustomerRepresentative

Returns a new instance of BusinessCustomerRepresentative.

Parameters:

  • name (String) —

    Full name of the representative.

  • email (String, nil) (defaults to: nil) —

    Email address of the representative.

  • phone (String, nil) (defaults to: nil) —

    Phone number of the representative.

  • name: (String)
  • email: (String, nil) (defaults to: nil)
  • phone: (String, nil) (defaults to: nil)


# File 'lib/straddle/models/business_customer_representative.rb', line 24

Instance Attribute Details

#email ⇒ String?

Email address of the representative.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :email, String, nil?: true

#name ⇒ String

Full name of the representative.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :name, String

#phone ⇒ String?

Phone number of the representative.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :phone, String, nil?: true

Instance Method Details

#to_hash ⇒ { name: String, email: String?, phone: String? }

Returns:

  • ({ name: String, email: String?, phone: String? })


15
# File 'sig/straddle/models/business_customer_representative.rbs', line 15

def to_hash: -> { name: String, email: String?, phone: String? }