Class: Twilio::REST::Preview::BulkExports::ExportConfigurationContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Preview::BulkExports::ExportConfigurationContext
- Defined in:
- lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb
Overview
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 [email protected]
Instance Method Summary collapse
-
#fetch ⇒ ExportConfigurationInstance
Fetch the ExportConfigurationInstance.
-
#initialize(version, resource_type) ⇒ ExportConfigurationContext
constructor
Initialize the ExportConfigurationContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(enabled: :unset, webhook_url: :unset, webhook_method: :unset) ⇒ ExportConfigurationInstance
Update the ExportConfigurationInstance.
Constructor Details
#initialize(version, resource_type) ⇒ ExportConfigurationContext
Initialize the ExportConfigurationContext
74 75 76 77 78 79 80 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb', line 74 def initialize(version, resource_type) super(version) # Path Solution @solution = {resource_type: resource_type, } @uri = "/Exports/#{@solution[:resource_type]}/Configuration" end |
Instance Method Details
#fetch ⇒ ExportConfigurationInstance
Fetch the ExportConfigurationInstance
85 86 87 88 89 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb', line 85 def fetch payload = @version.fetch('GET', @uri) ExportConfigurationInstance.new(@version, payload, resource_type: @solution[:resource_type], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
122 123 124 125 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb', line 122 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.BulkExports.ExportConfigurationContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
115 116 117 118 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb', line 115 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.BulkExports.ExportConfigurationContext #{context}>" end |
#update(enabled: :unset, webhook_url: :unset, webhook_method: :unset) ⇒ ExportConfigurationInstance
Update the ExportConfigurationInstance
101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb', line 101 def update(enabled: :unset, webhook_url: :unset, webhook_method: :unset) data = Twilio::Values.of({ 'Enabled' => enabled, 'WebhookUrl' => webhook_url, 'WebhookMethod' => webhook_method, }) payload = @version.update('POST', @uri, data: data) ExportConfigurationInstance.new(@version, payload, resource_type: @solution[:resource_type], ) end |