Class: Twilio::REST::Studio::V1::FlowContext::EngagementContext::StepContext::StepContextInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Studio::V1::FlowContext::EngagementContext::StepContext::StepContextInstance
- Defined in:
- lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#context ⇒ Hash
The current state of the flow.
-
#engagement_sid ⇒ String
The SID of the Engagement.
-
#fetch ⇒ StepContextInstance
Fetch the StepContextInstance.
-
#flow_sid ⇒ String
The SID of the Flow.
-
#initialize(version, payload, flow_sid: nil, engagement_sid: nil, step_sid: nil) ⇒ StepContextInstance
constructor
Initialize the StepContextInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#step_sid ⇒ String
Step SID.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL of the resource.
Constructor Details
#initialize(version, payload, flow_sid: nil, engagement_sid: nil, step_sid: nil) ⇒ StepContextInstance
Initialize the StepContextInstance
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 128 def initialize(version, payload, flow_sid: nil, engagement_sid: nil, step_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'context' => payload['context'], 'engagement_sid' => payload['engagement_sid'], 'flow_sid' => payload['flow_sid'], 'step_sid' => payload['step_sid'], 'url' => payload['url'], } # Context @instance_context = nil @params = {'flow_sid' => flow_sid, 'engagement_sid' => engagement_sid, 'step_sid' => step_sid, } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the resource.
164 165 166 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 164 def account_sid @properties['account_sid'] end |
#context ⇒ Hash
Returns The current state of the flow.
150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 150 def context unless @instance_context @instance_context = StepContextContext.new( @version, @params['flow_sid'], @params['engagement_sid'], @params['step_sid'], ) end @instance_context end |
#engagement_sid ⇒ String
Returns The SID of the Engagement.
176 177 178 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 176 def engagement_sid @properties['engagement_sid'] end |
#fetch ⇒ StepContextInstance
Fetch the StepContextInstance
201 202 203 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 201 def fetch context.fetch end |
#flow_sid ⇒ String
Returns The SID of the Flow.
182 183 184 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 182 def flow_sid @properties['flow_sid'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
214 215 216 217 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 214 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Studio.V1.StepContextInstance #{values}>" end |
#step_sid ⇒ String
Returns Step SID.
188 189 190 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 188 def step_sid @properties['step_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
207 208 209 210 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 207 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Studio.V1.StepContextInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL of the resource.
194 195 196 |
# File 'lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb', line 194 def url @properties['url'] end |