Balance Reference
Constructor
A new private instantiation of the Balance class occurs automatically for each new instantiation of the Account class.`
Example
//Balance class instance
{
available: 10,
currency: 'USD',
native: 10,
pending: undefined,
toJSON: {
available: 10,
currency: 'USD',
native: 10,
pending: undefined
}
}
Properties
Property table for Balance
Property | Description | Required | Schema |
---|---|---|---|
available | Gets (returns) the available balance for this account. | No | { "title": "TheM.accounts[0].balance.available", "type": "number", "description": "Gets (returns) the available balance for this account.", "examples": [ 10 ] } |
currency | Gets (returns) the 3 character currency code. | No | { "title": "TheM.accounts[0].balance.currency", "type": "string", "description": "Gets (returns) the 3 character currency code.", "examples": [ "USD", "EUR", "KZT", "JPY", "GBP" ], "default": "USD" } |
native | Gets (returns) the native balance for this account. | No | { "title": "TheM.accounts[0].balance.native", "type": "number", "description": "Gets (returns) the native balance for this account.", "examples": [ 10 ] } |
pending | Gets (returns) the pending balance for this account. | No | { "title": "TheM.accounts[0].balance.pending", "type": "number", "description": "Gets (returns) the pending balance for this account.", "examples": [ 1.5 ] } |
toJSON | Gets (returns) a JSON formated object containing balance properties. | Yes | { "title": "TheM.accounts[0].balance.toJSON", "type": "object", "description": "Gets (returns) a JSON formated object containing balance properties.", "examples": [ { "available": 10, "currency": "USD", "native": 10 } ], "default": { "currency": "USD" }, "nullable": false } |