Class: Telnyx::Models::AvailablePhoneNumberListParams::Filter

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

Defined Under Namespace

Modules: Feature, PhoneNumberType Classes: PhoneNumber

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(contains: nil, ends_with: nil, starts_with: nil) ⇒ Object

Some parameter documentations has been truncated, see PhoneNumber for more details.

Filter phone numbers by pattern matching.



28
29
30
31
32
33
34
35
36
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# File 'lib/telnyx/models/available_phone_number_list_params.rb', line 28

class Filter < Telnyx::Internal::Type::BaseModel
  # @!attribute administrative_area
  #   Find numbers in a particular US state or CA province.
  #
  #   @return [String, nil]
  optional :administrative_area, String

  # @!attribute best_effort
  #   Filter to determine if best effort results should be included. Only available in
  #   USA/CANADA.
  #
  #   @return [Boolean, nil]
  optional :best_effort, Telnyx::Internal::Type::Boolean

  # @!attribute country_code
  #   Filter phone numbers by country.
  #
  #   @return [String, nil]
  optional :country_code, String

  # @!attribute exclude_held_numbers
  #   Filter to exclude phone numbers that are currently on hold/reserved for your
  #   account.
  #
  #   @return [Boolean, nil]
  optional :exclude_held_numbers, Telnyx::Internal::Type::Boolean

  # @!attribute features
  #   Filter phone numbers with specific features.
  #
  #   @return [Array<Symbol, Telnyx::Models::AvailablePhoneNumberListParams::Filter::Feature>, nil]
  optional :features,
           -> { Telnyx::Internal::Type::ArrayOf[enum: Telnyx::AvailablePhoneNumberListParams::Filter::Feature] }

  # @!attribute limit
  #   Limits the number of results.
  #
  #   @return [Integer, nil]
  optional :limit, Integer

  # @!attribute locality
  #   Filter phone numbers by city.
  #
  #   @return [String, nil]
  optional :locality, String

  # @!attribute national_destination_code
  #   Filter by the national destination code of the number.
  #
  #   @return [String, nil]
  optional :national_destination_code, String

  # @!attribute phone_number
  #   Filter phone numbers by pattern matching.
  #
  #   @return [Telnyx::Models::AvailablePhoneNumberListParams::Filter::PhoneNumber, nil]
  optional :phone_number, -> { Telnyx::AvailablePhoneNumberListParams::Filter::PhoneNumber }

  # @!attribute phone_number_type
  #   Filter phone numbers by number type.
  #
  #   @return [Symbol, Telnyx::Models::AvailablePhoneNumberListParams::Filter::PhoneNumberType, nil]
  optional :phone_number_type, enum: -> { Telnyx::AvailablePhoneNumberListParams::Filter::PhoneNumberType }

  # @!attribute quickship
  #   Filter to exclude phone numbers that need additional time after to purchase to
  #   activate. Only applicable for +1 toll_free numbers.
  #
  #   @return [Boolean, nil]
  optional :quickship, Telnyx::Internal::Type::Boolean

  # @!attribute rate_center
  #   Filter phone numbers by rate center. This filter is only applicable to USA and
  #   Canada numbers.
  #
  #   @return [String, nil]
  optional :rate_center, String

  # @!attribute reservable
  #   Filter to ensure only numbers that can be reserved are included in the results.
  #
  #   @return [Boolean, nil]
  optional :reservable, Telnyx::Internal::Type::Boolean

  # @!method initialize(administrative_area: nil, best_effort: nil, country_code: nil, exclude_held_numbers: nil, features: nil, limit: nil, locality: nil, national_destination_code: nil, phone_number: nil, phone_number_type: nil, quickship: nil, rate_center: nil, reservable: nil)
  #   Some parameter documentations has been truncated, see
  #   {Telnyx::Models::AvailablePhoneNumberListParams::Filter} for more details.
  #
  #   Consolidated filter parameter (deepObject style). Originally:
  #   filter[phone_number], filter[locality], filter[administrative_area],
  #   filter[country_code], filter[national_destination_code], filter[rate_center],
  #   filter[phone_number_type], filter[features], filter[limit], filter[best_effort],
  #   filter[quickship], filter[reservable], filter[exclude_held_numbers]
  #
  #   @param administrative_area [String] Find numbers in a particular US state or CA province.
  #
  #   @param best_effort [Boolean] Filter to determine if best effort results should be included. Only available in
  #
  #   @param country_code [String] Filter phone numbers by country.
  #
  #   @param exclude_held_numbers [Boolean] Filter to exclude phone numbers that are currently on hold/reserved for your acc
  #
  #   @param features [Array<Symbol, Telnyx::Models::AvailablePhoneNumberListParams::Filter::Feature>] Filter phone numbers with specific features.
  #
  #   @param limit [Integer] Limits the number of results.
  #
  #   @param locality [String] Filter phone numbers by city.
  #
  #   @param national_destination_code [String] Filter by the national destination code of the number.
  #
  #   @param phone_number [Telnyx::Models::AvailablePhoneNumberListParams::Filter::PhoneNumber] Filter phone numbers by pattern matching.
  #
  #   @param phone_number_type [Symbol, Telnyx::Models::AvailablePhoneNumberListParams::Filter::PhoneNumberType] Filter phone numbers by number type.
  #
  #   @param quickship [Boolean] Filter to exclude phone numbers that need additional time after to purchase to a
  #
  #   @param rate_center [String] Filter phone numbers by rate center. This filter is only applicable to USA and C
  #
  #   @param reservable [Boolean] Filter to ensure only numbers that can be reserved are included in the results.

  module Feature
    extend Telnyx::Internal::Type::Enum

    SMS = :sms
    MMS = :mms
    VOICE = :voice
    FAX = :fax
    EMERGENCY = :emergency
    HD_VOICE = :hd_voice
    INTERNATIONAL_SMS = :international_sms
    LOCAL_CALLING = :local_calling

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

  # @see Telnyx::Models::AvailablePhoneNumberListParams::Filter#phone_number
  class PhoneNumber < Telnyx::Internal::Type::BaseModel
    # @!attribute contains
    #   Filter numbers containing a pattern (excludes NDC if used with
    #   `national_destination_code` filter).
    #
    #   @return [String, nil]
    optional :contains, String

    # @!attribute ends_with
    #   Filter numbers ending with a pattern (excludes NDC if used with
    #   `national_destination_code` filter).
    #
    #   @return [String, nil]
    optional :ends_with, String

    # @!attribute starts_with
    #   Filter numbers starting with a pattern (excludes NDC if used with
    #   `national_destination_code` filter).
    #
    #   @return [String, nil]
    optional :starts_with, String

    # @!method initialize(contains: nil, ends_with: nil, starts_with: nil)
    #   Some parameter documentations has been truncated, see
    #   {Telnyx::Models::AvailablePhoneNumberListParams::Filter::PhoneNumber} for more
    #   details.
    #
    #   Filter phone numbers by pattern matching.
    #
    #   @param contains [String] Filter numbers containing a pattern (excludes NDC if used with `national_destina
    #
    #   @param ends_with [String] Filter numbers ending with a pattern (excludes NDC if used with `national_destin
    #
    #   @param starts_with [String] Filter numbers starting with a pattern (excludes NDC if used with `national_dest
  end

  # Filter phone numbers by number type.
  #
  # @see Telnyx::Models::AvailablePhoneNumberListParams::Filter#phone_number_type
  module PhoneNumberType
    extend Telnyx::Internal::Type::Enum

    LOCAL = :local
    TOLL_FREE = :toll_free
    MOBILE = :mobile
    NATIONAL = :national
    SHARED_COST = :shared_cost

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

