Class: Twilio::REST::Bulkexports::V1::ExportInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Bulkexports::V1::ExportInstance
- Defined in:
- lib/twilio-ruby/rest/bulkexports/v1/export.rb
Instance Method Summary collapse
-
#context ⇒ ExportContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#days ⇒ days
Access the days.
-
#export_custom_jobs ⇒ export_custom_jobs
Access the export_custom_jobs.
-
#fetch ⇒ ExportInstance
Fetch the ExportInstance.
-
#initialize(version, payload, resource_type: nil) ⇒ ExportInstance
constructor
Initialize the ExportInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ Hash
Contains a dictionary of URL links to nested resources of this Export.
-
#resource_type ⇒ String
The type of communication – Messages, Calls, Conferences, and Participants.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, resource_type: nil) ⇒ ExportInstance
Initialize the ExportInstance
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export.rb', line 312 def initialize(version, payload , resource_type: nil) super(version) # Marshaled Properties @properties = { 'resource_type' => payload['resource_type'], 'url' => payload['url'], 'links' => payload['links'], } # Context @instance_context = nil @params = { 'resource_type' => resource_type || @properties['resource_type'] , } end |
Instance Method Details
#context ⇒ ExportContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
332 333 334 335 336 337 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export.rb', line 332 def context unless @instance_context @instance_context = ExportContext.new(@version , @params['resource_type']) end @instance_context end |
#days ⇒ days
Access the days
375 376 377 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export.rb', line 375 def days context.days end |
#export_custom_jobs ⇒ export_custom_jobs
Access the export_custom_jobs
368 369 370 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export.rb', line 368 def export_custom_jobs context.export_custom_jobs end |
#fetch ⇒ ExportInstance
Fetch the ExportInstance
360 361 362 363 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export.rb', line 360 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
388 389 390 391 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export.rb', line 388 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Bulkexports.V1.ExportInstance #{values}>" end |
#links ⇒ Hash
353 354 355 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export.rb', line 353 def links @properties['links'] end |
#resource_type ⇒ String
341 342 343 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export.rb', line 341 def resource_type @properties['resource_type'] end |
#to_s ⇒ Object
Provide a user friendly representation
381 382 383 384 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export.rb', line 381 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Bulkexports.V1.ExportInstance #{values}>" end |
#url ⇒ String
347 348 349 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export.rb', line 347 def url @properties['url'] end |