Class: Twilio::REST::Bulkexports::V1::ExportList::JobContext

Inherits:
InstanceContext
  • Object
show all
Defined in:
lib/twilio-ruby/rest/bulkexports/v1/export/job.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, job_sid) ⇒ JobContext

Initialize the JobContext

Parameters:

  • version (Version)

    Version that contains the resource

  • job_sid (String)

    The unique string that that we created to identify the Bulk Export job



50
51
52
53
54
55
56
57
58
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/job.rb', line 50

def initialize(version, job_sid)
    super(version)

    # Path Solution
    @solution = { job_sid: job_sid,  }
    @uri = "/Exports/Jobs/#{@solution[:job_sid]}"

    
end

Instance Method Details

#deleteBoolean

Delete the JobInstance

Returns:

  • (Boolean)

    True if delete succeeds, false otherwise



62
63
64
65
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/job.rb', line 62

def delete

    @version.delete('DELETE', @uri)
end

#fetchJobInstance

Fetch the JobInstance

Returns:



70
71
72
73
74
75
76
77
78
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/job.rb', line 70

def fetch

    payload = @version.fetch('GET', @uri)
    JobInstance.new(
        @version,
        payload,
        job_sid: @solution[:job_sid],
    )
end

#inspectObject

Provide a detailed, user friendly representation



90
91
92
93
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/job.rb', line 90

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Bulkexports.V1.JobContext #{context}>"
end

#to_sObject

Provide a user friendly representation



83
84
85
86
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/job.rb', line 83

def to_s
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Bulkexports.V1.JobContext #{context}>"
end