Class: Telnyx::Models::DirAPI::CallReason

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

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(created_at: nil, reason: nil) ⇒ CallReason

Returns a new instance of CallReason.

Parameters:

  • created_at (Time) (defaults to: nil)
  • reason (String) (defaults to: nil)
  • created_at: (Time) (defaults to: nil)
  • reason: (String) (defaults to: nil)


171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/telnyx/models/dir.rb', line 171

class CallReason < Telnyx::Internal::Type::BaseModel
  # @!attribute reason
  #
  #   @return [String, nil]
  optional :reason, String

  response_only do
    # @!attribute created_at
    #
    #   @return [Time, nil]
    optional :created_at, Time
  end

  # @!method initialize(created_at: nil, reason: nil)
  #   @param created_at [Time]
  #   @param reason [String]
end

Instance Attribute Details

#created_atTime? (readonly)

Returns the value of attribute created_at.

Returns:

  • (Time, nil)


145
146
147
# File 'sig/telnyx/models/dir.rbs', line 145

def created_at
  @created_at
end

#reasonString?

Parameters:

  • (String)

Returns:

  • (String, nil)


175
# File 'lib/telnyx/models/dir.rb', line 175

optional :reason, String

Instance Method Details

#created_at=Time (readonly)

Parameters:

  • (Time)

Returns:

  • (Time)


147
# File 'sig/telnyx/models/dir.rbs', line 147

def created_at=: (Time) -> Time

#to_hash{ created_at: Time, reason: String }

Returns:

  • ({ created_at: Time, reason: String })


151
# File 'sig/telnyx/models/dir.rbs', line 151

def to_hash: -> { created_at: Time, reason: String }