CreditCard
Extends:
Method Summary
| Public Methods | ||
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
createFromToken(token: object, customerID: string): Promise
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
Inherited Summary
| From class Base | ||
| public |
accessToken: * |
|
| public |
production: * |
|
| public |
realmID: * |
|
| public |
version: * |
|
| public |
all() |
|
| public |
create(info: *) |
|
| public |
createFromToken(info: *) |
|
| public |
|
|
| public |
get(id: *) |
|
| public |
remove(id: *) |
|
| public |
request(method: *, path: *, params: {}): * |
|
| public |
update(id: *, info: *) |
|
Public Methods
public all(customerID: string): Promise source
CreditCard all method.
Retrieve all credit cards through the Intuit Quickbooks payment API
Required Options:
customerIDidentifier for the customer
Examples:
CreditCard().all('customer-id');
Override:
Base#allParams:
| Name | Type | Attribute | Description |
| customerID | string |
public capture(chargeID: string, amount: number): Promise source
CreditCard capture method.
Capture an existing charge through the Intuit Quickbooks payment API
Required Options:
chargeIDidentifier of the chargeamountamount to capture
Examples:
CreditCard().capture('some-id');
public chargeByID(cardID: string, amount: number, description: string, currency: string): Promise source
CreditCard chargeByID method.
Charge a credit card through the Intuit Quickbooks payment API
Required Options:
cardIDidentifier of the cardamountthe amount to charge the carddescriptiondescription for the chargecurrencythe amount to charge will be in (defaultUSD)
Examples:
CreditCard().chargeByID('some-id', 10.55);
public chargeByToken(token: string, amount: number, description: string, currency: string): Promise source
CreditCard chargeByToken method.
Charge a credit card through the Intuit Quickbooks payment API
Required Options:
tokentokenized version of the cardamountthe amount to charge the cardcurrencythe amount to charge will be in (defaultUSD)descriptiondescription for the charge
Examples:
CreditCard().chargeByToken('some-token', 10.55);
public create(card: object, customerID: string): Promise source
CreditCard create method.
Create a credit card object through the Intuit Quickbooks payment API
Required Options:
cardnumbernumber on the cardexpMonthexpiration month on the cardexpYearexpiration year on the cardnamename on the cardaddressstreetAddressstreet address of billing addresscitycity of billing addressregionregion of billing addresscountrycountry of billing addresspostalCodepostalCode of billing address
customerIDidentifier for the customer
Examples:
CreditCard().create({
"number": "4408041234567893",
"expMonth": "12",
"expYear": "2026",
"name": "Test User",
"address": {
"streetAddress": "1245 Hana Rd",
"city": "Richmond",
"region": "VA",
"country": "US",
"postalCode": "44112"
}
}, 'customer-id');
Override:
Base#createpublic createFromToken(token: object, customerID: string): Promise source
CreditCard createFromToken method.
Create a credit card object through the Intuit Quickbooks payment API
Required Options:
tokentokenized version of the cardcustomerIDidentifier for the customer
Examples:
CreditCard().createFromToken('some-token', 'customer-id');
Override:
Base#createFromTokenpublic get(cardID: object, customerID: string): Promise source
CreditCard get method.
Retrieve a credit card through the Intuit Quickbooks payment API
Required Options:
cardIDidentifier of the cardcustomerIDidentifier for the customer
Examples:
CreditCard().get('identifier', 'customer-id');
Override:
Base#getpublic getRefund(chargeID: string, refundID: string): Promise source
CreditCard getRefund method.
Get information about a refund through the Intuit Quickbooks payment API
Required Options:
chargeIDidentifier of the chargerefundIDidentifier of the refund
Examples:
CreditCard().getRefund('some-id');
public receipt(chargeID: string): Promise source
CreditCard receipt method.
Retrieve a charge through the Intuit Quickbooks payment API
Required Options:
chargeIDidentifier of the charge
Examples:
CreditCard().receipt('some-id');
Params:
| Name | Type | Attribute | Description |
| chargeID | string |
public refund(chargeID: string, amount: number, reason: string): Promise source
CreditCard refund method.
Process a refund for a charge through the Intuit Quickbooks payment API
Required Options:
chargeIDidentifier of the chargeamountamount to capturereasonreason for the refund
Examples:
CreditCard().refund('some-id', 5.00, 'the reason');
public remove(cardID: object, customerID: string): Promise source
CreditCard remove method.
Remove a credit card through the Intuit Quickbooks payment API
Required Options:
cardIDidentifier of the cardcustomerIDidentifier for the customer
Examples:
CreditCard().remove('identifier', 'customer-id');