Home Reference Source
public class | source

BankAccount

Extends:

Base → BankAccount

Method Summary

Public Methods
public

all(customerID: string): Promise

BankAccount all method.

public

chargeByID(bankID: string, amount: number, description: string): Promise

BankAccount chargeByID method.

public

chargeByToken(token: string, amount: number, description: string): Promise

BankAccount chargeByID method.

public

create(bank: object, customerID: string): Promise

BankAccount create method.

public

createFromToken(token: string, customerID: string): Promise

BankAccount createFromToken method.

public

get(bankID: string, customerID: string): Promise

BankAccount get method.

public

receipt(checkID: string): Promise

BankAccount receipt method.

public

remove(bankID: string, customerID: string): Promise

BankAccount remove method.

Inherited Summary

From class Base
public
public
public

realmID: *

public

version: *

public

all()

public

create(info: *)

public

createFromToken(info: *)

public

formatUrl(path: *): string

public

get(id: *)

public

remove(id: *)

public

request(method: *, path: *, params: {}): *

public

update(id: *, info: *)

Public Methods

public all(customerID: string): Promise source

BankAccount all method.

Retrieve all bank accounts for a customer through the Intuit Quickbooks payment API

Required Options:

  • customerID identifier for the customer

Examples:

BankAccount().all(
   'customer-id'
);

Override:

Base#all

Params:

NameTypeAttributeDescription
customerID string

Return:

Promise

promise containing network response object

public chargeByID(bankID: string, amount: number, description: string): Promise source

BankAccount chargeByID method.

Charge a bank account for a customer through the Intuit Quickbooks payment API

Required Options:

  • bankID id of the bank account
  • amount the amount to charge the card
  • description description for the charge

Examples:

BankAccount().chargeByID(
   'some-id',
   10.55,
   'the description'
);

Params:

NameTypeAttributeDescription
bankID string
amount number
description string

Return:

Promise

promise containing network response object

public chargeByToken(token: string, amount: number, description: string): Promise source

BankAccount chargeByID method.

Charge a bank account for a customer through the Intuit Quickbooks payment API

Required Options:

  • token tokenized version of the card
  • amount the amount to charge the card
  • description description for the charge

Examples:

BankAccount().chargeByToken(
   'some-token',
   10.55,
   'the description'
);

Params:

NameTypeAttributeDescription
token string
amount number
description string

Return:

Promise

promise containing network response object

public create(bank: object, customerID: string): Promise source

BankAccount create method.

Create a bank account object through the Intuit Quickbooks payment API

Required Options:

  • bank
    • name name of person
    • routingNumber routing number for account
    • accountNumber account number for account
    • accountType account type (i.e. PERSONAL_CHECKING or PERSONAL_SAVINGS)
    • phone phone number of person
  • customerID identifier for the customer

Examples:

BankAccount().create({
   "name": "My Checking",
   "routingNumber": "XXXXX0358",
   "accountNumber": "XXXX4534",
   "accountType": "PERSONAL_CHECKING",
   "phone": "6047296480"
}, 'customer-id');

Override:

Base#create

Params:

NameTypeAttributeDescription
bank object
customerID string

Return:

Promise

promise containing network response object

public createFromToken(token: string, customerID: string): Promise source

BankAccount createFromToken method.

Create a bank account object from a token through the Intuit Quickbooks payment API

Required Options:

  • token tokenized version of the bank account
  • customerID identifier for the customer

Examples:

BankAccount().createFromToken(
   'some-token',
   'customer-id'
);

Override:

Base#createFromToken

Params:

NameTypeAttributeDescription
token string
customerID string

Return:

Promise

promise containing network response object

public get(bankID: string, customerID: string): Promise source

BankAccount get method.

Retrieve a bank account's information through the Intuit Quickbooks payment API

Required Options:

  • bankID tokenized version of the bank account
  • customerID identifier for the customer

Examples:

BankAccount().remove(
   'some-identifier',
   'customer-id'
);

Override:

Base#get

Params:

NameTypeAttributeDescription
bankID string
customerID string

Return:

Promise

promise containing network response object

public receipt(checkID: string): Promise source

BankAccount receipt method.

Get a receipt of a previous charge through the Intuit Quickbooks payment API

Required Options:

  • checkID id of the charge

Examples:

BankAccount().receipt(
   'some-id',
);

Params:

NameTypeAttributeDescription
checkID string

Return:

Promise

promise containing network response object

public remove(bankID: string, customerID: string): Promise source

BankAccount remove method.

Remove a bank account through the Intuit Quickbooks payment API

Required Options:

  • bankID tokenized version of the bank account
  • customerID identifier for the customer

Examples:

BankAccount().remove(
   'some-identifier',
   'customer-id'
);

Override:

Base#remove

Params:

NameTypeAttributeDescription
bankID string
customerID string

Return:

Promise

promise containing network response object