class Twilio::REST::Bulkexports::V1::ExportList::JobInstance

Public Class Methods

new(version, payload, job_sid: nil) click to toggle source

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

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/bulkexports/v1/export/job.rb
116 def initialize(version, payload, job_sid: nil)
117   super(version)
118 
119   # Marshaled Properties
120   @properties = {
121       'resource_type' => payload['resource_type'],
122       'friendly_name' => payload['friendly_name'],
123       'details' => payload['details'],
124       'start_day' => payload['start_day'],
125       'end_day' => payload['end_day'],
126       'job_sid' => payload['job_sid'],
127       'webhook_url' => payload['webhook_url'],
128       'webhook_method' => payload['webhook_method'],
129       'email' => payload['email'],
130       'url' => payload['url'],
131       'job_queue_position' => payload['job_queue_position'],
132       'estimated_completion_time' => payload['estimated_completion_time'],
133   }
134 
135   # Context
136   @instance_context = nil
137   @params = {'job_sid' => job_sid || @properties['job_sid'], }
138 end

Public Instance Methods

context() click to toggle source

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/bulkexports/v1/export/job.rb
144 def context
145   unless @instance_context
146     @instance_context = JobContext.new(@version, @params['job_sid'], )
147   end
148   @instance_context
149 end
delete() click to toggle source

Delete the JobInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/bulkexports/v1/export/job.rb
233 def delete
234   context.delete
235 end
details() click to toggle source

@return [Hash] The details of a job state which is an object that contains a `status` string, a day count integer, and list of days in the job

    # File lib/twilio-ruby/rest/bulkexports/v1/export/job.rb
165 def details
166   @properties['details']
167 end
email() click to toggle source

@return [String] The optional email to send the completion notification to

    # File lib/twilio-ruby/rest/bulkexports/v1/export/job.rb
201 def email
202   @properties['email']
203 end
end_day() click to toggle source

@return [String] The end time for the export specified when creating the job

    # File lib/twilio-ruby/rest/bulkexports/v1/export/job.rb
177 def end_day
178   @properties['end_day']
179 end
estimated_completion_time() click to toggle source

@return [String] this is the time estimated until your job is complete. This is calculated each time you request the job list. The time is calculated based on the current rate of job completion (which may vary) and your job queue position

    # File lib/twilio-ruby/rest/bulkexports/v1/export/job.rb
219 def estimated_completion_time
220   @properties['estimated_completion_time']
221 end
fetch() click to toggle source

Fetch the JobInstance @return [JobInstance] Fetched JobInstance

    # File lib/twilio-ruby/rest/bulkexports/v1/export/job.rb
226 def fetch
227   context.fetch
228 end
friendly_name() click to toggle source

@return [String] The friendly name specified when creating the job

    # File lib/twilio-ruby/rest/bulkexports/v1/export/job.rb
159 def friendly_name
160   @properties['friendly_name']
161 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/bulkexports/v1/export/job.rb
246 def inspect
247   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
248   "<Twilio.Bulkexports.V1.JobInstance #{values}>"
249 end
job_queue_position() click to toggle source

@return [String] This is the job position from the 1st in line. Your queue position will never increase. As jobs ahead of yours in the queue are processed, the queue position number will decrease

    # File lib/twilio-ruby/rest/bulkexports/v1/export/job.rb
213 def job_queue_position
214   @properties['job_queue_position']
215 end
job_sid() click to toggle source

@return [String] The job_sid returned when the export was created

    # File lib/twilio-ruby/rest/bulkexports/v1/export/job.rb
183 def job_sid
184   @properties['job_sid']
185 end
resource_type() click to toggle source

@return [String] The type of communication – Messages, Calls, Conferences, and Participants

    # File lib/twilio-ruby/rest/bulkexports/v1/export/job.rb
153 def resource_type
154   @properties['resource_type']
155 end
start_day() click to toggle source

@return [String] The start time for the export specified when creating the job

    # File lib/twilio-ruby/rest/bulkexports/v1/export/job.rb
171 def start_day
172   @properties['start_day']
173 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/bulkexports/v1/export/job.rb
239 def to_s
240   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
241   "<Twilio.Bulkexports.V1.JobInstance #{values}>"
242 end
url() click to toggle source

@return [String] The url

    # File lib/twilio-ruby/rest/bulkexports/v1/export/job.rb
207 def url
208   @properties['url']
209 end
webhook_method() click to toggle source

@return [String] This is the method used to call the webhook

    # File lib/twilio-ruby/rest/bulkexports/v1/export/job.rb
195 def webhook_method
196   @properties['webhook_method']
197 end
webhook_url() click to toggle source

@return [String] The optional webhook url called on completion

    # File lib/twilio-ruby/rest/bulkexports/v1/export/job.rb
189 def webhook_url
190   @properties['webhook_url']
191 end