Class: Telnyx::Models::PhoneNumberSlimListParams::Filter

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

Defined Under Namespace

Modules: CountryISOAlpha2, Source, Status, VoiceUsagePaymentMethod Classes: NumberType, VoiceConnectionName

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, eq: nil, starts_with: nil) ⇒ Object

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

Filter by voice connection name pattern matching (requires include_connection param).

Parameters:

  • (defaults to: nil)

    Filter contains connection name. Requires at least three characters and the incl

  • (defaults to: nil)

    Filter ends with connection name. Requires at least three characters and the inc

  • (defaults to: nil)

    Filter by connection name.

  • (defaults to: nil)

    Filter starts with connection name. Requires at least three characters and the i



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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
# File 'lib/telnyx/models/phone_number_slim_list_params.rb', line 68

class Filter < Telnyx::Internal::Type::BaseModel
  # @!attribute billing_group_id
  #   Filter by the billing_group_id associated with phone numbers. To filter to only
  #   phone numbers that have no billing group associated them, set the value of this
  #   filter to the string 'null'.
  #
  #   @return [String, nil]
  optional :billing_group_id, String

  # @!attribute connection_id
  #   Filter by connection_id.
  #
  #   @return [String, nil]
  optional :connection_id, String

  # @!attribute country_iso_alpha2
  #   Filter by phone number country ISO alpha-2 code. Can be a single value or an
  #   array of values.
  #
  #   @return [String, Array<String>, nil]
  optional :country_iso_alpha2, union: -> { Telnyx::PhoneNumberSlimListParams::Filter::CountryISOAlpha2 }

  # @!attribute customer_reference
  #   Filter numbers via the customer_reference set.
  #
  #   @return [String, nil]
  optional :customer_reference, String

  # @!attribute emergency_address_id
  #   Filter by the emergency_address_id associated with phone numbers. To filter only
  #   phone numbers that have no emergency address associated with them, set the value
  #   of this filter to the string 'null'.
  #
  #   @return [String, nil]
  optional :emergency_address_id, String

  # @!attribute number_type
  #   Filter phone numbers by phone number type.
  #
  #   @return [Telnyx::Models::PhoneNumberSlimListParams::Filter::NumberType, nil]
  optional :number_type, -> { Telnyx::PhoneNumberSlimListParams::Filter::NumberType }

  # @!attribute phone_number
  #   Filter by phone number. Requires at least three digits. Non-numerical characters
  #   will result in no values being returned.
  #
  #   @return [String, nil]
  optional :phone_number, String

  # @!attribute source
  #   Filter phone numbers by their source. Use 'ported' for numbers ported from other
  #   carriers, or 'purchased' for numbers bought directly from Telnyx.
  #
  #   @return [Symbol, Telnyx::Models::PhoneNumberSlimListParams::Filter::Source, nil]
  optional :source, enum: -> { Telnyx::PhoneNumberSlimListParams::Filter::Source }

  # @!attribute status
  #   Filter by phone number status.
  #
  #   @return [Symbol, Telnyx::Models::PhoneNumberSlimListParams::Filter::Status, nil]
  optional :status, enum: -> { Telnyx::PhoneNumberSlimListParams::Filter::Status }

  # @!attribute tag
  #   Filter by phone number tags. (This requires the include_tags param)
  #
  #   @return [String, nil]
  optional :tag, String

  # @!attribute voice_connection_name
  #   Filter by voice connection name pattern matching (requires include_connection
  #   param).
  #
  #   @return [Telnyx::Models::PhoneNumberSlimListParams::Filter::VoiceConnectionName, nil]
  optional :voice_connection_name,
           -> { Telnyx::PhoneNumberSlimListParams::Filter::VoiceConnectionName },
           api_name: :"voice.connection_name"

  # @!attribute voice_usage_payment_method
  #   Filter by usage_payment_method.
  #
  #   @return [Symbol, Telnyx::Models::PhoneNumberSlimListParams::Filter::VoiceUsagePaymentMethod, nil]
  optional :voice_usage_payment_method,
           enum: -> { Telnyx::PhoneNumberSlimListParams::Filter::VoiceUsagePaymentMethod },
           api_name: :"voice.usage_payment_method"

  # @!method initialize(billing_group_id: nil, connection_id: nil, country_iso_alpha2: nil, customer_reference: nil, emergency_address_id: nil, number_type: nil, phone_number: nil, source: nil, status: nil, tag: nil, voice_connection_name: nil, voice_usage_payment_method: nil)
  #   Some parameter documentations has been truncated, see
  #   {Telnyx::Models::PhoneNumberSlimListParams::Filter} for more details.
  #
  #   Consolidated filter parameter (deepObject style). Originally: filter[tag],
  #   filter[phone_number], filter[status], filter[country_iso_alpha2],
  #   filter[connection_id], filter[voice.connection_name],
  #   filter[voice.usage_payment_method], filter[billing_group_id],
  #   filter[emergency_address_id], filter[customer_reference], filter[number_type],
  #   filter[source]
  #
  #   @param billing_group_id [String] Filter by the billing_group_id associated with phone numbers. To filter to only
  #
  #   @param connection_id [String] Filter by connection_id.
  #
  #   @param country_iso_alpha2 [String, Array<String>] Filter by phone number country ISO alpha-2 code. Can be a single value or an arr
  #
  #   @param customer_reference [String] Filter numbers via the customer_reference set.
  #
  #   @param emergency_address_id [String] Filter by the emergency_address_id associated with phone numbers. To filter only
  #
  #   @param number_type [Telnyx::Models::PhoneNumberSlimListParams::Filter::NumberType] Filter phone numbers by phone number type.
  #
  #   @param phone_number [String] Filter by phone number. Requires at least three digits.
  #
  #   @param source [Symbol, Telnyx::Models::PhoneNumberSlimListParams::Filter::Source] Filter phone numbers by their source. Use 'ported' for numbers ported from other
  #
  #   @param status [Symbol, Telnyx::Models::PhoneNumberSlimListParams::Filter::Status] Filter by phone number status.
  #
  #   @param tag [String] Filter by phone number tags. (This requires the include_tags param)
  #
  #   @param voice_connection_name [Telnyx::Models::PhoneNumberSlimListParams::Filter::VoiceConnectionName] Filter by voice connection name pattern matching (requires include_connection pa
  #
  #   @param voice_usage_payment_method [Symbol, Telnyx::Models::PhoneNumberSlimListParams::Filter::VoiceUsagePaymentMethod] Filter by usage_payment_method.

  # Filter by phone number country ISO alpha-2 code. Can be a single value or an
  # array of values.
  #
  # @see Telnyx::Models::PhoneNumberSlimListParams::Filter#country_iso_alpha2
  module CountryISOAlpha2
    extend Telnyx::Internal::Type::Union

    variant String

    variant -> { Telnyx::Models::PhoneNumberSlimListParams::Filter::CountryISOAlpha2::StringArray }

    # @!method self.variants
    #   @return [Array(String, Array<String>)]

    # @type [Telnyx::Internal::Type::Converter]
    StringArray = Telnyx::Internal::Type::ArrayOf[String]
  end

  # @see Telnyx::Models::PhoneNumberSlimListParams::Filter#number_type
  class NumberType < Telnyx::Internal::Type::BaseModel
    # @!attribute eq
    #   Filter phone numbers by phone number type.
    #
    #   @return [Symbol, Telnyx::Models::PhoneNumberSlimListParams::Filter::NumberType::Eq, nil]
    optional :eq, enum: -> { Telnyx::PhoneNumberSlimListParams::Filter::NumberType::Eq }

    # @!method initialize(eq: nil)
    #   Filter phone numbers by phone number type.
    #
    #   @param eq [Symbol, Telnyx::Models::PhoneNumberSlimListParams::Filter::NumberType::Eq] Filter phone numbers by phone number type.

    # Filter phone numbers by phone number type.
    #
    # @see Telnyx::Models::PhoneNumberSlimListParams::Filter::NumberType#eq
    module Eq
      extend Telnyx::Internal::Type::Enum

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

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

  # Filter phone numbers by their source. Use 'ported' for numbers ported from other
  # carriers, or 'purchased' for numbers bought directly from Telnyx.
  #
  # @see Telnyx::Models::PhoneNumberSlimListParams::Filter#source
  module Source
    extend Telnyx::Internal::Type::Enum

    PORTED = :ported
    PURCHASED = :purchased

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

  # Filter by phone number status.
  #
  # @see Telnyx::Models::PhoneNumberSlimListParams::Filter#status
  module Status
    extend Telnyx::Internal::Type::Enum

    PURCHASE_PENDING = :"purchase-pending"
    PURCHASE_FAILED = :"purchase-failed"
    PORT_PENDING = :port_pending
    ACTIVE = :active
    DELETED = :deleted
    PORT_FAILED = :"port-failed"
    EMERGENCY_ONLY = :"emergency-only"
    PORTED_OUT = :"ported-out"
    PORT_OUT_PENDING = :"port-out-pending"

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

  # @see Telnyx::Models::PhoneNumberSlimListParams::Filter#voice_connection_name
  class VoiceConnectionName < Telnyx::Internal::Type::BaseModel
    # @!attribute contains
    #   Filter contains connection name. Requires at least three characters and the
    #   include_connection param.
    #
    #   @return [String, nil]
    optional :contains, String

    # @!attribute ends_with
    #   Filter ends with connection name. Requires at least three characters and the
    #   include_connection param.
    #
    #   @return [String, nil]
    optional :ends_with, String

    # @!attribute eq
    #   Filter by connection name.
    #
    #   @return [String, nil]
    optional :eq, String

    # @!attribute starts_with
    #   Filter starts with connection name. Requires at least three characters and the
    #   include_connection param.
    #
    #   @return [String, nil]
    optional :starts_with, String

    # @!method initialize(contains: nil, ends_with: nil, eq: nil, starts_with: nil)
    #   Some parameter documentations has been truncated, see
    #   {Telnyx::Models::PhoneNumberSlimListParams::Filter::VoiceConnectionName} for
    #   more details.
    #
    #   Filter by voice connection name pattern matching (requires include_connection
    #   param).
    #
    #   @param contains [String] Filter contains connection name. Requires at least three characters and the incl
    #
    #   @param ends_with [String] Filter ends with connection name. Requires at least three characters and the inc
    #
    #   @param eq [String] Filter by connection name.
    #
    #   @param starts_with [String] Filter starts with connection name. Requires at least three characters and the i
  end

  # Filter by usage_payment_method.
  #
  # @see Telnyx::Models::PhoneNumberSlimListParams::Filter#voice_usage_payment_method
  module VoiceUsagePaymentMethod
    extend Telnyx::Internal::Type::Enum

    PAY_PER_MINUTE = :"pay-per-minute"
    CHANNEL = :channel

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

