Constructor
new Contact(options)
Create a new contact service
- Source:
Parameters:
Name | Type | Description |
---|---|---|
options |
Object
|
configuration parameters |
Methods
createContact(accessToken, name, accountType, accountNumber, sortCode, customerId) → {Promise}
Creates a contact (payee) for the customer
- Source:
Parameters:
Name | Type | Description |
---|---|---|
accessToken |
string
|
the oauth bearer token. |
name |
string
|
the name of the new contact. |
accountType |
string
|
the account type (domestic or international). |
accountNumber |
string
|
the contact's bank account number. |
sortCode |
string
|
the contact's sort code. |
customerId |
string
|
the customer's ID. (optional) |
Returns:
- Type:
-
Promise
- the http request promise
deleteContact(accessToken, contactId) → {Promise}
Deletes a specific contact (payee) from the customer's account
- Source:
Parameters:
Name | Type | Description |
---|---|---|
accessToken |
string
|
the oauth bearer token. |
contactId |
string
|
the Identifier of the contact to be deleted. |
Returns:
- Type:
-
Promise
- the http request promise
getContactAccount(accessToken, contactId) → {Promise}
Gets a specific contact's (payee) account details
- Source:
Parameters:
Name | Type | Description |
---|---|---|
accessToken |
string
|
the oauth bearer token. |
contactId |
string
|
the contact's ID. |
Returns:
- Type:
-
Promise
- the http request promise
getContacts(accessToken) → {Promise}
Gets the customer's contacts (payees)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
accessToken |
string
|
the oauth bearer token. |
Returns:
- Type:
-
Promise
- the http request promise