class Twilio::REST::Bulkexports::V1::ExportConfigurationInstance

Public Class Methods

new(version, payload, resource_type: nil) click to toggle source

Initialize the ExportConfigurationInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] resource_type The type of communication – Messages, Calls,

Conferences, and Participants

@return [ExportConfigurationInstance] ExportConfigurationInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb
130 def initialize(version, payload, resource_type: nil)
131   super(version)
132 
133   # Marshaled Properties
134   @properties = {
135       'enabled' => payload['enabled'],
136       'webhook_url' => payload['webhook_url'],
137       'webhook_method' => payload['webhook_method'],
138       'resource_type' => payload['resource_type'],
139       'url' => payload['url'],
140   }
141 
142   # Context
143   @instance_context = nil
144   @params = {'resource_type' => resource_type || @properties['resource_type'], }
145 end

Public Instance Methods

context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [ExportConfigurationContext] ExportConfigurationContext for this ExportConfigurationInstance

    # File lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb
151 def context
152   unless @instance_context
153     @instance_context = ExportConfigurationContext.new(@version, @params['resource_type'], )
154   end
155   @instance_context
156 end
enabled() click to toggle source

@return [Boolean] Whether files are automatically generated

    # File lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb
160 def enabled
161   @properties['enabled']
162 end
fetch() click to toggle source

Fetch the ExportConfigurationInstance @return [ExportConfigurationInstance] Fetched ExportConfigurationInstance

    # File lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb
191 def fetch
192   context.fetch
193 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb
218 def inspect
219   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
220   "<Twilio.Bulkexports.V1.ExportConfigurationInstance #{values}>"
221 end
resource_type() click to toggle source

@return [String] The type of communication – Messages, Calls, Conferences, and Participants

    # File lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb
178 def resource_type
179   @properties['resource_type']
180 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb
211 def to_s
212   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
213   "<Twilio.Bulkexports.V1.ExportConfigurationInstance #{values}>"
214 end
update(enabled: :unset, webhook_url: :unset, webhook_method: :unset) click to toggle source

Update the ExportConfigurationInstance @param [Boolean] enabled If true, Twilio will automatically generate every day's

file when the day is over.

@param [String] webhook_url Stores the URL destination for the method specified

in webhook_method.

@param [String] webhook_method 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

@return [ExportConfigurationInstance] Updated ExportConfigurationInstance

    # File lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb
205 def update(enabled: :unset, webhook_url: :unset, webhook_method: :unset)
206   context.update(enabled: enabled, webhook_url: webhook_url, webhook_method: webhook_method, )
207 end
url() click to toggle source

@return [String] The URL of this resource.

    # File lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb
184 def url
185   @properties['url']
186 end
webhook_method() click to toggle source

@return [String] Whether to GET or POST to the webhook url

    # File lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb
172 def webhook_method
173   @properties['webhook_method']
174 end
webhook_url() click to toggle source

@return [String] URL targeted at export

    # File lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb
166 def webhook_url
167   @properties['webhook_url']
168 end