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