Class: Twilio::REST::Bulkexports::V1::ExportConfigurationInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Bulkexports::V1::ExportConfigurationInstance
- Defined in:
- lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb
Instance Method Summary collapse
-
#context ⇒ ExportConfigurationContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#enabled ⇒ Boolean
If true, Twilio will automatically generate every day’s file when the day is over.
-
#fetch ⇒ ExportConfigurationInstance
Fetch the 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, Conferences, and Participants.
-
#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
Sets whether Twilio should call a webhook URL when the automatic generation is complete, using GET or POST.
-
#webhook_url ⇒ String
Stores the URL destination for the method specified in webhook_method.
Constructor Details
#initialize(version, payload, resource_type: nil) ⇒ ExportConfigurationInstance
Initialize the ExportConfigurationInstance
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb', line 153 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
174 175 176 177 178 179 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb', line 174 def context unless @instance_context @instance_context = ExportConfigurationContext.new(@version , @params['resource_type']) end @instance_context end |
#enabled ⇒ Boolean
Returns If true, Twilio will automatically generate every day’s file when the day is over.
183 184 185 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb', line 183 def enabled @properties['enabled'] end |
#fetch ⇒ ExportConfigurationInstance
Fetch the ExportConfigurationInstance
214 215 216 217 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb', line 214 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
247 248 249 250 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb', line 247 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Bulkexports.V1.ExportConfigurationInstance #{values}>" 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_configuration.rb', line 201 def resource_type @properties['resource_type'] end |
#to_s ⇒ Object
Provide a user friendly representation
240 241 242 243 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb', line 240 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Bulkexports.V1.ExportConfigurationInstance #{values}>" end |
#update(enabled: :unset, webhook_url: :unset, webhook_method: :unset) ⇒ ExportConfigurationInstance
Update the ExportConfigurationInstance
225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb', line 225 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.
207 208 209 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb', line 207 def url @properties['url'] end |
#webhook_method ⇒ String
Returns Sets whether Twilio should call a webhook URL when the automatic generation is complete, using GET or POST. The actual destination is set in the webhook_url.
195 196 197 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb', line 195 def webhook_method @properties['webhook_method'] end |
#webhook_url ⇒ String
Returns Stores the URL destination for the method specified in webhook_method.
189 190 191 |
# File 'lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb', line 189 def webhook_url @properties['webhook_url'] end |