Class: Twilio::REST::Preview::BulkExports::ExportContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Preview::BulkExports::ExportContext
- Defined in:
- lib/twilio-ruby/rest/preview/bulk_exports/export.rb,
lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb,
lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb
Overview
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected]
Defined Under Namespace
Classes: DayContext, DayInstance, DayList, DayPage, ExportCustomJobInstance, ExportCustomJobList, ExportCustomJobPage
Instance Method Summary collapse
-
#days(day = :unset) ⇒ DayList, DayContext
Access the days.
-
#export_custom_jobs ⇒ ExportCustomJobList, ExportCustomJobContext
Access the export_custom_jobs.
-
#fetch ⇒ ExportInstance
Fetch the ExportInstance.
-
#initialize(version, resource_type) ⇒ ExportContext
constructor
Initialize the ExportContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, resource_type) ⇒ ExportContext
Initialize the ExportContext
93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export.rb', line 93 def initialize(version, resource_type) super(version) # Path Solution @solution = {resource_type: resource_type, } @uri = "/Exports/#{@solution[:resource_type]}" # Dependents @days = nil @export_custom_jobs = nil end |
Instance Method Details
#days(day = :unset) ⇒ DayList, DayContext
Access the days
118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export.rb', line 118 def days(day=:unset) raise ArgumentError, 'day cannot be nil' if day.nil? if day != :unset return DayContext.new(@version, @solution[:resource_type], day, ) end unless @days @days = DayList.new(@version, resource_type: @solution[:resource_type], ) end @days end |
#export_custom_jobs ⇒ ExportCustomJobList, ExportCustomJobContext
Access the export_custom_jobs
136 137 138 139 140 141 142 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export.rb', line 136 def export_custom_jobs unless @export_custom_jobs @export_custom_jobs = ExportCustomJobList.new(@version, resource_type: @solution[:resource_type], ) end @export_custom_jobs end |
#fetch ⇒ ExportInstance
Fetch the ExportInstance
108 109 110 111 112 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export.rb', line 108 def fetch payload = @version.fetch('GET', @uri) ExportInstance.new(@version, payload, resource_type: @solution[:resource_type], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
153 154 155 156 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export.rb', line 153 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.BulkExports.ExportContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
146 147 148 149 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export.rb', line 146 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.BulkExports.ExportContext #{context}>" end |