Class: Twilio::REST::Studio::V2::FlowContext::ExecutionContext::ExecutionStepContext::ExecutionStepContextInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, flow_sid: nil, execution_sid: nil, step_sid: nil) ⇒ ExecutionStepContextInstance

Initialize the ExecutionStepContextInstance



135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb', line 135

def initialize(version, payload , flow_sid: nil, execution_sid: nil, step_sid: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'account_sid' => payload['account_sid'],
        'context' => payload['context'],
        'execution_sid' => payload['execution_sid'],
        'flow_sid' => payload['flow_sid'],
        'step_sid' => payload['step_sid'],
        'url' => payload['url'],
    }

    # Context
    @instance_context = nil
    @params = { 'flow_sid' => flow_sid  || @properties['flow_sid']  ,'execution_sid' => execution_sid  || @properties['execution_sid']  ,'step_sid' => step_sid  || @properties['step_sid']  , }
end

Instance Method Details

#account_sidString



166
167
168
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb', line 166

def 
    @properties['account_sid']
end

#contextHash



157
158
159
160
161
162
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb', line 157

def context
    unless @instance_context
        @instance_context = ExecutionStepContextContext.new(@version , @params['flow_sid'], @params['execution_sid'], @params['step_sid'])
    end
    @instance_context
end

#execution_sidString



178
179
180
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb', line 178

def execution_sid
    @properties['execution_sid']
end

#fetchExecutionStepContextInstance

Fetch the ExecutionStepContextInstance



203
204
205
206
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb', line 203

def fetch

    context.fetch
end

#flow_sidString



184
185
186
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb', line 184

def flow_sid
    @properties['flow_sid']
end

#inspectObject

Provide a detailed, user friendly representation



217
218
219
220
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb', line 217

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Studio.V2.ExecutionStepContextInstance #{values}>"
end

#step_sidString



190
191
192
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb', line 190

def step_sid
    @properties['step_sid']
end

#to_sObject

Provide a user friendly representation



210
211
212
213
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb', line 210

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Studio.V2.ExecutionStepContextInstance #{values}>"
end

#urlString



196
197
198
# File 'lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb', line 196

def url
    @properties['url']
end