Skip to content

Commit

Permalink
credit card token
Browse files Browse the repository at this point in the history
  • Loading branch information
williangaspar committed May 8, 2019
1 parent 1881579 commit 49c77b0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
2 changes: 2 additions & 0 deletions dist/sdk/ecommerce/creditCard.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ import { Card } from './card';
import { PaymentType } from './paymentType';
export declare class CreditCard extends Card {
protected type: PaymentType;
cardToken: string;
setCardToken(cardToken: string): this;
}
13 changes: 13 additions & 0 deletions dist/sdk/ecommerce/creditCard.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/sdk/ecommerce/creditCard.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion sdk/ecommerce/creditCard.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import { Card } from './card';
import { PaymentType } from './paymentType';
import { JsonObject } from 'json2typescript';
import { JsonObject, JsonProperty } from 'json2typescript';

@JsonObject('CreditCard')
export class CreditCard extends Card {
protected type: PaymentType = PaymentType.CreditCard;

@JsonProperty('ardToken', String, true)
public cardToken: string = undefined;;

public setCardToken(cardToken: string) {
this.cardToken = cardToken;
return this;
}
}

0 comments on commit 49c77b0

Please sign in to comment.