Class: Telnyx::Models::SimCardListParams::Filter

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

Defined Under Namespace

Modules: Status

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(filter: nil, filter_sim_card_group_id: nil, include_sim_card_group: nil, page_number: nil, page_size: nil, sort: nil, request_options: {}) ⇒ Object

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

Parameters:

  • filter (Telnyx::Models::SimCardListParams::Filter) (defaults to: nil)

    Consolidated filter parameter for SIM cards (deepObject style). Originally: filt

  • filter_sim_card_group_id (String) (defaults to: nil)

    A valid SIM card group ID.

  • include_sim_card_group (Boolean) (defaults to: nil)

    It includes the associated SIM card group object in the response when present.

  • page_number (Integer) (defaults to: nil)
  • page_size (Integer) (defaults to: nil)
  • sort (Symbol, Telnyx::Models::SimCardListParams::Sort) (defaults to: nil)

    Sorts SIM cards by the given field. Defaults to ascending order unless field is

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


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
# File 'lib/telnyx/models/sim_card_list_params.rb', line 64

class Filter < Telnyx::Internal::Type::BaseModel
  # @!attribute iccid
  #   A search string to partially match for the SIM card's ICCID.
  #
  #   @return [String, nil]
  optional :iccid, String

  # @!attribute msisdn
  #   A search string to match for the SIM card's MSISDN.
  #
  #   @return [String, nil]
  optional :msisdn, String

  # @!attribute status
  #   Filter by a SIM card's status.
  #
  #   @return [Array<Symbol, Telnyx::Models::SimCardListParams::Filter::Status>, nil]
  optional :status, -> { Telnyx::Internal::Type::ArrayOf[enum: Telnyx::SimCardListParams::Filter::Status] }

  # @!attribute tags
  #   A list of SIM card tags to filter on.<br/><br/> If the SIM card contains
  #   <b><i>all</i></b> of the given <code>tags</code> they will be found.<br/><br/>
  #   For example, if the SIM cards have the following tags: <ul>
  #
  #     <li><code>['customers', 'staff', 'test']</code>
  #     <li><code>['test']</code></li>
  #     <li><code>['customers']</code></li>
  #   </ul>
  #   Searching for <code>['customers', 'test']</code> returns only the first because it's the only one with both tags.<br/> Searching for <code>test</code> returns the first two SIMs, because both of them have such tag.<br/> Searching for <code>customers</code> returns the first and last SIMs.<br/>
  #
  #   @return [Array<String>, nil]
  optional :tags, Telnyx::Internal::Type::ArrayOf[String]

  # @!method initialize(iccid: nil, msisdn: nil, status: nil, tags: nil)
  #   Some parameter documentations has been truncated, see
  #   {Telnyx::Models::SimCardListParams::Filter} for more details.
  #
  #   Consolidated filter parameter for SIM cards (deepObject style). Originally:
  #   filter[iccid], filter[msisdn], filter[status], filter[tags]
  #
  #   @param iccid [String] A search string to partially match for the SIM card's ICCID.
  #
  #   @param msisdn [String] A search string to match for the SIM card's MSISDN.
  #
  #   @param status [Array<Symbol, Telnyx::Models::SimCardListParams::Filter::Status>] Filter by a SIM card's status.
  #
  #   @param tags [Array<String>] A list of SIM card tags to filter on.<br/><br/>

  module Status
    extend Telnyx::Internal::Type::Enum

    ENABLED = :enabled
    DISABLED = :disabled
    STANDBY = :standby
    DATA_LIMIT_EXCEEDED = :data_limit_exceeded
    UNAUTHORIZED_IMEI = :unauthorized_imei

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

Instance Attribute Details

#iccidString?

A search string to partially match for the SIM card's ICCID.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :iccid, String

#msisdnString?

A search string to match for the SIM card's MSISDN.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :msisdn, String

#statusArray<Symbol, Telnyx::Models::SimCardListParams::Filter::Status>?

Filter by a SIM card's status.

Returns:



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

optional :status, -> { Telnyx::Internal::Type::ArrayOf[enum: Telnyx::SimCardListParams::Filter::Status] }

#tagsArray<String>?

A list of SIM card tags to filter on.

If the SIM card contains all of the given tags they will be found.

For example, if the SIM cards have the following tags:

  • ['customers', 'staff', 'test']
  • ['test']
  • ['customers']
Searching for ['customers', 'test'] returns only the first because it's the only one with both tags.
Searching for test returns the first two SIMs, because both of them have such tag.
Searching for customers returns the first and last SIMs.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


95
# File 'lib/telnyx/models/sim_card_list_params.rb', line 95

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

Instance Method Details

#to_hash{

Returns:

  • ({)


100
# File 'sig/telnyx/models/sim_card_list_params.rbs', line 100

def to_hash: -> {