Method: Twilio::REST::Preview::HostedNumbers::AuthorizationDocumentList#list

Defined in:
lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb

#list(email: :unset, status: :unset, limit: nil, page_size: nil) ⇒ Array

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

Parameters:

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

    Email that this AuthorizationDocument will be sent to for signing.

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

    Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses.

  • 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



134
135
136
137
138
139
140
141
# File 'lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb', line 134

def list(email: :unset, status: :unset, limit: nil, page_size: nil)
    self.stream(
        email: email,
        status: status,
        limit: limit,
        page_size: page_size
    ).entries
end