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
173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export.rb', line 173 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
192 193 194 195 196 197 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export.rb', line 192 def context unless @instance_context @instance_context = ExportContext.new(@version , @params['resource_type']) end @instance_context end |
#days ⇒ days
Access the days
235 236 237 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export.rb', line 235 def days context.days end |
#export_custom_jobs ⇒ export_custom_jobs
Access the export_custom_jobs
228 229 230 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export.rb', line 228 def export_custom_jobs context.export_custom_jobs end |
#fetch ⇒ ExportInstance
Fetch the ExportInstance
220 221 222 223 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export.rb', line 220 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
248 249 250 251 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export.rb', line 248 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Bulkexports.V1.ExportInstance #{values}>" end |
#links ⇒ Hash
Returns Contains a dictionary of URL links to nested resources of this Export.
213 214 215 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export.rb', line 213 def links @properties['links'] end |
#resource_type ⇒ String
Returns The type of communication – Messages, Calls, Conferences, and Participants.
201 202 203 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export.rb', line 201 def resource_type @properties['resource_type'] end |
#to_s ⇒ Object
Provide a user friendly representation
241 242 243 244 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export.rb', line 241 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Bulkexports.V1.ExportInstance #{values}>" end |
#url ⇒ String
Returns The URL of this resource.
207 208 209 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export.rb', line 207 def url @properties['url'] end |