sm-types 1.2.2 → 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.2",
3
+ "version": "1.3.0",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build": "tsc",
@@ -3,6 +3,7 @@ export interface IListOffersReqDto {
3
3
  international: boolean;
4
4
  cabinClass: string;
5
5
  promoCode: string;
6
+ airlinesCode: string;
6
7
  paxInfo: IPaxInfo;
7
8
  routes: IRoute[];
8
9
  config: {
@@ -15,6 +16,7 @@ export interface IAddOfferReqDto {
15
16
  offerDetails: ISmWcfOffer;
16
17
  cabinClass: string;
17
18
  promoCode: string;
19
+ airlinesCode: string;
18
20
  paxInfo: IPaxInfo;
19
21
  routes: IRoute[];
20
22
  recordLocator?: string;
@@ -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;
@@ -5,6 +5,8 @@ export declare const SystemType: {
5
5
  readonly AZUL: "AZUL";
6
6
  readonly PASSAREDO: "PASSAREDO";
7
7
  readonly SABRE: "SABRE";
8
+ readonly ITAPEMIRIM: "ITAPEMIRIM";
9
+ readonly AMADEUS: "AMADEUS";
8
10
  };
9
11
  export declare const JourneyType: {
10
12
  readonly INBOUND: "inbound";
@@ -7,7 +7,9 @@ exports.SystemType = {
7
7
  GOLGWS: 'GOLGWS',
8
8
  AZUL: 'AZUL',
9
9
  PASSAREDO: 'PASSAREDO',
10
- SABRE: 'SABRE'
10
+ SABRE: 'SABRE',
11
+ ITAPEMIRIM: 'ITAPEMIRIM',
12
+ AMADEUS: 'AMADEUS',
11
13
  };
12
14
  exports.JourneyType = {
13
15
  INBOUND: 'inbound',