#NEWLINE# def add_transaction( self , amount , subaccount = None , metadata = None ) : #NEWLINE# #INDENT# "\n        Add a new transaction to the account.\n\n        Parameters\n        ----------\n        amount : float\n            Negative for withdrawls, positive for deposits.\n        subaccount : object, optional\n            Any indicator of a subaccount to which this transaction applies.\n        metadata : dict, optional\n            Any extra metadata to record with the transaction.\n            (E.g. Info about where the money is coming from or going.)\n            May not contain keys 'amount' or 'subaccount'.\n\n        " #NEWLINE# metadata = ( metadata or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# self . transactions . append ( Transaction ( amount , subaccount , metadata ) ) #NEWLINE# self . balance += amount