Method: Twilio::REST::Wireless::V1::SimList#list

Defined in:
lib/twilio-ruby/rest/wireless/v1/sim.rb

#list(status: :unset, iccid: :unset, rate_plan: :unset, e_id: :unset, sim_registration_code: :unset, limit: nil, page_size: nil) ⇒ Array

Lists SimInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.

Parameters:

  • status (Status) (defaults to: :unset)

    Only return Sim resources with this status.

  • iccid (String) (defaults to: :unset)

    Only return Sim resources with this ICCID. This will return a list with a maximum size of 1.

  • rate_plan (String) (defaults to: :unset)

    The SID or unique name of a [RatePlan resource](www.twilio.com/docs/iot/wireless/api/rateplan-resource). Only return Sim resources assigned to this RatePlan resource.

  • e_id (String) (defaults to: :unset)

    Deprecated.

  • sim_registration_code (String) (defaults to: :unset)

    Only return Sim resources with this registration code. This will return a list with a maximum size of 1.

  • limit (Integer) (defaults to: nil)

    Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit

  • page_size (Integer) (defaults to: nil)

    Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)

Returns:

  • (Array)

    Array of up to limit results



51
52
53
54
55
56
57
58
59
60
61
# File 'lib/twilio-ruby/rest/wireless/v1/sim.rb', line 51

def list(status: :unset, iccid: :unset, rate_plan: :unset, e_id: :unset, sim_registration_code: :unset, limit: nil, page_size: nil)
    self.stream(
        status: status,
        iccid: iccid,
        rate_plan: rate_plan,
        e_id: e_id,
        sim_registration_code: sim_registration_code,
        limit: limit,
        page_size: page_size
    ).entries
end