BeneficiaryCheque Reference
Constructor
The BeneficiaryCheque class extends the Beneficiary class and has all of the corresponding properties and methods, with the addition of the paper check properties specified in this documentation. See the Beneficiary Reference documentation for additional information on the base Beneficiary class.
const newBeneficiary = TheM.beneficiaries.newTempBeneficiary('cheque', {//beneficiary properties});
await newBeneficiary.doSubmit(givenProperties);
Example
const newBeneficiary = TheM.beneficiaries.newTempBeneficiary('cheque', {
txnType: 'cheque',
name: 'Check Payee',
legalName: 'John Doe',
defaultAmount: 20,
narrativeDebit: 'Check payment',
isFavourite: false
address: {
addressLine1: '123 Main Str.',
addressLine2: 'Suite 456',
city: 'Harrisburg',
province: 'PA',
state: 'PA',
postalCode: '12345'
}
});
await newBeneficiary.doSubmit({});
Properties
Property table for BeneficiaryCheque
Property | Description | Required | Schema |
---|---|---|---|
legalName | Gets (returns) or sets the legal name of the beneficiary (individual or business). | Yes | { "title": "TheM.beneficiaries[0].legalName", "type": "string", "description": "Gets (returns) or sets the legal name of the beneficiary (individual or business).", "examples": [ "John Doe", "ABC Electric", "Acme Home Mortgage" ], "nullable": false } |
address | Gets (returns) the beneficiary address. | Yes | address object |
address.toJSON | Gets (returns) the beneficary address properties in a JSON formatted object. | Yes | { "title": "TheM.beneficiaries[0].address.toJSON", "type": "object", "description": "Gets (returns) the beneficary address properties in a JSON formatted object.", "examples": [ { "addressLine1": "123 Main Str.", "addressLine2": "Suite 456", "city": "Harrisburg", "province": "PA", "state": "PA", "countryCode": "US", "postalCode": "12345" } ], "nullable": false } |
isValid | Gets (returns) true if all the required beneficiary details are present and valid. For BeneficiaryCheque class instances, the transaction type (txnType) is 'cheque', representing a paper check payment, and will require the following properties to be considered valid: name, legalName, and address. For the address object, the required properties are address.addressLine1, address.city, address.postalCode, and address.province. | Yes | { "title": "TheM.beneficiaries[0].isValid", "type": "boolean", "description": "Gets (returns) true if all the required beneficiary details are present and valid. For BeneficiaryCheque class instances, the transaction type (txnType) is 'cheque', representing a paper check payment, and will require the following properties to be considered valid: name, legalName, and address. For the address object, the required properties are address.addressLine1, address.city, address.postalCode, and address.province.", "examples": [ true, false ], "nullable": false } |
toJSON | Gets (returns) the beneficary properties in a JSON formatted object. | Yes | { "title": "TheM.beneficiaries[0].toJSON", "type": "object", "description": "Gets (returns) the beneficary properties in a JSON formatted object.", "examples": [ { "AFiBeneficiaryId": "testpgbenlxuma31jlu", "AFiPayeeId": "3gzvss70aqhkjh0gcmwz6fr6eutmzmf8", "accountNumber": "1234567890123456", "routingNumber": "123456789", "bankName": "Citibank NA", "defaultAmount": 20, "destinationName": "Receiving account title", "isActive": true, "isBusiness": false, "isFavourite": true, "isHidden": false, "status": "Active", "type": "CHECKING", "imageBase64": "Very_Long_Base64_Image_String", "dtsCreated": "2024-06-28T11:12:10.053Z", "name": "Check Payee", "txnType": "cheque", "legalName": "John Doe", "narrativeDebit": "Check payment", "address": { "addressLine1": "123 Main Str.", "addressLine2": "Suite 456", "city": "Harrisburg", "province": "PA", "state": "PA", "countryCode": "US", "postalCode": "12345" } } ], "nullable": false } |
Property table for address object
Property | Description | Required | Schema |
---|---|---|---|
addressLine1 | Gets (returns) or sets the beneficiary address line 1. | Yes | { "title": "TheM.beneficiaries[0].address.addressLine1", "type": "string", "description": "Gets (returns) or sets the beneficiary address line 1.", "examples": [ "123 Main Str." ], "nullable": false } |
addressLine2 | Gets (returns) or sets the beneficiary address line 2. | No | { "title": "TheM.beneficiaries[0].address.addressLine2", "type": "string", "description": "Gets (returns) or sets the beneficiary address line 2.", "examples": [ "Suite 456" ], "nullable": true } |
city | Gets (returns) or sets the beneficiary city. | Yes | { "title": "TheM.beneficiaries[0].address.city", "type": "string", "description": "Gets (returns) or sets the beneficiary city.", "examples": [ "Harrisburg" ], "nullable": false } |
province | Gets (returns) or sets the beneficiary province or state. | Yes | { "title": "TheM.beneficiaries[0].address.province", "type": "string", "description": "Gets (returns) or sets the beneficiary province or state.", "examples": [ "PA" ], "nullable": false } |
state | Gets (returns) or sets the beneficiary province or state. | No | { "title": "TheM.beneficiaries[0].address.state", "type": "string", "description": "Gets (returns) or sets the beneficiary province or state.", "examples": [ "PA" ], "nullable": true } |
countryCode | Gets (returns) or sets the beneficiary countryCode. | No | { "title": "TheM.beneficiaries[0].address.countryCode", "type": "string", "description": "Gets (returns) or sets the beneficiary countryCode.", "examples": [ "US" ], "nullable": true } |
postalCode | Gets (returns) or sets the beneficiary postalCode. | Yes | { "title": "TheM.beneficiaries[0].address.postalCode", "type": "string", "description": "Gets (returns) or sets the beneficiary postalCode.", "examples": [ "12345" ], "nullable": false } |