sm-types 1.2.4 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/common/index.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  import * as SharedTypes from './shared';
2
- export interface ICreditCard {
3
- holderName: string;
4
- number: string;
5
- expirationDate: string;
6
- cvv: string;
7
- brand: SharedTypes.ICardBrandsType;
2
+ export interface IPaymentMethod {
3
+ holderName?: string;
4
+ number?: string;
5
+ expirationDate?: string;
6
+ cvv?: string;
7
+ brand?: SharedTypes.ICardBrandsType;
8
8
  pgmId?: string;
9
9
  creditCardToken?: string;
10
10
  cardType?: string;
11
+ payment_type: SharedTypes.PaymentMethodType;
11
12
  }
@@ -5,6 +5,11 @@ declare const ICardBrands: {
5
5
  readonly Diners: "diners";
6
6
  readonly Elo: "elo";
7
7
  };
8
+ declare const PaymentMethods: {
9
+ readonly CreditCard: "credit_card";
10
+ readonly Billed: "billed";
11
+ };
8
12
  declare type ValueOf<T> = T[keyof T];
9
13
  export declare type ICardBrandsType = ValueOf<typeof ICardBrands>;
14
+ export declare type PaymentMethodType = ValueOf<typeof PaymentMethods>;
10
15
  export {};
@@ -7,3 +7,7 @@ var ICardBrands = {
7
7
  Diners: "diners",
8
8
  Elo: "elo"
9
9
  };
10
+ var PaymentMethods = {
11
+ CreditCard: 'credit_card',
12
+ Billed: 'billed'
13
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sm-types",
3
- "version": "1.2.4",
3
+ "version": "1.3.0",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build": "tsc",
@@ -1,4 +1,4 @@
1
- import { ICreditCard } from '../common';
1
+ import { IPaymentMethod } from '../common';
2
2
  import { IOfferStatus, IPriceDetails } from '../sm-airlines';
3
3
  import * as SharedTypes from './shared';
4
4
  export * from './shared';
@@ -54,7 +54,10 @@ export interface ICheckReserveInfo {
54
54
  }
55
55
  export interface IGetEmissionDataInfo {
56
56
  cardBrands: ICardBrandItem[];
57
- allowCreditCardPayment: boolean;
57
+ paymentMethods: {
58
+ credit_card: boolean;
59
+ billed: boolean;
60
+ };
58
61
  total: number;
59
62
  }
60
63
  export interface ICardBrandItem {
@@ -62,7 +65,7 @@ export interface ICardBrandItem {
62
65
  brandName: string;
63
66
  }
64
67
  export interface IGetInstallmentsArgs {
65
- creditCard: ICreditCard;
68
+ paymentMethod: IPaymentMethod;
66
69
  creditCardBrandCode: string;
67
70
  system: SharedTypes.ISystemType;
68
71
  total: number;
@@ -79,9 +82,9 @@ export interface IInstallmentOption {
79
82
  }
80
83
  export interface IEmitOfferArgs {
81
84
  serviceOrderInfo: IServiceOrderInfo;
82
- creditCard: ICreditCard;
83
- creditCardBrandCode: string;
84
- installments: number;
85
+ paymentMethod: IPaymentMethod;
86
+ creditCardBrandCode?: string;
87
+ installments?: number;
85
88
  }
86
89
  export interface IEmitOfferInfo {
87
90
  isEmitted: boolean;