Class: Telnyx::Models::AvailablePhoneNumberBlockListParams::Filter

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

Defined Under Namespace

Modules: PhoneNumberType

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

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

Parameters:

  • country_code (String) (defaults to: nil)

    Filter phone numbers by country.

  • locality (String) (defaults to: nil)

    Filter phone numbers by city.

  • national_destination_code (String) (defaults to: nil)

    Filter by the national destination code of the number.

  • phone_number_type (Symbol, Telnyx::Models::AvailablePhoneNumberBlockListParams::Filter::PhoneNumberType) (defaults to: nil)

    Filter phone numbers by number type.



26
27
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
# File 'lib/telnyx/models/available_phone_number_block_list_params.rb', line 26

class Filter < Telnyx::Internal::Type::BaseModel
  # @!attribute country_code
  #   Filter phone numbers by country.
  #
  #   @return [String, nil]
  optional :country_code, String

  # @!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_type
  #   Filter phone numbers by number type.
  #
  #   @return [Symbol, Telnyx::Models::AvailablePhoneNumberBlockListParams::Filter::PhoneNumberType, nil]
  optional :phone_number_type,
           enum: -> { Telnyx::AvailablePhoneNumberBlockListParams::Filter::PhoneNumberType }

  # @!method initialize(country_code: nil, locality: nil, national_destination_code: nil, phone_number_type: nil)
  #   Consolidated filter parameter (deepObject style). Originally: filter[locality],
  #   filter[country_code], filter[national_destination_code],
  #   filter[phone_number_type]
  #
  #   @param country_code [String] Filter phone numbers by country.
  #
  #   @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_type [Symbol, Telnyx::Models::AvailablePhoneNumberBlockListParams::Filter::PhoneNumberType] Filter phone numbers by number type.

  # Filter phone numbers by number type.
  #
  # @see Telnyx::Models::AvailablePhoneNumberBlockListParams::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

#country_codeString?

Filter phone numbers by country.

Parameters:

  • (String)

Returns:

  • (String, nil)


31
# File 'lib/telnyx/models/available_phone_number_block_list_params.rb', line 31

optional :country_code, String

#localityString?

Filter phone numbers by city.

Parameters:

  • (String)

Returns:

  • (String, nil)


37
# File 'lib/telnyx/models/available_phone_number_block_list_params.rb', line 37

optional :locality, String

#national_destination_codeString?

Filter by the national destination code of the number.

Parameters:

  • (String)

Returns:

  • (String, nil)


43
# File 'lib/telnyx/models/available_phone_number_block_list_params.rb', line 43

optional :national_destination_code, String

#phone_number_typeSymbol, ...

Filter phone numbers by number type.



49
50
# File 'lib/telnyx/models/available_phone_number_block_list_params.rb', line 49

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

Instance Method Details

#to_hash{

Returns:

  • ({)


61
# File 'sig/telnyx/models/available_phone_number_block_list_params.rbs', line 61

def to_hash: -> {