BeneficiaryUSA_wire Reference
Constructor
The BeneficiaryUSA_wire class extends the Beneficiary class and has all of the corresponding properties and methods, with the addition of the wire properties specified in this documentation. See the Beneficiary Reference documentation for additional information on the base Beneficiary class.
const newBeneficiary = TheM.beneficiaries.newTempBeneficiary('USA_wire', {//beneficiary properties});
await newBeneficiary.doSubmit(givenProperties);
Example
const newBeneficiary = TheM.beneficiaries.newTempBeneficiary('USA_wire', {
txnType: 'USA_wire',
name: 'Wire Payee',
bankName: 'Citibank NA',
destinationName: 'Receiving account title',
accountNumber: '1234567890123456',
routingNumber: '123456789',
defaultAmount: 20,
narrativeDebit: 'Wire payment',
isFavourite: false./;' `,
type: 'CHECKING'
address: {
addressLine1: '123 Main Str.',
addressLine2: 'Suite 456',
city: 'Harrisburg',
province: 'PA',
state: 'PA',
postalCode: '12345'
countryCode: 'US'
}
});
await newBeneficiary.doSubmit({});
Properties
Property table for BeneficiaryUSA_wire
Property | Description | Required | Schema |
---|---|---|---|
destinationName | Gets (returns) or sets the destination account title (who owns the beneficiary account). | Yes | { "title": "TheM.beneficiaries[0].destinationName", "type": "string", "description": "Gets (returns) or sets the destination account title (who owns the beneficiary account).", "examples": [ "Receiving account title" ], "nullable": false } |
bankName | Gets (returns) or sets the beneficiary's bank name. | Yes | { "title": "TheM.beneficiaries[0].bankName", "type": "string", "description": "Gets (returns) or sets the beneficiary's bank name.", "examples": [ "Citibank NA" ], "nullable": false } |
routingNumber | Gets (returns) or sets the routing number of the beneficiary account. | Yes | { "title": "TheM.beneficiaries[0].routingNumber", "type": "string", "description": "Gets (returns) or sets the routing number of the beneficiary account.", "examples": [ "123456789" ], "nullable": false } |
accountNumber | Gets (returns) or sets the account number of the beneficiary account. | Yes | { "title": "TheM.beneficiaries[0].accountNumber", "type": "string", "description": "Gets (returns) or sets the account number of the beneficiary account.", "examples": [ "1234567890123456" ], "nullable": false } |
type | Gets (returns) or sets the beneficiary account type. | Yes | { "title": "TheM.beneficiaries[0].type", "type": "string", "description": "Gets (returns) or sets the beneficiary account type.", "examples": [ "CHECKING", "SAVINGS" ], "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 BeneficiaryUSA_wire class instances, the transaction type (txnType) is 'USA_wire', representing a wire transfer, and will require the following properties to be considered valid: name, destinationName, bankName, routingNumber, accountNumber, address, and type. For the address object, the required properties are address.addressLine1, address.city, address.countryCode, 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 BeneficiaryUSA_wire class instances, the transaction type (txnType) is 'USA_wire', representing a wire transfer, and will require the following properties to be considered valid: name, destinationName, bankName, routingNumber, accountNumber, address, and type. For the address object, the required properties are address.addressLine1, address.city, address.countryCode, 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": "Wire Payee", "txnType": "USA_wire", "narrativeDebit": "Wire 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. | Yes | { "title": "TheM.beneficiaries[0].address.countryCode", "type": "string", "description": "Gets (returns) or sets the beneficiary countryCode.", "examples": [ "US" ], "nullable": false } |
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 } |