Class: Twilio::REST::Studio::V2::FlowContext::FlowRevisionInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Studio::V2::FlowContext::FlowRevisionInstance
- Defined in:
- lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#commit_message ⇒ String
Description on change made in the revision.
-
#context ⇒ FlowRevisionContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The ISO 8601 date and time in GMT when the resource was created.
-
#date_updated ⇒ Time
The ISO 8601 date and time in GMT when the resource was last updated.
-
#definition ⇒ Hash
JSON representation of flow definition.
-
#errors ⇒ Hash
List of error in the flow definition.
-
#fetch ⇒ FlowRevisionInstance
Fetch a FlowRevisionInstance.
-
#friendly_name ⇒ String
The string that you assigned to describe the Flow.
-
#initialize(version, payload, sid: nil, revision: nil) ⇒ FlowRevisionInstance
constructor
Initialize the FlowRevisionInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#revision ⇒ String
The latest revision number of the Flow’s definition.
-
#sid ⇒ String
The unique string that identifies the resource.
-
#status ⇒ flow_revision.Status
The status of the Flow.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL of the resource.
-
#valid ⇒ Boolean
Boolean if the flow definition is valid.
Constructor Details
#initialize(version, payload, sid: nil, revision: nil) ⇒ FlowRevisionInstance
Initialize the FlowRevisionInstance
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 211 def initialize(version, payload, sid: nil, revision: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'friendly_name' => payload['friendly_name'], 'definition' => payload['definition'], 'status' => payload['status'], 'revision' => payload['revision'].to_i, 'commit_message' => payload['commit_message'], 'valid' => payload['valid'], 'errors' => payload['errors'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], } # Context @instance_context = nil @params = {'sid' => sid, 'revision' => revision || @properties['revision'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the resource.
254 255 256 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 254 def account_sid @properties['account_sid'] end |
#commit_message ⇒ String
Returns Description on change made in the revision.
284 285 286 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 284 def @properties['commit_message'] end |
#context ⇒ FlowRevisionContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
239 240 241 242 243 244 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 239 def context unless @instance_context @instance_context = FlowRevisionContext.new(@version, @params['sid'], @params['revision'], ) end @instance_context end |
#date_created ⇒ Time
Returns The ISO 8601 date and time in GMT when the resource was created.
302 303 304 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 302 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The ISO 8601 date and time in GMT when the resource was last updated.
308 309 310 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 308 def date_updated @properties['date_updated'] end |
#definition ⇒ Hash
Returns JSON representation of flow definition.
266 267 268 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 266 def definition @properties['definition'] end |
#errors ⇒ Hash
Returns List of error in the flow definition.
296 297 298 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 296 def errors @properties['errors'] end |
#fetch ⇒ FlowRevisionInstance
Fetch a FlowRevisionInstance
321 322 323 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 321 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the Flow.
260 261 262 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 260 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
334 335 336 337 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 334 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Studio.V2.FlowRevisionInstance #{values}>" end |
#revision ⇒ String
Returns The latest revision number of the Flow’s definition.
278 279 280 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 278 def revision @properties['revision'] end |
#sid ⇒ String
Returns The unique string that identifies the resource.
248 249 250 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 248 def sid @properties['sid'] end |
#status ⇒ flow_revision.Status
Returns The status of the Flow.
272 273 274 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 272 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
327 328 329 330 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 327 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Studio.V2.FlowRevisionInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL of the resource.
314 315 316 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 314 def url @properties['url'] end |
#valid ⇒ Boolean
Returns Boolean if the flow definition is valid.
290 291 292 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 290 def valid @properties['valid'] end |