Class: Twilio::REST::FlexApi::V1::FlexFlowContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::FlexApi::V1::FlexFlowContext
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Deletes the FlexFlowInstance.
-
#fetch ⇒ FlexFlowInstance
Fetch a FlexFlowInstance.
-
#initialize(version, sid) ⇒ FlexFlowContext
constructor
Initialize the FlexFlowContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(friendly_name: :unset, chat_service_sid: :unset, channel_type: :unset, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset) ⇒ FlexFlowInstance
Update the FlexFlowInstance.
Constructor Details
#initialize(version, sid) ⇒ FlexFlowContext
Initialize the FlexFlowContext
212 213 214 215 216 217 218 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 212 def initialize(version, sid) super(version) # Path Solution @solution = {sid: sid, } @uri = "/FlexFlows/#{@solution[:sid]}" end |
Instance Method Details
#delete ⇒ Boolean
Deletes the FlexFlowInstance
295 296 297 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 295 def delete @version.delete('delete', @uri) end |
#fetch ⇒ FlexFlowInstance
Fetch a FlexFlowInstance
223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 223 def fetch params = Twilio::Values.of({}) payload = @version.fetch( 'GET', @uri, params, ) FlexFlowInstance.new(@version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
308 309 310 311 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 308 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.FlexFlowContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
301 302 303 304 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 301 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.FlexFlowContext #{context}>" end |
#update(friendly_name: :unset, chat_service_sid: :unset, channel_type: :unset, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset) ⇒ FlexFlowInstance
Update the FlexFlowInstance
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 |
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 264 def update(friendly_name: :unset, chat_service_sid: :unset, channel_type: :unset, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset) data = Twilio::Values.of({ 'FriendlyName' => friendly_name, 'ChatServiceSid' => chat_service_sid, 'ChannelType' => channel_type, 'ContactIdentity' => contact_identity, 'Enabled' => enabled, 'IntegrationType' => integration_type, 'Integration.FlowSid' => integration_flow_sid, 'Integration.Url' => integration_url, 'Integration.WorkspaceSid' => integration_workspace_sid, 'Integration.WorkflowSid' => integration_workflow_sid, 'Integration.Channel' => integration_channel, 'Integration.Timeout' => integration_timeout, 'Integration.Priority' => integration_priority, 'Integration.CreationOnMessage' => , 'LongLived' => long_lived, }) payload = @version.update( 'POST', @uri, data: data, ) FlexFlowInstance.new(@version, payload, sid: @solution[:sid], ) end |