class Twilio::REST::Preview::BulkExports::ExportContext

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.

Public Class Methods

new(version, resource_type) click to toggle source

Initialize the ExportContext @param [Version] version Version that contains the resource @param [String] resource_type The type of communication – Messages, Calls,

Conferences, and Participants

@return [ExportContext] ExportContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/preview/bulk_exports/export.rb
 93 def initialize(version, resource_type)
 94   super(version)
 95 
 96   # Path Solution
 97   @solution = {resource_type: resource_type, }
 98   @uri = "/Exports/#{@solution[:resource_type]}"
 99 
100   # Dependents
101   @days = nil
102   @export_custom_jobs = nil
103 end

Public Instance Methods

days(day=:unset) click to toggle source

Access the days @return [DayList] @return [DayContext] if day was passed.

    # File lib/twilio-ruby/rest/preview/bulk_exports/export.rb
118 def days(day=:unset)
119   raise ArgumentError, 'day cannot be nil' if day.nil?
120 
121   if day != :unset
122     return DayContext.new(@version, @solution[:resource_type], day, )
123   end
124 
125   unless @days
126     @days = DayList.new(@version, resource_type: @solution[:resource_type], )
127   end
128 
129   @days
130 end
export_custom_jobs() click to toggle source

Access the export_custom_jobs @return [ExportCustomJobList] @return [ExportCustomJobContext]

    # File lib/twilio-ruby/rest/preview/bulk_exports/export.rb
136 def export_custom_jobs
137   unless @export_custom_jobs
138     @export_custom_jobs = ExportCustomJobList.new(@version, resource_type: @solution[:resource_type], )
139   end
140 
141   @export_custom_jobs
142 end
fetch() click to toggle source

Fetch the ExportInstance @return [ExportInstance] Fetched ExportInstance

    # File lib/twilio-ruby/rest/preview/bulk_exports/export.rb
108 def fetch
109   payload = @version.fetch('GET', @uri)
110 
111   ExportInstance.new(@version, payload, resource_type: @solution[:resource_type], )
112 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/preview/bulk_exports/export.rb
153 def inspect
154   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
155   "#<Twilio.Preview.BulkExports.ExportContext #{context}>"
156 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/preview/bulk_exports/export.rb
146 def to_s
147   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
148   "#<Twilio.Preview.BulkExports.ExportContext #{context}>"
149 end