Document Type <item>

Contained in unabbreviated <transaction> documents.

Quote from comment in OTItem.hpp:

Item as in "Transaction Item"

An OTLedger contains a list of transactions (pending transactions, inbox or outbox.) Each transaction has a list of items that make up that transaction. I think that the Item ID shall be the order in which the items are meant to be processed. Items are like tracks on a CD. It is assumed there will be several of them, they come in packs. You normally would deal with the transaction as a single entity, not the item. A transaction contains a list of items.

Elements and attributes

Item Types

Transcribed from OTItem.hpp, non-exhaustive.

Every type has a corresponding at type, which indicates the server response.

Transfer

Example

<item type="transfer"
status="request"
numberOfOrigin="0"
transactionNum="608"
notaryID="otx127PFVQPLRrYrCENt4yqeHXcYxZtZ4669V"
nymID="otx16n7N8Mxd8CiY4M6zhrbeatiMbbTBUQctN"
fromAccountID="otx1DuqE35bzbuDv2kwMPmWt7EdxVMZtds1Ew"
toAccountID="otx14N8M2es7RRbraFtFRib4njx4zJGvd5gKV"
inReferenceTo="0"
amount="100" >

<note>
eNrjyi3PLMlIKUosV/B09/MPclXQ1VXw8w9xVQhwdHHx9HMH8XHIcJGuAwB9Yxw2
</note>

</item>

Example

<item type="atTransfer"
status="acknowledgement"
numberOfOrigin="608"
transactionNum="608"
notaryID="otx127PFVQPLRrYrCENt4yqeHXcYxZtZ4669V"
nymID="otx1iDN28aAkxYsFQreU1hBC4X4Ss6btPKGR"
fromAccountID="otx1DuqE35bzbuDv2kwMPmWt7EdxVMZtds1Ew"
toAccountID=""
inReferenceTo="608"
amount="0" >

<inReferenceTo>
...
</inReferenceTo>

</item>

Nymbox Resolution

Example

<item type="acceptTransaction"
status="request"
numberOfOrigin="0"
transactionNum="0"
totalListOfNumbers="509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608"
notaryID="otx127PFVQPLRrYrCENt4yqeHXcYxZtZ4669V"
nymID="otx16n7N8Mxd8CiY4M6zhrbeatiMbbTBUQctN"
fromAccountID="otx16n7N8Mxd8CiY4M6zhrbeatiMbbTBUQctN"
toAccountID=""
inReferenceTo="509"
amount="0" >

</item>

Inbox Resolution

Info

Example

<item type="balanceStatement"
status="request"
numberOfOrigin="0"
transactionNum="710"
notaryID="otx1C2jLg8GpXB7An3pWv1eQdbkV4sCiDGQzt"
nymID="otx1FQ6w3YBsijh24BYRxCAPFqvwj1oiwMpMJ"
fromAccountID="otx1K4mr87GwCXt83xsneQhPYE6ztwSyNSi7b"
toAccountID=""
inReferenceTo="0"
amount="999998" >
<attachment>
</attachment>

<transactionReport type="transferReceipt"
adjustment="-1"
accountID="otx1K4mr87GwCXt83xsneQhPYE6ztwSyNSi7b"
nymID="otx1FQ6w3YBsijh24BYRxCAPFqvwj1oiwMpMJ"
notaryID="otx1C2jLg8GpXB7An3pWv1eQdbkV4sCiDGQzt"
numberOfOrigin="711"
transactionNum="827"
closingTransactionNum="0"
inReferenceTo="823" />

<transactionReport type="transfer"
adjustment="-1"
accountID="otx1K4mr87GwCXt83xsneQhPYE6ztwSyNSi7b"
nymID="otx1FQ6w3YBsijh24BYRxCAPFqvwj1oiwMpMJ"
notaryID="otx1C2jLg8GpXB7An3pWv1eQdbkV4sCiDGQzt"
numberOfOrigin="710"
transactionNum="1"
closingTransactionNum="0"
inReferenceTo="710" />

</item>

Cash Withdrawal and Deposit

Cheques and Vouchers

Receipt Types

Payment receipts

References

Notes

Code Smell: Switch Statement

Source. In this case on the type attribute.

The number of possible types of this class the product of * Number of possible transaction types * Number of possible items inside the transaction type * Number of message types (two, request and response)

Should be solved by a better type hierarchy.