@emilgroup/discount-sdk 1.4.1-beta.0 → 1.5.1
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/README.md +2 -2
- package/index.js +99 -0
- package/package.json +8 -21
- package/scripts/deploy.js +225 -0
- package/.openapi-generator/FILES +0 -54
- package/.openapi-generator/VERSION +0 -1
- package/.openapi-generator-ignore +0 -23
- package/api/campaigns-api.ts +0 -1433
- package/api/default-api.ts +0 -124
- package/api/policy-vouchers-api.ts +0 -999
- package/api/vouchers-api.ts +0 -691
- package/api.ts +0 -33
- package/base.ts +0 -331
- package/common.ts +0 -198
- package/configuration.ts +0 -110
- package/dist/api/campaigns-api.d.ts +0 -808
- package/dist/api/campaigns-api.js +0 -1251
- package/dist/api/default-api.d.ts +0 -70
- package/dist/api/default-api.js +0 -200
- package/dist/api/policy-vouchers-api.d.ts +0 -555
- package/dist/api/policy-vouchers-api.js +0 -915
- package/dist/api/vouchers-api.d.ts +0 -393
- package/dist/api/vouchers-api.js +0 -642
- package/dist/api.d.ts +0 -15
- package/dist/api.js +0 -33
- package/dist/base.d.ts +0 -86
- package/dist/base.js +0 -367
- package/dist/common.d.ts +0 -91
- package/dist/common.js +0 -276
- package/dist/configuration.d.ts +0 -89
- package/dist/configuration.js +0 -52
- package/dist/index.d.ts +0 -15
- package/dist/index.js +0 -36
- package/dist/models/campaign-class.d.ts +0 -105
- package/dist/models/campaign-class.js +0 -24
- package/dist/models/charge-policy-voucher-request-dto.d.ts +0 -48
- package/dist/models/charge-policy-voucher-request-dto.js +0 -15
- package/dist/models/charge-policy-voucher-response-class.d.ts +0 -96
- package/dist/models/charge-policy-voucher-response-class.js +0 -21
- package/dist/models/check-account-eligibility-request-dto.d.ts +0 -48
- package/dist/models/check-account-eligibility-request-dto.js +0 -15
- package/dist/models/check-account-eligibility-response-class.d.ts +0 -57
- package/dist/models/check-account-eligibility-response-class.js +0 -24
- package/dist/models/create-campaign-request-dto.d.ts +0 -42
- package/dist/models/create-campaign-request-dto.js +0 -15
- package/dist/models/create-campaign-response-class.d.ts +0 -25
- package/dist/models/create-campaign-response-class.js +0 -15
- package/dist/models/create-eligible-account-request-dto.d.ts +0 -30
- package/dist/models/create-eligible-account-request-dto.js +0 -15
- package/dist/models/create-eligible-account-response-class.d.ts +0 -25
- package/dist/models/create-eligible-account-response-class.js +0 -15
- package/dist/models/create-policy-voucher-request-dto.d.ts +0 -48
- package/dist/models/create-policy-voucher-request-dto.js +0 -15
- package/dist/models/create-policy-voucher-response-class.d.ts +0 -25
- package/dist/models/create-policy-voucher-response-class.js +0 -15
- package/dist/models/create-product-discount-dto.d.ts +0 -48
- package/dist/models/create-product-discount-dto.js +0 -15
- package/dist/models/create-voucher-request-dto.d.ts +0 -66
- package/dist/models/create-voucher-request-dto.js +0 -20
- package/dist/models/create-voucher-response-class.d.ts +0 -25
- package/dist/models/create-voucher-response-class.js +0 -15
- package/dist/models/eligible-account-class.d.ts +0 -78
- package/dist/models/eligible-account-class.js +0 -15
- package/dist/models/get-campaign-response-class.d.ts +0 -25
- package/dist/models/get-campaign-response-class.js +0 -15
- package/dist/models/get-policy-voucher-response-class.d.ts +0 -25
- package/dist/models/get-policy-voucher-response-class.js +0 -15
- package/dist/models/get-voucher-response-class.d.ts +0 -25
- package/dist/models/get-voucher-response-class.js +0 -15
- package/dist/models/index.d.ts +0 -37
- package/dist/models/index.js +0 -53
- package/dist/models/inline-response200.d.ts +0 -54
- package/dist/models/inline-response200.js +0 -15
- package/dist/models/inline-response503.d.ts +0 -54
- package/dist/models/inline-response503.js +0 -15
- package/dist/models/list-campaigns-response-class.d.ts +0 -43
- package/dist/models/list-campaigns-response-class.js +0 -15
- package/dist/models/list-eligible-accounts-response-class.d.ts +0 -43
- package/dist/models/list-eligible-accounts-response-class.js +0 -15
- package/dist/models/list-policy-vouchers-response-class.d.ts +0 -43
- package/dist/models/list-policy-vouchers-response-class.js +0 -15
- package/dist/models/list-vouchers-response-class.d.ts +0 -43
- package/dist/models/list-vouchers-response-class.js +0 -15
- package/dist/models/policy-voucher-class.d.ts +0 -165
- package/dist/models/policy-voucher-class.js +0 -21
- package/dist/models/policy-voucher-transaction-class.d.ts +0 -126
- package/dist/models/policy-voucher-transaction-class.js +0 -26
- package/dist/models/product-discount-class.d.ts +0 -90
- package/dist/models/product-discount-class.js +0 -15
- package/dist/models/redeem-policy-voucher-request-dto.d.ts +0 -48
- package/dist/models/redeem-policy-voucher-request-dto.js +0 -15
- package/dist/models/redeem-policy-voucher-response-class.d.ts +0 -84
- package/dist/models/redeem-policy-voucher-response-class.js +0 -21
- package/dist/models/update-campaign-request-dto.d.ts +0 -42
- package/dist/models/update-campaign-request-dto.js +0 -15
- package/dist/models/update-campaign-response-class.d.ts +0 -25
- package/dist/models/update-campaign-response-class.js +0 -15
- package/dist/models/update-campaign-status-request-dto.d.ts +0 -33
- package/dist/models/update-campaign-status-request-dto.js +0 -24
- package/dist/models/update-voucher-request-dto.d.ts +0 -60
- package/dist/models/update-voucher-request-dto.js +0 -20
- package/dist/models/update-voucher-response-class.d.ts +0 -25
- package/dist/models/update-voucher-response-class.js +0 -15
- package/dist/models/voucher-class.d.ts +0 -127
- package/dist/models/voucher-class.js +0 -20
- package/dist/models/withdraw-policy-voucher-request-dto.d.ts +0 -36
- package/dist/models/withdraw-policy-voucher-request-dto.js +0 -15
- package/dist/models/withdraw-policy-voucher-response-class.d.ts +0 -78
- package/dist/models/withdraw-policy-voucher-response-class.js +0 -21
- package/git_push.sh +0 -57
- package/index.ts +0 -19
- package/models/campaign-class.ts +0 -114
- package/models/charge-policy-voucher-request-dto.ts +0 -54
- package/models/charge-policy-voucher-response-class.ts +0 -105
- package/models/check-account-eligibility-request-dto.ts +0 -54
- package/models/check-account-eligibility-response-class.ts +0 -66
- package/models/create-campaign-request-dto.ts +0 -48
- package/models/create-campaign-response-class.ts +0 -31
- package/models/create-eligible-account-request-dto.ts +0 -36
- package/models/create-eligible-account-response-class.ts +0 -31
- package/models/create-policy-voucher-request-dto.ts +0 -54
- package/models/create-policy-voucher-response-class.ts +0 -31
- package/models/create-product-discount-dto.ts +0 -54
- package/models/create-voucher-request-dto.ts +0 -75
- package/models/create-voucher-response-class.ts +0 -31
- package/models/eligible-account-class.ts +0 -84
- package/models/get-campaign-response-class.ts +0 -31
- package/models/get-policy-voucher-response-class.ts +0 -31
- package/models/get-voucher-response-class.ts +0 -31
- package/models/index.ts +0 -37
- package/models/inline-response200.ts +0 -48
- package/models/inline-response503.ts +0 -48
- package/models/list-campaigns-response-class.ts +0 -49
- package/models/list-eligible-accounts-response-class.ts +0 -49
- package/models/list-policy-vouchers-response-class.ts +0 -49
- package/models/list-vouchers-response-class.ts +0 -49
- package/models/policy-voucher-class.ts +0 -174
- package/models/policy-voucher-transaction-class.ts +0 -136
- package/models/product-discount-class.ts +0 -96
- package/models/redeem-policy-voucher-request-dto.ts +0 -54
- package/models/redeem-policy-voucher-response-class.ts +0 -93
- package/models/update-campaign-request-dto.ts +0 -48
- package/models/update-campaign-response-class.ts +0 -31
- package/models/update-campaign-status-request-dto.ts +0 -42
- package/models/update-voucher-request-dto.ts +0 -69
- package/models/update-voucher-response-class.ts +0 -31
- package/models/voucher-class.ts +0 -136
- package/models/withdraw-policy-voucher-request-dto.ts +0 -42
- package/models/withdraw-policy-voucher-response-class.ts +0 -87
- package/tsconfig.json +0 -23
package/api/campaigns-api.ts
DELETED
|
@@ -1,1433 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* EMIL DiscountService
|
|
5
|
-
* The EMIL DiscountService API description
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 1.0
|
|
8
|
-
* Contact: kontakt@emil.de
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
17
|
-
import { Configuration } from '../configuration';
|
|
18
|
-
// Some imports not used depending on template conditions
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
21
|
-
// @ts-ignore
|
|
22
|
-
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
import { CreateCampaignRequestDto } from '../models';
|
|
25
|
-
// @ts-ignore
|
|
26
|
-
import { CreateCampaignResponseClass } from '../models';
|
|
27
|
-
// @ts-ignore
|
|
28
|
-
import { CreateEligibleAccountRequestDto } from '../models';
|
|
29
|
-
// @ts-ignore
|
|
30
|
-
import { CreateEligibleAccountResponseClass } from '../models';
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
import { GetCampaignResponseClass } from '../models';
|
|
33
|
-
// @ts-ignore
|
|
34
|
-
import { ListCampaignsResponseClass } from '../models';
|
|
35
|
-
// @ts-ignore
|
|
36
|
-
import { ListEligibleAccountsResponseClass } from '../models';
|
|
37
|
-
// @ts-ignore
|
|
38
|
-
import { UpdateCampaignRequestDto } from '../models';
|
|
39
|
-
// @ts-ignore
|
|
40
|
-
import { UpdateCampaignResponseClass } from '../models';
|
|
41
|
-
// @ts-ignore
|
|
42
|
-
import { UpdateCampaignStatusRequestDto } from '../models';
|
|
43
|
-
/**
|
|
44
|
-
* CampaignsApi - axios parameter creator
|
|
45
|
-
* @export
|
|
46
|
-
*/
|
|
47
|
-
export const CampaignsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
48
|
-
return {
|
|
49
|
-
/**
|
|
50
|
-
* Creates a new campaign that can contain multiple vouchers for eligible accounts to redeem.
|
|
51
|
-
* @summary Create the Campaign
|
|
52
|
-
* @param {CreateCampaignRequestDto} createCampaignRequestDto
|
|
53
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
54
|
-
* @param {*} [options] Override http request option.
|
|
55
|
-
* @throws {RequiredError}
|
|
56
|
-
*/
|
|
57
|
-
createCampaign: async (createCampaignRequestDto: CreateCampaignRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
58
|
-
// verify required parameter 'createCampaignRequestDto' is not null or undefined
|
|
59
|
-
assertParamExists('createCampaign', 'createCampaignRequestDto', createCampaignRequestDto)
|
|
60
|
-
const localVarPath = `/discountservice/v1/campaigns`;
|
|
61
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
62
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
63
|
-
let baseOptions;
|
|
64
|
-
let baseAccessToken;
|
|
65
|
-
if (configuration) {
|
|
66
|
-
baseOptions = configuration.baseOptions;
|
|
67
|
-
baseAccessToken = configuration.accessToken;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
71
|
-
const localVarHeaderParameter = {} as any;
|
|
72
|
-
const localVarQueryParameter = {} as any;
|
|
73
|
-
|
|
74
|
-
// authentication bearer required
|
|
75
|
-
// http bearer authentication required
|
|
76
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
77
|
-
|
|
78
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
79
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
85
|
-
|
|
86
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
87
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
88
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
89
|
-
localVarRequestOptions.data = serializeDataIfNeeded(createCampaignRequestDto, localVarRequestOptions, configuration)
|
|
90
|
-
|
|
91
|
-
return {
|
|
92
|
-
url: toPathString(localVarUrlObj),
|
|
93
|
-
options: localVarRequestOptions,
|
|
94
|
-
};
|
|
95
|
-
},
|
|
96
|
-
/**
|
|
97
|
-
* Creates an account that is eligible to redeem a vouchers from a specific campaign.
|
|
98
|
-
* @summary Create the Eligible Account
|
|
99
|
-
* @param {string} code Unique identifier for the object.
|
|
100
|
-
* @param {CreateEligibleAccountRequestDto} createEligibleAccountRequestDto
|
|
101
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
102
|
-
* @param {*} [options] Override http request option.
|
|
103
|
-
* @throws {RequiredError}
|
|
104
|
-
*/
|
|
105
|
-
createEligibleAccount: async (code: string, createEligibleAccountRequestDto: CreateEligibleAccountRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
106
|
-
// verify required parameter 'code' is not null or undefined
|
|
107
|
-
assertParamExists('createEligibleAccount', 'code', code)
|
|
108
|
-
// verify required parameter 'createEligibleAccountRequestDto' is not null or undefined
|
|
109
|
-
assertParamExists('createEligibleAccount', 'createEligibleAccountRequestDto', createEligibleAccountRequestDto)
|
|
110
|
-
const localVarPath = `/discountservice/v1/campaigns/{code}/eligible-accounts`
|
|
111
|
-
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
112
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
113
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
114
|
-
let baseOptions;
|
|
115
|
-
let baseAccessToken;
|
|
116
|
-
if (configuration) {
|
|
117
|
-
baseOptions = configuration.baseOptions;
|
|
118
|
-
baseAccessToken = configuration.accessToken;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
122
|
-
const localVarHeaderParameter = {} as any;
|
|
123
|
-
const localVarQueryParameter = {} as any;
|
|
124
|
-
|
|
125
|
-
// authentication bearer required
|
|
126
|
-
// http bearer authentication required
|
|
127
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
128
|
-
|
|
129
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
130
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
136
|
-
|
|
137
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
138
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
139
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
140
|
-
localVarRequestOptions.data = serializeDataIfNeeded(createEligibleAccountRequestDto, localVarRequestOptions, configuration)
|
|
141
|
-
|
|
142
|
-
return {
|
|
143
|
-
url: toPathString(localVarUrlObj),
|
|
144
|
-
options: localVarRequestOptions,
|
|
145
|
-
};
|
|
146
|
-
},
|
|
147
|
-
/**
|
|
148
|
-
* Removes a campaign and its associated vouchers. This will prevent any further voucher redemptions.
|
|
149
|
-
* @summary Delete the Campaign
|
|
150
|
-
* @param {string} code Unique identifier for the object.
|
|
151
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
152
|
-
* @param {*} [options] Override http request option.
|
|
153
|
-
* @throws {RequiredError}
|
|
154
|
-
*/
|
|
155
|
-
deleteCampaign: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
156
|
-
// verify required parameter 'code' is not null or undefined
|
|
157
|
-
assertParamExists('deleteCampaign', 'code', code)
|
|
158
|
-
const localVarPath = `/discountservice/v1/campaigns/{code}`
|
|
159
|
-
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
160
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
161
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
162
|
-
let baseOptions;
|
|
163
|
-
let baseAccessToken;
|
|
164
|
-
if (configuration) {
|
|
165
|
-
baseOptions = configuration.baseOptions;
|
|
166
|
-
baseAccessToken = configuration.accessToken;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
170
|
-
const localVarHeaderParameter = {} as any;
|
|
171
|
-
const localVarQueryParameter = {} as any;
|
|
172
|
-
|
|
173
|
-
// authentication bearer required
|
|
174
|
-
// http bearer authentication required
|
|
175
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
176
|
-
|
|
177
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
178
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
184
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
185
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
186
|
-
|
|
187
|
-
return {
|
|
188
|
-
url: toPathString(localVarUrlObj),
|
|
189
|
-
options: localVarRequestOptions,
|
|
190
|
-
};
|
|
191
|
-
},
|
|
192
|
-
/**
|
|
193
|
-
* Removes an eligible account from a campaign. This will prevent the account from using the assigned voucher code for discounts when the campaign is released.
|
|
194
|
-
* @summary Delete the Eligible Account
|
|
195
|
-
* @param {string} code Unique identifier for the object.
|
|
196
|
-
* @param {string} accountCode The code of the eligible account
|
|
197
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
198
|
-
* @param {*} [options] Override http request option.
|
|
199
|
-
* @throws {RequiredError}
|
|
200
|
-
*/
|
|
201
|
-
deleteEligibleAccount: async (code: string, accountCode: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
202
|
-
// verify required parameter 'code' is not null or undefined
|
|
203
|
-
assertParamExists('deleteEligibleAccount', 'code', code)
|
|
204
|
-
// verify required parameter 'accountCode' is not null or undefined
|
|
205
|
-
assertParamExists('deleteEligibleAccount', 'accountCode', accountCode)
|
|
206
|
-
const localVarPath = `/discountservice/v1/campaigns/{code}/eligible-accounts/{accountCode}`
|
|
207
|
-
.replace(`{${"code"}}`, encodeURIComponent(String(code)))
|
|
208
|
-
.replace(`{${"accountCode"}}`, encodeURIComponent(String(accountCode)));
|
|
209
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
210
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
211
|
-
let baseOptions;
|
|
212
|
-
let baseAccessToken;
|
|
213
|
-
if (configuration) {
|
|
214
|
-
baseOptions = configuration.baseOptions;
|
|
215
|
-
baseAccessToken = configuration.accessToken;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
219
|
-
const localVarHeaderParameter = {} as any;
|
|
220
|
-
const localVarQueryParameter = {} as any;
|
|
221
|
-
|
|
222
|
-
// authentication bearer required
|
|
223
|
-
// http bearer authentication required
|
|
224
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
225
|
-
|
|
226
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
227
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
233
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
234
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
235
|
-
|
|
236
|
-
return {
|
|
237
|
-
url: toPathString(localVarUrlObj),
|
|
238
|
-
options: localVarRequestOptions,
|
|
239
|
-
};
|
|
240
|
-
},
|
|
241
|
-
/**
|
|
242
|
-
* Removes all eligible accounts from a campaign. This will prevent these accounts from using their assigned voucher codes for discounts when the campaign is released.
|
|
243
|
-
* @summary Delete the Eligible Accounts
|
|
244
|
-
* @param {string} code Unique identifier for the object.
|
|
245
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
246
|
-
* @param {*} [options] Override http request option.
|
|
247
|
-
* @throws {RequiredError}
|
|
248
|
-
*/
|
|
249
|
-
deleteEligibleAccounts: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
250
|
-
// verify required parameter 'code' is not null or undefined
|
|
251
|
-
assertParamExists('deleteEligibleAccounts', 'code', code)
|
|
252
|
-
const localVarPath = `/discountservice/v1/campaigns/{code}/eligible-accounts`
|
|
253
|
-
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
254
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
255
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
256
|
-
let baseOptions;
|
|
257
|
-
let baseAccessToken;
|
|
258
|
-
if (configuration) {
|
|
259
|
-
baseOptions = configuration.baseOptions;
|
|
260
|
-
baseAccessToken = configuration.accessToken;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
264
|
-
const localVarHeaderParameter = {} as any;
|
|
265
|
-
const localVarQueryParameter = {} as any;
|
|
266
|
-
|
|
267
|
-
// authentication bearer required
|
|
268
|
-
// http bearer authentication required
|
|
269
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
270
|
-
|
|
271
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
272
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
278
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
279
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
280
|
-
|
|
281
|
-
return {
|
|
282
|
-
url: toPathString(localVarUrlObj),
|
|
283
|
-
options: localVarRequestOptions,
|
|
284
|
-
};
|
|
285
|
-
},
|
|
286
|
-
/**
|
|
287
|
-
* Retrieves detailed information about a specific campaign.
|
|
288
|
-
* @summary Retrieve the Campaign
|
|
289
|
-
* @param {string} code Unique identifier for the object.
|
|
290
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
291
|
-
* @param {string} [expand] You can expand campaign in this endpoint.
|
|
292
|
-
* @param {*} [options] Override http request option.
|
|
293
|
-
* @throws {RequiredError}
|
|
294
|
-
*/
|
|
295
|
-
getCampaign: async (code: string, authorization?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
296
|
-
// verify required parameter 'code' is not null or undefined
|
|
297
|
-
assertParamExists('getCampaign', 'code', code)
|
|
298
|
-
const localVarPath = `/discountservice/v1/campaigns/{code}`
|
|
299
|
-
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
300
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
301
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
302
|
-
let baseOptions;
|
|
303
|
-
let baseAccessToken;
|
|
304
|
-
if (configuration) {
|
|
305
|
-
baseOptions = configuration.baseOptions;
|
|
306
|
-
baseAccessToken = configuration.accessToken;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
310
|
-
const localVarHeaderParameter = {} as any;
|
|
311
|
-
const localVarQueryParameter = {} as any;
|
|
312
|
-
|
|
313
|
-
// authentication bearer required
|
|
314
|
-
// http bearer authentication required
|
|
315
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
316
|
-
|
|
317
|
-
if (expand !== undefined) {
|
|
318
|
-
localVarQueryParameter['expand'] = expand;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
322
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
328
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
329
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
330
|
-
|
|
331
|
-
return {
|
|
332
|
-
url: toPathString(localVarUrlObj),
|
|
333
|
-
options: localVarRequestOptions,
|
|
334
|
-
};
|
|
335
|
-
},
|
|
336
|
-
/**
|
|
337
|
-
* Retrieves a list of campaigns.
|
|
338
|
-
* @summary List Campaigns
|
|
339
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
340
|
-
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
341
|
-
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
342
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, name, status, slug, startDate, endDate, createdAt</i>
|
|
343
|
-
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: name, slug</i>
|
|
344
|
-
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: name, status, startDate, endDate, createdAt</i>
|
|
345
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
346
|
-
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, name, status, slug, startDate, endDate, createdAt</i>
|
|
347
|
-
* @param {*} [options] Override http request option.
|
|
348
|
-
* @throws {RequiredError}
|
|
349
|
-
*/
|
|
350
|
-
listCampaigns: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
351
|
-
const localVarPath = `/discountservice/v1/campaigns`;
|
|
352
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
353
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
354
|
-
let baseOptions;
|
|
355
|
-
let baseAccessToken;
|
|
356
|
-
if (configuration) {
|
|
357
|
-
baseOptions = configuration.baseOptions;
|
|
358
|
-
baseAccessToken = configuration.accessToken;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
362
|
-
const localVarHeaderParameter = {} as any;
|
|
363
|
-
const localVarQueryParameter = {} as any;
|
|
364
|
-
|
|
365
|
-
// authentication bearer required
|
|
366
|
-
// http bearer authentication required
|
|
367
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
368
|
-
|
|
369
|
-
if (pageSize !== undefined) {
|
|
370
|
-
localVarQueryParameter['pageSize'] = pageSize;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
if (pageToken !== undefined) {
|
|
374
|
-
localVarQueryParameter['pageToken'] = pageToken;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
if (filter !== undefined) {
|
|
378
|
-
localVarQueryParameter['filter'] = filter;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
if (search !== undefined) {
|
|
382
|
-
localVarQueryParameter['search'] = search;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
if (order !== undefined) {
|
|
386
|
-
localVarQueryParameter['order'] = order;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
if (expand !== undefined) {
|
|
390
|
-
localVarQueryParameter['expand'] = expand;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
if (filters !== undefined) {
|
|
394
|
-
localVarQueryParameter['filters'] = filters;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
398
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
404
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
405
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
406
|
-
|
|
407
|
-
return {
|
|
408
|
-
url: toPathString(localVarUrlObj),
|
|
409
|
-
options: localVarRequestOptions,
|
|
410
|
-
};
|
|
411
|
-
},
|
|
412
|
-
/**
|
|
413
|
-
* Retrieves a list of eligible accounts.
|
|
414
|
-
* @summary List Eligible Accounts
|
|
415
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
416
|
-
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
417
|
-
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
418
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, voucherCode, partnerNumber, campaignId, createdAt, updatedAt</i>
|
|
419
|
-
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: voucherCode, partnerNumber</i>
|
|
420
|
-
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: voucherCode, partnerNumber, createdAt</i>
|
|
421
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
422
|
-
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, voucherCode, partnerNumber, campaignId, createdAt, updatedAt</i>
|
|
423
|
-
* @param {*} [options] Override http request option.
|
|
424
|
-
* @throws {RequiredError}
|
|
425
|
-
*/
|
|
426
|
-
listEligibleAccounts: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
427
|
-
const localVarPath = `/discountservice/v1/campaigns/eligible-accounts`;
|
|
428
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
429
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
430
|
-
let baseOptions;
|
|
431
|
-
let baseAccessToken;
|
|
432
|
-
if (configuration) {
|
|
433
|
-
baseOptions = configuration.baseOptions;
|
|
434
|
-
baseAccessToken = configuration.accessToken;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
438
|
-
const localVarHeaderParameter = {} as any;
|
|
439
|
-
const localVarQueryParameter = {} as any;
|
|
440
|
-
|
|
441
|
-
// authentication bearer required
|
|
442
|
-
// http bearer authentication required
|
|
443
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
444
|
-
|
|
445
|
-
if (pageSize !== undefined) {
|
|
446
|
-
localVarQueryParameter['pageSize'] = pageSize;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
if (pageToken !== undefined) {
|
|
450
|
-
localVarQueryParameter['pageToken'] = pageToken;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
if (filter !== undefined) {
|
|
454
|
-
localVarQueryParameter['filter'] = filter;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
if (search !== undefined) {
|
|
458
|
-
localVarQueryParameter['search'] = search;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
if (order !== undefined) {
|
|
462
|
-
localVarQueryParameter['order'] = order;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
if (expand !== undefined) {
|
|
466
|
-
localVarQueryParameter['expand'] = expand;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
if (filters !== undefined) {
|
|
470
|
-
localVarQueryParameter['filters'] = filters;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
474
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
480
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
481
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
482
|
-
|
|
483
|
-
return {
|
|
484
|
-
url: toPathString(localVarUrlObj),
|
|
485
|
-
options: localVarRequestOptions,
|
|
486
|
-
};
|
|
487
|
-
},
|
|
488
|
-
/**
|
|
489
|
-
* Updates the data of an existing campaign. Only DRAFT campaigns can be updated.
|
|
490
|
-
* @summary Update the Campaign
|
|
491
|
-
* @param {string} code Unique identifier for the object.
|
|
492
|
-
* @param {UpdateCampaignRequestDto} updateCampaignRequestDto
|
|
493
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
494
|
-
* @param {*} [options] Override http request option.
|
|
495
|
-
* @throws {RequiredError}
|
|
496
|
-
*/
|
|
497
|
-
updateCampaign: async (code: string, updateCampaignRequestDto: UpdateCampaignRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
498
|
-
// verify required parameter 'code' is not null or undefined
|
|
499
|
-
assertParamExists('updateCampaign', 'code', code)
|
|
500
|
-
// verify required parameter 'updateCampaignRequestDto' is not null or undefined
|
|
501
|
-
assertParamExists('updateCampaign', 'updateCampaignRequestDto', updateCampaignRequestDto)
|
|
502
|
-
const localVarPath = `/discountservice/v1/campaigns/{code}`
|
|
503
|
-
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
504
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
505
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
506
|
-
let baseOptions;
|
|
507
|
-
let baseAccessToken;
|
|
508
|
-
if (configuration) {
|
|
509
|
-
baseOptions = configuration.baseOptions;
|
|
510
|
-
baseAccessToken = configuration.accessToken;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
514
|
-
const localVarHeaderParameter = {} as any;
|
|
515
|
-
const localVarQueryParameter = {} as any;
|
|
516
|
-
|
|
517
|
-
// authentication bearer required
|
|
518
|
-
// http bearer authentication required
|
|
519
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
520
|
-
|
|
521
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
522
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
528
|
-
|
|
529
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
530
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
531
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
532
|
-
localVarRequestOptions.data = serializeDataIfNeeded(updateCampaignRequestDto, localVarRequestOptions, configuration)
|
|
533
|
-
|
|
534
|
-
return {
|
|
535
|
-
url: toPathString(localVarUrlObj),
|
|
536
|
-
options: localVarRequestOptions,
|
|
537
|
-
};
|
|
538
|
-
},
|
|
539
|
-
/**
|
|
540
|
-
* Updates the status of a campaign, which affects whether vouchers can be redeemed.
|
|
541
|
-
* @summary Updates the status of a campaign.
|
|
542
|
-
* @param {string} code Unique identifier for the object.
|
|
543
|
-
* @param {UpdateCampaignStatusRequestDto} updateCampaignStatusRequestDto
|
|
544
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
545
|
-
* @param {*} [options] Override http request option.
|
|
546
|
-
* @throws {RequiredError}
|
|
547
|
-
*/
|
|
548
|
-
updateCampaignStatus: async (code: string, updateCampaignStatusRequestDto: UpdateCampaignStatusRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
549
|
-
// verify required parameter 'code' is not null or undefined
|
|
550
|
-
assertParamExists('updateCampaignStatus', 'code', code)
|
|
551
|
-
// verify required parameter 'updateCampaignStatusRequestDto' is not null or undefined
|
|
552
|
-
assertParamExists('updateCampaignStatus', 'updateCampaignStatusRequestDto', updateCampaignStatusRequestDto)
|
|
553
|
-
const localVarPath = `/discountservice/v1/campaigns/{code}/status`
|
|
554
|
-
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
555
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
556
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
557
|
-
let baseOptions;
|
|
558
|
-
let baseAccessToken;
|
|
559
|
-
if (configuration) {
|
|
560
|
-
baseOptions = configuration.baseOptions;
|
|
561
|
-
baseAccessToken = configuration.accessToken;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
565
|
-
const localVarHeaderParameter = {} as any;
|
|
566
|
-
const localVarQueryParameter = {} as any;
|
|
567
|
-
|
|
568
|
-
// authentication bearer required
|
|
569
|
-
// http bearer authentication required
|
|
570
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
571
|
-
|
|
572
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
573
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
579
|
-
|
|
580
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
581
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
582
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
583
|
-
localVarRequestOptions.data = serializeDataIfNeeded(updateCampaignStatusRequestDto, localVarRequestOptions, configuration)
|
|
584
|
-
|
|
585
|
-
return {
|
|
586
|
-
url: toPathString(localVarUrlObj),
|
|
587
|
-
options: localVarRequestOptions,
|
|
588
|
-
};
|
|
589
|
-
},
|
|
590
|
-
/**
|
|
591
|
-
* Uploads accounts that are eligible to redeem vouchers from a specific campaign using a CSV file. The CSV file must contain a header row with the following columns: partnerNumber, voucherCode. Separate each column with a comma.
|
|
592
|
-
* @summary Uploads the eligible accounts.
|
|
593
|
-
* @param {string} code Unique identifier for the object.
|
|
594
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
595
|
-
* @param {*} [options] Override http request option.
|
|
596
|
-
* @throws {RequiredError}
|
|
597
|
-
*/
|
|
598
|
-
uploadEligibleAccounts: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
599
|
-
// verify required parameter 'code' is not null or undefined
|
|
600
|
-
assertParamExists('uploadEligibleAccounts', 'code', code)
|
|
601
|
-
const localVarPath = `/discountservice/v1/campaigns/{code}/eligible-accounts/batch`
|
|
602
|
-
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
603
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
604
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
605
|
-
let baseOptions;
|
|
606
|
-
let baseAccessToken;
|
|
607
|
-
if (configuration) {
|
|
608
|
-
baseOptions = configuration.baseOptions;
|
|
609
|
-
baseAccessToken = configuration.accessToken;
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
613
|
-
const localVarHeaderParameter = {} as any;
|
|
614
|
-
const localVarQueryParameter = {} as any;
|
|
615
|
-
|
|
616
|
-
// authentication bearer required
|
|
617
|
-
// http bearer authentication required
|
|
618
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
619
|
-
|
|
620
|
-
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
621
|
-
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
627
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
628
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
629
|
-
|
|
630
|
-
return {
|
|
631
|
-
url: toPathString(localVarUrlObj),
|
|
632
|
-
options: localVarRequestOptions,
|
|
633
|
-
};
|
|
634
|
-
},
|
|
635
|
-
}
|
|
636
|
-
};
|
|
637
|
-
|
|
638
|
-
/**
|
|
639
|
-
* CampaignsApi - functional programming interface
|
|
640
|
-
* @export
|
|
641
|
-
*/
|
|
642
|
-
export const CampaignsApiFp = function(configuration?: Configuration) {
|
|
643
|
-
const localVarAxiosParamCreator = CampaignsApiAxiosParamCreator(configuration)
|
|
644
|
-
return {
|
|
645
|
-
/**
|
|
646
|
-
* Creates a new campaign that can contain multiple vouchers for eligible accounts to redeem.
|
|
647
|
-
* @summary Create the Campaign
|
|
648
|
-
* @param {CreateCampaignRequestDto} createCampaignRequestDto
|
|
649
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
650
|
-
* @param {*} [options] Override http request option.
|
|
651
|
-
* @throws {RequiredError}
|
|
652
|
-
*/
|
|
653
|
-
async createCampaign(createCampaignRequestDto: CreateCampaignRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateCampaignResponseClass>> {
|
|
654
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createCampaign(createCampaignRequestDto, authorization, options);
|
|
655
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
656
|
-
},
|
|
657
|
-
/**
|
|
658
|
-
* Creates an account that is eligible to redeem a vouchers from a specific campaign.
|
|
659
|
-
* @summary Create the Eligible Account
|
|
660
|
-
* @param {string} code Unique identifier for the object.
|
|
661
|
-
* @param {CreateEligibleAccountRequestDto} createEligibleAccountRequestDto
|
|
662
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
663
|
-
* @param {*} [options] Override http request option.
|
|
664
|
-
* @throws {RequiredError}
|
|
665
|
-
*/
|
|
666
|
-
async createEligibleAccount(code: string, createEligibleAccountRequestDto: CreateEligibleAccountRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateEligibleAccountResponseClass>> {
|
|
667
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.createEligibleAccount(code, createEligibleAccountRequestDto, authorization, options);
|
|
668
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
669
|
-
},
|
|
670
|
-
/**
|
|
671
|
-
* Removes a campaign and its associated vouchers. This will prevent any further voucher redemptions.
|
|
672
|
-
* @summary Delete the Campaign
|
|
673
|
-
* @param {string} code Unique identifier for the object.
|
|
674
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
675
|
-
* @param {*} [options] Override http request option.
|
|
676
|
-
* @throws {RequiredError}
|
|
677
|
-
*/
|
|
678
|
-
async deleteCampaign(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
679
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCampaign(code, authorization, options);
|
|
680
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
681
|
-
},
|
|
682
|
-
/**
|
|
683
|
-
* Removes an eligible account from a campaign. This will prevent the account from using the assigned voucher code for discounts when the campaign is released.
|
|
684
|
-
* @summary Delete the Eligible Account
|
|
685
|
-
* @param {string} code Unique identifier for the object.
|
|
686
|
-
* @param {string} accountCode The code of the eligible account
|
|
687
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
688
|
-
* @param {*} [options] Override http request option.
|
|
689
|
-
* @throws {RequiredError}
|
|
690
|
-
*/
|
|
691
|
-
async deleteEligibleAccount(code: string, accountCode: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
692
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteEligibleAccount(code, accountCode, authorization, options);
|
|
693
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
694
|
-
},
|
|
695
|
-
/**
|
|
696
|
-
* Removes all eligible accounts from a campaign. This will prevent these accounts from using their assigned voucher codes for discounts when the campaign is released.
|
|
697
|
-
* @summary Delete the Eligible Accounts
|
|
698
|
-
* @param {string} code Unique identifier for the object.
|
|
699
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
700
|
-
* @param {*} [options] Override http request option.
|
|
701
|
-
* @throws {RequiredError}
|
|
702
|
-
*/
|
|
703
|
-
async deleteEligibleAccounts(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
704
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteEligibleAccounts(code, authorization, options);
|
|
705
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
706
|
-
},
|
|
707
|
-
/**
|
|
708
|
-
* Retrieves detailed information about a specific campaign.
|
|
709
|
-
* @summary Retrieve the Campaign
|
|
710
|
-
* @param {string} code Unique identifier for the object.
|
|
711
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
712
|
-
* @param {string} [expand] You can expand campaign in this endpoint.
|
|
713
|
-
* @param {*} [options] Override http request option.
|
|
714
|
-
* @throws {RequiredError}
|
|
715
|
-
*/
|
|
716
|
-
async getCampaign(code: string, authorization?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetCampaignResponseClass>> {
|
|
717
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getCampaign(code, authorization, expand, options);
|
|
718
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
719
|
-
},
|
|
720
|
-
/**
|
|
721
|
-
* Retrieves a list of campaigns.
|
|
722
|
-
* @summary List Campaigns
|
|
723
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
724
|
-
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
725
|
-
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
726
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, name, status, slug, startDate, endDate, createdAt</i>
|
|
727
|
-
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: name, slug</i>
|
|
728
|
-
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: name, status, startDate, endDate, createdAt</i>
|
|
729
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
730
|
-
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, name, status, slug, startDate, endDate, createdAt</i>
|
|
731
|
-
* @param {*} [options] Override http request option.
|
|
732
|
-
* @throws {RequiredError}
|
|
733
|
-
*/
|
|
734
|
-
async listCampaigns(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListCampaignsResponseClass>> {
|
|
735
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.listCampaigns(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
736
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
737
|
-
},
|
|
738
|
-
/**
|
|
739
|
-
* Retrieves a list of eligible accounts.
|
|
740
|
-
* @summary List Eligible Accounts
|
|
741
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
742
|
-
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
743
|
-
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
744
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, voucherCode, partnerNumber, campaignId, createdAt, updatedAt</i>
|
|
745
|
-
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: voucherCode, partnerNumber</i>
|
|
746
|
-
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: voucherCode, partnerNumber, createdAt</i>
|
|
747
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
748
|
-
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, voucherCode, partnerNumber, campaignId, createdAt, updatedAt</i>
|
|
749
|
-
* @param {*} [options] Override http request option.
|
|
750
|
-
* @throws {RequiredError}
|
|
751
|
-
*/
|
|
752
|
-
async listEligibleAccounts(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListEligibleAccountsResponseClass>> {
|
|
753
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.listEligibleAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
754
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
755
|
-
},
|
|
756
|
-
/**
|
|
757
|
-
* Updates the data of an existing campaign. Only DRAFT campaigns can be updated.
|
|
758
|
-
* @summary Update the Campaign
|
|
759
|
-
* @param {string} code Unique identifier for the object.
|
|
760
|
-
* @param {UpdateCampaignRequestDto} updateCampaignRequestDto
|
|
761
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
762
|
-
* @param {*} [options] Override http request option.
|
|
763
|
-
* @throws {RequiredError}
|
|
764
|
-
*/
|
|
765
|
-
async updateCampaign(code: string, updateCampaignRequestDto: UpdateCampaignRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateCampaignResponseClass>> {
|
|
766
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.updateCampaign(code, updateCampaignRequestDto, authorization, options);
|
|
767
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
768
|
-
},
|
|
769
|
-
/**
|
|
770
|
-
* Updates the status of a campaign, which affects whether vouchers can be redeemed.
|
|
771
|
-
* @summary Updates the status of a campaign.
|
|
772
|
-
* @param {string} code Unique identifier for the object.
|
|
773
|
-
* @param {UpdateCampaignStatusRequestDto} updateCampaignStatusRequestDto
|
|
774
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
775
|
-
* @param {*} [options] Override http request option.
|
|
776
|
-
* @throws {RequiredError}
|
|
777
|
-
*/
|
|
778
|
-
async updateCampaignStatus(code: string, updateCampaignStatusRequestDto: UpdateCampaignStatusRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
779
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.updateCampaignStatus(code, updateCampaignStatusRequestDto, authorization, options);
|
|
780
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
781
|
-
},
|
|
782
|
-
/**
|
|
783
|
-
* Uploads accounts that are eligible to redeem vouchers from a specific campaign using a CSV file. The CSV file must contain a header row with the following columns: partnerNumber, voucherCode. Separate each column with a comma.
|
|
784
|
-
* @summary Uploads the eligible accounts.
|
|
785
|
-
* @param {string} code Unique identifier for the object.
|
|
786
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
787
|
-
* @param {*} [options] Override http request option.
|
|
788
|
-
* @throws {RequiredError}
|
|
789
|
-
*/
|
|
790
|
-
async uploadEligibleAccounts(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
791
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.uploadEligibleAccounts(code, authorization, options);
|
|
792
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
793
|
-
},
|
|
794
|
-
}
|
|
795
|
-
};
|
|
796
|
-
|
|
797
|
-
/**
|
|
798
|
-
* CampaignsApi - factory interface
|
|
799
|
-
* @export
|
|
800
|
-
*/
|
|
801
|
-
export const CampaignsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
802
|
-
const localVarFp = CampaignsApiFp(configuration)
|
|
803
|
-
return {
|
|
804
|
-
/**
|
|
805
|
-
* Creates a new campaign that can contain multiple vouchers for eligible accounts to redeem.
|
|
806
|
-
* @summary Create the Campaign
|
|
807
|
-
* @param {CreateCampaignRequestDto} createCampaignRequestDto
|
|
808
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
809
|
-
* @param {*} [options] Override http request option.
|
|
810
|
-
* @throws {RequiredError}
|
|
811
|
-
*/
|
|
812
|
-
createCampaign(createCampaignRequestDto: CreateCampaignRequestDto, authorization?: string, options?: any): AxiosPromise<CreateCampaignResponseClass> {
|
|
813
|
-
return localVarFp.createCampaign(createCampaignRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
814
|
-
},
|
|
815
|
-
/**
|
|
816
|
-
* Creates an account that is eligible to redeem a vouchers from a specific campaign.
|
|
817
|
-
* @summary Create the Eligible Account
|
|
818
|
-
* @param {string} code Unique identifier for the object.
|
|
819
|
-
* @param {CreateEligibleAccountRequestDto} createEligibleAccountRequestDto
|
|
820
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
821
|
-
* @param {*} [options] Override http request option.
|
|
822
|
-
* @throws {RequiredError}
|
|
823
|
-
*/
|
|
824
|
-
createEligibleAccount(code: string, createEligibleAccountRequestDto: CreateEligibleAccountRequestDto, authorization?: string, options?: any): AxiosPromise<CreateEligibleAccountResponseClass> {
|
|
825
|
-
return localVarFp.createEligibleAccount(code, createEligibleAccountRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
826
|
-
},
|
|
827
|
-
/**
|
|
828
|
-
* Removes a campaign and its associated vouchers. This will prevent any further voucher redemptions.
|
|
829
|
-
* @summary Delete the Campaign
|
|
830
|
-
* @param {string} code Unique identifier for the object.
|
|
831
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
832
|
-
* @param {*} [options] Override http request option.
|
|
833
|
-
* @throws {RequiredError}
|
|
834
|
-
*/
|
|
835
|
-
deleteCampaign(code: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
836
|
-
return localVarFp.deleteCampaign(code, authorization, options).then((request) => request(axios, basePath));
|
|
837
|
-
},
|
|
838
|
-
/**
|
|
839
|
-
* Removes an eligible account from a campaign. This will prevent the account from using the assigned voucher code for discounts when the campaign is released.
|
|
840
|
-
* @summary Delete the Eligible Account
|
|
841
|
-
* @param {string} code Unique identifier for the object.
|
|
842
|
-
* @param {string} accountCode The code of the eligible account
|
|
843
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
844
|
-
* @param {*} [options] Override http request option.
|
|
845
|
-
* @throws {RequiredError}
|
|
846
|
-
*/
|
|
847
|
-
deleteEligibleAccount(code: string, accountCode: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
848
|
-
return localVarFp.deleteEligibleAccount(code, accountCode, authorization, options).then((request) => request(axios, basePath));
|
|
849
|
-
},
|
|
850
|
-
/**
|
|
851
|
-
* Removes all eligible accounts from a campaign. This will prevent these accounts from using their assigned voucher codes for discounts when the campaign is released.
|
|
852
|
-
* @summary Delete the Eligible Accounts
|
|
853
|
-
* @param {string} code Unique identifier for the object.
|
|
854
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
855
|
-
* @param {*} [options] Override http request option.
|
|
856
|
-
* @throws {RequiredError}
|
|
857
|
-
*/
|
|
858
|
-
deleteEligibleAccounts(code: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
859
|
-
return localVarFp.deleteEligibleAccounts(code, authorization, options).then((request) => request(axios, basePath));
|
|
860
|
-
},
|
|
861
|
-
/**
|
|
862
|
-
* Retrieves detailed information about a specific campaign.
|
|
863
|
-
* @summary Retrieve the Campaign
|
|
864
|
-
* @param {string} code Unique identifier for the object.
|
|
865
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
866
|
-
* @param {string} [expand] You can expand campaign in this endpoint.
|
|
867
|
-
* @param {*} [options] Override http request option.
|
|
868
|
-
* @throws {RequiredError}
|
|
869
|
-
*/
|
|
870
|
-
getCampaign(code: string, authorization?: string, expand?: string, options?: any): AxiosPromise<GetCampaignResponseClass> {
|
|
871
|
-
return localVarFp.getCampaign(code, authorization, expand, options).then((request) => request(axios, basePath));
|
|
872
|
-
},
|
|
873
|
-
/**
|
|
874
|
-
* Retrieves a list of campaigns.
|
|
875
|
-
* @summary List Campaigns
|
|
876
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
877
|
-
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
878
|
-
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
879
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, name, status, slug, startDate, endDate, createdAt</i>
|
|
880
|
-
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: name, slug</i>
|
|
881
|
-
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: name, status, startDate, endDate, createdAt</i>
|
|
882
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
883
|
-
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, name, status, slug, startDate, endDate, createdAt</i>
|
|
884
|
-
* @param {*} [options] Override http request option.
|
|
885
|
-
* @throws {RequiredError}
|
|
886
|
-
*/
|
|
887
|
-
listCampaigns(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListCampaignsResponseClass> {
|
|
888
|
-
return localVarFp.listCampaigns(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
889
|
-
},
|
|
890
|
-
/**
|
|
891
|
-
* Retrieves a list of eligible accounts.
|
|
892
|
-
* @summary List Eligible Accounts
|
|
893
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
894
|
-
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
895
|
-
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
896
|
-
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, voucherCode, partnerNumber, campaignId, createdAt, updatedAt</i>
|
|
897
|
-
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: voucherCode, partnerNumber</i>
|
|
898
|
-
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: voucherCode, partnerNumber, createdAt</i>
|
|
899
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
900
|
-
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, voucherCode, partnerNumber, campaignId, createdAt, updatedAt</i>
|
|
901
|
-
* @param {*} [options] Override http request option.
|
|
902
|
-
* @throws {RequiredError}
|
|
903
|
-
*/
|
|
904
|
-
listEligibleAccounts(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListEligibleAccountsResponseClass> {
|
|
905
|
-
return localVarFp.listEligibleAccounts(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
906
|
-
},
|
|
907
|
-
/**
|
|
908
|
-
* Updates the data of an existing campaign. Only DRAFT campaigns can be updated.
|
|
909
|
-
* @summary Update the Campaign
|
|
910
|
-
* @param {string} code Unique identifier for the object.
|
|
911
|
-
* @param {UpdateCampaignRequestDto} updateCampaignRequestDto
|
|
912
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
913
|
-
* @param {*} [options] Override http request option.
|
|
914
|
-
* @throws {RequiredError}
|
|
915
|
-
*/
|
|
916
|
-
updateCampaign(code: string, updateCampaignRequestDto: UpdateCampaignRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateCampaignResponseClass> {
|
|
917
|
-
return localVarFp.updateCampaign(code, updateCampaignRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
918
|
-
},
|
|
919
|
-
/**
|
|
920
|
-
* Updates the status of a campaign, which affects whether vouchers can be redeemed.
|
|
921
|
-
* @summary Updates the status of a campaign.
|
|
922
|
-
* @param {string} code Unique identifier for the object.
|
|
923
|
-
* @param {UpdateCampaignStatusRequestDto} updateCampaignStatusRequestDto
|
|
924
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
925
|
-
* @param {*} [options] Override http request option.
|
|
926
|
-
* @throws {RequiredError}
|
|
927
|
-
*/
|
|
928
|
-
updateCampaignStatus(code: string, updateCampaignStatusRequestDto: UpdateCampaignStatusRequestDto, authorization?: string, options?: any): AxiosPromise<void> {
|
|
929
|
-
return localVarFp.updateCampaignStatus(code, updateCampaignStatusRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
930
|
-
},
|
|
931
|
-
/**
|
|
932
|
-
* Uploads accounts that are eligible to redeem vouchers from a specific campaign using a CSV file. The CSV file must contain a header row with the following columns: partnerNumber, voucherCode. Separate each column with a comma.
|
|
933
|
-
* @summary Uploads the eligible accounts.
|
|
934
|
-
* @param {string} code Unique identifier for the object.
|
|
935
|
-
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
936
|
-
* @param {*} [options] Override http request option.
|
|
937
|
-
* @throws {RequiredError}
|
|
938
|
-
*/
|
|
939
|
-
uploadEligibleAccounts(code: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
940
|
-
return localVarFp.uploadEligibleAccounts(code, authorization, options).then((request) => request(axios, basePath));
|
|
941
|
-
},
|
|
942
|
-
};
|
|
943
|
-
};
|
|
944
|
-
|
|
945
|
-
/**
|
|
946
|
-
* Request parameters for createCampaign operation in CampaignsApi.
|
|
947
|
-
* @export
|
|
948
|
-
* @interface CampaignsApiCreateCampaignRequest
|
|
949
|
-
*/
|
|
950
|
-
export interface CampaignsApiCreateCampaignRequest {
|
|
951
|
-
/**
|
|
952
|
-
*
|
|
953
|
-
* @type {CreateCampaignRequestDto}
|
|
954
|
-
* @memberof CampaignsApiCreateCampaign
|
|
955
|
-
*/
|
|
956
|
-
readonly createCampaignRequestDto: CreateCampaignRequestDto
|
|
957
|
-
|
|
958
|
-
/**
|
|
959
|
-
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
960
|
-
* @type {string}
|
|
961
|
-
* @memberof CampaignsApiCreateCampaign
|
|
962
|
-
*/
|
|
963
|
-
readonly authorization?: string
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
/**
|
|
967
|
-
* Request parameters for createEligibleAccount operation in CampaignsApi.
|
|
968
|
-
* @export
|
|
969
|
-
* @interface CampaignsApiCreateEligibleAccountRequest
|
|
970
|
-
*/
|
|
971
|
-
export interface CampaignsApiCreateEligibleAccountRequest {
|
|
972
|
-
/**
|
|
973
|
-
* Unique identifier for the object.
|
|
974
|
-
* @type {string}
|
|
975
|
-
* @memberof CampaignsApiCreateEligibleAccount
|
|
976
|
-
*/
|
|
977
|
-
readonly code: string
|
|
978
|
-
|
|
979
|
-
/**
|
|
980
|
-
*
|
|
981
|
-
* @type {CreateEligibleAccountRequestDto}
|
|
982
|
-
* @memberof CampaignsApiCreateEligibleAccount
|
|
983
|
-
*/
|
|
984
|
-
readonly createEligibleAccountRequestDto: CreateEligibleAccountRequestDto
|
|
985
|
-
|
|
986
|
-
/**
|
|
987
|
-
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
988
|
-
* @type {string}
|
|
989
|
-
* @memberof CampaignsApiCreateEligibleAccount
|
|
990
|
-
*/
|
|
991
|
-
readonly authorization?: string
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
/**
|
|
995
|
-
* Request parameters for deleteCampaign operation in CampaignsApi.
|
|
996
|
-
* @export
|
|
997
|
-
* @interface CampaignsApiDeleteCampaignRequest
|
|
998
|
-
*/
|
|
999
|
-
export interface CampaignsApiDeleteCampaignRequest {
|
|
1000
|
-
/**
|
|
1001
|
-
* Unique identifier for the object.
|
|
1002
|
-
* @type {string}
|
|
1003
|
-
* @memberof CampaignsApiDeleteCampaign
|
|
1004
|
-
*/
|
|
1005
|
-
readonly code: string
|
|
1006
|
-
|
|
1007
|
-
/**
|
|
1008
|
-
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1009
|
-
* @type {string}
|
|
1010
|
-
* @memberof CampaignsApiDeleteCampaign
|
|
1011
|
-
*/
|
|
1012
|
-
readonly authorization?: string
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
/**
|
|
1016
|
-
* Request parameters for deleteEligibleAccount operation in CampaignsApi.
|
|
1017
|
-
* @export
|
|
1018
|
-
* @interface CampaignsApiDeleteEligibleAccountRequest
|
|
1019
|
-
*/
|
|
1020
|
-
export interface CampaignsApiDeleteEligibleAccountRequest {
|
|
1021
|
-
/**
|
|
1022
|
-
* Unique identifier for the object.
|
|
1023
|
-
* @type {string}
|
|
1024
|
-
* @memberof CampaignsApiDeleteEligibleAccount
|
|
1025
|
-
*/
|
|
1026
|
-
readonly code: string
|
|
1027
|
-
|
|
1028
|
-
/**
|
|
1029
|
-
* The code of the eligible account
|
|
1030
|
-
* @type {string}
|
|
1031
|
-
* @memberof CampaignsApiDeleteEligibleAccount
|
|
1032
|
-
*/
|
|
1033
|
-
readonly accountCode: string
|
|
1034
|
-
|
|
1035
|
-
/**
|
|
1036
|
-
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1037
|
-
* @type {string}
|
|
1038
|
-
* @memberof CampaignsApiDeleteEligibleAccount
|
|
1039
|
-
*/
|
|
1040
|
-
readonly authorization?: string
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
/**
|
|
1044
|
-
* Request parameters for deleteEligibleAccounts operation in CampaignsApi.
|
|
1045
|
-
* @export
|
|
1046
|
-
* @interface CampaignsApiDeleteEligibleAccountsRequest
|
|
1047
|
-
*/
|
|
1048
|
-
export interface CampaignsApiDeleteEligibleAccountsRequest {
|
|
1049
|
-
/**
|
|
1050
|
-
* Unique identifier for the object.
|
|
1051
|
-
* @type {string}
|
|
1052
|
-
* @memberof CampaignsApiDeleteEligibleAccounts
|
|
1053
|
-
*/
|
|
1054
|
-
readonly code: string
|
|
1055
|
-
|
|
1056
|
-
/**
|
|
1057
|
-
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1058
|
-
* @type {string}
|
|
1059
|
-
* @memberof CampaignsApiDeleteEligibleAccounts
|
|
1060
|
-
*/
|
|
1061
|
-
readonly authorization?: string
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
/**
|
|
1065
|
-
* Request parameters for getCampaign operation in CampaignsApi.
|
|
1066
|
-
* @export
|
|
1067
|
-
* @interface CampaignsApiGetCampaignRequest
|
|
1068
|
-
*/
|
|
1069
|
-
export interface CampaignsApiGetCampaignRequest {
|
|
1070
|
-
/**
|
|
1071
|
-
* Unique identifier for the object.
|
|
1072
|
-
* @type {string}
|
|
1073
|
-
* @memberof CampaignsApiGetCampaign
|
|
1074
|
-
*/
|
|
1075
|
-
readonly code: string
|
|
1076
|
-
|
|
1077
|
-
/**
|
|
1078
|
-
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1079
|
-
* @type {string}
|
|
1080
|
-
* @memberof CampaignsApiGetCampaign
|
|
1081
|
-
*/
|
|
1082
|
-
readonly authorization?: string
|
|
1083
|
-
|
|
1084
|
-
/**
|
|
1085
|
-
* You can expand campaign in this endpoint.
|
|
1086
|
-
* @type {string}
|
|
1087
|
-
* @memberof CampaignsApiGetCampaign
|
|
1088
|
-
*/
|
|
1089
|
-
readonly expand?: string
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
/**
|
|
1093
|
-
* Request parameters for listCampaigns operation in CampaignsApi.
|
|
1094
|
-
* @export
|
|
1095
|
-
* @interface CampaignsApiListCampaignsRequest
|
|
1096
|
-
*/
|
|
1097
|
-
export interface CampaignsApiListCampaignsRequest {
|
|
1098
|
-
/**
|
|
1099
|
-
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1100
|
-
* @type {string}
|
|
1101
|
-
* @memberof CampaignsApiListCampaigns
|
|
1102
|
-
*/
|
|
1103
|
-
readonly authorization?: string
|
|
1104
|
-
|
|
1105
|
-
/**
|
|
1106
|
-
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
1107
|
-
* @type {number}
|
|
1108
|
-
* @memberof CampaignsApiListCampaigns
|
|
1109
|
-
*/
|
|
1110
|
-
readonly pageSize?: number
|
|
1111
|
-
|
|
1112
|
-
/**
|
|
1113
|
-
* A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
1114
|
-
* @type {string}
|
|
1115
|
-
* @memberof CampaignsApiListCampaigns
|
|
1116
|
-
*/
|
|
1117
|
-
readonly pageToken?: string
|
|
1118
|
-
|
|
1119
|
-
/**
|
|
1120
|
-
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, name, status, slug, startDate, endDate, createdAt</i>
|
|
1121
|
-
* @type {string}
|
|
1122
|
-
* @memberof CampaignsApiListCampaigns
|
|
1123
|
-
*/
|
|
1124
|
-
readonly filter?: string
|
|
1125
|
-
|
|
1126
|
-
/**
|
|
1127
|
-
* Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: name, slug</i>
|
|
1128
|
-
* @type {string}
|
|
1129
|
-
* @memberof CampaignsApiListCampaigns
|
|
1130
|
-
*/
|
|
1131
|
-
readonly search?: string
|
|
1132
|
-
|
|
1133
|
-
/**
|
|
1134
|
-
* Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: name, status, startDate, endDate, createdAt</i>
|
|
1135
|
-
* @type {string}
|
|
1136
|
-
* @memberof CampaignsApiListCampaigns
|
|
1137
|
-
*/
|
|
1138
|
-
readonly order?: string
|
|
1139
|
-
|
|
1140
|
-
/**
|
|
1141
|
-
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
1142
|
-
* @type {string}
|
|
1143
|
-
* @memberof CampaignsApiListCampaigns
|
|
1144
|
-
*/
|
|
1145
|
-
readonly expand?: string
|
|
1146
|
-
|
|
1147
|
-
/**
|
|
1148
|
-
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, name, status, slug, startDate, endDate, createdAt</i>
|
|
1149
|
-
* @type {string}
|
|
1150
|
-
* @memberof CampaignsApiListCampaigns
|
|
1151
|
-
*/
|
|
1152
|
-
readonly filters?: string
|
|
1153
|
-
}
|
|
1154
|
-
|
|
1155
|
-
/**
|
|
1156
|
-
* Request parameters for listEligibleAccounts operation in CampaignsApi.
|
|
1157
|
-
* @export
|
|
1158
|
-
* @interface CampaignsApiListEligibleAccountsRequest
|
|
1159
|
-
*/
|
|
1160
|
-
export interface CampaignsApiListEligibleAccountsRequest {
|
|
1161
|
-
/**
|
|
1162
|
-
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1163
|
-
* @type {string}
|
|
1164
|
-
* @memberof CampaignsApiListEligibleAccounts
|
|
1165
|
-
*/
|
|
1166
|
-
readonly authorization?: string
|
|
1167
|
-
|
|
1168
|
-
/**
|
|
1169
|
-
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
1170
|
-
* @type {number}
|
|
1171
|
-
* @memberof CampaignsApiListEligibleAccounts
|
|
1172
|
-
*/
|
|
1173
|
-
readonly pageSize?: number
|
|
1174
|
-
|
|
1175
|
-
/**
|
|
1176
|
-
* A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
1177
|
-
* @type {string}
|
|
1178
|
-
* @memberof CampaignsApiListEligibleAccounts
|
|
1179
|
-
*/
|
|
1180
|
-
readonly pageToken?: string
|
|
1181
|
-
|
|
1182
|
-
/**
|
|
1183
|
-
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, voucherCode, partnerNumber, campaignId, createdAt, updatedAt</i>
|
|
1184
|
-
* @type {string}
|
|
1185
|
-
* @memberof CampaignsApiListEligibleAccounts
|
|
1186
|
-
*/
|
|
1187
|
-
readonly filter?: string
|
|
1188
|
-
|
|
1189
|
-
/**
|
|
1190
|
-
* Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: voucherCode, partnerNumber</i>
|
|
1191
|
-
* @type {string}
|
|
1192
|
-
* @memberof CampaignsApiListEligibleAccounts
|
|
1193
|
-
*/
|
|
1194
|
-
readonly search?: string
|
|
1195
|
-
|
|
1196
|
-
/**
|
|
1197
|
-
* Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: voucherCode, partnerNumber, createdAt</i>
|
|
1198
|
-
* @type {string}
|
|
1199
|
-
* @memberof CampaignsApiListEligibleAccounts
|
|
1200
|
-
*/
|
|
1201
|
-
readonly order?: string
|
|
1202
|
-
|
|
1203
|
-
/**
|
|
1204
|
-
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
1205
|
-
* @type {string}
|
|
1206
|
-
* @memberof CampaignsApiListEligibleAccounts
|
|
1207
|
-
*/
|
|
1208
|
-
readonly expand?: string
|
|
1209
|
-
|
|
1210
|
-
/**
|
|
1211
|
-
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, voucherCode, partnerNumber, campaignId, createdAt, updatedAt</i>
|
|
1212
|
-
* @type {string}
|
|
1213
|
-
* @memberof CampaignsApiListEligibleAccounts
|
|
1214
|
-
*/
|
|
1215
|
-
readonly filters?: string
|
|
1216
|
-
}
|
|
1217
|
-
|
|
1218
|
-
/**
|
|
1219
|
-
* Request parameters for updateCampaign operation in CampaignsApi.
|
|
1220
|
-
* @export
|
|
1221
|
-
* @interface CampaignsApiUpdateCampaignRequest
|
|
1222
|
-
*/
|
|
1223
|
-
export interface CampaignsApiUpdateCampaignRequest {
|
|
1224
|
-
/**
|
|
1225
|
-
* Unique identifier for the object.
|
|
1226
|
-
* @type {string}
|
|
1227
|
-
* @memberof CampaignsApiUpdateCampaign
|
|
1228
|
-
*/
|
|
1229
|
-
readonly code: string
|
|
1230
|
-
|
|
1231
|
-
/**
|
|
1232
|
-
*
|
|
1233
|
-
* @type {UpdateCampaignRequestDto}
|
|
1234
|
-
* @memberof CampaignsApiUpdateCampaign
|
|
1235
|
-
*/
|
|
1236
|
-
readonly updateCampaignRequestDto: UpdateCampaignRequestDto
|
|
1237
|
-
|
|
1238
|
-
/**
|
|
1239
|
-
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1240
|
-
* @type {string}
|
|
1241
|
-
* @memberof CampaignsApiUpdateCampaign
|
|
1242
|
-
*/
|
|
1243
|
-
readonly authorization?: string
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
/**
|
|
1247
|
-
* Request parameters for updateCampaignStatus operation in CampaignsApi.
|
|
1248
|
-
* @export
|
|
1249
|
-
* @interface CampaignsApiUpdateCampaignStatusRequest
|
|
1250
|
-
*/
|
|
1251
|
-
export interface CampaignsApiUpdateCampaignStatusRequest {
|
|
1252
|
-
/**
|
|
1253
|
-
* Unique identifier for the object.
|
|
1254
|
-
* @type {string}
|
|
1255
|
-
* @memberof CampaignsApiUpdateCampaignStatus
|
|
1256
|
-
*/
|
|
1257
|
-
readonly code: string
|
|
1258
|
-
|
|
1259
|
-
/**
|
|
1260
|
-
*
|
|
1261
|
-
* @type {UpdateCampaignStatusRequestDto}
|
|
1262
|
-
* @memberof CampaignsApiUpdateCampaignStatus
|
|
1263
|
-
*/
|
|
1264
|
-
readonly updateCampaignStatusRequestDto: UpdateCampaignStatusRequestDto
|
|
1265
|
-
|
|
1266
|
-
/**
|
|
1267
|
-
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1268
|
-
* @type {string}
|
|
1269
|
-
* @memberof CampaignsApiUpdateCampaignStatus
|
|
1270
|
-
*/
|
|
1271
|
-
readonly authorization?: string
|
|
1272
|
-
}
|
|
1273
|
-
|
|
1274
|
-
/**
|
|
1275
|
-
* Request parameters for uploadEligibleAccounts operation in CampaignsApi.
|
|
1276
|
-
* @export
|
|
1277
|
-
* @interface CampaignsApiUploadEligibleAccountsRequest
|
|
1278
|
-
*/
|
|
1279
|
-
export interface CampaignsApiUploadEligibleAccountsRequest {
|
|
1280
|
-
/**
|
|
1281
|
-
* Unique identifier for the object.
|
|
1282
|
-
* @type {string}
|
|
1283
|
-
* @memberof CampaignsApiUploadEligibleAccounts
|
|
1284
|
-
*/
|
|
1285
|
-
readonly code: string
|
|
1286
|
-
|
|
1287
|
-
/**
|
|
1288
|
-
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1289
|
-
* @type {string}
|
|
1290
|
-
* @memberof CampaignsApiUploadEligibleAccounts
|
|
1291
|
-
*/
|
|
1292
|
-
readonly authorization?: string
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
|
-
/**
|
|
1296
|
-
* CampaignsApi - object-oriented interface
|
|
1297
|
-
* @export
|
|
1298
|
-
* @class CampaignsApi
|
|
1299
|
-
* @extends {BaseAPI}
|
|
1300
|
-
*/
|
|
1301
|
-
export class CampaignsApi extends BaseAPI {
|
|
1302
|
-
/**
|
|
1303
|
-
* Creates a new campaign that can contain multiple vouchers for eligible accounts to redeem.
|
|
1304
|
-
* @summary Create the Campaign
|
|
1305
|
-
* @param {CampaignsApiCreateCampaignRequest} requestParameters Request parameters.
|
|
1306
|
-
* @param {*} [options] Override http request option.
|
|
1307
|
-
* @throws {RequiredError}
|
|
1308
|
-
* @memberof CampaignsApi
|
|
1309
|
-
*/
|
|
1310
|
-
public createCampaign(requestParameters: CampaignsApiCreateCampaignRequest, options?: AxiosRequestConfig) {
|
|
1311
|
-
return CampaignsApiFp(this.configuration).createCampaign(requestParameters.createCampaignRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
/**
|
|
1315
|
-
* Creates an account that is eligible to redeem a vouchers from a specific campaign.
|
|
1316
|
-
* @summary Create the Eligible Account
|
|
1317
|
-
* @param {CampaignsApiCreateEligibleAccountRequest} requestParameters Request parameters.
|
|
1318
|
-
* @param {*} [options] Override http request option.
|
|
1319
|
-
* @throws {RequiredError}
|
|
1320
|
-
* @memberof CampaignsApi
|
|
1321
|
-
*/
|
|
1322
|
-
public createEligibleAccount(requestParameters: CampaignsApiCreateEligibleAccountRequest, options?: AxiosRequestConfig) {
|
|
1323
|
-
return CampaignsApiFp(this.configuration).createEligibleAccount(requestParameters.code, requestParameters.createEligibleAccountRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
/**
|
|
1327
|
-
* Removes a campaign and its associated vouchers. This will prevent any further voucher redemptions.
|
|
1328
|
-
* @summary Delete the Campaign
|
|
1329
|
-
* @param {CampaignsApiDeleteCampaignRequest} requestParameters Request parameters.
|
|
1330
|
-
* @param {*} [options] Override http request option.
|
|
1331
|
-
* @throws {RequiredError}
|
|
1332
|
-
* @memberof CampaignsApi
|
|
1333
|
-
*/
|
|
1334
|
-
public deleteCampaign(requestParameters: CampaignsApiDeleteCampaignRequest, options?: AxiosRequestConfig) {
|
|
1335
|
-
return CampaignsApiFp(this.configuration).deleteCampaign(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
/**
|
|
1339
|
-
* Removes an eligible account from a campaign. This will prevent the account from using the assigned voucher code for discounts when the campaign is released.
|
|
1340
|
-
* @summary Delete the Eligible Account
|
|
1341
|
-
* @param {CampaignsApiDeleteEligibleAccountRequest} requestParameters Request parameters.
|
|
1342
|
-
* @param {*} [options] Override http request option.
|
|
1343
|
-
* @throws {RequiredError}
|
|
1344
|
-
* @memberof CampaignsApi
|
|
1345
|
-
*/
|
|
1346
|
-
public deleteEligibleAccount(requestParameters: CampaignsApiDeleteEligibleAccountRequest, options?: AxiosRequestConfig) {
|
|
1347
|
-
return CampaignsApiFp(this.configuration).deleteEligibleAccount(requestParameters.code, requestParameters.accountCode, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
/**
|
|
1351
|
-
* Removes all eligible accounts from a campaign. This will prevent these accounts from using their assigned voucher codes for discounts when the campaign is released.
|
|
1352
|
-
* @summary Delete the Eligible Accounts
|
|
1353
|
-
* @param {CampaignsApiDeleteEligibleAccountsRequest} requestParameters Request parameters.
|
|
1354
|
-
* @param {*} [options] Override http request option.
|
|
1355
|
-
* @throws {RequiredError}
|
|
1356
|
-
* @memberof CampaignsApi
|
|
1357
|
-
*/
|
|
1358
|
-
public deleteEligibleAccounts(requestParameters: CampaignsApiDeleteEligibleAccountsRequest, options?: AxiosRequestConfig) {
|
|
1359
|
-
return CampaignsApiFp(this.configuration).deleteEligibleAccounts(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
/**
|
|
1363
|
-
* Retrieves detailed information about a specific campaign.
|
|
1364
|
-
* @summary Retrieve the Campaign
|
|
1365
|
-
* @param {CampaignsApiGetCampaignRequest} requestParameters Request parameters.
|
|
1366
|
-
* @param {*} [options] Override http request option.
|
|
1367
|
-
* @throws {RequiredError}
|
|
1368
|
-
* @memberof CampaignsApi
|
|
1369
|
-
*/
|
|
1370
|
-
public getCampaign(requestParameters: CampaignsApiGetCampaignRequest, options?: AxiosRequestConfig) {
|
|
1371
|
-
return CampaignsApiFp(this.configuration).getCampaign(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
|
|
1372
|
-
}
|
|
1373
|
-
|
|
1374
|
-
/**
|
|
1375
|
-
* Retrieves a list of campaigns.
|
|
1376
|
-
* @summary List Campaigns
|
|
1377
|
-
* @param {CampaignsApiListCampaignsRequest} requestParameters Request parameters.
|
|
1378
|
-
* @param {*} [options] Override http request option.
|
|
1379
|
-
* @throws {RequiredError}
|
|
1380
|
-
* @memberof CampaignsApi
|
|
1381
|
-
*/
|
|
1382
|
-
public listCampaigns(requestParameters: CampaignsApiListCampaignsRequest = {}, options?: AxiosRequestConfig) {
|
|
1383
|
-
return CampaignsApiFp(this.configuration).listCampaigns(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
/**
|
|
1387
|
-
* Retrieves a list of eligible accounts.
|
|
1388
|
-
* @summary List Eligible Accounts
|
|
1389
|
-
* @param {CampaignsApiListEligibleAccountsRequest} requestParameters Request parameters.
|
|
1390
|
-
* @param {*} [options] Override http request option.
|
|
1391
|
-
* @throws {RequiredError}
|
|
1392
|
-
* @memberof CampaignsApi
|
|
1393
|
-
*/
|
|
1394
|
-
public listEligibleAccounts(requestParameters: CampaignsApiListEligibleAccountsRequest = {}, options?: AxiosRequestConfig) {
|
|
1395
|
-
return CampaignsApiFp(this.configuration).listEligibleAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
|
|
1396
|
-
}
|
|
1397
|
-
|
|
1398
|
-
/**
|
|
1399
|
-
* Updates the data of an existing campaign. Only DRAFT campaigns can be updated.
|
|
1400
|
-
* @summary Update the Campaign
|
|
1401
|
-
* @param {CampaignsApiUpdateCampaignRequest} requestParameters Request parameters.
|
|
1402
|
-
* @param {*} [options] Override http request option.
|
|
1403
|
-
* @throws {RequiredError}
|
|
1404
|
-
* @memberof CampaignsApi
|
|
1405
|
-
*/
|
|
1406
|
-
public updateCampaign(requestParameters: CampaignsApiUpdateCampaignRequest, options?: AxiosRequestConfig) {
|
|
1407
|
-
return CampaignsApiFp(this.configuration).updateCampaign(requestParameters.code, requestParameters.updateCampaignRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1410
|
-
/**
|
|
1411
|
-
* Updates the status of a campaign, which affects whether vouchers can be redeemed.
|
|
1412
|
-
* @summary Updates the status of a campaign.
|
|
1413
|
-
* @param {CampaignsApiUpdateCampaignStatusRequest} requestParameters Request parameters.
|
|
1414
|
-
* @param {*} [options] Override http request option.
|
|
1415
|
-
* @throws {RequiredError}
|
|
1416
|
-
* @memberof CampaignsApi
|
|
1417
|
-
*/
|
|
1418
|
-
public updateCampaignStatus(requestParameters: CampaignsApiUpdateCampaignStatusRequest, options?: AxiosRequestConfig) {
|
|
1419
|
-
return CampaignsApiFp(this.configuration).updateCampaignStatus(requestParameters.code, requestParameters.updateCampaignStatusRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1420
|
-
}
|
|
1421
|
-
|
|
1422
|
-
/**
|
|
1423
|
-
* Uploads accounts that are eligible to redeem vouchers from a specific campaign using a CSV file. The CSV file must contain a header row with the following columns: partnerNumber, voucherCode. Separate each column with a comma.
|
|
1424
|
-
* @summary Uploads the eligible accounts.
|
|
1425
|
-
* @param {CampaignsApiUploadEligibleAccountsRequest} requestParameters Request parameters.
|
|
1426
|
-
* @param {*} [options] Override http request option.
|
|
1427
|
-
* @throws {RequiredError}
|
|
1428
|
-
* @memberof CampaignsApi
|
|
1429
|
-
*/
|
|
1430
|
-
public uploadEligibleAccounts(requestParameters: CampaignsApiUploadEligibleAccountsRequest, options?: AxiosRequestConfig) {
|
|
1431
|
-
return CampaignsApiFp(this.configuration).uploadEligibleAccounts(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1432
|
-
}
|
|
1433
|
-
}
|