feat(card-io): add typing for response

This commit is contained in:
Ibby Hadeed 2016-12-01 18:45:02 -05:00
parent e6700a360e
commit 2e82320b4c

View File

@ -45,7 +45,7 @@ export class CardIO {
* @param {CardIOOptions} options Options for configuring the plugin * @param {CardIOOptions} options Options for configuring the plugin
*/ */
@Cordova() @Cordova()
static scan(options?: CardIOOptions): Promise<any> { return; } static scan(options?: CardIOOptions): Promise<CardIOResponse> { return; }
/** /**
* Retrieve the version of the card.io library. Useful when contacting support. * Retrieve the version of the card.io library. Useful when contacting support.
@ -73,3 +73,14 @@ export interface CardIOOptions {
useCardIOLogo?: boolean; useCardIOLogo?: boolean;
supressScan?: boolean; supressScan?: boolean;
} }
export interface CardIOResponse {
cardType: string;
redactedCardNumber: string;
cardNumber: string;
expiryMonth: number;
expiryYear: number;
cvv: string;
postalCode: string;
cardholderName: string;
}