class Twilio::REST::Preview::BulkExports::ExportConfigurationInstance
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
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
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb 138 def initialize(version, payload, resource_type: nil) 139 super(version) 140 141 # Marshaled Properties 142 @properties = { 143 'enabled' => payload['enabled'], 144 'webhook_url' => payload['webhook_url'], 145 'webhook_method' => payload['webhook_method'], 146 'resource_type' => payload['resource_type'], 147 'url' => payload['url'], 148 } 149 150 # Context 151 @instance_context = nil 152 @params = {'resource_type' => resource_type || @properties['resource_type'], } 153 end
Public Instance Methods
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/preview/bulk_exports/export_configuration.rb 159 def context 160 unless @instance_context 161 @instance_context = ExportConfigurationContext.new(@version, @params['resource_type'], ) 162 end 163 @instance_context 164 end
@return [Boolean] Whether files are automatically generated
# File lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb 168 def enabled 169 @properties['enabled'] 170 end
Fetch the ExportConfigurationInstance
@return [ExportConfigurationInstance] Fetched ExportConfigurationInstance
# File lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb 199 def fetch 200 context.fetch 201 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb 226 def inspect 227 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 228 "<Twilio.Preview.BulkExports.ExportConfigurationInstance #{values}>" 229 end
@return [String] The type of communication – Messages, Calls, Conferences, and Participants
# File lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb 186 def resource_type 187 @properties['resource_type'] 188 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb 219 def to_s 220 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 221 "<Twilio.Preview.BulkExports.ExportConfigurationInstance #{values}>" 222 end
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 213 def update(enabled: :unset, webhook_url: :unset, webhook_method: :unset) 214 context.update(enabled: enabled, webhook_url: webhook_url, webhook_method: webhook_method, ) 215 end
@return [String] The URL of this resource.
# File lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb 192 def url 193 @properties['url'] 194 end
@return [String] Whether to GET or POST to the webhook url
# File lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb 180 def webhook_method 181 @properties['webhook_method'] 182 end
@return [String] URL targeted at export
# File lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb 174 def webhook_url 175 @properties['webhook_url'] 176 end