wallet 2.4.2 → 2.5.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/dist/api/apis.d.ts +3 -1
- package/dist/api/apis.js +3 -1
- package/dist/api/apis.js.map +1 -1
- package/dist/api/giftCardsApi.d.ts +86 -0
- package/dist/api/giftCardsApi.js +507 -0
- package/dist/api/giftCardsApi.js.map +1 -0
- package/dist/model/merchant.d.ts +2 -0
- package/dist/model/merchant.js +5 -0
- package/dist/model/merchant.js.map +1 -1
- package/dist/model/models.d.ts +8 -1
- package/dist/model/models.js +24 -3
- package/dist/model/models.js.map +1 -1
- package/dist/model/{pickVSPaymentDesignCreateParamsExcludeKeyofVSPaymentDesignCreateParamsEmployeeID.d.ts → pickVSPaymentDesignCreateParamsExcludeKeyofVSPaymentDesignCreateParamsEmployeeIDOrAbbreviationOrAcronym.d.ts} +1 -3
- package/dist/model/{pickVSPaymentDesignCreateParamsExcludeKeyofVSPaymentDesignCreateParamsEmployeeID.js → pickVSPaymentDesignCreateParamsExcludeKeyofVSPaymentDesignCreateParamsEmployeeIDOrAbbreviationOrAcronym.js} +7 -17
- package/dist/model/pickVSPaymentDesignCreateParamsExcludeKeyofVSPaymentDesignCreateParamsEmployeeIDOrAbbreviationOrAcronym.js.map +1 -0
- package/dist/model/wTBillingVerifyPaymentMethodResponse.d.ts +2 -0
- package/dist/model/wTBillingVerifyPaymentMethodResponse.js +5 -0
- package/dist/model/wTBillingVerifyPaymentMethodResponse.js.map +1 -1
- package/dist/model/wTBillingVerifyPaymentMethodResponseBillingCadence.d.ts +13 -0
- package/dist/model/wTBillingVerifyPaymentMethodResponseBillingCadence.js +12 -0
- package/dist/model/wTBillingVerifyPaymentMethodResponseBillingCadence.js.map +1 -0
- package/dist/model/wTCertificateDealCreateRequest.d.ts +23 -0
- package/dist/model/wTCertificateDealCreateRequest.js +73 -0
- package/dist/model/wTCertificateDealCreateRequest.js.map +1 -0
- package/dist/model/wTCertificateDealCreateRequestEntitlementType.d.ts +13 -0
- package/dist/model/wTCertificateDealCreateRequestEntitlementType.js +12 -0
- package/dist/model/wTCertificateDealCreateRequestEntitlementType.js.map +1 -0
- package/dist/model/wTCertificateEntitlementSnapshot.d.ts +12 -0
- package/dist/model/wTCertificateEntitlementSnapshot.js +28 -0
- package/dist/model/wTCertificateEntitlementSnapshot.js.map +1 -0
- package/dist/model/wTCertificatePurchaseRequest.d.ts +17 -0
- package/dist/model/wTCertificatePurchaseRequest.js +53 -0
- package/dist/model/wTCertificatePurchaseRequest.js.map +1 -0
- package/dist/model/wTGiftCardPurchaseRequest.d.ts +14 -0
- package/dist/model/wTGiftCardPurchaseRequest.js +38 -0
- package/dist/model/wTGiftCardPurchaseRequest.js.map +1 -0
- package/dist/model/wTGiftClaimRequest.d.ts +11 -0
- package/dist/model/wTGiftClaimRequest.js +23 -0
- package/dist/model/wTGiftClaimRequest.js.map +1 -0
- package/dist/model/wTPaymentDesignCreateParams.d.ts +2 -2
- package/dist/model/wTPaymentDesignCreateParams.js +10 -10
- package/dist/model/wTPaymentDesignCreateParams.js.map +1 -1
- package/dist/model/wTPaymentDesignUpdateParams.d.ts +2 -2
- package/dist/model/wTPaymentDesignUpdateParams.js +10 -10
- package/dist/model/wTPaymentDesignUpdateParams.js.map +1 -1
- package/package.json +1 -1
- package/dist/model/pickVSPaymentDesignCreateParamsExcludeKeyofVSPaymentDesignCreateParamsEmployeeID.js.map +0 -1
package/dist/api/apis.d.ts
CHANGED
|
@@ -33,6 +33,8 @@ export * from './galleryApi';
|
|
|
33
33
|
import { GalleryApi } from './galleryApi';
|
|
34
34
|
export * from './gamingApi';
|
|
35
35
|
import { GamingApi } from './gamingApi';
|
|
36
|
+
export * from './giftCardsApi';
|
|
37
|
+
import { GiftCardsApi } from './giftCardsApi';
|
|
36
38
|
export * from './helpDeskApi';
|
|
37
39
|
import { HelpDeskApi } from './helpDeskApi';
|
|
38
40
|
export * from './importExportApi';
|
|
@@ -125,4 +127,4 @@ export declare class HttpError extends Error {
|
|
|
125
127
|
constructor(response: http.IncomingMessage, body: any, statusCode?: number | undefined);
|
|
126
128
|
}
|
|
127
129
|
export { RequestFile } from '../model/models';
|
|
128
|
-
export declare const APIS: (typeof APIKeysApi | typeof AmenitiesApi | typeof AppToPersonA2PRegistrationApi | typeof AppleWalletSubscribersApi | typeof AuthenticationApi | typeof BillingPaymentsApi | typeof BroadcastsApi | typeof ClubMembersApi | typeof CountriesApi | typeof CustomerApi | typeof DiningApi | typeof DynamicVouchersApi | typeof EmailSubscribersApi | typeof EmployeesApi | typeof FilesDocumentsApi | typeof GalleryApi | typeof GamingApi | typeof HelpDeskApi | typeof ImportExportApi | typeof ImportedListsApi | typeof IndustriesApi | typeof InfoGenesisReportsApi | typeof InteractionsApi | typeof LoungeApi | typeof MembershipTiersApi | typeof MerchantApi | typeof MerchantCreditsApi | typeof NewsApi | typeof OpenAIApi | typeof OptInListsApi | typeof PaymentDesignsApi | typeof PerformancesApi | typeof PhoneNumbersApi | typeof PointOfSaleConfigurationApi | typeof PrizesApi | typeof ProductsApi | typeof PromotionCodesApi | typeof QRCodeDesignsApi | typeof QuickLinksApi | typeof QuickLinksSectionApi | typeof RoomRatesApi | typeof SMSMessagesApi | typeof SMSSubscribersApi | typeof ServicesApi | typeof ShopifyTerminalApi | typeof ShortLinksApi | typeof StaticVoucherCampaignsApi | typeof StaticVouchersApi | typeof StripeConnectApi | typeof SystemApi | typeof TicketsApi | typeof VideosApi | typeof VirtualBusinessCardApi | typeof WalletConfigurationApi | typeof WalletMobileTerminalApi | typeof WalletTransactionLedgerApi | typeof WalletWebTerminalApi | typeof WixTerminalApi | typeof WooCommerceTerminalApi)[];
|
|
130
|
+
export declare const APIS: (typeof APIKeysApi | typeof AmenitiesApi | typeof AppToPersonA2PRegistrationApi | typeof AppleWalletSubscribersApi | typeof AuthenticationApi | typeof BillingPaymentsApi | typeof BroadcastsApi | typeof ClubMembersApi | typeof CountriesApi | typeof CustomerApi | typeof DiningApi | typeof DynamicVouchersApi | typeof EmailSubscribersApi | typeof EmployeesApi | typeof FilesDocumentsApi | typeof GalleryApi | typeof GamingApi | typeof GiftCardsApi | typeof HelpDeskApi | typeof ImportExportApi | typeof ImportedListsApi | typeof IndustriesApi | typeof InfoGenesisReportsApi | typeof InteractionsApi | typeof LoungeApi | typeof MembershipTiersApi | typeof MerchantApi | typeof MerchantCreditsApi | typeof NewsApi | typeof OpenAIApi | typeof OptInListsApi | typeof PaymentDesignsApi | typeof PerformancesApi | typeof PhoneNumbersApi | typeof PointOfSaleConfigurationApi | typeof PrizesApi | typeof ProductsApi | typeof PromotionCodesApi | typeof QRCodeDesignsApi | typeof QuickLinksApi | typeof QuickLinksSectionApi | typeof RoomRatesApi | typeof SMSMessagesApi | typeof SMSSubscribersApi | typeof ServicesApi | typeof ShopifyTerminalApi | typeof ShortLinksApi | typeof StaticVoucherCampaignsApi | typeof StaticVouchersApi | typeof StripeConnectApi | typeof SystemApi | typeof TicketsApi | typeof VideosApi | typeof VirtualBusinessCardApi | typeof WalletConfigurationApi | typeof WalletMobileTerminalApi | typeof WalletTransactionLedgerApi | typeof WalletWebTerminalApi | typeof WixTerminalApi | typeof WooCommerceTerminalApi)[];
|
package/dist/api/apis.js
CHANGED
|
@@ -49,6 +49,8 @@ __exportStar(require("./galleryApi"), exports);
|
|
|
49
49
|
const galleryApi_1 = require("./galleryApi");
|
|
50
50
|
__exportStar(require("./gamingApi"), exports);
|
|
51
51
|
const gamingApi_1 = require("./gamingApi");
|
|
52
|
+
__exportStar(require("./giftCardsApi"), exports);
|
|
53
|
+
const giftCardsApi_1 = require("./giftCardsApi");
|
|
52
54
|
__exportStar(require("./helpDeskApi"), exports);
|
|
53
55
|
const helpDeskApi_1 = require("./helpDeskApi");
|
|
54
56
|
__exportStar(require("./importExportApi"), exports);
|
|
@@ -143,5 +145,5 @@ class HttpError extends Error {
|
|
|
143
145
|
}
|
|
144
146
|
}
|
|
145
147
|
exports.HttpError = HttpError;
|
|
146
|
-
exports.APIS = [aPIKeysApi_1.APIKeysApi, amenitiesApi_1.AmenitiesApi, appToPersonA2PRegistrationApi_1.AppToPersonA2PRegistrationApi, appleWalletSubscribersApi_1.AppleWalletSubscribersApi, authenticationApi_1.AuthenticationApi, billingPaymentsApi_1.BillingPaymentsApi, broadcastsApi_1.BroadcastsApi, clubMembersApi_1.ClubMembersApi, countriesApi_1.CountriesApi, customerApi_1.CustomerApi, diningApi_1.DiningApi, dynamicVouchersApi_1.DynamicVouchersApi, emailSubscribersApi_1.EmailSubscribersApi, employeesApi_1.EmployeesApi, filesDocumentsApi_1.FilesDocumentsApi, galleryApi_1.GalleryApi, gamingApi_1.GamingApi, helpDeskApi_1.HelpDeskApi, importExportApi_1.ImportExportApi, importedListsApi_1.ImportedListsApi, industriesApi_1.IndustriesApi, infoGenesisReportsApi_1.InfoGenesisReportsApi, interactionsApi_1.InteractionsApi, loungeApi_1.LoungeApi, membershipTiersApi_1.MembershipTiersApi, merchantApi_1.MerchantApi, merchantCreditsApi_1.MerchantCreditsApi, newsApi_1.NewsApi, openAIApi_1.OpenAIApi, optInListsApi_1.OptInListsApi, paymentDesignsApi_1.PaymentDesignsApi, performancesApi_1.PerformancesApi, phoneNumbersApi_1.PhoneNumbersApi, pointOfSaleConfigurationApi_1.PointOfSaleConfigurationApi, prizesApi_1.PrizesApi, productsApi_1.ProductsApi, promotionCodesApi_1.PromotionCodesApi, qRCodeDesignsApi_1.QRCodeDesignsApi, quickLinksApi_1.QuickLinksApi, quickLinksSectionApi_1.QuickLinksSectionApi, roomRatesApi_1.RoomRatesApi, sMSMessagesApi_1.SMSMessagesApi, sMSSubscribersApi_1.SMSSubscribersApi, servicesApi_1.ServicesApi, shopifyTerminalApi_1.ShopifyTerminalApi, shortLinksApi_1.ShortLinksApi, staticVoucherCampaignsApi_1.StaticVoucherCampaignsApi, staticVouchersApi_1.StaticVouchersApi, stripeConnectApi_1.StripeConnectApi, systemApi_1.SystemApi, ticketsApi_1.TicketsApi, videosApi_1.VideosApi, virtualBusinessCardApi_1.VirtualBusinessCardApi, walletConfigurationApi_1.WalletConfigurationApi, walletMobileTerminalApi_1.WalletMobileTerminalApi, walletTransactionLedgerApi_1.WalletTransactionLedgerApi, walletWebTerminalApi_1.WalletWebTerminalApi, wixTerminalApi_1.WixTerminalApi, wooCommerceTerminalApi_1.WooCommerceTerminalApi];
|
|
148
|
+
exports.APIS = [aPIKeysApi_1.APIKeysApi, amenitiesApi_1.AmenitiesApi, appToPersonA2PRegistrationApi_1.AppToPersonA2PRegistrationApi, appleWalletSubscribersApi_1.AppleWalletSubscribersApi, authenticationApi_1.AuthenticationApi, billingPaymentsApi_1.BillingPaymentsApi, broadcastsApi_1.BroadcastsApi, clubMembersApi_1.ClubMembersApi, countriesApi_1.CountriesApi, customerApi_1.CustomerApi, diningApi_1.DiningApi, dynamicVouchersApi_1.DynamicVouchersApi, emailSubscribersApi_1.EmailSubscribersApi, employeesApi_1.EmployeesApi, filesDocumentsApi_1.FilesDocumentsApi, galleryApi_1.GalleryApi, gamingApi_1.GamingApi, giftCardsApi_1.GiftCardsApi, helpDeskApi_1.HelpDeskApi, importExportApi_1.ImportExportApi, importedListsApi_1.ImportedListsApi, industriesApi_1.IndustriesApi, infoGenesisReportsApi_1.InfoGenesisReportsApi, interactionsApi_1.InteractionsApi, loungeApi_1.LoungeApi, membershipTiersApi_1.MembershipTiersApi, merchantApi_1.MerchantApi, merchantCreditsApi_1.MerchantCreditsApi, newsApi_1.NewsApi, openAIApi_1.OpenAIApi, optInListsApi_1.OptInListsApi, paymentDesignsApi_1.PaymentDesignsApi, performancesApi_1.PerformancesApi, phoneNumbersApi_1.PhoneNumbersApi, pointOfSaleConfigurationApi_1.PointOfSaleConfigurationApi, prizesApi_1.PrizesApi, productsApi_1.ProductsApi, promotionCodesApi_1.PromotionCodesApi, qRCodeDesignsApi_1.QRCodeDesignsApi, quickLinksApi_1.QuickLinksApi, quickLinksSectionApi_1.QuickLinksSectionApi, roomRatesApi_1.RoomRatesApi, sMSMessagesApi_1.SMSMessagesApi, sMSSubscribersApi_1.SMSSubscribersApi, servicesApi_1.ServicesApi, shopifyTerminalApi_1.ShopifyTerminalApi, shortLinksApi_1.ShortLinksApi, staticVoucherCampaignsApi_1.StaticVoucherCampaignsApi, staticVouchersApi_1.StaticVouchersApi, stripeConnectApi_1.StripeConnectApi, systemApi_1.SystemApi, ticketsApi_1.TicketsApi, videosApi_1.VideosApi, virtualBusinessCardApi_1.VirtualBusinessCardApi, walletConfigurationApi_1.WalletConfigurationApi, walletMobileTerminalApi_1.WalletMobileTerminalApi, walletTransactionLedgerApi_1.WalletTransactionLedgerApi, walletWebTerminalApi_1.WalletWebTerminalApi, wixTerminalApi_1.WixTerminalApi, wooCommerceTerminalApi_1.WooCommerceTerminalApi];
|
|
147
149
|
//# sourceMappingURL=apis.js.map
|
package/dist/api/apis.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apis.js","sourceRoot":"","sources":["../../api/apis.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,6CAA0C;AAC1C,iDAA+B;AAC/B,iDAA8C;AAC9C,kEAAgD;AAChD,mFAAgF;AAChF,8DAA4C;AAC5C,2EAAwE;AACxE,sDAAoC;AACpC,2DAAwD;AACxD,uDAAqC;AACrC,6DAA0D;AAC1D,kDAAgC;AAChC,mDAAgD;AAChD,mDAAiC;AACjC,qDAAkD;AAClD,iDAA+B;AAC/B,iDAA8C;AAC9C,gDAA8B;AAC9B,+CAA4C;AAC5C,8CAA4B;AAC5B,2CAAwC;AACxC,uDAAqC;AACrC,6DAA0D;AAC1D,wDAAsC;AACtC,+DAA4D;AAC5D,iDAA+B;AAC/B,iDAA8C;AAC9C,sDAAoC;AACpC,2DAAwD;AACxD,+CAA6B;AAC7B,6CAA0C;AAC1C,8CAA4B;AAC5B,2CAAwC;AACxC,gDAA8B;AAC9B,+CAA4C;AAC5C,oDAAkC;AAClC,uDA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BAAS,EAAE,6BAAa,EAAE,qCAAiB,EAAE,iCAAe,EAAE,iCAAe,EAAE,yDAA2B,EAAE,qBAAS,EAAE,yBAAW,EAAE,qCAAiB,EAAE,mCAAgB,EAAE,6BAAa,EAAE,2CAAoB,EAAE,2BAAY,EAAE,+BAAc,EAAE,qCAAiB,EAAE,yBAAW,EAAE,uCAAkB,EAAE,6BAAa,EAAE,qDAAyB,EAAE,qCAAiB,EAAE,mCAAgB,EAAE,qBAAS,EAAE,uBAAU,EAAE,qBAAS,EAAE,+CAAsB,EAAE,+CAAsB,EAAE,iDAAuB,EAAE,uDAA0B,EAAE,2CAAoB,EAAE,+BAAc,EAAE,+CAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import http from 'http';
|
|
3
|
+
import { WTCertificateDealCreateRequest } from '../model/wTCertificateDealCreateRequest';
|
|
4
|
+
import { WTCertificatePurchaseRequest } from '../model/wTCertificatePurchaseRequest';
|
|
5
|
+
import { WTGiftCardPurchaseRequest } from '../model/wTGiftCardPurchaseRequest';
|
|
6
|
+
import { WTGiftClaimRequest } from '../model/wTGiftClaimRequest';
|
|
7
|
+
import { Authentication, Interceptor } from '../model/models';
|
|
8
|
+
import { ApiKeyAuth } from '../model/models';
|
|
9
|
+
export declare enum GiftCardsApiApiKeys {
|
|
10
|
+
api_key = 0
|
|
11
|
+
}
|
|
12
|
+
export declare class GiftCardsApi {
|
|
13
|
+
protected _basePath: string;
|
|
14
|
+
protected _defaultHeaders: any;
|
|
15
|
+
protected _useQuerystring: boolean;
|
|
16
|
+
protected authentications: {
|
|
17
|
+
default: Authentication;
|
|
18
|
+
api_key: ApiKeyAuth;
|
|
19
|
+
};
|
|
20
|
+
protected interceptors: Interceptor[];
|
|
21
|
+
constructor(basePath?: string);
|
|
22
|
+
set useQuerystring(value: boolean);
|
|
23
|
+
set basePath(basePath: string);
|
|
24
|
+
set defaultHeaders(defaultHeaders: any);
|
|
25
|
+
get defaultHeaders(): any;
|
|
26
|
+
get basePath(): string;
|
|
27
|
+
setDefaultAuthentication(auth: Authentication): void;
|
|
28
|
+
setApiKey(key: GiftCardsApiApiKeys, value: string): void;
|
|
29
|
+
addInterceptor(interceptor: Interceptor): void;
|
|
30
|
+
claimGift(giftID: string, wTGiftClaimRequest: WTGiftClaimRequest, options?: {
|
|
31
|
+
headers: {
|
|
32
|
+
[name: string]: string;
|
|
33
|
+
};
|
|
34
|
+
}): Promise<{
|
|
35
|
+
response: http.IncomingMessage;
|
|
36
|
+
body: any;
|
|
37
|
+
}>;
|
|
38
|
+
createCertificateDeal(wTCertificateDealCreateRequest: WTCertificateDealCreateRequest, options?: {
|
|
39
|
+
headers: {
|
|
40
|
+
[name: string]: string;
|
|
41
|
+
};
|
|
42
|
+
}): Promise<{
|
|
43
|
+
response: http.IncomingMessage;
|
|
44
|
+
body: any;
|
|
45
|
+
}>;
|
|
46
|
+
fetchCertificateDeal(dealID: string, options?: {
|
|
47
|
+
headers: {
|
|
48
|
+
[name: string]: string;
|
|
49
|
+
};
|
|
50
|
+
}): Promise<{
|
|
51
|
+
response: http.IncomingMessage;
|
|
52
|
+
body: any;
|
|
53
|
+
}>;
|
|
54
|
+
fetchGift(giftID: string, options?: {
|
|
55
|
+
headers: {
|
|
56
|
+
[name: string]: string;
|
|
57
|
+
};
|
|
58
|
+
}): Promise<{
|
|
59
|
+
response: http.IncomingMessage;
|
|
60
|
+
body: any;
|
|
61
|
+
}>;
|
|
62
|
+
publishCertificateDeal(dealID: string, options?: {
|
|
63
|
+
headers: {
|
|
64
|
+
[name: string]: string;
|
|
65
|
+
};
|
|
66
|
+
}): Promise<{
|
|
67
|
+
response: http.IncomingMessage;
|
|
68
|
+
body: any;
|
|
69
|
+
}>;
|
|
70
|
+
purchaseCertificateFromDeal(dealID: string, wTCertificatePurchaseRequest: WTCertificatePurchaseRequest, options?: {
|
|
71
|
+
headers: {
|
|
72
|
+
[name: string]: string;
|
|
73
|
+
};
|
|
74
|
+
}): Promise<{
|
|
75
|
+
response: http.IncomingMessage;
|
|
76
|
+
body: any;
|
|
77
|
+
}>;
|
|
78
|
+
purchaseGiftCard(wTGiftCardPurchaseRequest: WTGiftCardPurchaseRequest, options?: {
|
|
79
|
+
headers: {
|
|
80
|
+
[name: string]: string;
|
|
81
|
+
};
|
|
82
|
+
}): Promise<{
|
|
83
|
+
response: http.IncomingMessage;
|
|
84
|
+
body: any;
|
|
85
|
+
}>;
|
|
86
|
+
}
|
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.GiftCardsApi = exports.GiftCardsApiApiKeys = void 0;
|
|
16
|
+
const request_1 = __importDefault(require("request"));
|
|
17
|
+
const models_1 = require("../model/models");
|
|
18
|
+
const models_2 = require("../model/models");
|
|
19
|
+
const apis_1 = require("./apis");
|
|
20
|
+
let defaultBasePath = 'https://api.wall.et';
|
|
21
|
+
var GiftCardsApiApiKeys;
|
|
22
|
+
(function (GiftCardsApiApiKeys) {
|
|
23
|
+
GiftCardsApiApiKeys[GiftCardsApiApiKeys["api_key"] = 0] = "api_key";
|
|
24
|
+
})(GiftCardsApiApiKeys = exports.GiftCardsApiApiKeys || (exports.GiftCardsApiApiKeys = {}));
|
|
25
|
+
class GiftCardsApi {
|
|
26
|
+
constructor(basePathOrUsername, password, basePath) {
|
|
27
|
+
this._basePath = defaultBasePath;
|
|
28
|
+
this._defaultHeaders = {};
|
|
29
|
+
this._useQuerystring = false;
|
|
30
|
+
this.authentications = {
|
|
31
|
+
'default': new models_1.VoidAuth(),
|
|
32
|
+
'api_key': new models_2.ApiKeyAuth('header', 'access-token'),
|
|
33
|
+
};
|
|
34
|
+
this.interceptors = [];
|
|
35
|
+
if (password) {
|
|
36
|
+
if (basePath) {
|
|
37
|
+
this.basePath = basePath;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
if (basePathOrUsername) {
|
|
42
|
+
this.basePath = basePathOrUsername;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
set useQuerystring(value) {
|
|
47
|
+
this._useQuerystring = value;
|
|
48
|
+
}
|
|
49
|
+
set basePath(basePath) {
|
|
50
|
+
this._basePath = basePath;
|
|
51
|
+
}
|
|
52
|
+
set defaultHeaders(defaultHeaders) {
|
|
53
|
+
this._defaultHeaders = defaultHeaders;
|
|
54
|
+
}
|
|
55
|
+
get defaultHeaders() {
|
|
56
|
+
return this._defaultHeaders;
|
|
57
|
+
}
|
|
58
|
+
get basePath() {
|
|
59
|
+
return this._basePath;
|
|
60
|
+
}
|
|
61
|
+
setDefaultAuthentication(auth) {
|
|
62
|
+
this.authentications.default = auth;
|
|
63
|
+
}
|
|
64
|
+
setApiKey(key, value) {
|
|
65
|
+
this.authentications[GiftCardsApiApiKeys[key]].apiKey = value;
|
|
66
|
+
}
|
|
67
|
+
addInterceptor(interceptor) {
|
|
68
|
+
this.interceptors.push(interceptor);
|
|
69
|
+
}
|
|
70
|
+
claimGift(giftID, wTGiftClaimRequest, options = { headers: {} }) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
const localVarPath = this.basePath + '/giftcards/{giftID}/claim'
|
|
73
|
+
.replace('{' + 'giftID' + '}', encodeURIComponent(String(giftID)));
|
|
74
|
+
let localVarQueryParameters = {};
|
|
75
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
76
|
+
const produces = ['application/json'];
|
|
77
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
78
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
82
|
+
}
|
|
83
|
+
let localVarFormParams = {};
|
|
84
|
+
if (giftID === null || giftID === undefined) {
|
|
85
|
+
throw new Error('Required parameter giftID was null or undefined when calling claimGift.');
|
|
86
|
+
}
|
|
87
|
+
if (wTGiftClaimRequest === null || wTGiftClaimRequest === undefined) {
|
|
88
|
+
throw new Error('Required parameter wTGiftClaimRequest was null or undefined when calling claimGift.');
|
|
89
|
+
}
|
|
90
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
91
|
+
let localVarUseFormData = false;
|
|
92
|
+
let localVarRequestOptions = {
|
|
93
|
+
method: 'POST',
|
|
94
|
+
qs: localVarQueryParameters,
|
|
95
|
+
headers: localVarHeaderParams,
|
|
96
|
+
uri: localVarPath,
|
|
97
|
+
useQuerystring: this._useQuerystring,
|
|
98
|
+
json: true,
|
|
99
|
+
body: models_1.ObjectSerializer.serialize(wTGiftClaimRequest, "WTGiftClaimRequest")
|
|
100
|
+
};
|
|
101
|
+
let authenticationPromise = Promise.resolve();
|
|
102
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
103
|
+
let interceptorPromise = authenticationPromise;
|
|
104
|
+
for (const interceptor of this.interceptors) {
|
|
105
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
106
|
+
}
|
|
107
|
+
return interceptorPromise.then(() => {
|
|
108
|
+
if (Object.keys(localVarFormParams).length) {
|
|
109
|
+
if (localVarUseFormData) {
|
|
110
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return new Promise((resolve, reject) => {
|
|
117
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
118
|
+
if (error) {
|
|
119
|
+
reject(error);
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
123
|
+
body = models_1.ObjectSerializer.deserialize(body, "any");
|
|
124
|
+
resolve({ response: response, body: body });
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
createCertificateDeal(wTCertificateDealCreateRequest, options = { headers: {} }) {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
const localVarPath = this.basePath + '/giftcards/deals';
|
|
138
|
+
let localVarQueryParameters = {};
|
|
139
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
140
|
+
const produces = ['application/json'];
|
|
141
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
142
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
146
|
+
}
|
|
147
|
+
let localVarFormParams = {};
|
|
148
|
+
if (wTCertificateDealCreateRequest === null || wTCertificateDealCreateRequest === undefined) {
|
|
149
|
+
throw new Error('Required parameter wTCertificateDealCreateRequest was null or undefined when calling createCertificateDeal.');
|
|
150
|
+
}
|
|
151
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
152
|
+
let localVarUseFormData = false;
|
|
153
|
+
let localVarRequestOptions = {
|
|
154
|
+
method: 'POST',
|
|
155
|
+
qs: localVarQueryParameters,
|
|
156
|
+
headers: localVarHeaderParams,
|
|
157
|
+
uri: localVarPath,
|
|
158
|
+
useQuerystring: this._useQuerystring,
|
|
159
|
+
json: true,
|
|
160
|
+
body: models_1.ObjectSerializer.serialize(wTCertificateDealCreateRequest, "WTCertificateDealCreateRequest")
|
|
161
|
+
};
|
|
162
|
+
let authenticationPromise = Promise.resolve();
|
|
163
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
164
|
+
let interceptorPromise = authenticationPromise;
|
|
165
|
+
for (const interceptor of this.interceptors) {
|
|
166
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
167
|
+
}
|
|
168
|
+
return interceptorPromise.then(() => {
|
|
169
|
+
if (Object.keys(localVarFormParams).length) {
|
|
170
|
+
if (localVarUseFormData) {
|
|
171
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return new Promise((resolve, reject) => {
|
|
178
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
179
|
+
if (error) {
|
|
180
|
+
reject(error);
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
184
|
+
body = models_1.ObjectSerializer.deserialize(body, "any");
|
|
185
|
+
resolve({ response: response, body: body });
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
fetchCertificateDeal(dealID, options = { headers: {} }) {
|
|
197
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
198
|
+
const localVarPath = this.basePath + '/giftcards/deals/{dealID}'
|
|
199
|
+
.replace('{' + 'dealID' + '}', encodeURIComponent(String(dealID)));
|
|
200
|
+
let localVarQueryParameters = {};
|
|
201
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
202
|
+
const produces = ['application/json'];
|
|
203
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
204
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
208
|
+
}
|
|
209
|
+
let localVarFormParams = {};
|
|
210
|
+
if (dealID === null || dealID === undefined) {
|
|
211
|
+
throw new Error('Required parameter dealID was null or undefined when calling fetchCertificateDeal.');
|
|
212
|
+
}
|
|
213
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
214
|
+
let localVarUseFormData = false;
|
|
215
|
+
let localVarRequestOptions = {
|
|
216
|
+
method: 'GET',
|
|
217
|
+
qs: localVarQueryParameters,
|
|
218
|
+
headers: localVarHeaderParams,
|
|
219
|
+
uri: localVarPath,
|
|
220
|
+
useQuerystring: this._useQuerystring,
|
|
221
|
+
json: true,
|
|
222
|
+
};
|
|
223
|
+
let authenticationPromise = Promise.resolve();
|
|
224
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
225
|
+
let interceptorPromise = authenticationPromise;
|
|
226
|
+
for (const interceptor of this.interceptors) {
|
|
227
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
228
|
+
}
|
|
229
|
+
return interceptorPromise.then(() => {
|
|
230
|
+
if (Object.keys(localVarFormParams).length) {
|
|
231
|
+
if (localVarUseFormData) {
|
|
232
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return new Promise((resolve, reject) => {
|
|
239
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
240
|
+
if (error) {
|
|
241
|
+
reject(error);
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
245
|
+
body = models_1.ObjectSerializer.deserialize(body, "any");
|
|
246
|
+
resolve({ response: response, body: body });
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
});
|
|
254
|
+
});
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
fetchGift(giftID, options = { headers: {} }) {
|
|
258
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
259
|
+
const localVarPath = this.basePath + '/giftcards/{giftID}'
|
|
260
|
+
.replace('{' + 'giftID' + '}', encodeURIComponent(String(giftID)));
|
|
261
|
+
let localVarQueryParameters = {};
|
|
262
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
263
|
+
const produces = ['application/json'];
|
|
264
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
265
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
268
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
269
|
+
}
|
|
270
|
+
let localVarFormParams = {};
|
|
271
|
+
if (giftID === null || giftID === undefined) {
|
|
272
|
+
throw new Error('Required parameter giftID was null or undefined when calling fetchGift.');
|
|
273
|
+
}
|
|
274
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
275
|
+
let localVarUseFormData = false;
|
|
276
|
+
let localVarRequestOptions = {
|
|
277
|
+
method: 'GET',
|
|
278
|
+
qs: localVarQueryParameters,
|
|
279
|
+
headers: localVarHeaderParams,
|
|
280
|
+
uri: localVarPath,
|
|
281
|
+
useQuerystring: this._useQuerystring,
|
|
282
|
+
json: true,
|
|
283
|
+
};
|
|
284
|
+
let authenticationPromise = Promise.resolve();
|
|
285
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
286
|
+
let interceptorPromise = authenticationPromise;
|
|
287
|
+
for (const interceptor of this.interceptors) {
|
|
288
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
289
|
+
}
|
|
290
|
+
return interceptorPromise.then(() => {
|
|
291
|
+
if (Object.keys(localVarFormParams).length) {
|
|
292
|
+
if (localVarUseFormData) {
|
|
293
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
return new Promise((resolve, reject) => {
|
|
300
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
301
|
+
if (error) {
|
|
302
|
+
reject(error);
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
306
|
+
body = models_1.ObjectSerializer.deserialize(body, "any");
|
|
307
|
+
resolve({ response: response, body: body });
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
publishCertificateDeal(dealID, options = { headers: {} }) {
|
|
319
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
320
|
+
const localVarPath = this.basePath + '/giftcards/deals/{dealID}/publish'
|
|
321
|
+
.replace('{' + 'dealID' + '}', encodeURIComponent(String(dealID)));
|
|
322
|
+
let localVarQueryParameters = {};
|
|
323
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
324
|
+
const produces = ['application/json'];
|
|
325
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
326
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
327
|
+
}
|
|
328
|
+
else {
|
|
329
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
330
|
+
}
|
|
331
|
+
let localVarFormParams = {};
|
|
332
|
+
if (dealID === null || dealID === undefined) {
|
|
333
|
+
throw new Error('Required parameter dealID was null or undefined when calling publishCertificateDeal.');
|
|
334
|
+
}
|
|
335
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
336
|
+
let localVarUseFormData = false;
|
|
337
|
+
let localVarRequestOptions = {
|
|
338
|
+
method: 'POST',
|
|
339
|
+
qs: localVarQueryParameters,
|
|
340
|
+
headers: localVarHeaderParams,
|
|
341
|
+
uri: localVarPath,
|
|
342
|
+
useQuerystring: this._useQuerystring,
|
|
343
|
+
json: true,
|
|
344
|
+
};
|
|
345
|
+
let authenticationPromise = Promise.resolve();
|
|
346
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
347
|
+
let interceptorPromise = authenticationPromise;
|
|
348
|
+
for (const interceptor of this.interceptors) {
|
|
349
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
350
|
+
}
|
|
351
|
+
return interceptorPromise.then(() => {
|
|
352
|
+
if (Object.keys(localVarFormParams).length) {
|
|
353
|
+
if (localVarUseFormData) {
|
|
354
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
return new Promise((resolve, reject) => {
|
|
361
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
362
|
+
if (error) {
|
|
363
|
+
reject(error);
|
|
364
|
+
}
|
|
365
|
+
else {
|
|
366
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
367
|
+
body = models_1.ObjectSerializer.deserialize(body, "any");
|
|
368
|
+
resolve({ response: response, body: body });
|
|
369
|
+
}
|
|
370
|
+
else {
|
|
371
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
purchaseCertificateFromDeal(dealID, wTCertificatePurchaseRequest, options = { headers: {} }) {
|
|
380
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
381
|
+
const localVarPath = this.basePath + '/giftcards/deals/{dealID}/purchase'
|
|
382
|
+
.replace('{' + 'dealID' + '}', encodeURIComponent(String(dealID)));
|
|
383
|
+
let localVarQueryParameters = {};
|
|
384
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
385
|
+
const produces = ['application/json'];
|
|
386
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
387
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
388
|
+
}
|
|
389
|
+
else {
|
|
390
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
391
|
+
}
|
|
392
|
+
let localVarFormParams = {};
|
|
393
|
+
if (dealID === null || dealID === undefined) {
|
|
394
|
+
throw new Error('Required parameter dealID was null or undefined when calling purchaseCertificateFromDeal.');
|
|
395
|
+
}
|
|
396
|
+
if (wTCertificatePurchaseRequest === null || wTCertificatePurchaseRequest === undefined) {
|
|
397
|
+
throw new Error('Required parameter wTCertificatePurchaseRequest was null or undefined when calling purchaseCertificateFromDeal.');
|
|
398
|
+
}
|
|
399
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
400
|
+
let localVarUseFormData = false;
|
|
401
|
+
let localVarRequestOptions = {
|
|
402
|
+
method: 'POST',
|
|
403
|
+
qs: localVarQueryParameters,
|
|
404
|
+
headers: localVarHeaderParams,
|
|
405
|
+
uri: localVarPath,
|
|
406
|
+
useQuerystring: this._useQuerystring,
|
|
407
|
+
json: true,
|
|
408
|
+
body: models_1.ObjectSerializer.serialize(wTCertificatePurchaseRequest, "WTCertificatePurchaseRequest")
|
|
409
|
+
};
|
|
410
|
+
let authenticationPromise = Promise.resolve();
|
|
411
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
412
|
+
let interceptorPromise = authenticationPromise;
|
|
413
|
+
for (const interceptor of this.interceptors) {
|
|
414
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
415
|
+
}
|
|
416
|
+
return interceptorPromise.then(() => {
|
|
417
|
+
if (Object.keys(localVarFormParams).length) {
|
|
418
|
+
if (localVarUseFormData) {
|
|
419
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
420
|
+
}
|
|
421
|
+
else {
|
|
422
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
return new Promise((resolve, reject) => {
|
|
426
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
427
|
+
if (error) {
|
|
428
|
+
reject(error);
|
|
429
|
+
}
|
|
430
|
+
else {
|
|
431
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
432
|
+
body = models_1.ObjectSerializer.deserialize(body, "any");
|
|
433
|
+
resolve({ response: response, body: body });
|
|
434
|
+
}
|
|
435
|
+
else {
|
|
436
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
});
|
|
441
|
+
});
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
purchaseGiftCard(wTGiftCardPurchaseRequest, options = { headers: {} }) {
|
|
445
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
446
|
+
const localVarPath = this.basePath + '/giftcards/purchase';
|
|
447
|
+
let localVarQueryParameters = {};
|
|
448
|
+
let localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
449
|
+
const produces = ['application/json'];
|
|
450
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
451
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
452
|
+
}
|
|
453
|
+
else {
|
|
454
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
455
|
+
}
|
|
456
|
+
let localVarFormParams = {};
|
|
457
|
+
if (wTGiftCardPurchaseRequest === null || wTGiftCardPurchaseRequest === undefined) {
|
|
458
|
+
throw new Error('Required parameter wTGiftCardPurchaseRequest was null or undefined when calling purchaseGiftCard.');
|
|
459
|
+
}
|
|
460
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
461
|
+
let localVarUseFormData = false;
|
|
462
|
+
let localVarRequestOptions = {
|
|
463
|
+
method: 'POST',
|
|
464
|
+
qs: localVarQueryParameters,
|
|
465
|
+
headers: localVarHeaderParams,
|
|
466
|
+
uri: localVarPath,
|
|
467
|
+
useQuerystring: this._useQuerystring,
|
|
468
|
+
json: true,
|
|
469
|
+
body: models_1.ObjectSerializer.serialize(wTGiftCardPurchaseRequest, "WTGiftCardPurchaseRequest")
|
|
470
|
+
};
|
|
471
|
+
let authenticationPromise = Promise.resolve();
|
|
472
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
473
|
+
let interceptorPromise = authenticationPromise;
|
|
474
|
+
for (const interceptor of this.interceptors) {
|
|
475
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
476
|
+
}
|
|
477
|
+
return interceptorPromise.then(() => {
|
|
478
|
+
if (Object.keys(localVarFormParams).length) {
|
|
479
|
+
if (localVarUseFormData) {
|
|
480
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
481
|
+
}
|
|
482
|
+
else {
|
|
483
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
return new Promise((resolve, reject) => {
|
|
487
|
+
(0, request_1.default)(localVarRequestOptions, (error, response, body) => {
|
|
488
|
+
if (error) {
|
|
489
|
+
reject(error);
|
|
490
|
+
}
|
|
491
|
+
else {
|
|
492
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
493
|
+
body = models_1.ObjectSerializer.deserialize(body, "any");
|
|
494
|
+
resolve({ response: response, body: body });
|
|
495
|
+
}
|
|
496
|
+
else {
|
|
497
|
+
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
});
|
|
502
|
+
});
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
exports.GiftCardsApi = GiftCardsApi;
|
|
507
|
+
//# sourceMappingURL=giftCardsApi.js.map
|