class Twilio::REST::Bulkexports::V1::ExportContext
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/bulkexports/v1/export.rb 87 def initialize(version, resource_type) 88 super(version) 89 90 # Path Solution 91 @solution = {resource_type: resource_type, } 92 @uri = "/Exports/#{@solution[:resource_type]}" 93 94 # Dependents 95 @days = nil 96 @export_custom_jobs = nil 97 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/bulkexports/v1/export.rb 112 def days(day=:unset) 113 raise ArgumentError, 'day cannot be nil' if day.nil? 114 115 if day != :unset 116 return DayContext.new(@version, @solution[:resource_type], day, ) 117 end 118 119 unless @days 120 @days = DayList.new(@version, resource_type: @solution[:resource_type], ) 121 end 122 123 @days 124 end
export_custom_jobs()
click to toggle source
Access the export_custom_jobs
@return [ExportCustomJobList] @return [ExportCustomJobContext]
# File lib/twilio-ruby/rest/bulkexports/v1/export.rb 130 def export_custom_jobs 131 unless @export_custom_jobs 132 @export_custom_jobs = ExportCustomJobList.new(@version, resource_type: @solution[:resource_type], ) 133 end 134 135 @export_custom_jobs 136 end
fetch()
click to toggle source
Fetch the ExportInstance
@return [ExportInstance] Fetched ExportInstance
# File lib/twilio-ruby/rest/bulkexports/v1/export.rb 102 def fetch 103 payload = @version.fetch('GET', @uri) 104 105 ExportInstance.new(@version, payload, resource_type: @solution[:resource_type], ) 106 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/bulkexports/v1/export.rb 147 def inspect 148 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 149 "#<Twilio.Bulkexports.V1.ExportContext #{context}>" 150 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/bulkexports/v1/export.rb 140 def to_s 141 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 142 "#<Twilio.Bulkexports.V1.ExportContext #{context}>" 143 end