@pax2pay/client 0.0.69 → 0.0.72

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.
@@ -37,7 +37,10 @@ export class Cards extends List<
37
37
  return new Cards(connection)
38
38
  }
39
39
  async getCard(providerCardId: string, providerCode: model.ProviderCode) {
40
- const result = await this.connection.get<model.CardResponse>(`cards/virtual/${providerCode}/${providerCardId}`)
40
+ const result = await this.connection.get<
41
+ model.CardResponse
42
+ >(`cards/virtual/${providerCode}/${providerCardId}?includeSchedules=true
43
+ `)
41
44
  return model.ErrorResponse.is(result) ? result : this.mapLegacy(result)
42
45
  }
43
46
  async getCardTypes(providerCode: model.ProviderCode) {
@@ -51,4 +54,9 @@ export class Cards extends List<
51
54
  )
52
55
  return result
53
56
  }
57
+ async getCardBookingInfo(providerCardId: string, providerCode: model.ProviderCode) {
58
+ const result = await this.connection.get<model.CardResponse>(`/booking-info/cards/${providerCode}/${providerCardId}
59
+ `)
60
+ return model.ErrorResponse.is(result) ? result : this.mapLegacy(result)
61
+ }
54
62
  }
@@ -25,4 +25,7 @@ export declare class Cards extends List<model.CardResponseV2 | model.CardRespons
25
25
  getFundingAccounts(searchRequest: model.FundingAccountSearchRequest): Promise<(model.ErrorResponse & {
26
26
  status: 400 | 404 | 500 | 403 | 503;
27
27
  }) | model.CardFundingAccountResponse[]>;
28
+ getCardBookingInfo(providerCardId: string, providerCode: model.ProviderCode): Promise<(model.ErrorResponse & {
29
+ status: 400 | 404 | 500 | 403 | 503;
30
+ }) | (Card & model.CardResponse)>;
28
31
  }
@@ -30,7 +30,8 @@ export class Cards extends List {
30
30
  return new Cards(connection);
31
31
  }
32
32
  async getCard(providerCardId, providerCode) {
33
- const result = await this.connection.get(`cards/virtual/${providerCode}/${providerCardId}`);
33
+ const result = await this.connection.get(`cards/virtual/${providerCode}/${providerCardId}?includeSchedules=true
34
+ `);
34
35
  return model.ErrorResponse.is(result) ? result : this.mapLegacy(result);
35
36
  }
36
37
  async getCardTypes(providerCode) {
@@ -41,5 +42,10 @@ export class Cards extends List {
41
42
  const result = await this.connection.post("funding-accounts/searches", searchRequest);
42
43
  return result;
43
44
  }
45
+ async getCardBookingInfo(providerCardId, providerCode) {
46
+ const result = await this.connection.get(`/booking-info/cards/${providerCode}/${providerCardId}
47
+ `);
48
+ return model.ErrorResponse.is(result) ? result : this.mapLegacy(result);
49
+ }
44
50
  }
45
51
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Cards/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAE9B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAE9B,MAAM,OAAO,KAAM,SAAQ,IAK1B;IAEA,YAAY,UAAsB;QACjC,KAAK,CAAC,UAAU,CAAC,CAAA;QAFR,WAAM,GAAG,eAAe,CAAA;IAGlC,CAAC;IACS,eAAe,CAAC,QAAmD;QAC5E,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAC/E,CAAC;IACS,cAAc,CAAC,QAA8B;QACtD,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,CAAA;IACpH,CAAC;IACS,GAAG,CAAC,QAA8B;QAC3C,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAA;IACpG,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CAAC,YAAY,CAAC,YAAgC;QAClD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAA2B,kBAAkB,YAAY,EAAE,CAAC,CAAA;QACpG,OAAO,MAAM,CAAA;IACd,CAAC;IACD,KAAK,CAAC,kBAAkB,CAAC,aAAgD;QACxE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CACxC,2BAA2B,EAC3B,aAAa,CACb,CAAA;QACD,OAAO,MAAM,CAAA;IACd,CAAC;IACD,KAAK,CAAC,kBAAkB,CAAC,cAAsB,EAAE,YAAgC;QAChF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAqB,uBAAuB,YAAY,IAAI,cAAc;CACnH,CAAC,CAAA;QACA,OAAO,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;IACxE,CAAC;CACD"}
@@ -4,6 +4,8 @@ import { CardDeliveryResponse } from "./CardDeliveryResponse";
4
4
  import { CardScheduleResponseItem } from "./CardScheduleResponseItem";
5
5
  import { CardTypeSpecification } from "./CardTypeSpecification";
6
6
  import { CardUsage } from "./CardUsage";
