Class: Zavudev::Models::ContactChannel

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/zavudev/models/contact_channel.rb

Defined Under Namespace

Modules: Channel Classes: Metrics

Instance Attribute Summary collapse

Class Method 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:, channel:, created_at:, identifier:, is_primary:, verified:, country_code: nil, label: nil, last_inbound_at: nil, metadata: nil, metrics: nil, updated_at: nil) ⇒ Object

A communication channel for a contact.

Parameters:

  • id (String)
  • channel (Symbol, Zavudev::Models::ContactChannel::Channel)

    Channel type.

  • created_at (Time)
  • identifier (String)

    Channel identifier (phone number or email address).

  • is_primary (Boolean)

    Whether this is the primary channel for its type.

  • verified (Boolean)

    Whether this channel has been verified.

  • country_code (String) (defaults to: nil)

    ISO country code for phone numbers.

  • label (String) (defaults to: nil)

    Optional label for the channel.

  • last_inbound_at (Time) (defaults to: nil)

    Last time a message was received on this channel.

  • metadata (Hash{Symbol=>String}) (defaults to: nil)
  • metrics (Zavudev::Models::ContactChannel::Metrics) (defaults to: nil)

    Delivery metrics for this channel.

  • updated_at (Time) (defaults to: nil)


# File 'lib/zavudev/models/contact_channel.rb', line 74

Instance Attribute Details

#channelSymbol, Zavudev::Models::ContactChannel::Channel

Channel type.



15
# File 'lib/zavudev/models/contact_channel.rb', line 15

required :channel, enum: -> { Zavudev::ContactChannel::Channel }

#country_codeString?

ISO country code for phone numbers.

Returns:

  • (String, nil)


44
# File 'lib/zavudev/models/contact_channel.rb', line 44

optional :country_code, String, api_name: :countryCode

#created_atTime

Returns:

  • (Time)


20
# File 'lib/zavudev/models/contact_channel.rb', line 20

required :created_at, Time, api_name: :createdAt

#idString

Returns:

  • (String)


9
# File 'lib/zavudev/models/contact_channel.rb', line 9

required :id, String

#identifierString

Channel identifier (phone number or email address).

Returns:

  • (String)


26
# File 'lib/zavudev/models/contact_channel.rb', line 26

required :identifier, String

#is_primaryBoolean

Whether this is the primary channel for its type.

Returns:

  • (Boolean)


32
# File 'lib/zavudev/models/contact_channel.rb', line 32

required :is_primary, Zavudev::Internal::Type::Boolean, api_name: :isPrimary

#labelString?

Optional label for the channel.

Returns:

  • (String, nil)


50
# File 'lib/zavudev/models/contact_channel.rb', line 50

optional :label, String

#last_inbound_atTime?

Last time a message was received on this channel.

Returns:

  • (Time, nil)


56
# File 'lib/zavudev/models/contact_channel.rb', line 56

optional :last_inbound_at, Time, api_name: :lastInboundAt

#metadataHash{Symbol=>String}?

Returns:

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


61
# File 'lib/zavudev/models/contact_channel.rb', line 61

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

#metricsZavudev::Models::ContactChannel::Metrics?

Delivery metrics for this channel.



67
# File 'lib/zavudev/models/contact_channel.rb', line 67

optional :metrics, -> { Zavudev::ContactChannel::Metrics }

#updated_atTime?

Returns:

  • (Time, nil)


72
# File 'lib/zavudev/models/contact_channel.rb', line 72

optional :updated_at, Time, api_name: :updatedAt

#verifiedBoolean

Whether this channel has been verified.

Returns:

  • (Boolean)


38
# File 'lib/zavudev/models/contact_channel.rb', line 38

required :verified, Zavudev::Internal::Type::Boolean

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/zavudev/models/contact_channel.rb', line 113