@tradecafe/offer-service-sdk 0.0.57 → 0.0.62
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/.openapi-generator/FILES +9 -0
- package/api/apis.ts +3 -1
- package/api/matchedOffersApi.ts +329 -0
- package/api/promoTextsApi.ts +426 -0
- 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/matchedOffersApi.d.ts +43 -0
- package/dist/api/matchedOffersApi.js +406 -84
- package/dist/api/matchedOffersApi.js.map +1 -1
- package/dist/api/promoTextsApi.d.ts +67 -0
- package/dist/api/promoTextsApi.js +436 -0
- package/dist/api/promoTextsApi.js.map +1 -0
- package/dist/model/archivePromoTextDto.d.ts +14 -0
- package/dist/model/archivePromoTextDto.js +21 -0
- package/dist/model/archivePromoTextDto.js.map +1 -0
- package/dist/model/bulkCancelPromotionDto.d.ts +16 -0
- package/dist/model/bulkCancelPromotionDto.js +31 -0
- package/dist/model/bulkCancelPromotionDto.js.map +1 -0
- package/dist/model/bulkChangeDestinationLocationDto.d.ts +16 -0
- package/dist/model/bulkChangeDestinationLocationDto.js +31 -0
- package/dist/model/bulkChangeDestinationLocationDto.js.map +1 -0
- package/dist/model/bulkPromoteDto.d.ts +17 -0
- package/dist/model/bulkPromoteDto.js +36 -0
- package/dist/model/bulkPromoteDto.js.map +1 -0
- package/dist/model/createPromoTextDto.d.ts +17 -0
- package/dist/model/createPromoTextDto.js +31 -0
- package/dist/model/createPromoTextDto.js.map +1 -0
- package/dist/model/models.d.ts +8 -0
- package/dist/model/models.js +25 -0
- package/dist/model/models.js.map +1 -1
- package/dist/model/promoTextPairDto.d.ts +24 -0
- package/dist/model/promoTextPairDto.js +41 -0
- package/dist/model/promoTextPairDto.js.map +1 -0
- package/dist/model/searchPromoTextDto.d.ts +15 -0
- package/dist/model/searchPromoTextDto.js +26 -0
- package/dist/model/searchPromoTextDto.js.map +1 -0
- package/dist/model/updatePromoTextDto.d.ts +17 -0
- package/dist/model/updatePromoTextDto.js +31 -0
- package/dist/model/updatePromoTextDto.js.map +1 -0
- package/model/archivePromoTextDto.ts +34 -0
- package/model/bulkCancelPromotionDto.ts +49 -0
- package/model/bulkChangeDestinationLocationDto.ts +43 -0
- package/model/bulkPromoteDto.ts +55 -0
- package/model/createPromoTextDto.ts +53 -0
- package/model/models.ts +25 -0
- package/model/promoTextPairDto.ts +60 -0
- package/model/searchPromoTextDto.ts +43 -0
- package/model/updatePromoTextDto.ts +47 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -7,18 +7,23 @@ api/futureBidsApi.ts
|
|
|
7
7
|
api/healthApi.ts
|
|
8
8
|
api/matchedOffersApi.ts
|
|
9
9
|
api/offersApi.ts
|
|
10
|
+
api/promoTextsApi.ts
|
|
10
11
|
git_push.sh
|
|
11
12
|
model/addFutureBidDto.ts
|
|
12
13
|
model/addMatchedDeliveryDateDto.ts
|
|
14
|
+
model/archivePromoTextDto.ts
|
|
13
15
|
model/associatedCostDto.ts
|
|
14
16
|
model/bulkAddRelistingDto.ts
|
|
15
17
|
model/bulkAddTertiaryCostsDto.ts
|
|
18
|
+
model/bulkCancelPromotionDto.ts
|
|
19
|
+
model/bulkChangeDestinationLocationDto.ts
|
|
16
20
|
model/bulkChangeFreightRatesDto.ts
|
|
17
21
|
model/bulkChangeIncotermDto.ts
|
|
18
22
|
model/bulkChangeSellPriceItemDto.ts
|
|
19
23
|
model/bulkChangeSellPricesDto.ts
|
|
20
24
|
model/bulkChangeSellingTraderDto.ts
|
|
21
25
|
model/bulkDeleteBuyerSpecialInstructionsDto.ts
|
|
26
|
+
model/bulkPromoteDto.ts
|
|
22
27
|
model/bulkUpdateBuyerSpecialInstructionsDto.ts
|
|
23
28
|
model/bulkUpdateDeliveryDatesDto.ts
|
|
24
29
|
model/bulkUpdateDocsCountryDto.ts
|
|
@@ -40,6 +45,7 @@ model/createOfferDtoAttributes.ts
|
|
|
40
45
|
model/createOfferDtoFormula.ts
|
|
41
46
|
model/createOfferDtoPacking.ts
|
|
42
47
|
model/createOfferDtoWeight.ts
|
|
48
|
+
model/createPromoTextDto.ts
|
|
43
49
|
model/defaultCostDto.ts
|
|
44
50
|
model/formulaDto.ts
|
|
45
51
|
model/formulaLineDto.ts
|
|
@@ -55,12 +61,15 @@ model/overwriteItemDto.ts
|
|
|
55
61
|
model/overwriteItemDtoWeight.ts
|
|
56
62
|
model/packing.ts
|
|
57
63
|
model/pinActionDto.ts
|
|
64
|
+
model/promoTextPairDto.ts
|
|
58
65
|
model/relistingConfigDto.ts
|
|
59
66
|
model/relistingDetailDto.ts
|
|
60
67
|
model/relistingDetailDtoRandomConfig.ts
|
|
61
68
|
model/relistingRandomConfigDto.ts
|
|
69
|
+
model/searchPromoTextDto.ts
|
|
62
70
|
model/updateFutureBidDto.ts
|
|
63
71
|
model/updateMatchedDeliveryDateDto.ts
|
|
72
|
+
model/updatePromoTextDto.ts
|
|
64
73
|
model/userPin.ts
|
|
65
74
|
model/weight.ts
|
|
66
75
|
model/weightDto.ts
|
package/api/apis.ts
CHANGED
|
@@ -8,6 +8,8 @@ export * from './matchedOffersApi';
|
|
|
8
8
|
import { MatchedOffersApi } from './matchedOffersApi';
|
|
9
9
|
export * from './offersApi';
|
|
10
10
|
import { OffersApi } from './offersApi';
|
|
11
|
+
export * from './promoTextsApi';
|
|
12
|
+
import { PromoTextsApi } from './promoTextsApi';
|
|
11
13
|
import * as http from 'http';
|
|
12
14
|
|
|
13
15
|
export class HttpError extends Error {
|
|
@@ -19,4 +21,4 @@ export class HttpError extends Error {
|
|
|
19
21
|
|
|
20
22
|
export { RequestFile } from '../model/models';
|
|
21
23
|
|
|
22
|
-
export const APIS = [AutomatedOffersApi, FutureBidsApi, HealthApi, MatchedOffersApi, OffersApi];
|
|
24
|
+
export const APIS = [AutomatedOffersApi, FutureBidsApi, HealthApi, MatchedOffersApi, OffersApi, PromoTextsApi];
|
package/api/matchedOffersApi.ts
CHANGED
|
@@ -16,11 +16,14 @@ import http from 'http';
|
|
|
16
16
|
|
|
17
17
|
/* tslint:disable:no-unused-locals */
|
|
18
18
|
import { BulkAddTertiaryCostsDto } from '../model/bulkAddTertiaryCostsDto';
|
|
19
|
+
import { BulkCancelPromotionDto } from '../model/bulkCancelPromotionDto';
|
|
20
|
+
import { BulkChangeDestinationLocationDto } from '../model/bulkChangeDestinationLocationDto';
|
|
19
21
|
import { BulkChangeFreightRatesDto } from '../model/bulkChangeFreightRatesDto';
|
|
20
22
|
import { BulkChangeIncotermDto } from '../model/bulkChangeIncotermDto';
|
|
21
23
|
import { BulkChangeSellPricesDto } from '../model/bulkChangeSellPricesDto';
|
|
22
24
|
import { BulkChangeSellingTraderDto } from '../model/bulkChangeSellingTraderDto';
|
|
23
25
|
import { BulkDeleteBuyerSpecialInstructionsDto } from '../model/bulkDeleteBuyerSpecialInstructionsDto';
|
|
26
|
+
import { BulkPromoteDto } from '../model/bulkPromoteDto';
|
|
24
27
|
import { BulkUpdateBuyerSpecialInstructionsDto } from '../model/bulkUpdateBuyerSpecialInstructionsDto';
|
|
25
28
|
import { BulkUpdateDeliveryDatesDto } from '../model/bulkUpdateDeliveryDatesDto';
|
|
26
29
|
import { BulkUpdateDocsCountryDto } from '../model/bulkUpdateDocsCountryDto';
|
|
@@ -96,6 +99,67 @@ export class MatchedOffersApi {
|
|
|
96
99
|
this.interceptors.push(interceptor);
|
|
97
100
|
}
|
|
98
101
|
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @summary Lists live campaigns for the Promoted filter
|
|
105
|
+
* @param account
|
|
106
|
+
*/
|
|
107
|
+
public async matchedOffersControllerActivepromotions (account: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
|
108
|
+
const localVarPath = this.basePath + '/matched-offers/{account}/promotions/active'
|
|
109
|
+
.replace('{' + 'account' + '}', encodeURIComponent(String(account)));
|
|
110
|
+
let localVarQueryParameters: any = {};
|
|
111
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
112
|
+
let localVarFormParams: any = {};
|
|
113
|
+
|
|
114
|
+
// verify required parameter 'account' is not null or undefined
|
|
115
|
+
if (account === null || account === undefined) {
|
|
116
|
+
throw new Error('Required parameter account was null or undefined when calling matchedOffersControllerActivepromotions.');
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
120
|
+
|
|
121
|
+
let localVarUseFormData = false;
|
|
122
|
+
|
|
123
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
124
|
+
method: 'GET',
|
|
125
|
+
qs: localVarQueryParameters,
|
|
126
|
+
headers: localVarHeaderParams,
|
|
127
|
+
uri: localVarPath,
|
|
128
|
+
useQuerystring: this._useQuerystring,
|
|
129
|
+
json: true,
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
let authenticationPromise = Promise.resolve();
|
|
133
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
134
|
+
|
|
135
|
+
let interceptorPromise = authenticationPromise;
|
|
136
|
+
for (const interceptor of this.interceptors) {
|
|
137
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return interceptorPromise.then(() => {
|
|
141
|
+
if (Object.keys(localVarFormParams).length) {
|
|
142
|
+
if (localVarUseFormData) {
|
|
143
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
144
|
+
} else {
|
|
145
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
|
149
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
150
|
+
if (error) {
|
|
151
|
+
reject(error);
|
|
152
|
+
} else {
|
|
153
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
154
|
+
resolve({ response: response, body: body });
|
|
155
|
+
} else {
|
|
156
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
}
|
|
99
163
|
/**
|
|
100
164
|
*
|
|
101
165
|
* @summary Adds bid to the matched offer with the provided ID
|
|
@@ -328,6 +392,142 @@ export class MatchedOffersApi {
|
|
|
328
392
|
});
|
|
329
393
|
});
|
|
330
394
|
}
|
|
395
|
+
/**
|
|
396
|
+
*
|
|
397
|
+
* @summary Cancels promotions by matched offer or by whole campaign
|
|
398
|
+
* @param account
|
|
399
|
+
* @param bulkCancelPromotionDto
|
|
400
|
+
*/
|
|
401
|
+
public async matchedOffersControllerBulkcancelpromotion (account: string, bulkCancelPromotionDto: BulkCancelPromotionDto, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
|
402
|
+
const localVarPath = this.basePath + '/matched-offers/{account}/bulk/cancel-promotion'
|
|
403
|
+
.replace('{' + 'account' + '}', encodeURIComponent(String(account)));
|
|
404
|
+
let localVarQueryParameters: any = {};
|
|
405
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
406
|
+
let localVarFormParams: any = {};
|
|
407
|
+
|
|
408
|
+
// verify required parameter 'account' is not null or undefined
|
|
409
|
+
if (account === null || account === undefined) {
|
|
410
|
+
throw new Error('Required parameter account was null or undefined when calling matchedOffersControllerBulkcancelpromotion.');
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
// verify required parameter 'bulkCancelPromotionDto' is not null or undefined
|
|
414
|
+
if (bulkCancelPromotionDto === null || bulkCancelPromotionDto === undefined) {
|
|
415
|
+
throw new Error('Required parameter bulkCancelPromotionDto was null or undefined when calling matchedOffersControllerBulkcancelpromotion.');
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
419
|
+
|
|
420
|
+
let localVarUseFormData = false;
|
|
421
|
+
|
|
422
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
423
|
+
method: 'PUT',
|
|
424
|
+
qs: localVarQueryParameters,
|
|
425
|
+
headers: localVarHeaderParams,
|
|
426
|
+
uri: localVarPath,
|
|
427
|
+
useQuerystring: this._useQuerystring,
|
|
428
|
+
json: true,
|
|
429
|
+
body: ObjectSerializer.serialize(bulkCancelPromotionDto, "BulkCancelPromotionDto")
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
let authenticationPromise = Promise.resolve();
|
|
433
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
434
|
+
|
|
435
|
+
let interceptorPromise = authenticationPromise;
|
|
436
|
+
for (const interceptor of this.interceptors) {
|
|
437
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
return interceptorPromise.then(() => {
|
|
441
|
+
if (Object.keys(localVarFormParams).length) {
|
|
442
|
+
if (localVarUseFormData) {
|
|
443
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
444
|
+
} else {
|
|
445
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
|
449
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
450
|
+
if (error) {
|
|
451
|
+
reject(error);
|
|
452
|
+
} else {
|
|
453
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
454
|
+
resolve({ response: response, body: body });
|
|
455
|
+
} else {
|
|
456
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
});
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
*
|
|
465
|
+
* @summary Changes the destination location on multiple matched offers in a single operation
|
|
466
|
+
* @param account
|
|
467
|
+
* @param bulkChangeDestinationLocationDto
|
|
468
|
+
*/
|
|
469
|
+
public async matchedOffersControllerBulkchangedestinationlocation (account: string, bulkChangeDestinationLocationDto: BulkChangeDestinationLocationDto, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
|
470
|
+
const localVarPath = this.basePath + '/matched-offers/{account}/bulk/destination-location'
|
|
471
|
+
.replace('{' + 'account' + '}', encodeURIComponent(String(account)));
|
|
472
|
+
let localVarQueryParameters: any = {};
|
|
473
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
474
|
+
let localVarFormParams: any = {};
|
|
475
|
+
|
|
476
|
+
// verify required parameter 'account' is not null or undefined
|
|
477
|
+
if (account === null || account === undefined) {
|
|
478
|
+
throw new Error('Required parameter account was null or undefined when calling matchedOffersControllerBulkchangedestinationlocation.');
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
// verify required parameter 'bulkChangeDestinationLocationDto' is not null or undefined
|
|
482
|
+
if (bulkChangeDestinationLocationDto === null || bulkChangeDestinationLocationDto === undefined) {
|
|
483
|
+
throw new Error('Required parameter bulkChangeDestinationLocationDto was null or undefined when calling matchedOffersControllerBulkchangedestinationlocation.');
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
487
|
+
|
|
488
|
+
let localVarUseFormData = false;
|
|
489
|
+
|
|
490
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
491
|
+
method: 'PUT',
|
|
492
|
+
qs: localVarQueryParameters,
|
|
493
|
+
headers: localVarHeaderParams,
|
|
494
|
+
uri: localVarPath,
|
|
495
|
+
useQuerystring: this._useQuerystring,
|
|
496
|
+
json: true,
|
|
497
|
+
body: ObjectSerializer.serialize(bulkChangeDestinationLocationDto, "BulkChangeDestinationLocationDto")
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
let authenticationPromise = Promise.resolve();
|
|
501
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
502
|
+
|
|
503
|
+
let interceptorPromise = authenticationPromise;
|
|
504
|
+
for (const interceptor of this.interceptors) {
|
|
505
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
return interceptorPromise.then(() => {
|
|
509
|
+
if (Object.keys(localVarFormParams).length) {
|
|
510
|
+
if (localVarUseFormData) {
|
|
511
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
512
|
+
} else {
|
|
513
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
|
517
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
518
|
+
if (error) {
|
|
519
|
+
reject(error);
|
|
520
|
+
} else {
|
|
521
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
522
|
+
resolve({ response: response, body: body });
|
|
523
|
+
} else {
|
|
524
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
});
|
|
528
|
+
});
|
|
529
|
+
});
|
|
530
|
+
}
|
|
331
531
|
/**
|
|
332
532
|
*
|
|
333
533
|
* @summary Changes freight rates for multiple matched offers in a single operation
|
|
@@ -668,6 +868,74 @@ export class MatchedOffersApi {
|
|
|
668
868
|
});
|
|
669
869
|
});
|
|
670
870
|
}
|
|
871
|
+
/**
|
|
872
|
+
*
|
|
873
|
+
* @summary Promotes multiple matched offers under a single campaign
|
|
874
|
+
* @param account
|
|
875
|
+
* @param bulkPromoteDto
|
|
876
|
+
*/
|
|
877
|
+
public async matchedOffersControllerBulkpromote (account: string, bulkPromoteDto: BulkPromoteDto, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
|
878
|
+
const localVarPath = this.basePath + '/matched-offers/{account}/bulk/promote'
|
|
879
|
+
.replace('{' + 'account' + '}', encodeURIComponent(String(account)));
|
|
880
|
+
let localVarQueryParameters: any = {};
|
|
881
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
882
|
+
let localVarFormParams: any = {};
|
|
883
|
+
|
|
884
|
+
// verify required parameter 'account' is not null or undefined
|
|
885
|
+
if (account === null || account === undefined) {
|
|
886
|
+
throw new Error('Required parameter account was null or undefined when calling matchedOffersControllerBulkpromote.');
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
// verify required parameter 'bulkPromoteDto' is not null or undefined
|
|
890
|
+
if (bulkPromoteDto === null || bulkPromoteDto === undefined) {
|
|
891
|
+
throw new Error('Required parameter bulkPromoteDto was null or undefined when calling matchedOffersControllerBulkpromote.');
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
895
|
+
|
|
896
|
+
let localVarUseFormData = false;
|
|
897
|
+
|
|
898
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
899
|
+
method: 'POST',
|
|
900
|
+
qs: localVarQueryParameters,
|
|
901
|
+
headers: localVarHeaderParams,
|
|
902
|
+
uri: localVarPath,
|
|
903
|
+
useQuerystring: this._useQuerystring,
|
|
904
|
+
json: true,
|
|
905
|
+
body: ObjectSerializer.serialize(bulkPromoteDto, "BulkPromoteDto")
|
|
906
|
+
};
|
|
907
|
+
|
|
908
|
+
let authenticationPromise = Promise.resolve();
|
|
909
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
910
|
+
|
|
911
|
+
let interceptorPromise = authenticationPromise;
|
|
912
|
+
for (const interceptor of this.interceptors) {
|
|
913
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
return interceptorPromise.then(() => {
|
|
917
|
+
if (Object.keys(localVarFormParams).length) {
|
|
918
|
+
if (localVarUseFormData) {
|
|
919
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
920
|
+
} else {
|
|
921
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
|
925
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
926
|
+
if (error) {
|
|
927
|
+
reject(error);
|
|
928
|
+
} else {
|
|
929
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
930
|
+
resolve({ response: response, body: body });
|
|
931
|
+
} else {
|
|
932
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
});
|
|
936
|
+
});
|
|
937
|
+
});
|
|
938
|
+
}
|
|
671
939
|
/**
|
|
672
940
|
*
|
|
673
941
|
* @summary Sets buyer special instructions on multiple matched offers in a single operation
|
|
@@ -1524,6 +1792,67 @@ export class MatchedOffersApi {
|
|
|
1524
1792
|
});
|
|
1525
1793
|
});
|
|
1526
1794
|
}
|
|
1795
|
+
/**
|
|
1796
|
+
*
|
|
1797
|
+
* @summary Running promotions per buyer, for the Promote modal
|
|
1798
|
+
* @param account
|
|
1799
|
+
*/
|
|
1800
|
+
public async matchedOffersControllerPromotionsbybuyer (account: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> {
|
|
1801
|
+
const localVarPath = this.basePath + '/matched-offers/{account}/promotions/by-buyer'
|
|
1802
|
+
.replace('{' + 'account' + '}', encodeURIComponent(String(account)));
|
|
1803
|
+
let localVarQueryParameters: any = {};
|
|
1804
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
1805
|
+
let localVarFormParams: any = {};
|
|
1806
|
+
|
|
1807
|
+
// verify required parameter 'account' is not null or undefined
|
|
1808
|
+
if (account === null || account === undefined) {
|
|
1809
|
+
throw new Error('Required parameter account was null or undefined when calling matchedOffersControllerPromotionsbybuyer.');
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1813
|
+
|
|
1814
|
+
let localVarUseFormData = false;
|
|
1815
|
+
|
|
1816
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
1817
|
+
method: 'GET',
|
|
1818
|
+
qs: localVarQueryParameters,
|
|
1819
|
+
headers: localVarHeaderParams,
|
|
1820
|
+
uri: localVarPath,
|
|
1821
|
+
useQuerystring: this._useQuerystring,
|
|
1822
|
+
json: true,
|
|
1823
|
+
};
|
|
1824
|
+
|
|
1825
|
+
let authenticationPromise = Promise.resolve();
|
|
1826
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1827
|
+
|
|
1828
|
+
let interceptorPromise = authenticationPromise;
|
|
1829
|
+
for (const interceptor of this.interceptors) {
|
|
1830
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
return interceptorPromise.then(() => {
|
|
1834
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1835
|
+
if (localVarUseFormData) {
|
|
1836
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1837
|
+
} else {
|
|
1838
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => {
|
|
1842
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
1843
|
+
if (error) {
|
|
1844
|
+
reject(error);
|
|
1845
|
+
} else {
|
|
1846
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1847
|
+
resolve({ response: response, body: body });
|
|
1848
|
+
} else {
|
|
1849
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
});
|
|
1853
|
+
});
|
|
1854
|
+
});
|
|
1855
|
+
}
|
|
1527
1856
|
/**
|
|
1528
1857
|
*
|
|
1529
1858
|
* @summary Removes the matched offer with the provided ID
|