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
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Flow resource.
-
#commit_message ⇒ String
Description of 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 date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#definition ⇒ Hash
JSON representation of flow definition.
-
#errors ⇒ Array<Hash>
List of error in the flow definition.
-
#fetch ⇒ FlowRevisionInstance
Fetch the 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 we created to identify the Flow resource.
- #status ⇒ Status
-
#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
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 212 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'] == nil ? payload['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 || @properties['sid'] ,'revision' => revision || @properties['revision'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Flow resource.
255 256 257 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 255 def account_sid @properties['account_sid'] end |
#commit_message ⇒ String
Returns Description of change made in the revision.
285 286 287 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 285 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
240 241 242 243 244 245 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 240 def context unless @instance_context @instance_context = FlowRevisionContext.new(@version , @params['sid'], @params['revision']) end @instance_context end |
#date_created ⇒ Time
Returns The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
303 304 305 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 303 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT when the resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
309 310 311 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 309 def date_updated @properties['date_updated'] end |
#definition ⇒ Hash
Returns JSON representation of flow definition.
267 268 269 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 267 def definition @properties['definition'] end |
#errors ⇒ Array<Hash>
Returns List of error in the flow definition.
297 298 299 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 297 def errors @properties['errors'] end |
#fetch ⇒ FlowRevisionInstance
Fetch the FlowRevisionInstance
322 323 324 325 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 322 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the Flow.
261 262 263 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 261 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
336 337 338 339 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 336 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.
279 280 281 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 279 def revision @properties['revision'] end |
#sid ⇒ String
Returns The unique string that we created to identify the Flow resource.
249 250 251 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 249 def sid @properties['sid'] end |
#status ⇒ Status
273 274 275 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 273 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
329 330 331 332 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 329 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.
315 316 317 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 315 def url @properties['url'] end |
#valid ⇒ Boolean
Returns Boolean if the flow definition is valid.
291 292 293 |
# File 'lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb', line 291 def valid @properties['valid'] end |