Class: SurgeAPI::Models::Contact

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/surge_api/models/contact.rb

Overview

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:, phone_number:, email: nil, first_name: nil, last_name: nil, metadata: nil) ⇒ Object

A contact who has consented to receive messages

Parameters:

  • id (String)

    Unique identifier for the object.

  • phone_number (String)

    The contact’s phone number in E.164 format.

  • email (String) (defaults to: nil)

    The contact’s email address.

  • first_name (String) (defaults to: nil)

    The contact’s first name.

  • last_name (String) (defaults to: nil)

    The contact’s last name.

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

    Set of key-value pairs that will be stored with the object.



# File 'lib/surge_api/models/contact.rb', line 43

Instance Attribute Details

#emailString?

The contact’s email address.

Returns:

  • (String, nil)


23
# File 'lib/surge_api/models/contact.rb', line 23

optional :email, String

#first_nameString?

The contact’s first name.

Returns:

  • (String, nil)


29
# File 'lib/surge_api/models/contact.rb', line 29

optional :first_name, String

#idString

Unique identifier for the object.

Returns:

  • (String)


11
# File 'lib/surge_api/models/contact.rb', line 11

required :id, String

#last_nameString?

The contact’s last name.

Returns:

  • (String, nil)


35
# File 'lib/surge_api/models/contact.rb', line 35

optional :last_name, String

#metadataHash{Symbol=>String}?

Set of key-value pairs that will be stored with the object.

Returns:

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


41
# File 'lib/surge_api/models/contact.rb', line 41

optional :metadata, SurgeAPI::Internal::Type::HashOf[String]

#phone_numberString

The contact’s phone number in E.164 format.

Returns:

  • (String)


17
# File 'lib/surge_api/models/contact.rb', line 17

required :phone_number, String