@@ -39,7 +39,8 @@ def __init__(self, version):
3939
4040 def create (self , friendly_name = values .unset , date_created = values .unset ,
4141 date_updated = values .unset , messaging_service_sid = values .unset ,
42- attributes = values .unset , x_twilio_webhook_enabled = values .unset ):
42+ attributes = values .unset , state = values .unset ,
43+ x_twilio_webhook_enabled = values .unset ):
4344 """
4445 Create the ConversationInstance
4546
@@ -48,6 +49,7 @@ def create(self, friendly_name=values.unset, date_created=values.unset,
4849 :param datetime date_updated: The date that this resource was last updated.
4950 :param unicode messaging_service_sid: The unique id of the SMS Service this conversation belongs to.
5051 :param unicode attributes: An optional string metadata field you can use to store any data you wish.
52+ :param ConversationInstance.State state: Current state of this conversation.
5153 :param ConversationInstance.WebhookEnabledType x_twilio_webhook_enabled: The X-Twilio-Webhook-Enabled HTTP request header
5254
5355 :returns: The created ConversationInstance
@@ -59,6 +61,7 @@ def create(self, friendly_name=values.unset, date_created=values.unset,
5961 'DateUpdated' : serialize .iso8601_datetime (date_updated ),
6062 'MessagingServiceSid' : messaging_service_sid ,
6163 'Attributes' : attributes ,
64+ 'State' : state ,
6265 })
6366 headers = values .of ({'X-Twilio-Webhook-Enabled' : x_twilio_webhook_enabled , })
6467
@@ -242,7 +245,7 @@ def __init__(self, version, sid):
242245
243246 def update (self , friendly_name = values .unset , date_created = values .unset ,
244247 date_updated = values .unset , attributes = values .unset ,
245- messaging_service_sid = values .unset ,
248+ messaging_service_sid = values .unset , state = values . unset ,
246249 x_twilio_webhook_enabled = values .unset ):
247250 """
248251 Update the ConversationInstance
@@ -252,6 +255,7 @@ def update(self, friendly_name=values.unset, date_created=values.unset,
252255 :param datetime date_updated: The date that this resource was last updated.
253256 :param unicode attributes: An optional string metadata field you can use to store any data you wish.
254257 :param unicode messaging_service_sid: The unique id of the SMS Service this conversation belongs to.
258+ :param ConversationInstance.State state: Current state of this conversation.
255259 :param ConversationInstance.WebhookEnabledType x_twilio_webhook_enabled: The X-Twilio-Webhook-Enabled HTTP request header
256260
257261 :returns: The updated ConversationInstance
@@ -263,6 +267,7 @@ def update(self, friendly_name=values.unset, date_created=values.unset,
263267 'DateUpdated' : serialize .iso8601_datetime (date_updated ),
264268 'Attributes' : attributes ,
265269 'MessagingServiceSid' : messaging_service_sid ,
270+ 'State' : state ,
266271 })
267272 headers = values .of ({'X-Twilio-Webhook-Enabled' : x_twilio_webhook_enabled , })
268273
@@ -349,6 +354,11 @@ class WebhookEnabledType(object):
349354 TRUE = "true"
350355 FALSE = "false"
351356
357+ class State (object ):
358+ INACTIVE = "inactive"
359+ ACTIVE = "active"
360+ CLOSED = "closed"
361+
352362 def __init__ (self , version , payload , sid = None ):
353363 """
354364 Initialize the ConversationInstance
@@ -366,6 +376,7 @@ def __init__(self, version, payload, sid=None):
366376 'sid' : payload .get ('sid' ),
367377 'friendly_name' : payload .get ('friendly_name' ),
368378 'attributes' : payload .get ('attributes' ),
379+ 'state' : payload .get ('state' ),
369380 'date_created' : deserialize .iso8601_datetime (payload .get ('date_created' )),
370381 'date_updated' : deserialize .iso8601_datetime (payload .get ('date_updated' )),
371382 'url' : payload .get ('url' ),
@@ -437,6 +448,14 @@ def attributes(self):
437448 """
438449 return self ._properties ['attributes' ]
439450
451+ @property
452+ def state (self ):
453+ """
454+ :returns: Current state of this conversation.
455+ :rtype: ConversationInstance.State
456+ """
457+ return self ._properties ['state' ]
458+
440459 @property
441460 def date_created (self ):
442461 """
@@ -471,7 +490,7 @@ def links(self):
471490
472491 def update (self , friendly_name = values .unset , date_created = values .unset ,
473492 date_updated = values .unset , attributes = values .unset ,
474- messaging_service_sid = values .unset ,
493+ messaging_service_sid = values .unset , state = values . unset ,
475494 x_twilio_webhook_enabled = values .unset ):
476495 """
477496 Update the ConversationInstance
@@ -481,6 +500,7 @@ def update(self, friendly_name=values.unset, date_created=values.unset,
481500 :param datetime date_updated: The date that this resource was last updated.
482501 :param unicode attributes: An optional string metadata field you can use to store any data you wish.
483502 :param unicode messaging_service_sid: The unique id of the SMS Service this conversation belongs to.
503+ :param ConversationInstance.State state: Current state of this conversation.
484504 :param ConversationInstance.WebhookEnabledType x_twilio_webhook_enabled: The X-Twilio-Webhook-Enabled HTTP request header
485505
486506 :returns: The updated ConversationInstance
@@ -492,6 +512,7 @@ def update(self, friendly_name=values.unset, date_created=values.unset,
492512 date_updated = date_updated ,
493513 attributes = attributes ,
494514 messaging_service_sid = messaging_service_sid ,
515+ state = state ,
495516 x_twilio_webhook_enabled = x_twilio_webhook_enabled ,
496517 )
497518
0 commit comments