class Twilio::REST::Studio::V2::FlowContext::FlowRevisionInstance

Public Class Methods

new(version, payload, sid: nil, revision: nil) click to toggle source

Initialize the FlowRevisionInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] sid The unique string that we created to identify the Flow

resource.

@param [String] revision Specific Revision number or can be `LatestPublished`

and `LatestRevision`.

@return [FlowRevisionInstance] FlowRevisionInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb
195 def initialize(version, payload, sid: nil, revision: nil)
196   super(version)
197 
198   # Marshaled Properties
199   @properties = {
200       'sid' => payload['sid'],
201       'account_sid' => payload['account_sid'],
202       'friendly_name' => payload['friendly_name'],
203       'definition' => payload['definition'],
204       'status' => payload['status'],
205       'revision' => payload['revision'].to_i,
206       'commit_message' => payload['commit_message'],
207       'valid' => payload['valid'],
208       'errors' => payload['errors'],
209       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
210       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
211       'url' => payload['url'],
212   }
213 
214   # Context
215   @instance_context = nil
216   @params = {'sid' => sid, 'revision' => revision || @properties['revision'], }
217 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb
238 def account_sid
239   @properties['account_sid']
240 end
commit_message() click to toggle source

@return [String] Description of change made in the revision

    # File lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb
268 def commit_message
269   @properties['commit_message']
270 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [FlowRevisionContext] FlowRevisionContext for this FlowRevisionInstance

    # File lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb
223 def context
224   unless @instance_context
225     @instance_context = FlowRevisionContext.new(@version, @params['sid'], @params['revision'], )
226   end
227   @instance_context
228 end
date_created() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was created

    # File lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb
286 def date_created
287   @properties['date_created']
288 end
date_updated() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was last updated

    # File lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb
292 def date_updated
293   @properties['date_updated']
294 end
definition() click to toggle source

@return [Hash] JSON representation of flow definition

    # File lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb
250 def definition
251   @properties['definition']
252 end
errors() click to toggle source

@return [Array] List of error in the flow definition

    # File lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb
280 def errors
281   @properties['errors']
282 end
fetch() click to toggle source

Fetch the FlowRevisionInstance @return [FlowRevisionInstance] Fetched FlowRevisionInstance

    # File lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb
305 def fetch
306   context.fetch
307 end
friendly_name() click to toggle source

@return [String] The string that you assigned to describe the Flow

    # File lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb
244 def friendly_name
245   @properties['friendly_name']
246 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb
318 def inspect
319   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
320   "<Twilio.Studio.V2.FlowRevisionInstance #{values}>"
321 end
revision() click to toggle source

@return [String] The latest revision number of the Flow's definition

    # File lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb
262 def revision
263   @properties['revision']
264 end
sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb
232 def sid
233   @properties['sid']
234 end
status() click to toggle source

@return [flow_revision.Status] The status of the Flow

    # File lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb
256 def status
257   @properties['status']
258 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb
311 def to_s
312   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
313   "<Twilio.Studio.V2.FlowRevisionInstance #{values}>"
314 end
url() click to toggle source

@return [String] The absolute URL of the resource

    # File lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb
298 def url
299   @properties['url']
300 end
valid() click to toggle source

@return [Boolean] Boolean if the flow definition is valid

    # File lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb
274 def valid
275   @properties['valid']
276 end