Class: Zavudev::Models::ContactCreateParams::Channel

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

Defined Under Namespace

Modules: Channel

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(channel:, identifier:, country_code: nil, is_primary: nil, label: nil) ⇒ Object

Input for creating a contact channel.

Parameters:

  • channel (Symbol, Zavudev::Models::ContactCreateParams::Channel::Channel)

    Channel type.

  • identifier (String)

    Channel identifier (phone number in E.164 format or email address).

  • country_code (String) (defaults to: nil)

    ISO country code for phone numbers.

  • is_primary (Boolean) (defaults to: nil)

    Whether this should be the primary channel for its type.

  • label (String) (defaults to: nil)

    Optional label for the channel.



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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
# File 'lib/zavudev/models/contact_create_params.rb', line 37

class Channel < Zavudev::Internal::Type::BaseModel
  # @!attribute channel
  #   Channel type.
  #
  #   @return [Symbol, Zavudev::Models::ContactCreateParams::Channel::Channel]
  required :channel, enum: -> { Zavudev::ContactCreateParams::Channel::Channel }

  # @!attribute identifier
  #   Channel identifier (phone number in E.164 format or email address).
  #
  #   @return [String]
  required :identifier, String

  # @!attribute country_code
  #   ISO country code for phone numbers.
  #
  #   @return [String, nil]
  optional :country_code, String, api_name: :countryCode

  # @!attribute is_primary
  #   Whether this should be the primary channel for its type.
  #
  #   @return [Boolean, nil]
  optional :is_primary, Zavudev::Internal::Type::Boolean, api_name: :isPrimary

  # @!attribute label
  #   Optional label for the channel.
  #
  #   @return [String, nil]
  optional :label, String

  # @!method initialize(channel:, identifier:, country_code: nil, is_primary: nil, label: nil)
  #   Input for creating a contact channel.
  #
  #   @param channel [Symbol, Zavudev::Models::ContactCreateParams::Channel::Channel] Channel type.
  #
  #   @param identifier [String] Channel identifier (phone number in E.164 format or email address).
  #
  #   @param country_code [String] ISO country code for phone numbers.
  #
  #   @param is_primary [Boolean] Whether this should be the primary channel for its type.
  #
  #   @param label [String] Optional label for the channel.

  # Channel type.
  #
  # @see Zavudev::Models::ContactCreateParams::Channel#channel
  module Channel
    extend Zavudev::Internal::Type::Enum

    SMS = :sms
    WHATSAPP = :whatsapp
    EMAIL = :email
    TELEGRAM = :telegram
    VOICE = :voice

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#channelSymbol, Zavudev::Models::ContactCreateParams::Channel::Channel

Channel type.



42
# File 'lib/zavudev/models/contact_create_params.rb', line 42

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

#country_codeString?

ISO country code for phone numbers.

Returns:

  • (String, nil)


54
# File 'lib/zavudev/models/contact_create_params.rb', line 54

optional :country_code, String, api_name: :countryCode

#identifierString

Channel identifier (phone number in E.164 format or email address).

Returns:

  • (String)


48
# File 'lib/zavudev/models/contact_create_params.rb', line 48

required :identifier, String

#is_primaryBoolean?

Whether this should be the primary channel for its type.

Returns:

  • (Boolean, nil)


60
# File 'lib/zavudev/models/contact_create_params.rb', line 60

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

#labelString?

Optional label for the channel.

Returns:

  • (String, nil)


66
# File 'lib/zavudev/models/contact_create_params.rb', line 66

optional :label, String