Class: Twilio::REST::Bulkexports::V1::ExportList::JobContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Bulkexports::V1::ExportList::JobContext
- Defined in:
- lib/twilio-ruby/rest/bulkexports/v1/export/job.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the JobInstance.
-
#fetch ⇒ JobInstance
Fetch the JobInstance.
-
#initialize(version, job_sid) ⇒ JobContext
constructor
Initialize the JobContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, job_sid) ⇒ JobContext
Initialize the JobContext
51 52 53 54 55 56 57 58 59 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/job.rb', line 51 def initialize(version, job_sid) super(version) # Path Solution @solution = { job_sid: job_sid, } @uri = "/Exports/Jobs/#{@solution[:job_sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Delete the JobInstance
63 64 65 66 67 68 69 70 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/job.rb', line 63 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#fetch ⇒ JobInstance
Fetch the JobInstance
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/job.rb', line 75 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) JobInstance.new( @version, payload, job_sid: @solution[:job_sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
101 102 103 104 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/job.rb', line 101 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Bulkexports.V1.JobContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
94 95 96 97 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/job.rb', line 94 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Bulkexports.V1.JobContext #{context}>" end |