Class: Twilio::REST::Assistants::V1::Knowledge::KnowledgeStatusInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Assistants::V1::Knowledge::KnowledgeStatusInstance
- Defined in:
- lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Knowledge resource.
-
#context ⇒ KnowledgeStatusContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_updated ⇒ Time
The date and time in GMT when the Knowledge was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#fetch ⇒ KnowledgeStatusInstance
Fetch the KnowledgeStatusInstance.
-
#initialize(version, payload, id: nil) ⇒ KnowledgeStatusInstance
constructor
Initialize the KnowledgeStatusInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#last_status ⇒ String
The last status of processing the knowledge source (‘QUEUED’, ‘PROCESSING’, ‘COMPLETED’, ‘FAILED’).
-
#status ⇒ String
The status of processing the knowledge source (‘QUEUED’, ‘PROCESSING’, ‘COMPLETED’, ‘FAILED’).
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, payload, id: nil) ⇒ KnowledgeStatusInstance
Initialize the KnowledgeStatusInstance
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb', line 129 def initialize(version, payload , id: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'status' => payload['status'], 'last_status' => payload['last_status'], 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), } # Context @instance_context = nil @params = { 'id' => id || @properties['id'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Knowledge resource.
158 159 160 |
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb', line 158 def account_sid @properties['account_sid'] end |
#context ⇒ KnowledgeStatusContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
149 150 151 152 153 154 |
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb', line 149 def context unless @instance_context @instance_context = KnowledgeStatusContext.new(@version , @params['id']) end @instance_context end |
#date_updated ⇒ Time
Returns The date and time in GMT when the Knowledge was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
176 177 178 |
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb', line 176 def date_updated @properties['date_updated'] end |
#fetch ⇒ KnowledgeStatusInstance
Fetch the KnowledgeStatusInstance
183 184 185 186 |
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb', line 183 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
197 198 199 200 |
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb', line 197 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Assistants.V1.KnowledgeStatusInstance #{values}>" end |
#last_status ⇒ String
Returns The last status of processing the knowledge source (‘QUEUED’, ‘PROCESSING’, ‘COMPLETED’, ‘FAILED’).
170 171 172 |
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb', line 170 def last_status @properties['last_status'] end |
#status ⇒ String
Returns The status of processing the knowledge source (‘QUEUED’, ‘PROCESSING’, ‘COMPLETED’, ‘FAILED’).
164 165 166 |
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb', line 164 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
190 191 192 193 |
# File 'lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb', line 190 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Assistants.V1.KnowledgeStatusInstance #{values}>" end |