Skip to content

Transaction Version List

Hugh Jeremy edited this page Mar 27, 2019 · 2 revisions

Documentation > TransactionVersionList

Amatino retains a version history of every Transaction. That history allows you to step backwards and forwards through changes to the accounting information describing an Entity. To view the history of a Transaction, you can retrieve a Transaction Version List.

UserList complies with the Python Sequence protocol, meaning you can iterate over constituent Transactions, call len(), and access elements by integer subscript.

Properties

.entity - Entity

The Entity that contains the versioned Transactions provided in this TransactionVersionList.


.session - Session

The Session used to initialise this TransactionVersionList.


.versions - List[Transaction]

A list of versions of the target Transaction.


Methods

classmethod .retrieve() -> TransactionVersionList

Retrieve a TransactionVersionList

Parameters

  1. entity: Entity
  2. transaction: Transaction

Example

versions = TransactionVersionList.retrieve(
  entity=mega_corp,
  transaction=big_sale
)

Clone this wiki locally