Class: Twilio::REST::Bulkexports::V1::ExportContext::DayInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Bulkexports::V1::ExportContext::DayInstance
- Defined in:
- lib/twilio-ruby/rest/bulkexports/v1/export/day.rb
Instance Method Summary collapse
-
#context ⇒ DayContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#create_date ⇒ String
The ISO 8601 format date when resources is created.
-
#day ⇒ String
The ISO 8601 format date of the resources in the file, for a UTC day.
-
#fetch ⇒ DayInstance
Fetch the DayInstance.
-
#friendly_name ⇒ String
The friendly name specified when creating the job.
-
#initialize(version, payload, resource_type: nil, day: nil) ⇒ DayInstance
constructor
Initialize the DayInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
- #redirect_to ⇒ String
-
#resource_type ⇒ String
The type of communication – Messages, Calls, Conferences, and Participants.
-
#size ⇒ String
The size of the day’s data file in bytes.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, payload, resource_type: nil, day: nil) ⇒ DayInstance
Initialize the DayInstance
388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/day.rb', line 388 def initialize(version, payload , resource_type: nil, day: nil) super(version) # Marshaled Properties @properties = { 'redirect_to' => payload['redirect_to'], 'day' => payload['day'], 'size' => payload['size'] == nil ? payload['size'] : payload['size'].to_i, 'create_date' => payload['create_date'], 'friendly_name' => payload['friendly_name'], 'resource_type' => payload['resource_type'], } # Context @instance_context = nil @params = { 'resource_type' => resource_type || @properties['resource_type'] ,'day' => day || @properties['day'] , } end |
Instance Method Details
#context ⇒ DayContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
411 412 413 414 415 416 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/day.rb', line 411 def context unless @instance_context @instance_context = DayContext.new(@version , @params['resource_type'], @params['day']) end @instance_context end |
#create_date ⇒ String
Returns The ISO 8601 format date when resources is created.
438 439 440 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/day.rb', line 438 def create_date @properties['create_date'] end |
#day ⇒ String
Returns The ISO 8601 format date of the resources in the file, for a UTC day.
426 427 428 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/day.rb', line 426 def day @properties['day'] end |
#fetch ⇒ DayInstance
Fetch the DayInstance
457 458 459 460 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/day.rb', line 457 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The friendly name specified when creating the job.
444 445 446 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/day.rb', line 444 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
471 472 473 474 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/day.rb', line 471 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Bulkexports.V1.DayInstance #{values}>" end |
#redirect_to ⇒ String
420 421 422 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/day.rb', line 420 def redirect_to @properties['redirect_to'] end |
#resource_type ⇒ String
Returns The type of communication – Messages, Calls, Conferences, and Participants.
450 451 452 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/day.rb', line 450 def resource_type @properties['resource_type'] end |
#size ⇒ String
Returns The size of the day’s data file in bytes.
432 433 434 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/day.rb', line 432 def size @properties['size'] end |
#to_s ⇒ Object
Provide a user friendly representation
464 465 466 467 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export/day.rb', line 464 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Bulkexports.V1.DayInstance #{values}>" end |