class Twilio::REST::Bulkexports::V1::ExportConfigurationContext

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/bulkexports/v1/export_configuration.rb
68 def initialize(version, resource_type)
69   super(version)
70 
71   # Path Solution
72   @solution = {resource_type: resource_type, }
73   @uri = "/Exports/#{@solution[:resource_type]}/Configuration"
74 end

Public Instance Methods

fetch() click to toggle source

Fetch the ExportConfigurationInstance @return [ExportConfigurationInstance] Fetched ExportConfigurationInstance

   # File lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb
79 def fetch
80   payload = @version.fetch('GET', @uri)
81 
82   ExportConfigurationInstance.new(@version, payload, resource_type: @solution[:resource_type], )
83 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb
116 def inspect
117   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
118   "#<Twilio.Bulkexports.V1.ExportConfigurationContext #{context}>"
119 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb
109 def to_s
110   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
111   "#<Twilio.Bulkexports.V1.ExportConfigurationContext #{context}>"
112 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
 95 def update(enabled: :unset, webhook_url: :unset, webhook_method: :unset)
 96   data = Twilio::Values.of({
 97       'Enabled' => enabled,
 98       'WebhookUrl' => webhook_url,
 99       'WebhookMethod' => webhook_method,
100   })
101 
102   payload = @version.update('POST', @uri, data: data)
103 
104   ExportConfigurationInstance.new(@version, payload, resource_type: @solution[:resource_type], )
105 end