7
+ import { FiveFieldsBookingInfoResponse } from "./FiveFieldsBookingInfoResponse";
8
+ import { HotelBookingInfoResponse } from "./HotelBookingInfoResponse";
7
9
  import { ProviderCode } from "./ProviderCode";
8
10
  export interface CardResponse {
9
11
  cardType?: CardTypeSpecification | string;
@@ -27,7 +29,7 @@ export interface CardResponse {
27
29
  fundingAccount?: AccountResponse;
28
30
  creatingSystem?: "PORTAL" | "REST_API" | "FAB" | "REST_API_PORTAL" | "REST_API_EXTERNAL" | "SOAP_API_FAB" | "SOAP_API_EXTERNAL" | "CRON" | "UNKNOWN" | "UNDEFINED";
29
31
  createdBy?: string;
30
- bookingInfo?: BookingInfo;
32
+ bookingInfo?: BookingInfo | FiveFieldsBookingInfoResponse | HotelBookingInfoResponse;
31
33
  schedule?: CardScheduleResponseItem[];
32
34
  delivery?: CardDeliveryResponse;
33
35
  }
@@ -1,8 +1,10 @@
1
1
  export interface FiveFieldsBookingInfoResponse {
2
- bookingInfoIdentifier?: string;
2
+ type: "FIVE_FIELDS";
3
+ bookingInfoIdentifier: string;
3
4
  agentBookingReference?: string;
4
5
  departureDate?: string;
5
6
  supplierBookingReference?: string;
6
7
  leadPassengerName?: string;
7
8
  supplierCode?: string;
9
+ trackingId?: string;
8
10
  }
@@ -0,0 +1,19 @@
1
+ export interface HotelBookingInfoResponse {
2
+ type: "HOTEL";
3
+ bookingInfoIdentifier?: string;
4
+ trackingId?: string;
5
+ passengers?: {
6
+ leadPassengerName: string;
7
+ };
8
+ hotel?: {
9
+ checkIn: string;
10
+ };
11
+ references?: {
12
+ supplierCode?: string;
13
+ supplierBookingReference?: string;
14
+ agentBookingReference?: string;
15
+ };
16
+ cost?: number;
17
+ currency?: string;
18
+ timestamp: string;
19
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=HotelBookingInfoResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HotelBookingInfoResponse.js","sourceRoot":"../","sources":["model/HotelBookingInfoResponse.ts"],"names":[],"mappings":""}
@@ -4,6 +4,8 @@ import { CardDeliveryResponse } from "./CardDeliveryResponse"
4
4
  import { CardScheduleResponseItem } from "./CardScheduleResponseItem"
5
5
  import { CardTypeSpecification } from "./CardTypeSpecification"
6
6
  import { CardUsage } from "./CardUsage"
7
+ import { FiveFieldsBookingInfoResponse } from "./FiveFieldsBookingInfoResponse"
8
+ import { HotelBookingInfoResponse } from "./HotelBookingInfoResponse"
7
9
  import { ProviderCode } from "./ProviderCode"
8
10
 
9
11
  export interface CardResponse {
@@ -38,7 +40,7 @@ export interface CardResponse {
38
40
  | "UNKNOWN"
39
41
  | "UNDEFINED"
40
42
  createdBy?: string
41
- bookingInfo?: BookingInfo
43
+ bookingInfo?: BookingInfo | FiveFieldsBookingInfoResponse | HotelBookingInfoResponse
42
44
  schedule?: CardScheduleResponseItem[]
43
45
  delivery?: CardDeliveryResponse
44
46
  }
@@ -1,8 +1,10 @@
1
1
  export interface FiveFieldsBookingInfoResponse {
2
- bookingInfoIdentifier?: string
2
+ type: "FIVE_FIELDS"
3
+ bookingInfoIdentifier: string
3
4
  agentBookingReference?: string
4
5
  departureDate?: string
5
6
  supplierBookingReference?: string
6
7
  leadPassengerName?: string
7
8
  supplierCode?: string
9
+ trackingId?: string
8
10
  }
@@ -0,0 +1,19 @@
1
+ export interface HotelBookingInfoResponse {
2
+ type: "HOTEL"
3
+ bookingInfoIdentifier?: string
4
+ trackingId?: string
5
+ passengers?: {
6
+ leadPassengerName: string
7
+ }
8
+ hotel?: {
9
+ checkIn: string
10
+ }
11
+ references?: {
12
+ supplierCode?: string
13
+ supplierBookingReference?: string
14
+ agentBookingReference?: string
15
+ }
16
+ cost?: number
17
+ currency?: string
18
+ timestamp: string
19
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/client",
3
- "version": "0.0.69",
3
+ "version": "0.0.72",
4
4
  "description": "Client library for the Pax2Pay API",
5
5
  "author": "Pax2Pay Ltd.",
6
6
  "license": "MIT",