Class: Twilio::REST::FlexApi::V1::FlexFlowContext

Inherits:
InstanceContext show all
Defined in:
lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, sid) ⇒ FlexFlowContext

Initialize the FlexFlowContext



215
216
217
218
219
220
221
222
223
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 215

def initialize(version, sid)
    super(version)

    # Path Solution
    @solution = { sid: sid,  }
    @uri = "/FlexFlows/#{@solution[:sid]}"

    
end

Instance Method Details

#deleteBoolean

Delete the FlexFlowInstance



227
228
229
230
231
232
233
234
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 227

def delete

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    @version.delete('DELETE', @uri, headers: headers)
end

#fetchFlexFlowInstance

Fetch the FlexFlowInstance



239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 239

def fetch

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.fetch('GET', @uri, headers: headers)
    FlexFlowInstance.new(
        @version,
        payload,
        sid: @solution[:sid],
    )
end

#inspectObject

Provide a detailed, user friendly representation



339
340
341
342
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 339

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.FlexApi.V1.FlexFlowContext #{context}>"
end

#to_sObject

Provide a user friendly representation



332
333
334
335
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 332

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, janitor_enabled: :unset, integration_retry_count: :unset) ⇒ FlexFlowInstance

Update the FlexFlowInstance



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
# File 'lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb', line 275

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, 
    janitor_enabled: :unset, 
    integration_retry_count: :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' => integration_creation_on_message,
        'LongLived' => long_lived,
        'JanitorEnabled' => janitor_enabled,
        'Integration.RetryCount' => integration_retry_count,
    })

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.update('POST', @uri, data: data, headers: headers)
    FlexFlowInstance.new(
        @version,
        payload,
        sid: @solution[:sid],
    )
end