Instance Attribute Details

#billing_group_idString?

Filter by the billing_group_id associated with phone numbers. To filter to only phone numbers that have no billing group associated them, set the value of this filter to the string 'null'.

Parameters:

Returns:



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

optional :billing_group_id, String

#connection_idString?

Filter by connection_id.

Parameters:

Returns:



81
# File 'lib/telnyx/models/phone_number_slim_list_params.rb', line 81

optional :connection_id, String

#country_iso_alpha2String, ...

Filter by phone number country ISO alpha-2 code. Can be a single value or an array of values.

Returns:



88
# File 'lib/telnyx/models/phone_number_slim_list_params.rb', line 88

optional :country_iso_alpha2, union: -> { Telnyx::PhoneNumberSlimListParams::Filter::CountryISOAlpha2 }

#customer_referenceString?

Filter numbers via the customer_reference set.

Parameters:

Returns:



94
# File 'lib/telnyx/models/phone_number_slim_list_params.rb', line 94

optional :customer_reference, String

#emergency_address_idString?

Filter by the emergency_address_id associated with phone numbers. To filter only phone numbers that have no emergency address associated with them, set the value of this filter to the string 'null'.

Parameters:

Returns:



102
# File 'lib/telnyx/models/phone_number_slim_list_params.rb', line 102

