@bebapps/rapyd-sdk
Version:
An un-official [Rapyd](https://rapyd.net) SDK for Node.js.
111 lines (110 loc) • 8.34 kB
text/typescript
export enum WalletError {
/**
* The request tried to create a wallet, but the ewallet reference ID was not valid. The request was rejected. Corrective action: Set ‘ewallet_reference_id’ to a string of less than 200 characters.
*/
ERROR_CREATE_USER_INVALID_EWALLET_REFERENCE_ID = 'ERROR_CREATE_USER_INVALID_EWALLET_REFERENCE_ID',
/**
* The request tried to create a wallet, but the reference ID was already in use. The request was rejected. Corrective action: For 'ewallet_reference_id', enter a unique string.
*/
ERROR_CREATE_USER_EWALLET_REFERENCE_ID_ALREADY_EXISTS = 'ERROR_CREATE_USER_EWALLET_REFERENCE_ID_ALREADY_EXISTS',
/**
* The request attempted an operation that requires a wallet, but the wallet is disabled. The request was rejected. Corrective action: Enable the wallet.
*/
ERROR_EWALLET_DISABLED = 'ERROR_EWALLET_DISABLED',
/**
* The request attempted an operation that requires a person's first name, but the name contained special characters. The request was rejected. Corrective action: Use only alphabetic characters and spaces for 'first_name'.
*/
ERROR_FIRST_NAME_CONTAINS_ILLEGAL_CHARS = 'ERROR_FIRST_NAME_CONTAINS_ILLEGAL_CHARS',
/**
* The request attempted an operation that requires a wallet, but the wallet was not found. The request was rejected. Corrective action: Use the ID of a valid wallet, a string starting with 'ewallet_'.
*/
ERROR_GET_EWALLET = 'ERROR_GET_EWALLET',
/**
* The request attempted an operation that requires a wallet, but the wallet was not found. The request was rejected. Corrective action: Use a valid wallet ID, which is a string starting with 'ewallet_'.
*/
ERROR_GET_USER = 'ERROR_GET_USER',
/**
* The request attempted an operation that requires a wallet, but the wallet was not recognized. The request was rejected. Corrective action: Use the ID of a valid wallet, a string starting with 'ewallet_'.
*/
ERROR_INVALID_EWALLET = 'ERROR_INVALID_EWALLET',
/**
* The request attempted an operation that requires the ewallet reference ID, but the ewallet ID was not valid. The request was rejected. Corrective action: Set 'ewallet_reference_id' to a string of less than 200 characters.
*/
ERROR_INVALID_EWALLET_REFERENCE_ID = 'ERROR_INVALID_EWALLET_REFERENCE_ID',
/**
* The request attempted an operation that requires the 'type' parameter, but the 'type' was not a recognized value. The request was rejected. Corrective action: Set 'type' to one of the following values: 'person', 'company', 'client'.
*/
ERROR_INVALID_EWALLET_TYPE = 'ERROR_INVALID_EWALLET_TYPE',
/**
* The request attempted an operation that requires the verification status, but the verification status was not valid. The request was rejected. Corrective action: Set 'verification_status' to one of the following values: 'verified', 'not verified'
*/
ERROR_INVALID_EWALLET_VERIFICATION_STATUS = 'ERROR_INVALID_EWALLET_VERIFICATION_STATUS',
/**
* The request attempted an operation that requires a pay code or refund code, but these codes are now obsolete. The request was rejected. Corrective action: Use 'Create Payment' and related methods.
*/
ERROR_PAYCODE_AND_REFUND_CODE_OBSOLETE = 'ERROR_PAYCODE_AND_REFUND_CODE_OBSOLETE',
/**
* The request tried to update a wallet type, but the 'type' cannot be changed. The request was rejected. Corrective action: None. Create a new wallet.
*/
ERROR_UPDATE_EWALLET_TYPE = 'ERROR_UPDATE_EWALLET_TYPE',
/**
* The request tried to add funds to or remove funds from a wallet, but the wallet was not found. The request was rejected. Corrective action: Use a valid wallet phone number in E.164 format, or a valid wallet ID, which is a string starting with 'ewallet_'.
*/
ERROR_UPDATE_FUNDS = 'ERROR_UPDATE_FUNDS',
/**
* The request tried to update a wallet, but the wallet was not found. The request was rejected. Corrective action: Use a valid wallet phone number in E.164 format, or a valid wallet ID, which is a string starting with 'ewallet_'.
*/
ERROR_UPDATE_USER = 'ERROR_UPDATE_USER',
/**
* The request tried to update a wallet, but the reference ID was already in use. The request was rejected. Corrective action: For 'ewallet_reference_id', enter a unique string.
*/
ERROR_UPDATE_USER_EWALLET_REFERENCE_ID_ALREADY_EXISTS = 'ERROR_UPDATE_USER_EWALLET_REFERENCE_ID_ALREADY_EXISTS',
/**
* The request created a company wallet, but the first line of the business address was not found. The wallet was created with no 'business_details' object, and it is not valid without it. Corrective action: Use 'Update Wallet' to set 'line1' in the 'address' object to a string made up of alphabetic characters and spaces.
*/
EWALLET_BUSINESS_DETAILS_ADDRESS_LINE1_NOT_VALID = 'EWALLET_BUSINESS_DETAILS_ADDRESS_LINE1_NOT_VALID',
/**
* The request created a company wallet, but the name associated with the business address was not found or contained special characters. The wallet was created with no 'business_details' object, and it is not valid without it. Corrective action: Use 'Update Wallet' to set 'name' in the 'address' object to a string made up of alphabetic characters and spaces.
*/
EWALLET_BUSINESS_DETAILS_ADDRESS_NAME_NOT_VALID = 'EWALLET_BUSINESS_DETAILS_ADDRESS_NAME_NOT_VALID',
/**
* The request tried to update a wallet, but the business address was missing required information or contained special characters. The request was rejected. Corrective action: Inside the 'address' object, which is inside the 'business_details' object, provide 'name' with alphanumerics and spaces and 'line_1' with a string.
*/
EWALLET_UPDATED_WITH_NO_BUSINESS_DETAILS_DUE_TO_INVALID_ADDRESS = 'EWALLET_UPDATED_WITH_NO_BUSINESS_DETAILS_DUE_TO_INVALID_ADDRESS',
/**
* The request tried to delete a wallet, but the wallet held an account. The request was rejected. Corrective action: None. Determine why an attempt was made to delete the wallet.
*/
EWALLET_WITH_ACCOUNT_CANNOT_BE_DELETED = 'EWALLET_WITH_ACCOUNT_CANNOT_BE_DELETED',
/**
* The request attempted an operation that requires an email address, but the email was not valid or is already in use. The request was rejected. Corrective action: Provide a valid, unique email address for 'email'.
*/
INVALID_EMAIL = 'INVALID_EMAIL',
/**
* The request tried to create a wallet, but the 'type' body parameter was not a recognized value. The request was rejected. Corrective action: Set 'type' to one of the following values: 'person', 'company'.
*/
INVALID_EWALLET_TYPE = 'INVALID_EWALLET_TYPE',
/**
* The request tried to perform an operation that requires the family name of an individual, but the 'last_name' field was blank or invalid. The request was rejected. Corrective action: Submit a valid last name.
*/
INVALID_LAST_NAME = 'INVALID_LAST_NAME',
/**
* The request tried to create or update a wallet contact, but the 'contact_type' was missing. The request was rejected. Corrective action: Set 'contact_type' to one of the following values: 'personal', 'business'
*/
MISSING_EWALLET_CONTACT_TYPE = 'MISSING_EWALLET_CONTACT_TYPE',
/**
* The request attempted an operation that requires a wallet, but the wallet was not found. The request was rejected. Corrective action: Use the ID of a valid wallet.
*/
MISSING_EWALLET_ID = 'MISSING_EWALLET_ID',
/**
* The request attempted an operation that requires a wallet, but the wallet was not found. The request was rejected. Corrective action: Provide a valid wallet ID.
*/
MISSING_EWALLET_TOKEN = 'MISSING_EWALLET_TOKEN',
/**
* The request attempted an operation that requires a wallet, but the wallet was not found. The request was rejected. Corrective action: Provide the wallet's phone number in E.164 format or wallet ID, which is a string starting with 'ewallet_'.
*/
MISSING_PHONE_NUMBER_OR_EWALLET_ID = 'MISSING_PHONE_NUMBER_OR_EWALLET_ID',
/**
* The request tried to assign a phone number to a wallet, but the phone number is already in the database. A wallet must have a unique phone number, but wallet contacts are not restricted. The request was rejected. Corrective action: In the 'contact' object, assign the number to the 'phone_number' field.
*/
USER_ALREADY_EXISTS = 'USER_ALREADY_EXISTS',
};