Class: Telnyx::Models::RequirementListParams::Filter

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

Defined Under Namespace

Modules: Action, PhoneNumberType

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(action: nil, country_code: nil, phone_number_type: nil) ⇒ Object

Some parameter documentations has been truncated, see Telnyx::Models::RequirementListParams::Filter for more details.

Consolidated filter parameter for requirements (deepObject style). Originally: filter, filter, filter

Parameters:



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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/telnyx/models/requirement_list_params.rb', line 57

class Filter < Telnyx::Internal::Type::BaseModel
  # @!attribute action
  #   Filters requirements to those applying to a specific action.
  #
  #   @return [Symbol, Telnyx::Models::RequirementListParams::Filter::Action, nil]
  optional :action, enum: -> { Telnyx::RequirementListParams::Filter::Action }

  # @!attribute country_code
  #   Filters results to those applying to a 2-character (ISO 3166-1 alpha-2) country
  #   code
  #
  #   @return [String, nil]
  optional :country_code, String

  # @!attribute phone_number_type
  #   Filters results to those applying to a specific phone_number_type
  #
  #   @return [Symbol, Telnyx::Models::RequirementListParams::Filter::PhoneNumberType, nil]
  optional :phone_number_type, enum: -> { Telnyx::RequirementListParams::Filter::PhoneNumberType }

  # @!method initialize(action: nil, country_code: nil, phone_number_type: nil)
  #   Some parameter documentations has been truncated, see
  #   {Telnyx::Models::RequirementListParams::Filter} for more details.
  #
  #   Consolidated filter parameter for requirements (deepObject style). Originally:
  #   filter[country_code], filter[phone_number_type], filter[action]
  #
  #   @param action [Symbol, Telnyx::Models::RequirementListParams::Filter::Action] Filters requirements to those applying to a specific action.
  #
  #   @param country_code [String] Filters results to those applying to a 2-character (ISO 3166-1 alpha-2) country
  #
  #   @param phone_number_type [Symbol, Telnyx::Models::RequirementListParams::Filter::PhoneNumberType] Filters results to those applying to a specific phone_number_type

  # Filters requirements to those applying to a specific action.
  #
  # @see Telnyx::Models::RequirementListParams::Filter#action
  module Action
    extend Telnyx::Internal::Type::Enum

    BRANDED_CALLING = :branded_calling
    ORDERING = :ordering
    PORTING = :porting

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

  # Filters results to those applying to a specific phone_number_type
  #
  # @see Telnyx::Models::RequirementListParams::Filter#phone_number_type
  module PhoneNumberType
    extend Telnyx::Internal::Type::Enum

    LOCAL = :local
    NATIONAL = :national
    TOLL_FREE = :toll_free

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

Instance Attribute Details

#actionSymbol, ...

Filters requirements to those applying to a specific action.



62
# File 'lib/telnyx/models/requirement_list_params.rb', line 62

optional :action, enum: -> { Telnyx::RequirementListParams::Filter::Action }

#country_codeString?

Filters results to those applying to a 2-character (ISO 3166-1 alpha-2) country code

Parameters:

  • (String)

Returns:

  • (String, nil)


69
# File 'lib/telnyx/models/requirement_list_params.rb', line 69

optional :country_code, String

#phone_number_typeSymbol, ...

Filters results to those applying to a specific phone_number_type



75
# File 'lib/telnyx/models/requirement_list_params.rb', line 75

optional :phone_number_type, enum: -> { Telnyx::RequirementListParams::Filter::PhoneNumberType }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/telnyx/models/requirement_list_params.rb', line 100


Instance Method Details

#to_hash{

Returns:

  • ({)


89
# File 'sig/telnyx/models/requirement_list_params.rbs', line 89

def to_hash: -> {