Class: Twilio::REST::Preview::BulkExports::ExportConfigurationInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::BulkExports::ExportConfigurationInstance
- Defined in:
- lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.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 ⇒ ExportConfigurationContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#enabled ⇒ Boolean
Whether files are automatically generated.
-
#fetch ⇒ ExportConfigurationInstance
Fetch a ExportConfigurationInstance.
-
#initialize(version, payload, resource_type: nil) ⇒ ExportConfigurationInstance
constructor
Initialize the ExportConfigurationInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#resource_type ⇒ String
The type of communication – Messages, Calls.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(enabled: :unset, webhook_url: :unset, webhook_method: :unset) ⇒ ExportConfigurationInstance
Update the ExportConfigurationInstance.
-
#url ⇒ String
The URL of this resource.
-
#webhook_method ⇒ String
Whether to GET or POST to the webhook url.
-
#webhook_url ⇒ String
URL targeted at export.
Constructor Details
#initialize(version, payload, resource_type: nil) ⇒ ExportConfigurationInstance
Initialize the ExportConfigurationInstance
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb', line 146 def initialize(version, payload, resource_type: nil) super(version) # Marshaled Properties @properties = { 'enabled' => payload['enabled'], 'webhook_url' => payload['webhook_url'], 'webhook_method' => payload['webhook_method'], 'resource_type' => payload['resource_type'], 'url' => payload['url'], } # Context @instance_context = nil @params = {'resource_type' => resource_type || @properties['resource_type'], } end |
Instance Method Details
#context ⇒ ExportConfigurationContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
167 168 169 170 171 172 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb', line 167 def context unless @instance_context @instance_context = ExportConfigurationContext.new(@version, @params['resource_type'], ) end @instance_context end |
#enabled ⇒ Boolean
Returns Whether files are automatically generated.
176 177 178 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb', line 176 def enabled @properties['enabled'] end |
#fetch ⇒ ExportConfigurationInstance
Fetch a ExportConfigurationInstance
207 208 209 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb', line 207 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
234 235 236 237 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb', line 234 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.BulkExports.ExportConfigurationInstance #{values}>" end |
#resource_type ⇒ String
Returns The type of communication – Messages, Calls.
194 195 196 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb', line 194 def resource_type @properties['resource_type'] end |
#to_s ⇒ Object
Provide a user friendly representation
227 228 229 230 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb', line 227 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.BulkExports.ExportConfigurationInstance #{values}>" end |
#update(enabled: :unset, webhook_url: :unset, webhook_method: :unset) ⇒ ExportConfigurationInstance
Update the ExportConfigurationInstance
221 222 223 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb', line 221 def update(enabled: :unset, webhook_url: :unset, webhook_method: :unset) context.update(enabled: enabled, webhook_url: webhook_url, webhook_method: webhook_method, ) end |
#url ⇒ String
Returns The URL of this resource.
200 201 202 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb', line 200 def url @properties['url'] end |
#webhook_method ⇒ String
Returns Whether to GET or POST to the webhook url.
188 189 190 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb', line 188 def webhook_method @properties['webhook_method'] end |
#webhook_url ⇒ String
Returns URL targeted at export.
182 183 184 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb', line 182 def webhook_url @properties['webhook_url'] end |