<s> from . import InstanceResource , ListResource <EOL> from . applications import Applications <EOL> from . notifications import Notifications <EOL> from . recordings import Transcriptions , Recordings <EOL> from . calls import Calls <EOL> from . sms_messages import Sms <EOL> from . caller_ids import CallerIds <EOL> from . phone_numbers import PhoneNumbers <EOL> from . conferences import Conferences <EOL> from . connect_apps import ConnectApps , AuthorizedConnectApps <EOL> from . queues import Queues <EOL> from . keys import Keys <EOL> from . usage import UsageRecords , UsageTriggers <EOL> from . messages import Messages <EOL> from . media import MediaList <EOL> from . sip import Sip <EOL> class Account ( InstanceResource ) : <EOL> """<STR_LIT>""" <EOL> ACTIVE = "<STR_LIT>" <EOL> SUSPENDED = "<STR_LIT>" <EOL> CLOSED = "<STR_LIT>" <EOL> subresources = [ <EOL> Applications , <EOL> Notifications , <EOL> Transcriptions , <EOL> Recordings , <EOL> Calls , <EOL> Sms , <EOL> CallerIds , <EOL> PhoneNumbers , <EOL> Conferences , <EOL> ConnectApps , <EOL> Queues , <EOL> AuthorizedConnectApps , <EOL> UsageRecords , <EOL> UsageTriggers , <EOL> MediaList , <EOL> Messages , <EOL> Sip , <EOL> Keys , <EOL> ] <EOL> def update ( self , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> self . update_instance ( ** kwargs ) <EOL> def close ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . update_instance ( status = Account . CLOSED ) <EOL> def suspend ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . update_instance ( status = Account . SUSPENDED ) <EOL> def activate ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . update_instance ( status = Account . ACTIVE ) <EOL> class Accounts ( ListResource ) : <EOL> """<STR_LIT>""" <EOL> name = "<STR_LIT>" <EOL> instance = Account <EOL> def list ( self , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> return self . get_instances ( kwargs ) <EOL> def update ( self , sid , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> return self . update_instance ( sid , kwargs ) <EOL> def close ( self , sid ) : <EOL> """<STR_LIT>""" <EOL> return self . update ( sid , status = Account . CLOSED ) <EOL> def suspend ( self , sid ) : <EOL> """<STR_LIT>""" <EOL> return self . update ( sid , status = Account . SUSPENDED ) <EOL> def activate ( self , sid ) : <EOL> """<STR_LIT>""" <EOL> return self . update ( sid , status = Account . ACTIVE ) <EOL> def create ( self , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> return self . create_instance ( kwargs ) </s>
