class Twilio::REST::Bulkexports::V1::ExportInstance
Public Class Methods
Initialize the ExportInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] resource_type
The type of communication – Messages, Calls,
Conferences, and Participants
@return [ExportInstance] ExportInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/bulkexports/v1/export.rb 161 def initialize(version, payload, resource_type: nil) 162 super(version) 163 164 # Marshaled Properties 165 @properties = { 166 'resource_type' => payload['resource_type'], 167 'url' => payload['url'], 168 'links' => payload['links'], 169 } 170 171 # Context 172 @instance_context = nil 173 @params = {'resource_type' => resource_type || @properties['resource_type'], } 174 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 [ExportContext] ExportContext
for this ExportInstance
# File lib/twilio-ruby/rest/bulkexports/v1/export.rb 180 def context 181 unless @instance_context 182 @instance_context = ExportContext.new(@version, @params['resource_type'], ) 183 end 184 @instance_context 185 end
Access the days @return [days] days
# File lib/twilio-ruby/rest/bulkexports/v1/export.rb 215 def days 216 context.days 217 end
Access the export_custom_jobs
@return [export_custom_jobs] export_custom_jobs
# File lib/twilio-ruby/rest/bulkexports/v1/export.rb 222 def export_custom_jobs 223 context.export_custom_jobs 224 end
Fetch the ExportInstance
@return [ExportInstance] Fetched ExportInstance
# File lib/twilio-ruby/rest/bulkexports/v1/export.rb 208 def fetch 209 context.fetch 210 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/bulkexports/v1/export.rb 235 def inspect 236 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 237 "<Twilio.Bulkexports.V1.ExportInstance #{values}>" 238 end
@return [String] Nested resource URLs.
# File lib/twilio-ruby/rest/bulkexports/v1/export.rb 201 def links 202 @properties['links'] 203 end
@return [String] The type of communication – Messages, Calls, Conferences, and Participants
# File lib/twilio-ruby/rest/bulkexports/v1/export.rb 189 def resource_type 190 @properties['resource_type'] 191 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/bulkexports/v1/export.rb 228 def to_s 229 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 230 "<Twilio.Bulkexports.V1.ExportInstance #{values}>" 231 end
@return [String] The URL of this resource.
# File lib/twilio-ruby/rest/bulkexports/v1/export.rb 195 def url 196 @properties['url'] 197 end