Class: Twilio::REST::Autopilot::V1::AssistantContext::ExportAssistantInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Autopilot::V1::AssistantContext::ExportAssistantInstance
- Defined in:
- lib/twilio-ruby/rest/autopilot/v1/assistant/export_assistant.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
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#assistant_sid ⇒ String
The SID of the Assistant to export.
-
#context ⇒ ExportAssistantContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The RFC 2822 date and time in GMT when the resource was created.
-
#error_code ⇒ String
More information about why the export failed, if ‘status` is `failed`.
-
#fetch ⇒ ExportAssistantInstance
Fetch a ExportAssistantInstance.
-
#initialize(version, payload, assistant_sid: nil) ⇒ ExportAssistantInstance
constructor
Initialize the ExportAssistantInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#schema ⇒ Hash
The JSON string that describes the requested Assistant.
-
#status ⇒ export_assistant.Status
The status of the export.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL of the Export resource.
Constructor Details
#initialize(version, payload, assistant_sid: nil) ⇒ ExportAssistantInstance
Initialize the ExportAssistantInstance
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/export_assistant.rb', line 125 def initialize(version, payload, assistant_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'assistant_sid' => payload['assistant_sid'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'status' => payload['status'], 'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i, 'url' => payload['url'], 'schema' => payload['schema'], } # Context @instance_context = nil @params = {'assistant_sid' => assistant_sid, } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the resource.
157 158 159 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/export_assistant.rb', line 157 def account_sid @properties['account_sid'] end |
#assistant_sid ⇒ String
Returns The SID of the Assistant to export.
163 164 165 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/export_assistant.rb', line 163 def assistant_sid @properties['assistant_sid'] end |
#context ⇒ ExportAssistantContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
148 149 150 151 152 153 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/export_assistant.rb', line 148 def context unless @instance_context @instance_context = ExportAssistantContext.new(@version, @params['assistant_sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The RFC 2822 date and time in GMT when the resource was created.
169 170 171 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/export_assistant.rb', line 169 def date_created @properties['date_created'] end |
#error_code ⇒ String
Returns More information about why the export failed, if ‘status` is `failed`.
181 182 183 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/export_assistant.rb', line 181 def error_code @properties['error_code'] end |
#fetch ⇒ ExportAssistantInstance
Fetch a ExportAssistantInstance
200 201 202 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/export_assistant.rb', line 200 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
213 214 215 216 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/export_assistant.rb', line 213 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Autopilot.V1.ExportAssistantInstance #{values}>" end |
#schema ⇒ Hash
Returns The JSON string that describes the requested Assistant.
193 194 195 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/export_assistant.rb', line 193 def schema @properties['schema'] end |
#status ⇒ export_assistant.Status
Returns The status of the export.
175 176 177 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/export_assistant.rb', line 175 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
206 207 208 209 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/export_assistant.rb', line 206 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Autopilot.V1.ExportAssistantInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL of the Export resource.
187 188 189 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant/export_assistant.rb', line 187 def url @properties['url'] end |