Class: Telnyx::Models::ShortCode

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

Defined Under Namespace

Modules: RecordType

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(messaging_profile_id:, id: nil, country_code: nil, created_at: nil, record_type: nil, short_code: nil, tags: nil, updated_at: nil) ⇒ Object

Parameters:

  • messaging_profile_id (String, nil)

    Unique identifier for a messaging profile.

  • id (String) (defaults to: nil)

    Identifies the type of resource.

  • country_code (String) (defaults to: nil)

    ISO 3166-1 alpha-2 country code.

  • created_at (Time) (defaults to: nil)

    ISO 8601 formatted date indicating when the resource was created.

  • record_type (Symbol, Telnyx::Models::ShortCode::RecordType) (defaults to: nil)

    Identifies the type of the resource.

  • short_code (String) (defaults to: nil)

    Short digit sequence used to address messages.

  • tags (Array<String>) (defaults to: nil)
  • updated_at (Time) (defaults to: nil)

    ISO 8601 formatted date indicating when the resource was updated.



# File 'lib/telnyx/models/short_code.rb', line 55

Instance Attribute Details

#country_codeString? (readonly)

Returns the value of attribute country_code.

Returns:

  • (String, nil)


26
27
28
# File 'sig/telnyx/models/short_code.rbs', line 26

def country_code
  @country_code
end

#created_atTime? (readonly)

Returns the value of attribute created_at.

Returns:

  • (Time, nil)


30
31
32
# File 'sig/telnyx/models/short_code.rbs', line 30

def created_at
  @created_at
end

#idString? (readonly)

Returns the value of attribute id.

Returns:

  • (String, nil)


22
23
24
# File 'sig/telnyx/models/short_code.rbs', line 22

def id
  @id
end

#messaging_profile_idString?

Unique identifier for a messaging profile.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


10
# File 'lib/telnyx/models/short_code.rb', line 10

required :messaging_profile_id, String, nil?: true

#record_typeTelnyx::Models::ShortCode::record_type? (readonly)

Returns the value of attribute record_type.

Returns:

  • (Telnyx::Models::ShortCode::record_type, nil)


34
35
36
# File 'sig/telnyx/models/short_code.rbs', line 34

def record_type
  @record_type
end

#short_codeString? (readonly)

Returns the value of attribute short_code.

Returns:

  • (String, nil)


40
41
42
# File 'sig/telnyx/models/short_code.rbs', line 40

def short_code
  @short_code
end

#tagsArray<String>?

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


15
# File 'lib/telnyx/models/short_code.rb', line 15

optional :tags, Telnyx::Internal::Type::ArrayOf[String]

#updated_atTime? (readonly)

Returns the value of attribute updated_at.

Returns:

  • (Time, nil)


44
45
46
# File 'sig/telnyx/models/short_code.rbs', line 44

def updated_at
  @updated_at
end

Instance Method Details

#country_code=String (readonly)

Parameters:

  • (String)

Returns:

  • (String)


28
# File 'sig/telnyx/models/short_code.rbs', line 28

def country_code=: (String) -> String

#created_at=Time (readonly)

Parameters:

  • (Time)

Returns:

  • (Time)


32
# File 'sig/telnyx/models/short_code.rbs', line 32

def created_at=: (Time) -> Time

#id=String (readonly)

Parameters:

  • (String)

Returns:

  • (String)


24
# File 'sig/telnyx/models/short_code.rbs', line 24

def id=: (String) -> String

#record_type=Object (readonly)



36
# File 'sig/telnyx/models/short_code.rbs', line 36

def record_type=: (

#short_code=String (readonly)

Parameters:

  • (String)

Returns:

  • (String)


42
# File 'sig/telnyx/models/short_code.rbs', line 42

def short_code=: (String) -> String

#to_hash{

Returns:

  • ({)


59
# File 'sig/telnyx/models/short_code.rbs', line 59

def to_hash: -> {

#updated_at=Time (readonly)

Parameters:

  • (Time)

Returns:

  • (Time)


46
# File 'sig/telnyx/models/short_code.rbs', line 46

def updated_at=: (Time) -> Time