Instance Attribute Details

#administrative_areaString?

Find numbers in a particular US state or CA province.



33
# File 'lib/telnyx/models/available_phone_number_list_params.rb', line 33

optional :administrative_area, String

#best_effortBoolean?

Filter to determine if best effort results should be included. Only available in USA/CANADA.



40
# File 'lib/telnyx/models/available_phone_number_list_params.rb', line 40

optional :best_effort, Telnyx::Internal::Type::Boolean

#country_codeString?

Filter phone numbers by country.



46
# File 'lib/telnyx/models/available_phone_number_list_params.rb', line 46

optional :country_code, String

#exclude_held_numbersBoolean?

Filter to exclude phone numbers that are currently on hold/reserved for your account.



53
# File 'lib/telnyx/models/available_phone_number_list_params.rb', line 53

optional :exclude_held_numbers, Telnyx::Internal::Type::Boolean

#featuresArray<Symbol, Telnyx::Models::AvailablePhoneNumberListParams::Filter::Feature>?

Filter phone numbers with specific features.



59
60
# File 'lib/telnyx/models/available_phone_number_list_params.rb', line 59

optional :features,
-> { Telnyx::Internal::Type::ArrayOf[enum: Telnyx::AvailablePhoneNumberListParams::Filter::Feature] }

#limitInteger?

Limits the number of results.



66
# File 'lib/telnyx/models/available_phone_number_list_params.rb', line 66

optional :limit, Integer

#localityString?

Filter phone numbers by city.



72
# File 'lib/telnyx/models/available_phone_number_list_params.rb', line 72

optional :locality, String

#national_destination_codeString?

Filter by the national destination code of the number.



78
# File 'lib/telnyx/models/available_phone_number_list_params.rb', line 78

optional :national_destination_code, String

#phone_numberTelnyx::Models::AvailablePhoneNumberListParams::Filter::PhoneNumber?

Filter phone numbers by pattern matching.



84
# File 'lib/telnyx/models/available_phone_number_list_params.rb', line 84

optional :phone_number, -> { Telnyx::AvailablePhoneNumberListParams::Filter::PhoneNumber }

#phone_number_typeSymbol, ...

Filter phone numbers by number type.



90
# File 'lib/telnyx/models/available_phone_number_list_params.rb', line 90

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

#quickshipBoolean?

Filter to exclude phone numbers that need additional time after to purchase to activate. Only applicable for +1 toll_free numbers.



97
# File 'lib/telnyx/models/available_phone_number_list_params.rb', line 97

optional :quickship, Telnyx::Internal::Type::Boolean

#rate_centerString?

Filter phone numbers by rate center. This filter is only applicable to USA and Canada numbers.



104
# File 'lib/telnyx/models/available_phone_number_list_params.rb', line 104

optional :rate_center, String

#reservableBoolean?

Filter to ensure only numbers that can be reserved are included in the results.



110
# File 'lib/telnyx/models/available_phone_number_list_params.rb', line 110

optional :reservable, Telnyx::Internal::Type::Boolean

Class Method Details

.valuesArray<Symbol>



# File 'lib/telnyx/models/available_phone_number_list_params.rb', line 160


Instance Method Details

#to_hash{



119
# File 'sig/telnyx/models/available_phone_number_list_params.rbs', line 119

def to_hash: -> {