Class: Telnyx::Models::CallAnswered::Payload::SipHeader

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/telnyx/models/call_answered.rb,
sig/telnyx/models/call_answered.rbs

Defined Under Namespace

Modules: Name

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(name:, value:) ⇒ Object

Parameters:



162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# File 'lib/telnyx/models/call_answered.rb', line 162

class SipHeader < Telnyx::Internal::Type::BaseModel
  # @!attribute name
  #   The name of the header received from the SIP INVITE.
  #
  #   @return [Symbol, Telnyx::Models::CallAnswered::Payload::SipHeader::Name]
  required :name, enum: -> { Telnyx::CallAnswered::Payload::SipHeader::Name }

  # @!attribute value
  #   The value of the header.
  #
  #   @return [String]
  required :value, String

  # @!method initialize(name:, value:)
  #   @param name [Symbol, Telnyx::Models::CallAnswered::Payload::SipHeader::Name] The name of the header received from the SIP INVITE.
  #
  #   @param value [String] The value of the header.

  # The name of the header received from the SIP INVITE.
  #
  # @see Telnyx::Models::CallAnswered::Payload::SipHeader#name
  module Name
    extend Telnyx::Internal::Type::Enum

    USER_TO_USER = :"User-to-User"
    DIVERSION = :Diversion

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

Instance Attribute Details

#nameSymbol, Telnyx::Models::CallAnswered::Payload::SipHeader::Name

The name of the header received from the SIP INVITE.

Parameters:

  • value (Telnyx::Models::CallAnswered::Payload::SipHeader::name_)

Returns:



167
# File 'lib/telnyx/models/call_answered.rb', line 167

required :name, enum: -> { Telnyx::CallAnswered::Payload::SipHeader::Name }

#valueString

The value of the header.

Parameters:

  • value (String)

Returns:

  • (String)


173
# File 'lib/telnyx/models/call_answered.rb', line 173

required :value, String

Instance Method Details

#to_hash{

Returns:

  • ({)


182
# File 'sig/telnyx/models/call_answered.rbs', line 182

def to_hash: -> {