Class: Twilio::REST::Preview::BulkExports::ExportInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::BulkExports::ExportInstance
- Defined in:
- lib/twilio-ruby/rest/preview/bulk_exports/export.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].
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.
-
#fetch ⇒ ExportInstance
Fetch a ExportInstance.
-
#initialize(version, payload, resource_type: nil) ⇒ ExportInstance
constructor
Initialize the ExportInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ String
The links.
-
#resource_type ⇒ String
The resource_type.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, resource_type: nil) ⇒ ExportInstance
Initialize the ExportInstance
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export.rb', line 138 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
159 160 161 162 163 164 165 166 167 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export.rb', line 159 def context unless @instance_context @instance_context = ExportContext.new( @version, @params['resource_type'], ) end @instance_context end |
#days ⇒ days
Access the days
197 198 199 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export.rb', line 197 def days context.days end |
#fetch ⇒ ExportInstance
Fetch a ExportInstance
190 191 192 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export.rb', line 190 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
210 211 212 213 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export.rb', line 210 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.BulkExports.ExportInstance #{values}>" end |
#links ⇒ String
Returns The links.
183 184 185 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export.rb', line 183 def links @properties['links'] end |
#resource_type ⇒ String
Returns The resource_type.
171 172 173 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export.rb', line 171 def resource_type @properties['resource_type'] end |
#to_s ⇒ Object
Provide a user friendly representation
203 204 205 206 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export.rb', line 203 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.BulkExports.ExportInstance #{values}>" end |
#url ⇒ String
Returns The url.
177 178 179 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export.rb', line 177 def url @properties['url'] end |