optional :emergency_address_id, String

#number_typeTelnyx::Models::PhoneNumberSlimListParams::Filter::NumberType?

Filter phone numbers by phone number type.

Returns:



108
# File 'lib/telnyx/models/phone_number_slim_list_params.rb', line 108

optional :number_type, -> { Telnyx::PhoneNumberSlimListParams::Filter::NumberType }

#phone_numberString?

Filter by phone number. Requires at least three digits. Non-numerical characters will result in no values being returned.

Parameters:

Returns:



115
# File 'lib/telnyx/models/phone_number_slim_list_params.rb', line 115

optional :phone_number, String

#sourceSymbol, ...

Filter phone numbers by their source. Use 'ported' for numbers ported from other carriers, or 'purchased' for numbers bought directly from Telnyx.

Returns:



122
# File 'lib/telnyx/models/phone_number_slim_list_params.rb', line 122

optional :source, enum: -> { Telnyx::PhoneNumberSlimListParams::Filter::Source }

#statusSymbol, ...

Filter by phone number status.

Returns:



128
# File 'lib/telnyx/models/phone_number_slim_list_params.rb', line 128

optional :status, enum: -> { Telnyx::PhoneNumberSlimListParams::Filter::Status }

#tagString?

Filter by phone number tags. (This requires the include_tags param)

Parameters:

Returns:



134
# File 'lib/telnyx/models/phone_number_slim_list_params.rb', line 134

optional :tag, String

#voice_connection_nameTelnyx::Models::PhoneNumberSlimListParams::Filter::VoiceConnectionName?

Filter by voice connection name pattern matching (requires include_connection param).

Returns:



141
142
143
# File 'lib/telnyx/models/phone_number_slim_list_params.rb', line 141

optional :voice_connection_name,
-> { Telnyx::PhoneNumberSlimListParams::Filter::VoiceConnectionName },
api_name: :"voice.connection_name"

#voice_usage_payment_methodSymbol, ...

Filter by usage_payment_method.

Returns:



149
150
151
# File 'lib/telnyx/models/phone_number_slim_list_params.rb', line 149

optional :voice_usage_payment_method,
enum: -> { Telnyx::PhoneNumberSlimListParams::Filter::VoiceUsagePaymentMethod },
api_name: :"voice.usage_payment_method"

Class Method Details

.valuesArray<Symbol>

Returns:



# File 'lib/telnyx/models/phone_number_slim_list_params.rb', line 231


Instance Method Details

#to_hash{

Returns:



158
# File 'sig/telnyx/models/phone_number_slim_list_params.rbs', line 158

def to_hash: -> {