twilio-python icon indicating copy to clipboard operation
twilio-python copied to clipboard

Add update and remove operations to client.studio.v2.flows.update

Open allavytalize opened this issue 1 year ago • 1 comments

Issue Summary

This is a feature request. Twilio studio api already supports update and remove operations. Why not add them on the twilio-python client just like create? https://www.twilio.com/docs/studio/rest-api/v2/flow#update-a-flow-resource https://www.twilio.com/docs/studio/rest-api/v2/flow#delete-a-flow-resource

Steps to Reproduce

  1. Try to use update or remove operation on v2.flows resource.

Code Snippet

from twilio.rest import Client
client = Client(TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN)
client.studio.v2.flows.update(...)

Exception/Log

AttributeError: 'FlowList' object has no attribute 'update'

Technical details:

  • twilio-python version: 9.0.4
  • python version: 3.11.6

allavytalize avatar Apr 10 '24 15:04 allavytalize

Hi @allavytalize! The fetch, update and delete functions are available for a specific Flow resource only. Thus if you want to update a particular Flow resource, you are required to provide its sid like FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. While in case of create you are creating a new Flow resource, in case of list you are listing all the resources. Thus no particular Flow resource sid is required. I think this helps!

tiwarishubham635 avatar Apr 22 '24 10:04 tiwarishubham635