class Twilio::REST::Preview::BulkExports::ExportList::JobInstance
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
Initialize the JobInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] job_sid
The unique string that that we created to identify the
Bulk Export job
@return [JobInstance] JobInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb 124 def initialize(version, payload, job_sid: nil) 125 super(version) 126 127 # Marshaled Properties 128 @properties = { 129 'resource_type' => payload['resource_type'], 130 'friendly_name' => payload['friendly_name'], 131 'details' => payload['details'], 132 'start_day' => payload['start_day'], 133 'end_day' => payload['end_day'], 134 'job_sid' => payload['job_sid'], 135 'webhook_url' => payload['webhook_url'], 136 'webhook_method' => payload['webhook_method'], 137 'email' => payload['email'], 138 'url' => payload['url'], 139 } 140 141 # Context 142 @instance_context = nil 143 @params = {'job_sid' => job_sid || @properties['job_sid'], } 144 end
Public Instance Methods
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [JobContext] JobContext
for this JobInstance
# File lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb 150 def context 151 unless @instance_context 152 @instance_context = JobContext.new(@version, @params['job_sid'], ) 153 end 154 @instance_context 155 end
Delete the JobInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb 227 def delete 228 context.delete 229 end
@return [Hash] This is a list of the completed, pending, or errored dates within the export time range, with one entry for each status with more than one day in that status
# File lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb 171 def details 172 @properties['details'] 173 end
@return [String] The optional email to send the completion notification to
# File lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb 207 def email 208 @properties['email'] 209 end
@return [String] The end time for the export specified when creating the job
# File lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb 183 def end_day 184 @properties['end_day'] 185 end
Fetch the JobInstance
@return [JobInstance] Fetched JobInstance
# File lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb 220 def fetch 221 context.fetch 222 end
@return [String] The friendly name specified when creating the job
# File lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb 165 def friendly_name 166 @properties['friendly_name'] 167 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb 240 def inspect 241 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 242 "<Twilio.Preview.BulkExports.JobInstance #{values}>" 243 end
@return [String] The job_sid
returned when the export was created
# File lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb 189 def job_sid 190 @properties['job_sid'] 191 end
@return [String] The type of communication – Messages, Calls, Conferences, and Participants
# File lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb 159 def resource_type 160 @properties['resource_type'] 161 end
@return [String] The start time for the export specified when creating the job
# File lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb 177 def start_day 178 @properties['start_day'] 179 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb 233 def to_s 234 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 235 "<Twilio.Preview.BulkExports.JobInstance #{values}>" 236 end
@return [String] The url
# File lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb 213 def url 214 @properties['url'] 215 end
@return [String] This is the method used to call the webhook
# File lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb 201 def webhook_method 202 @properties['webhook_method'] 203 end
@return [String] The optional webhook url called on completion
# File lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb 195 def webhook_url 196 @properties['webhook_url'] 197 end