Class: Sentdm::Models::ContactListResponse::Data::Contact

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/sentdm/models/contact_list_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(contacts: nil, pagination: nil) ⇒ Object

Paginated list of contacts response

Parameters:



64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# File 'lib/sentdm/models/contact_list_response.rb', line 64

class Contact < Sentdm::Internal::Type::BaseModel
  # @!attribute id
  #   Unique identifier for the contact
  #
  #   @return [String, nil]
  optional :id, String

  # @!attribute available_channels
  #   Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
  #
  #   @return [String, nil]
  optional :available_channels, String

  # @!attribute country_code
  #   Country calling code (e.g., 1 for US/Canada)
  #
  #   @return [String, nil]
  optional :country_code, String

  # @!attribute created_at
  #   When the contact was created
  #
  #   @return [Time, nil]
  optional :created_at, Time

  # @!attribute default_channel
  #   Default messaging channel to use (e.g., "sms" or "whatsapp")
  #
  #   @return [String, nil]
  optional :default_channel, String

  # @!attribute format_e164
  #   Phone number in E.164 format (e.g., +1234567890)
  #
  #   @return [String, nil]
  optional :format_e164, String

  # @!attribute format_international
  #   Phone number in international format (e.g., +1 234-567-890)
  #
  #   @return [String, nil]
  optional :format_international, String

  # @!attribute format_national
  #   Phone number in national format (e.g., (234) 567-890)
  #
  #   @return [String, nil]
  optional :format_national, String

  # @!attribute format_rfc
  #   Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
  #
  #   @return [String, nil]
  optional :format_rfc, String

  # @!attribute is_inherited
  #   Whether this is an inherited contact (read-only)
  #
  #   @return [Boolean, nil]
  optional :is_inherited, Sentdm::Internal::Type::Boolean

  # @!attribute opt_out
  #   Whether the contact has opted out of messaging. Single source of truth — opt-out
  #   is per-contact, not per-channel.
  #
  #   @return [Boolean, nil]
  optional :opt_out, Sentdm::Internal::Type::Boolean

  # @!attribute phone_number
  #   Phone number in original format
  #
  #   @return [String, nil]
  optional :phone_number, String

  # @!attribute region_code
  #   ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
  #
  #   @return [String, nil]
  optional :region_code, String

  # @!attribute updated_at
  #   When the contact was last updated
  #
  #   @return [Time, nil]
  optional :updated_at, Time, nil?: true

  # @!method initialize(id: nil, available_channels: 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)
  #   Some parameter documentations has been truncated, see
  #   {Sentdm::Models::ContactListResponse::Data::Contact} for more details.
  #
  #   Contact response for v3 API Uses snake_case for JSON property names
  #
  #   @param id [String] Unique identifier for the contact
  #
  #   @param available_channels [String] Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
  #
  #   @param country_code [String] Country calling code (e.g., 1 for US/Canada)
  #
  #   @param created_at [Time] When the contact was created
  #
  #   @param default_channel [String] Default messaging channel to use (e.g., "sms" or "whatsapp")
  #
  #   @param format_e164 [String] Phone number in E.164 format (e.g., +1234567890)
  #
  #   @param format_international [String] Phone number in international format (e.g., +1 234-567-890)
  #
  #   @param format_national [String] Phone number in national format (e.g., (234) 567-890)
  #
  #   @param format_rfc [String] Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
  #
  #   @param is_inherited [Boolean] Whether this is an inherited contact (read-only)
  #
  #   @param opt_out [Boolean] Whether the contact has opted out of messaging. Single source of truth — opt-out
  #
  #   @param phone_number [String] Phone number in original format
  #
  #   @param region_code [String] ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
  #
  #   @param updated_at [Time, nil] When the contact was last updated
end

Instance Attribute Details

#available_channelsString?

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

Returns:

  • (String, nil)


75
# File 'lib/sentdm/models/contact_list_response.rb', line 75

optional :available_channels, String

#country_codeString?

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

Returns:

  • (String, nil)


81
# File 'lib/sentdm/models/contact_list_response.rb', line 81

optional :country_code, String

#created_atTime?

When the contact was created

Returns:

  • (Time, nil)


87
# File 'lib/sentdm/models/contact_list_response.rb', line 87

optional :created_at, Time

#default_channelString?

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

Returns:

  • (String, nil)


93
# File 'lib/sentdm/models/contact_list_response.rb', line 93

optional :default_channel, String

#format_e164String?

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

Returns:

  • (String, nil)


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

optional :format_e164, String

#format_internationalString?

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

Returns:

  • (String, nil)


105
# File 'lib/sentdm/models/contact_list_response.rb', line 105

optional :format_international, String

#format_nationalString?

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

Returns:

  • (String, nil)


111
# File 'lib/sentdm/models/contact_list_response.rb', line 111

optional :format_national, String

#format_rfcString?

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

Returns:

  • (String, nil)


117
# File 'lib/sentdm/models/contact_list_response.rb', line 117

optional :format_rfc, String

#idString?

Unique identifier for the contact

Returns:

  • (String, nil)


69
# File 'lib/sentdm/models/contact_list_response.rb', line 69

optional :id, String

#is_inheritedBoolean?

Whether this is an inherited contact (read-only)

Returns:

  • (Boolean, nil)


123
# File 'lib/sentdm/models/contact_list_response.rb', line 123

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

#opt_outBoolean?

Whether the contact has opted out of messaging. Single source of truth — opt-out is per-contact, not per-channel.

Returns:

  • (Boolean, nil)


130
# File 'lib/sentdm/models/contact_list_response.rb', line 130

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

#phone_numberString?

Phone number in original format

Returns:

  • (String, nil)


136
# File 'lib/sentdm/models/contact_list_response.rb', line 136

optional :phone_number, String

#region_codeString?

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

Returns:

  • (String, nil)


142
# File 'lib/sentdm/models/contact_list_response.rb', line 142

optional :region_code, String

#updated_atTime?

When the contact was last updated

Returns:

  • (Time, nil)


148
# File 'lib/sentdm/models/contact_list_response.rb', line 148

optional :updated_at, Time, nil?: true