Skip to content

BeneficiaryPayPal Reference

Constructor

The BeneficiaryPayPal class extends the Beneficiary class and has all of the corresponding properties and methods, with the addition of the PayPal properties specified in this documentation. See the Beneficiary Reference documentation for additional information on the base Beneficiary class.

const newBeneficiary = TheM.beneficiaries.newTempBeneficiary('paypal', {//beneficiary properties});
await newBeneficiary.doSubmit(givenProperties);

Example

const newBeneficiary = TheM.beneficiaries.newTempBeneficiary('paypal', {
  txnType: 'paypal',
  name: 'PayPal Payee',
  paypalId: 'paypalname@email.test',
  defaultAmount: 20,
  narrativeDebit: 'PayPal payment',
  isFavourite: false./;' `,
});
await newBeneficiary.doSubmit({});

Properties

Property table for BeneficiaryPayPal

Property Description Required Schema
paypalId Gets (returns) or sets the PayPal id of the beneficiary. Yes {
  "title": "TheM.beneficiaries[0].paypalId",
  "type": "string",
  "description": "Gets (returns) or sets the PayPal
id of the beneficiary.",
  "examples": [
    "paypalname@email.test"
  ],
  "nullable": false
}
isValid Gets (returns) true if all the required beneficiary details are present and valid. For BeneficiaryPayPal class instances, the transaction type (txnType) is 'paypal', representing a PayPal payment, and will require the following properties to be considered valid: name and paypalId. Yes {
  "title": "TheM.beneficiaries[0].isValid",
  "type": "boolean",
  "description": "Gets (returns) true if all the
required beneficiary details are present and
valid. For BeneficiaryPayPal class instances, the
transaction type (txnType) is 'paypal',
representing a PayPal payment, and will require the
following properties to be considered valid: name
and paypalId.",
  "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",
      "defaultAmount": 20,
      "isActive": true,
      "isBusiness": false,
      "isFavourite": true,
      "isHidden": false,
      "status": "Active",
      "imageBase64":
"Very_Long_Base64_Image_String",
      "dtsCreated": "2024-06-28T11:12:10.053Z",
      "name": "PayPal Payee",
      "txnType": "paypal",
      "narrativeDebit": "PayPal payment",
      "paypalId": "paypalname@email.test"
    }
  ],
  "nullable": false
}