Cheque Reference
Constructor
A Cheque class instance or 'cheque' refers to an object representing a paper check, and the cheques array can contain multiple instances of the Cheque class. TheM.cheques[0]
refers to the first check belonging to the user. If multiple checks exist, TheM.cheques[0]
could be replaced by TheM.cheques[1]
, TheM.cheques[2]
, etc. Alternatively, you could reference the check based on the AFiChequeId, replacing TheM.cheques[0]
with TheM.cheques['PUT_AFiChequeId_HERE']
or TheM.cheques.cheque('PUT_AFiChequeId_HERE')
.
A new instance of the Cheque class is initialized when a modelBank cheques pushed
event occurs, as well as when a new check is added via a TheM.cheques.newTempCheque call. The properties and methods of the Cheque class can be referenced by specifying the check, followed by the property or method name, like TheM.cheques['PUT_AFiChequeId_HERE'].AFiChequeId
.
//A new instance of the Cheque class is instantiated automatically when a new check is added via a TheM.cheques.newTempCheque call.
Example
Properties
Property table for Cheque
Property | Description | Required | Schema |
---|---|---|---|
AFiChequeId | Gets (returns) the cheque ID in ampliFi. | Yes | { "title": "TheM.cheques[0].AFiChequeId", "type": "string", "description": "Gets (returns) the cheque ID in ampliFi.", "examples": [ "awcqly8ox03hpkxd9u8ax8ed8nh147jsoikhkgtjgjcw " ], "nullable": false } |
imgFront | Gets (returns) or sets the image associated with the front side of the paper check in base 64 format. When a check image is set, an attempt to deliver the image to the server will automatically occur. | Yes | { "title": "TheM.cheques[0].imgFront", "type": "string", "description": "Gets (returns) or sets the image associated with the front side of the paper check in base 64 format. When a check image is set, an attempt to deliver the image to the server will automatically occur.", "$comment": "enumerable getter setter", "examples": [ "VeryLongBase64ImageString" ], "nullable": false } |
imgBack | Gets (returns) or sets the image associated with the back side of the paper check in base 64 format. When a check image is set, an attempt to deliver the image to the server will automatically occur. | Yes | { "title": "TheM.cheques[0].imgBack", "type": "string", "description": "Gets (returns) or sets the image associated with the back side of the paper check in base 64 format. When a check image is set, an attempt to deliver the image to the server will automatically occur.", "$comment": "enumerable getter setter", "examples": [ "VeryLongBase64ImageString" ], "nullable": false } |
thumbFront | Gets (returns) or sets the image associated with the thumbnail image of the front side of the paper check in base 64 format. When a check image is set, an attempt to deliver the image to the server will automatically occur. | No | { "title": "TheM.cheques[0].thumbFront", "type": "string", "description": "Gets (returns) or sets the image associated with the thumbnail image of the front side of the paper check in base 64 format. When a check image is set, an attempt to deliver the image to the server will automatically occur.", "$comment": "enumerable getter setter", "examples": [ "VeryLongBase64ImageString", null ], "nullable": true } |
thumbBack | Gets (returns) or sets the image associated with the thumbnail image of the back side of the paper check in base 64 format. When a check image is set, an attempt to deliver the image to the server will automatically occur. | No | { "title": "TheM.cheques[0].thumbBack", "type": "string", "description": "Gets (returns) or sets the image associated with the thumbnail image of the back side of the paper check in base 64 format. When a check image is set, an attempt to deliver the image to the server will automatically occur.", "$comment": "enumerable getter setter", "examples": [ "VeryLongBase64ImageString", null ], "nullable": true } |
amount | Gets (returns) or sets the amount of the paper check. Must be a number greater than 0 up to 2 decimal places. | Yes | { "title": "TheM.cheques[0].amount", "type": "number", "description": "Gets (returns) or sets the amount of the paper check. Must be a number greater than 0 up to 2 decimal places.", "$comment": "enumerable getter setter", "examples": [ 10.01 ], "nullable": false } |
currency | Gets (returns) or sets the 3 character currency code. | Yes | { "title": "TheM.cheques[0].currency", "type": "string", "description": "Gets (returns) or sets the 3 character currency code.", "$comment": "enumerable getter setter", "examples": [ "USD" ], "nullable": false } |
toJSON | Gets (returns) the Cheque properties in a JSON formatted object. | Yes | { "title": "TheM.cheques[0].toJSON", "type": "object", "description": "Gets (returns) the Cheque properties in a JSON formatted object.", "examples": [ { "AFiChequeId": "awcqly8ox03hpkxd9u8ax8ed8nh147jsoikhkgtjgjcw ", "amount": 10.01, "currency": "USD", "dtsCreated": "2024-07-15T17:02:41.567Z", "dtsModified": "2024-07-15T17:02:41.567Z", "dtsProcessed": "2024-07-15T17:02:41.567Z", "isAccepted": false, "isCredited": false, "isDeleted": false, "isDelivered": true, "isDeliveredBack": true, "isDeliveredFront": true, "isDelivering": false, "isPendingApproval": false, "isSyncedToServer": true } ], "nullable": false } |
isAccepted | Gets (returns) true if the check has been accepted. | Yes | { "title": "TheM.cheques[0].isAccepted", "type": "boolean", "description": "Gets (returns) true if the check has been accepted.", "$comment": "enumerable getter", "examples": [ true, false ], "default": false, "nullable": false } |
isCredited | Gets (returns) true if the check has been credited. | Yes | { "title": "TheM.cheques[0].isCredited", "type": "boolean", "description": "Gets (returns) true if the check has been credited.", "$comment": "enumerable getter", "examples": [ true, false ], "default": false, "nullable": false } |
isDelivered | Gets (returns) true if both the front and back images of the check have been delivered to the server. | Yes | { "title": "TheM.cheques[0].isDelivered", "type": "boolean", "description": "Gets (returns) true if both the front and back images of the check have been delivered to the server.", "$comment": "enumerable getter", "examples": [ true, false ], "default": false, "nullable": false } |
isDelivering | Gets (returns) true if either the front image or the back image of the check is currently being delivered to the server. | Yes | { "title": "TheM.cheques[0].isDelivering", "type": "boolean", "description": "Gets (returns) true if either the front image or the back image of the check is currently being delivered to the server.", "$comment": "enumerable getter", "examples": [ true, false ], "default": false, "nullable": false } |
isPendingApproval | Gets (returns) true if the check has not yet been approved. | Yes | { "title": "TheM.cheques[0].isPendingApproval", "type": "boolean", "description": "Gets (returns) true if the check has not yet been approved.", "$comment": "enumerable getter", "examples": [ true, false ], "default": false, "nullable": false } |
isSyncedToServer | Gets (returns) true if the check has been synced to the server. | Yes | { "title": "TheM.cheques[0].isSyncedToServer", "type": "boolean", "description": "Gets (returns) true if the check has been synced to the server.", "$comment": "getter", "examples": [ true, false ], "default": false, "nullable": false } |
isValid | Gets (returns) true if all the required check details are present. All Cheque instances require an amount, a currency, an imgFront, an imgBack, and an AFiChequeId (automatically generated) to be considered valid. | Yes | { "title": "TheM.cheques[0].isValid", "type": "boolean", "description": "Gets (returns) true if all the required check details are present. All Cheque instances require an amount, a currency, an imgFront, an imgBack, and an AFiChequeId (automatically generated) to be considered valid.", "$comment": "getter", "examples": [ true, false ], "nullable": false } |
dtsCreated | Gets (returns) the date that the check was created. | Yes | { "title": "TheM.cheques[0].dtsCreated", "type": "Date", "description": "Gets (returns) the date that the check was created.", "examples": [ "Mon Jul 15 2024 13:02:41 GMT-0400 (Eastern Daylight Time)" ], "nullable": false } |
dtsModified | Gets (returns) the date that the check was last modified. | Yes | { "title": "TheM.cheques[0].dtsModified", "type": "Date", "description": "Gets (returns) the date that the check was last modified.", "examples": [ "Mon Jul 15 2024 13:02:41 GMT-0400 (Eastern Daylight Time)" ], "nullable": false } |
dtsProcessed | Gets (returns) the date that the check was processed. | Yes | { "title": "TheM.cheques[0].dtsProcessed", "type": "Date", "description": "Gets (returns) the date that the check was processed.", "examples": [ "Mon Jul 15 2024 13:02:41 GMT-0400 (Eastern Daylight Time)" ], "nullable": false } |