Class: Sentdm::Models::ContactResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/sentdm/models/contact_response.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(id: nil, available_channels: nil, channel_consent: nil, country_code: nil, created_at: nil, default_channel: nil, format_e164: nil, format_international: nil, format_national: nil, format_rfc: nil, is_inherited: nil, opt_out: nil, phone_number: nil, region_code: nil, updated_at: nil) ⇒ Object

Some parameter documentations has been truncated, see Sentdm::Models::ContactResponse for more details.

Contact response for v3 API Uses snake_case for JSON property names

Parameters:

  • id (String) (defaults to: nil)

    Unique identifier for the contact

  • available_channels (String) (defaults to: nil)

    Comma-separated list of available messaging channels (e.g., “sms,whatsapp”)

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

    Consent status by channel. Keys: “sms”, “whatsapp”. Values: “opted_in”, “opted_o

  • country_code (String) (defaults to: nil)

    Country calling code (e.g., 1 for US/Canada)

  • created_at (Time) (defaults to: nil)

    When the contact was created

  • default_channel (String) (defaults to: nil)

    Default messaging channel to use (e.g., “sms” or “whatsapp”)

  • format_e164 (String) (defaults to: nil)

    Phone number in E.164 format (e.g., +1234567890)

  • format_international (String) (defaults to: nil)

    Phone number in international format (e.g., +1 234-567-890)

  • format_national (String) (defaults to: nil)

    Phone number in national format (e.g., (234) 567-890)

  • format_rfc (String) (defaults to: nil)

    Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)

  • is_inherited (Boolean) (defaults to: nil)

    Whether this is an inherited contact (read-only)

  • opt_out (Boolean) (defaults to: nil)

    Whether the contact has opted out of messaging

  • phone_number (String) (defaults to: nil)

    Phone number in original format

  • region_code (String) (defaults to: nil)

    ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)

  • updated_at (Time, nil) (defaults to: nil)

    When the contact was last updated



# File 'lib/sentdm/models/contact_response.rb', line 99

Instance Attribute Details

#available_channelsString?

Comma-separated list of available messaging channels (e.g., “sms,whatsapp”)

Returns:

  • (String, nil)


16
# File 'lib/sentdm/models/contact_response.rb', line 16

optional :available_channels, String

Consent status by channel. Keys: “sms”, “whatsapp”. Values: “opted_in”, “opted_out”. All channels will have the same status because consent is global across channels. A STOP on any channel opts out of all channels; a START opts in to all.

Returns:

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


25
# File 'lib/sentdm/models/contact_response.rb', line 25

optional :channel_consent, Sentdm::Internal::Type::HashOf[String], nil?: true

#country_codeString?

Country calling code (e.g., 1 for US/Canada)

Returns:

  • (String, nil)


31
# File 'lib/sentdm/models/contact_response.rb', line 31

optional :country_code, String

#created_atTime?

When the contact was created

Returns:

  • (Time, nil)


37
# File 'lib/sentdm/models/contact_response.rb', line 37

optional :created_at, Time

#default_channelString?

Default messaging channel to use (e.g., “sms” or “whatsapp”)

Returns:

  • (String, nil)


43
# File 'lib/sentdm/models/contact_response.rb', line 43

optional :default_channel, String

#format_e164String?

Phone number in E.164 format (e.g., +1234567890)

Returns:

  • (String, nil)


49
# File 'lib/sentdm/models/contact_response.rb', line 49

optional :format_e164, String

#format_internationalString?

Phone number in international format (e.g., +1 234-567-890)

Returns:

  • (String, nil)


55
# File 'lib/sentdm/models/contact_response.rb', line 55

optional :format_international, String

#format_nationalString?

Phone number in national format (e.g., (234) 567-890)

Returns:

  • (String, nil)


61
# File 'lib/sentdm/models/contact_response.rb', line 61

optional :format_national, String

#format_rfcString?

Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)

Returns:

  • (String, nil)


67
# File 'lib/sentdm/models/contact_response.rb', line 67

optional :format_rfc, String

#idString?

Unique identifier for the contact

Returns:

  • (String, nil)


10
# File 'lib/sentdm/models/contact_response.rb', line 10

optional :id, String

#is_inheritedBoolean?

Whether this is an inherited contact (read-only)

Returns:

  • (Boolean, nil)


73
# File 'lib/sentdm/models/contact_response.rb', line 73

optional :is_inherited, Sentdm::Internal::Type::Boolean

#opt_outBoolean?

Whether the contact has opted out of messaging

Returns:

  • (Boolean, nil)


79
# File 'lib/sentdm/models/contact_response.rb', line 79

optional :opt_out, Sentdm::Internal::Type::Boolean

#phone_numberString?

Phone number in original format

Returns:

  • (String, nil)


85
# File 'lib/sentdm/models/contact_response.rb', line 85

optional :phone_number, String

#region_codeString?

ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)

Returns:

  • (String, nil)


91
# File 'lib/sentdm/models/contact_response.rb', line 91

optional :region_code, String

#updated_atTime?

When the contact was last updated

Returns:

  • (Time, nil)


97
# File 'lib/sentdm/models/contact_response.rb', line 97

optional :updated_at, Time, nil?: true