class Twilio::REST::Preview::BulkExports::ExportConfigurationContext

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 help@twilio.com.

Public Class Methods

new(version, resource_type) click to toggle source

Initialize the ExportConfigurationContext @param [Version] version Version that contains the resource @param [String] resource_type The type of communication – Messages, Calls,

Conferences, and Participants

@return [ExportConfigurationContext] ExportConfigurationContext

Calls superclass method Twilio::REST::InstanceContext::new
   # File lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb
74 def initialize(version, resource_type)
75   super(version)
76 
77   # Path Solution
78   @solution = {resource_type: resource_type, }
79   @uri = "/Exports/#{@solution[:resource_type]}/Configuration"
80 end

Public Instance Methods

fetch() click to toggle source

Fetch the ExportConfigurationInstance @return [ExportConfigurationInstance] Fetched ExportConfigurationInstance

   # File lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb
85 def fetch
86   payload = @version.fetch('GET', @uri)
87 
88   ExportConfigurationInstance.new(@version, payload, resource_type: @solution[:resource_type], )
89 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb
122 def inspect
123   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
124   "#<Twilio.Preview.BulkExports.ExportConfigurationContext #{context}>"
125 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb
115 def to_s
116   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
117   "#<Twilio.Preview.BulkExports.ExportConfigurationContext #{context}>"
118 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/preview/bulk_exports/export_configuration.rb
101 def update(enabled: :unset, webhook_url: :unset, webhook_method: :unset)
102   data = Twilio::Values.of({
103       'Enabled' => enabled,
104       'WebhookUrl' => webhook_url,
105       'WebhookMethod' => webhook_method,
106   })
107 
108   payload = @version.update('POST', @uri, data: data)
109 
110   ExportConfigurationInstance.new(@version, payload, resource_type: @solution[:resource_type], )
111 end