mts-booking-library 2.4.6 → 2.4.8
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.
@@ -110,7 +110,7 @@ export declare class ServiceBooking extends Booking {
|
|
110
110
|
* It should be null if the buyer data cannot be specified (see {@link GetBuyerPassengersDetailsResponse.buyerDataStatus}).
|
111
111
|
* @returns An {@link ErrorResponse} object in case of error, true otherwise.
|
112
112
|
*/
|
113
|
-
updateBuyerPassengersDetails(buyerDetails: PersonDetails | null,
|
113
|
+
updateBuyerPassengersDetails(buyerDetails: PersonDetails | null, options?: ApiCallOptions): Promise<ErrorResponse | boolean>;
|
114
114
|
/**
|
115
115
|
* @description This method allows to add a reduction to the whole cart or to a single trip in the cart.
|
116
116
|
* @param request The information about the reduction to add
|
@@ -385,7 +385,7 @@ var ServiceBooking = /** @class */ (function (_super) {
|
|
385
385
|
* It should be null if the buyer data cannot be specified (see {@link GetBuyerPassengersDetailsResponse.buyerDataStatus}).
|
386
386
|
* @returns An {@link ErrorResponse} object in case of error, true otherwise.
|
387
387
|
*/
|
388
|
-
ServiceBooking.prototype.updateBuyerPassengersDetails = function (buyerDetails,
|
388
|
+
ServiceBooking.prototype.updateBuyerPassengersDetails = function (buyerDetails, options) {
|
389
389
|
return __awaiter(this, void 0, void 0, function () {
|
390
390
|
var buyerPassengersDetails, request, url;
|
391
391
|
var _this = this;
|
@@ -401,8 +401,7 @@ var ServiceBooking = /** @class */ (function (_super) {
|
|
401
401
|
request = {
|
402
402
|
cartGuid: this.cart.guid,
|
403
403
|
buyer: buyerDetails,
|
404
|
-
passengers: []
|
405
|
-
noSSN: noSSN !== null && noSSN !== void 0 ? noSSN : false
|
404
|
+
passengers: []
|
406
405
|
};
|
407
406
|
url = "".concat(this.config.API_ENDPOINT, "/v3_booking/carts/details");
|
408
407
|
return [2 /*return*/, this.callPostApi(url, request, options).then(function (response) {
|
@@ -18,6 +18,10 @@ export type CreateUpdateCartRequest = {
|
|
18
18
|
cartBooking: CartBooking;
|
19
19
|
/** The return booking to be added to the cart (e.g. for MLP). */
|
20
20
|
returnCartBooking?: CartBooking;
|
21
|
+
/** Whether the buyer has opposed to the collection of the SSN for this cart (possible in TPL). */
|
22
|
+
noSSN?: boolean;
|
23
|
+
/** The payment method that the final customer is using to pay the reseller. Required when using {@link CreateUpdateCartRequest.noSSN} */
|
24
|
+
customerPaymentMethod?: PaymentMethods.CASH | PaymentMethods.CARD;
|
21
25
|
};
|
22
26
|
export type CartBooking = {
|
23
27
|
/** A record containing tariff ids as keys and their respective quantities as values. */
|
@@ -21,8 +21,6 @@ export type Person = {
|
|
21
21
|
export type PersonDetails = Person & {
|
22
22
|
/** The social security number of the buyer, if provided. */
|
23
23
|
socialSecurityNumber: string | null;
|
24
|
-
/** Whether the person has opposed to tax deduction. */
|
25
|
-
noSSN: boolean;
|
26
24
|
};
|
27
25
|
export declare const DEFAULT_PERSON: Person;
|
28
26
|
export declare const initializePerson: (person?: Person | undefined | null) => Person;
|
@@ -93,8 +91,6 @@ export type GetBuyerPassengersDetailsResponse = {
|
|
93
91
|
buyerSSNOption: PersonDataFieldStatus;
|
94
92
|
/** An array of {@link GetPassenger} objects representing the passengers. */
|
95
93
|
passengers: GetPassenger[] | null;
|
96
|
-
/** Whether the buyer has opposed to tax deduction for this cart. */
|
97
|
-
noSSN: boolean | null;
|
98
94
|
};
|
99
95
|
/**
|
100
96
|
* @description Represents the type of the passengers array in {@link EditPassengersDetailsRequest}.
|
@@ -118,9 +114,4 @@ export type EditPassengersDetailsRequest = {
|
|
118
114
|
* It should be null if the buyer data cannot be specified (see {@link GetBuyerPassengersDetailsResponse.buyerDataStatus}).
|
119
115
|
*/
|
120
116
|
buyer: PersonDetails | null;
|
121
|
-
/**
|
122
|
-
* Whether the buyer has opposed to tax deduction.
|
123
|
-
* This should be scoped to the cart, and is different from the preference saved for each buyer, which should only act as the default
|
124
|
-
*/
|
125
|
-
noSSN: boolean | null;
|
126
117
|
};
|