TheM.payees Reference
Constructor
The parent TheM class contains functionality enabling the initialization of any TheM subclass or submodule instance by simply calling TheM.doInit('subclassName'), where the input string is a case sensitive space-delimited string containing the names of all submodules that may be required in the current session. Most TheM subclasses also require the 'common' submodule. It is common to initialize the target submodule and any other submodule dependencies concurrently. The following example will initialize a new instance of the necessary submodules using a proxy constructor in TheM parent class.
Example
Properties
Property table for TheM.payees
Property | Description | Required | Schema |
---|---|---|---|
all | Gets (returns) an array with all the payees associated with the user that are not deleted. | Yes | { "title": "TheM.payees.all", "type": "array", "description": "Gets (returns) an array with all the payees associated with the user that are not deleted.", "$comment": "getter", "examples": [ [ { "AFiUserId": "testaurlx8wfimcrw", "dtsCreated": "2024-06-28T11:12:10.053Z", "dtsModified": "2024-06-28T11:12:10.053Z", "isBusiness": false, "AFiPayeeId": "3gzvss70aqhkjh0gcmwz6fr6eutmzmf8", "beneficiaries": [], "imageBase64": "VeryLongBase64ImageString", "isFavourite": false, "isHidden": false, "name": "Test Payee Group", "narrativeCredit": "A brief narrative", "narrativeDebit": "A brief narrative", "toJSON": {} } ] ], "nullable": false } |
length | Gets (returns) the length of the payees array. | Yes | { "title": "TheM.payees.length", "type": "number", "description": "Gets (returns) the length of the payees array.", "examples": [ 1 ], "default": 0, "nullable": false } |
isReady | Gets (returns) or sets true if TheM.payees is fully ready. When setting isReady true for the first time, a(n) 'TheM.payees ready' event is also triggered. | Yes | { "title": "TheM.payees.isReady", "type": "boolean", "description": "Gets (returns) or sets true if TheM.payees is fully ready. When setting isReady true for the first time, a(n) 'TheM.payees ready' event is also triggered.", "$comment": "getter setter", "examples": [ true, false ], "default": false, "nullable": false } |
Methods
Method Name | Parameter Descriptions | Description | Example |
---|---|---|---|
doSave | [] |
Saves payees data in local storage. Normally, there is no need to use this method as the framework knows automatically when to save and when to load the data to and from local storage. Returns true. | TheM.payees.doSave(); |
doLoad | [] |
Loads payees data from local storage and returns a boolean value to indicate success. On success, a(n) 'modelBank payees updated' event will occur.Normally, there is no need to use this method as the framework knows automatically when to save and when to load the data to and from local storage. | TheM.payees.doLoad(); |
doUpdate | [ |
Causes framework to pull fresh payees data from the server. If the data is fresh enough, meaning an update has happened recently, the framework will ignore the suggestion. However, you can force the framework to update the data by sending true as an argument. On success, a(n) 'modelBank payees refreshed' event will occur. |
TheM.payees.doUpdate(true); |
payee | [ |
Returns the payee specified by the included AFiPayeeId. | TheM.payees.payee({); |
filtered | [ |
This method accepts an object, givenParams , containing filter criteria (key:value pairs where key is a payee property) and then returns an array of payees with properties matching the given criteria. If no givenParams are included, then an unfiltered payee list is returned. |
TheM.payees.filtered({); |
doRefresh | [] |
Refreshes the beneficiaries array of each payee in the TheM.payees[0] array. | TheM.payees.doRefresh(); |
newTempPayee | [ |
Accepts a given object containing the properties that will be passed down to the new payee. Returns the newly created payee group object. | TheM.payees.newTempPayee({); |
doSubmit | [] |
The doSubmit method is available on a newly created payee initialized through a TheM.payees.newTempPayee(given) call. This method will submit the newly created temporary payee to the server in a POST /payees ampliFi endpoint request. | (TheM.payees.newTempPayee(given)).doSubmit(); |
Submodules
Submodule Name | Link |
---|---|
ClassPayee | ClassPayee Reference |