Class: ExportCustomJobList

Twilio.Preview.BulkExports.ExportContext.ExportCustomJobList(version, resourceType)

new ExportCustomJobList(version, resourceType)

Initialize the ExportCustomJobList PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
Parameters:
Name Type Description
version Twilio.Preview.BulkExports Version of the resource
resourceType string The type of communication – Messages, Calls, Conferences, and Participants
Source:

Methods

create(opts, callbackopt) → {Promise}

create a ExportCustomJobInstance
Parameters:
Name Type Attributes Description
opts object Options for request
Properties
Name Type Attributes Description
startDay string The start day for the custom export specified as a string in the format of yyyy-mm-dd
endDay string The end day for the custom export specified as a string in the format of yyyy-mm-dd. End day is inclusive and must be 2 days earlier than the current UTC day.
friendlyName string The friendly name specified when creating the job
webhookUrl string <optional>
The optional webhook url called on completion of the job. If this is supplied, `WebhookMethod` must also be supplied.
webhookMethod string <optional>
This is the method used to call the webhook on completion of the job. If this is supplied, `WebhookUrl` must also be supplied.
email string <optional>
The optional email to send the completion notification to
callback function <optional>
Callback to handle processed record
Source:
Returns:
Resolves to processed ExportCustomJobInstance
Type
Promise

each(optsopt, callbackopt)

Streams ExportCustomJobInstance records from the API. This operation lazily loads records as efficiently as possible until the limit is reached. The results are passed into the callback function, so this operation is memory efficient. If a function is passed as the first argument, it will be used as the callback function.
Parameters:
Name Type Attributes Description
opts object <optional>
Options for request
Properties
Name Type Attributes Description
limit number <optional>
Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit
pageSize number <optional>
Number of records to fetch per request, when not set will use the default value of 50 records. If no pageSize is defined but a limit is defined, each() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
callback function <optional>
Function to process each record. If this and a positional callback are passed, this one will be used
done function <optional>
Function to be called upon completion of streaming
callback function <optional>
Function to process each record
Source:

getPage(targetUrlopt, callbackopt) → {Promise}

Retrieve a single target page of ExportCustomJobInstance records from the API. The request is executed immediately. If a function is passed as the first argument, it will be used as the callback function.
Parameters:
Name Type Attributes Description
targetUrl string <optional>
API-generated URL for the requested results page
callback function <optional>
Callback to handle list of records
Source:
Returns:
Resolves to a list of records
Type
Promise

list(optsopt, callbackopt) → {Promise}

Lists ExportCustomJobInstance records from the API as a list. If a function is passed as the first argument, it will be used as the callback function.
Parameters:
Name Type Attributes Description
opts object <optional>
Options for request
Properties
Name Type Attributes Description
limit number <optional>
Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
pageSize number <optional>
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, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
callback function <optional>
Callback to handle list of records
Source:
Returns:
Resolves to a list of records
Type
Promise

page(optsopt, callbackopt) → {Promise}

Retrieve a single page of ExportCustomJobInstance records from the API. The request is executed immediately. If a function is passed as the first argument, it will be used as the callback function.
Parameters:
Name Type Attributes Description
opts object <optional>
Options for request
Properties
Name Type Attributes Description
pageToken string <optional>
PageToken provided by the API
pageNumber number <optional>
Page Number, this value is simply for client state
pageSize number <optional>
Number of records to return, defaults to 50
callback function <optional>
Callback to handle list of records
Source:
Returns:
Resolves to a list of records
Type
Promise

toJSON()

Provide a user-friendly representation
Source:
Returns:
Object