tremendous 2.2.0 → 3.0.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/dist/api.js ADDED
@@ -0,0 +1,3895 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * API Endpoints
6
+ * Deliver monetary rewards and incentives to employees, customers, survey participants, and more through the Tremendous API. For organizational tasks, like managing your organization and it\'s members within Tremendous, please see the Tremendous Organizational API.
7
+ *
8
+ * The version of the OpenAPI document: 2
9
+ * Contact: developers@tremendous.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.OrderWithoutLinkStatusEnum = exports.OrderWithLinkStatusEnum = exports.OrderStatus = exports.OrderBasePaymentChannelEnum = exports.OrderBaseStatusEnum = exports.OrderStatusEnum = exports.MemberWithoutEventsStatusEnum = exports.MemberWithoutEventsRoleEnum = exports.MemberWithEventsStatusEnum = exports.MemberWithEventsRoleEnum = exports.MemberBaseStatusEnum = exports.MemberBaseRoleEnum = exports.MemberStatusEnum = exports.MemberRoleEnum = exports.ListRewards200ResponseRewardsInnerValueCurrencyCodeEnum = exports.ListRewards200ResponseRewardsInnerDeliveryStatusEnum = exports.ListRewards200ResponseRewardsInnerDeliveryMethodEnum = exports.ListProductsResponseProductsInnerImagesInnerTypeEnum = exports.ListProductsResponseProductsInnerCurrencyCodesEnum = exports.ListProductsResponseProductsInnerCategoryEnum = exports.ListOrganizations200ResponseOrganizationsInnerStatusEnum = exports.ListOrders200ResponseOrdersInnerPaymentChannelEnum = exports.ListOrders200ResponseOrdersInnerStatusEnum = exports.ListMembers200ResponseMembersInnerStatusEnum = exports.ListMembers200ResponseMembersInnerRoleEnum = exports.ListInvoices200ResponseInvoicesInnerStatusEnum = exports.ListFundingSources200ResponseFundingSourcesInnerMetaNetworkEnum = exports.ListFundingSources200ResponseFundingSourcesInnerMetaAccountTypeEnum = exports.ListFundingSources200ResponseFundingSourcesInnerTypeEnum = exports.ListFundingSources200ResponseFundingSourcesInnerMethodEnum = exports.InvoiceStatusEnum = exports.GetMember200ResponseMemberEventsInnerTypeEnum = exports.GetMember200ResponseMemberStatusEnum = exports.GetMember200ResponseMemberRoleEnum = exports.FundingSourceTypeEnum = exports.FundingSourceMethodEnum = exports.DeliveryStatus = exports.DeliveryMethod = exports.DeliveryDetailsWithLinkStatusEnum = exports.DeliveryDetailsWithLinkMethodEnum = exports.DeliveryDetailsStatusEnum = exports.DeliveryDetailsMethodEnum = exports.CurrencyCodes = exports.CreateOrganization200ResponseOrganizationStatusEnum = exports.CreateOrderRequestRewardDeliveryMethodEnum = exports.CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum = exports.CreateOrder200ResponseOrderRewardsInnerDeliveryMethodEnum = exports.CreateOrder200ResponseOrderStatusEnum = exports.CreateMemberRequestRoleEnum = exports.CreateMemberRoleEnum = void 0;
26
+ exports.WebhooksApiAxiosParamCreator = exports.RewardsApi = exports.RewardsApiFactory = exports.RewardsApiFp = exports.RewardsApiAxiosParamCreator = exports.ProductsApi = exports.ProductsApiFactory = exports.ProductsApiFp = exports.ProductsApiAxiosParamCreator = exports.OrganizationsApi = exports.OrganizationsApiFactory = exports.OrganizationsApiFp = exports.OrganizationsApiAxiosParamCreator = exports.OrdersApi = exports.OrdersApiFactory = exports.OrdersApiFp = exports.OrdersApiAxiosParamCreator = exports.MembersApi = exports.MembersApiFactory = exports.MembersApiFp = exports.MembersApiAxiosParamCreator = exports.InvoicesApi = exports.InvoicesApiFactory = exports.InvoicesApiFp = exports.InvoicesApiAxiosParamCreator = exports.FundingSourcesApi = exports.FundingSourcesApiFactory = exports.FundingSourcesApiFp = exports.FundingSourcesApiAxiosParamCreator = exports.FieldsApi = exports.FieldsApiFactory = exports.FieldsApiFp = exports.FieldsApiAxiosParamCreator = exports.CampaignsApi = exports.CampaignsApiFactory = exports.CampaignsApiFp = exports.CampaignsApiAxiosParamCreator = exports.BalanceTransactionsApi = exports.BalanceTransactionsApiFactory = exports.BalanceTransactionsApiFp = exports.BalanceTransactionsApiAxiosParamCreator = exports.RewardWithoutLinkDeliveryStatusEnum = exports.RewardWithoutLinkDeliveryMethodEnum = exports.RewardWithLinkDeliveryStatusEnum = exports.RewardWithLinkDeliveryMethodEnum = exports.RewardValueCurrencyCodeEnum = exports.ProductCurrencyCodesEnum = exports.ProductCategoryEnum = exports.PaymentDetailsChannelEnum = exports.OrganizationStatusEnum = void 0;
27
+ exports.WebhooksApi = exports.WebhooksApiFactory = exports.WebhooksApiFp = void 0;
28
+ const axios_1 = require("axios");
29
+ // Some imports not used depending on template conditions
30
+ // @ts-ignore
31
+ const common_1 = require("./common");
32
+ // @ts-ignore
33
+ const base_1 = require("./base");
34
+ exports.CreateMemberRoleEnum = {
35
+ Member: 'MEMBER',
36
+ Admin: 'ADMIN'
37
+ };
38
+ exports.CreateMemberRequestRoleEnum = {
39
+ Member: 'MEMBER',
40
+ Admin: 'ADMIN'
41
+ };
42
+ exports.CreateOrder200ResponseOrderStatusEnum = {
43
+ Canceled: 'CANCELED',
44
+ Cart: 'CART',
45
+ Executed: 'EXECUTED',
46
+ Failed: 'FAILED',
47
+ PendingApproval: 'PENDING APPROVAL',
48
+ PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL'
49
+ };
50
+ exports.CreateOrder200ResponseOrderRewardsInnerDeliveryMethodEnum = {
51
+ Email: 'EMAIL',
52
+ Link: 'LINK',
53
+ Phone: 'PHONE'
54
+ };
55
+ exports.CreateOrder200ResponseOrderRewardsInnerDeliveryStatusEnum = {
56
+ Scheduled: 'SCHEDULED',
57
+ Failed: 'FAILED',
58
+ Succeeded: 'SUCCEEDED',
59
+ Pending: 'PENDING'
60
+ };
61
+ exports.CreateOrderRequestRewardDeliveryMethodEnum = {
62
+ Email: 'EMAIL',
63
+ Link: 'LINK',
64
+ Phone: 'PHONE'
65
+ };
66
+ exports.CreateOrganization200ResponseOrganizationStatusEnum = {
67
+ Pending: 'PENDING',
68
+ Approved: 'APPROVED',
69
+ Rejected: 'REJECTED'
70
+ };
71
+ /**
72
+ *
73
+ * @export
74
+ * @enum {string}
75
+ */
76
+ exports.CurrencyCodes = {
77
+ Usd: 'USD',
78
+ Cad: 'CAD',
79
+ Eur: 'EUR',
80
+ Aed: 'AED',
81
+ Afn: 'AFN',
82
+ All: 'ALL',
83
+ Amd: 'AMD',
84
+ Ars: 'ARS',
85
+ Aud: 'AUD',
86
+ Azn: 'AZN',
87
+ Bam: 'BAM',
88
+ Bdt: 'BDT',
89
+ Bgn: 'BGN',
90
+ Bhd: 'BHD',
91
+ Bif: 'BIF',
92
+ Bnd: 'BND',
93
+ Bob: 'BOB',
94
+ Brl: 'BRL',
95
+ Bwp: 'BWP',
96
+ Byr: 'BYR',
97
+ Bzd: 'BZD',
98
+ Cdf: 'CDF',
99
+ Chf: 'CHF',
100
+ Clp: 'CLP',
101
+ Cny: 'CNY',
102
+ Cop: 'COP',
103
+ Crc: 'CRC',
104
+ Cve: 'CVE',
105
+ Czk: 'CZK',
106
+ Djf: 'DJF',
107
+ Dkk: 'DKK',
108
+ Dop: 'DOP',
109
+ Dzd: 'DZD',
110
+ Eek: 'EEK',
111
+ Egp: 'EGP',
112
+ Ern: 'ERN',
113
+ Etb: 'ETB',
114
+ Gbp: 'GBP',
115
+ Gel: 'GEL',
116
+ Ghs: 'GHS',
117
+ Gnf: 'GNF',
118
+ Gtq: 'GTQ',
119
+ Hkd: 'HKD',
120
+ Hnl: 'HNL',
121
+ Hrk: 'HRK',
122
+ Huf: 'HUF',
123
+ Idr: 'IDR',
124
+ Ils: 'ILS',
125
+ Inr: 'INR',
126
+ Iqd: 'IQD',
127
+ Irr: 'IRR',
128
+ Isk: 'ISK',
129
+ Jmd: 'JMD',
130
+ Jod: 'JOD',
131
+ Jpy: 'JPY',
132
+ Kes: 'KES',
133
+ Khr: 'KHR',
134
+ Krw: 'KRW',
135
+ Kwd: 'KWD',
136
+ Kzt: 'KZT',
137
+ Lbp: 'LBP',
138
+ Lkr: 'LKR',
139
+ Ltl: 'LTL',
140
+ Lvl: 'LVL',
141
+ Mad: 'MAD',
142
+ Mdl: 'MDL',
143
+ Mga: 'MGA',
144
+ Mkd: 'MKD',
145
+ Mmk: 'MMK',
146
+ Mop: 'MOP',
147
+ Mur: 'MUR',
148
+ Mxn: 'MXN',
149
+ Myr: 'MYR',
150
+ Mzn: 'MZN',
151
+ Nad: 'NAD',
152
+ Ngn: 'NGN',
153
+ Nio: 'NIO',
154
+ Nok: 'NOK',
155
+ Npr: 'NPR',
156
+ Nzd: 'NZD',
157
+ Omr: 'OMR',
158
+ Pab: 'PAB',
159
+ Pen: 'PEN',
160
+ Php: 'PHP',
161
+ Pkr: 'PKR',
162
+ Pln: 'PLN',
163
+ Pyg: 'PYG',
164
+ Qar: 'QAR',
165
+ Ron: 'RON',
166
+ Rsd: 'RSD',
167
+ Rub: 'RUB',
168
+ Rwf: 'RWF',
169
+ Sar: 'SAR',
170
+ Sdg: 'SDG',
171
+ Sek: 'SEK',
172
+ Sgd: 'SGD',
173
+ Sos: 'SOS',
174
+ Syp: 'SYP',
175
+ Thb: 'THB',
176
+ Tnd: 'TND',
177
+ Top: 'TOP',
178
+ Try: 'TRY',
179
+ Ttd: 'TTD',
180
+ Twd: 'TWD',
181
+ Tzs: 'TZS',
182
+ Uah: 'UAH',
183
+ Ugx: 'UGX',
184
+ Uyu: 'UYU',
185
+ Uzs: 'UZS',
186
+ Vef: 'VEF',
187
+ Vnd: 'VND',
188
+ Xaf: 'XAF',
189
+ Xof: 'XOF',
190
+ Yer: 'YER',
191
+ Zar: 'ZAR',
192
+ Zmk: 'ZMK'
193
+ };
194
+ exports.DeliveryDetailsMethodEnum = {
195
+ Email: 'EMAIL',
196
+ Link: 'LINK',
197
+ Phone: 'PHONE'
198
+ };
199
+ exports.DeliveryDetailsStatusEnum = {
200
+ Scheduled: 'SCHEDULED',
201
+ Failed: 'FAILED',
202
+ Succeeded: 'SUCCEEDED',
203
+ Pending: 'PENDING'
204
+ };
205
+ exports.DeliveryDetailsWithLinkMethodEnum = {
206
+ Email: 'EMAIL',
207
+ Link: 'LINK',
208
+ Phone: 'PHONE'
209
+ };
210
+ exports.DeliveryDetailsWithLinkStatusEnum = {
211
+ Scheduled: 'SCHEDULED',
212
+ Failed: 'FAILED',
213
+ Succeeded: 'SUCCEEDED',
214
+ Pending: 'PENDING'
215
+ };
216
+ /**
217
+ * How to deliver the reward to the recipient. <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be delivered to the recipient out-of-band.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table>
218
+ * @export
219
+ * @enum {string}
220
+ */
221
+ exports.DeliveryMethod = {
222
+ Email: 'EMAIL',
223
+ Link: 'LINK',
224
+ Phone: 'PHONE'
225
+ };
226
+ /**
227
+ * Current status of the delivery of the reward: * `SCHEDULED` - Reward is scheduled for delivery and will be delivered soon. * `FAILED` - Delivery of reward failed (e.g. email bounced). * `SUCCEEDED` - Reward was successfully delivered (email or text message delivered or reward link opened). * `PENDING` - Delivery is pending but not yet scheduled.
228
+ * @export
229
+ * @enum {string}
230
+ */
231
+ exports.DeliveryStatus = {
232
+ Scheduled: 'SCHEDULED',
233
+ Failed: 'FAILED',
234
+ Succeeded: 'SUCCEEDED',
235
+ Pending: 'PENDING'
236
+ };
237
+ exports.FundingSourceMethodEnum = {
238
+ Balance: 'balance',
239
+ BankAccount: 'bank_account',
240
+ CreditCard: 'credit_card',
241
+ Invoice: 'invoice'
242
+ };
243
+ exports.FundingSourceTypeEnum = {
244
+ Commercial: 'COMMERCIAL',
245
+ ProForma: 'PRO_FORMA',
246
+ PrefundingOnly: 'PREFUNDING_ONLY'
247
+ };
248
+ exports.GetMember200ResponseMemberRoleEnum = {
249
+ Member: 'MEMBER',
250
+ Admin: 'ADMIN',
251
+ Deleted: 'DELETED'
252
+ };
253
+ exports.GetMember200ResponseMemberStatusEnum = {
254
+ Registered: 'REGISTERED',
255
+ Invited: 'INVITED'
256
+ };
257
+ exports.GetMember200ResponseMemberEventsInnerTypeEnum = {
258
+ Created: 'created',
259
+ LastLogin: 'last_login'
260
+ };
261
+ exports.InvoiceStatusEnum = {
262
+ Deleted: 'DELETED',
263
+ Paid: 'PAID',
264
+ Open: 'OPEN',
265
+ MarkedAsPaid: 'MARKED_AS_PAID'
266
+ };
267
+ exports.ListFundingSources200ResponseFundingSourcesInnerMethodEnum = {
268
+ Balance: 'balance',
269
+ BankAccount: 'bank_account',
270
+ CreditCard: 'credit_card',
271
+ Invoice: 'invoice'
272
+ };
273
+ exports.ListFundingSources200ResponseFundingSourcesInnerTypeEnum = {
274
+ Commercial: 'COMMERCIAL',
275
+ ProForma: 'PRO_FORMA',
276
+ PrefundingOnly: 'PREFUNDING_ONLY'
277
+ };
278
+ exports.ListFundingSources200ResponseFundingSourcesInnerMetaAccountTypeEnum = {
279
+ Checking: 'checking',
280
+ Savings: 'savings'
281
+ };
282
+ exports.ListFundingSources200ResponseFundingSourcesInnerMetaNetworkEnum = {
283
+ MasterCard: 'MasterCard',
284
+ Amex: 'Amex',
285
+ Jcb: 'JCB',
286
+ DinersClub: 'Diner\'s Club',
287
+ Visa: 'visa',
288
+ Discover: 'discover',
289
+ Laser: 'laser',
290
+ Elo: 'elo',
291
+ Maestro: 'maestro',
292
+ Solo: 'solo'
293
+ };
294
+ exports.ListInvoices200ResponseInvoicesInnerStatusEnum = {
295
+ Deleted: 'DELETED',
296
+ Paid: 'PAID',
297
+ Open: 'OPEN',
298
+ MarkedAsPaid: 'MARKED_AS_PAID'
299
+ };
300
+ exports.ListMembers200ResponseMembersInnerRoleEnum = {
301
+ Member: 'MEMBER',
302
+ Admin: 'ADMIN',
303
+ Deleted: 'DELETED'
304
+ };
305
+ exports.ListMembers200ResponseMembersInnerStatusEnum = {
306
+ Registered: 'REGISTERED',
307
+ Invited: 'INVITED'
308
+ };
309
+ exports.ListOrders200ResponseOrdersInnerStatusEnum = {
310
+ Canceled: 'CANCELED',
311
+ Cart: 'CART',
312
+ Executed: 'EXECUTED',
313
+ Failed: 'FAILED',
314
+ PendingApproval: 'PENDING APPROVAL',
315
+ PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL'
316
+ };
317
+ exports.ListOrders200ResponseOrdersInnerPaymentChannelEnum = {
318
+ Ui: 'UI',
319
+ Api: 'API',
320
+ Embed: 'EMBED',
321
+ Decipher: 'DECIPHER',
322
+ Qualtrics: 'QUALTRICS',
323
+ Typeform: 'TYPEFORM',
324
+ SurveyMonkey: 'SURVEY MONKEY'
325
+ };
326
+ exports.ListOrganizations200ResponseOrganizationsInnerStatusEnum = {
327
+ Pending: 'PENDING',
328
+ Approved: 'APPROVED',
329
+ Rejected: 'REJECTED'
330
+ };
331
+ exports.ListProductsResponseProductsInnerCategoryEnum = {
332
+ Ach: 'ach',
333
+ Charity: 'charity',
334
+ MerchantCard: 'merchant_card',
335
+ Paypal: 'paypal',
336
+ Venmo: 'venmo',
337
+ VisaCard: 'visa_card'
338
+ };
339
+ exports.ListProductsResponseProductsInnerCurrencyCodesEnum = {
340
+ Usd: 'USD',
341
+ Cad: 'CAD',
342
+ Eur: 'EUR',
343
+ Aed: 'AED',
344
+ Afn: 'AFN',
345
+ All: 'ALL',
346
+ Amd: 'AMD',
347
+ Ars: 'ARS',
348
+ Aud: 'AUD',
349
+ Azn: 'AZN',
350
+ Bam: 'BAM',
351
+ Bdt: 'BDT',
352
+ Bgn: 'BGN',
353
+ Bhd: 'BHD',
354
+ Bif: 'BIF',
355
+ Bnd: 'BND',
356
+ Bob: 'BOB',
357
+ Brl: 'BRL',
358
+ Bwp: 'BWP',
359
+ Byr: 'BYR',
360
+ Bzd: 'BZD',
361
+ Cdf: 'CDF',
362
+ Chf: 'CHF',
363
+ Clp: 'CLP',
364
+ Cny: 'CNY',
365
+ Cop: 'COP',
366
+ Crc: 'CRC',
367
+ Cve: 'CVE',
368
+ Czk: 'CZK',
369
+ Djf: 'DJF',
370
+ Dkk: 'DKK',
371
+ Dop: 'DOP',
372
+ Dzd: 'DZD',
373
+ Eek: 'EEK',
374
+ Egp: 'EGP',
375
+ Ern: 'ERN',
376
+ Etb: 'ETB',
377
+ Gbp: 'GBP',
378
+ Gel: 'GEL',
379
+ Ghs: 'GHS',
380
+ Gnf: 'GNF',
381
+ Gtq: 'GTQ',
382
+ Hkd: 'HKD',
383
+ Hnl: 'HNL',
384
+ Hrk: 'HRK',
385
+ Huf: 'HUF',
386
+ Idr: 'IDR',
387
+ Ils: 'ILS',
388
+ Inr: 'INR',
389
+ Iqd: 'IQD',
390
+ Irr: 'IRR',
391
+ Isk: 'ISK',
392
+ Jmd: 'JMD',
393
+ Jod: 'JOD',
394
+ Jpy: 'JPY',
395
+ Kes: 'KES',
396
+ Khr: 'KHR',
397
+ Krw: 'KRW',
398
+ Kwd: 'KWD',
399
+ Kzt: 'KZT',
400
+ Lbp: 'LBP',
401
+ Lkr: 'LKR',
402
+ Ltl: 'LTL',
403
+ Lvl: 'LVL',
404
+ Mad: 'MAD',
405
+ Mdl: 'MDL',
406
+ Mga: 'MGA',
407
+ Mkd: 'MKD',
408
+ Mmk: 'MMK',
409
+ Mop: 'MOP',
410
+ Mur: 'MUR',
411
+ Mxn: 'MXN',
412
+ Myr: 'MYR',
413
+ Mzn: 'MZN',
414
+ Nad: 'NAD',
415
+ Ngn: 'NGN',
416
+ Nio: 'NIO',
417
+ Nok: 'NOK',
418
+ Npr: 'NPR',
419
+ Nzd: 'NZD',
420
+ Omr: 'OMR',
421
+ Pab: 'PAB',
422
+ Pen: 'PEN',
423
+ Php: 'PHP',
424
+ Pkr: 'PKR',
425
+ Pln: 'PLN',
426
+ Pyg: 'PYG',
427
+ Qar: 'QAR',
428
+ Ron: 'RON',
429
+ Rsd: 'RSD',
430
+ Rub: 'RUB',
431
+ Rwf: 'RWF',
432
+ Sar: 'SAR',
433
+ Sdg: 'SDG',
434
+ Sek: 'SEK',
435
+ Sgd: 'SGD',
436
+ Sos: 'SOS',
437
+ Syp: 'SYP',
438
+ Thb: 'THB',
439
+ Tnd: 'TND',
440
+ Top: 'TOP',
441
+ Try: 'TRY',
442
+ Ttd: 'TTD',
443
+ Twd: 'TWD',
444
+ Tzs: 'TZS',
445
+ Uah: 'UAH',
446
+ Ugx: 'UGX',
447
+ Uyu: 'UYU',
448
+ Uzs: 'UZS',
449
+ Vef: 'VEF',
450
+ Vnd: 'VND',
451
+ Xaf: 'XAF',
452
+ Xof: 'XOF',
453
+ Yer: 'YER',
454
+ Zar: 'ZAR',
455
+ Zmk: 'ZMK'
456
+ };
457
+ exports.ListProductsResponseProductsInnerImagesInnerTypeEnum = {
458
+ Card: 'card',
459
+ Logo: 'logo'
460
+ };
461
+ exports.ListRewards200ResponseRewardsInnerDeliveryMethodEnum = {
462
+ Email: 'EMAIL',
463
+ Link: 'LINK',
464
+ Phone: 'PHONE'
465
+ };
466
+ exports.ListRewards200ResponseRewardsInnerDeliveryStatusEnum = {
467
+ Scheduled: 'SCHEDULED',
468
+ Failed: 'FAILED',
469
+ Succeeded: 'SUCCEEDED',
470
+ Pending: 'PENDING'
471
+ };
472
+ exports.ListRewards200ResponseRewardsInnerValueCurrencyCodeEnum = {
473
+ Usd: 'USD',
474
+ Cad: 'CAD',
475
+ Eur: 'EUR',
476
+ Aed: 'AED',
477
+ Afn: 'AFN',
478
+ All: 'ALL',
479
+ Amd: 'AMD',
480
+ Ars: 'ARS',
481
+ Aud: 'AUD',
482
+ Azn: 'AZN',
483
+ Bam: 'BAM',
484
+ Bdt: 'BDT',
485
+ Bgn: 'BGN',
486
+ Bhd: 'BHD',
487
+ Bif: 'BIF',
488
+ Bnd: 'BND',
489
+ Bob: 'BOB',
490
+ Brl: 'BRL',
491
+ Bwp: 'BWP',
492
+ Byr: 'BYR',
493
+ Bzd: 'BZD',
494
+ Cdf: 'CDF',
495
+ Chf: 'CHF',
496
+ Clp: 'CLP',
497
+ Cny: 'CNY',
498
+ Cop: 'COP',
499
+ Crc: 'CRC',
500
+ Cve: 'CVE',
501
+ Czk: 'CZK',
502
+ Djf: 'DJF',
503
+ Dkk: 'DKK',
504
+ Dop: 'DOP',
505
+ Dzd: 'DZD',
506
+ Eek: 'EEK',
507
+ Egp: 'EGP',
508
+ Ern: 'ERN',
509
+ Etb: 'ETB',
510
+ Gbp: 'GBP',
511
+ Gel: 'GEL',
512
+ Ghs: 'GHS',
513
+ Gnf: 'GNF',
514
+ Gtq: 'GTQ',
515
+ Hkd: 'HKD',
516
+ Hnl: 'HNL',
517
+ Hrk: 'HRK',
518
+ Huf: 'HUF',
519
+ Idr: 'IDR',
520
+ Ils: 'ILS',
521
+ Inr: 'INR',
522
+ Iqd: 'IQD',
523
+ Irr: 'IRR',
524
+ Isk: 'ISK',
525
+ Jmd: 'JMD',
526
+ Jod: 'JOD',
527
+ Jpy: 'JPY',
528
+ Kes: 'KES',
529
+ Khr: 'KHR',
530
+ Krw: 'KRW',
531
+ Kwd: 'KWD',
532
+ Kzt: 'KZT',
533
+ Lbp: 'LBP',
534
+ Lkr: 'LKR',
535
+ Ltl: 'LTL',
536
+ Lvl: 'LVL',
537
+ Mad: 'MAD',
538
+ Mdl: 'MDL',
539
+ Mga: 'MGA',
540
+ Mkd: 'MKD',
541
+ Mmk: 'MMK',
542
+ Mop: 'MOP',
543
+ Mur: 'MUR',
544
+ Mxn: 'MXN',
545
+ Myr: 'MYR',
546
+ Mzn: 'MZN',
547
+ Nad: 'NAD',
548
+ Ngn: 'NGN',
549
+ Nio: 'NIO',
550
+ Nok: 'NOK',
551
+ Npr: 'NPR',
552
+ Nzd: 'NZD',
553
+ Omr: 'OMR',
554
+ Pab: 'PAB',
555
+ Pen: 'PEN',
556
+ Php: 'PHP',
557
+ Pkr: 'PKR',
558
+ Pln: 'PLN',
559
+ Pyg: 'PYG',
560
+ Qar: 'QAR',
561
+ Ron: 'RON',
562
+ Rsd: 'RSD',
563
+ Rub: 'RUB',
564
+ Rwf: 'RWF',
565
+ Sar: 'SAR',
566
+ Sdg: 'SDG',
567
+ Sek: 'SEK',
568
+ Sgd: 'SGD',
569
+ Sos: 'SOS',
570
+ Syp: 'SYP',
571
+ Thb: 'THB',
572
+ Tnd: 'TND',
573
+ Top: 'TOP',
574
+ Try: 'TRY',
575
+ Ttd: 'TTD',
576
+ Twd: 'TWD',
577
+ Tzs: 'TZS',
578
+ Uah: 'UAH',
579
+ Ugx: 'UGX',
580
+ Uyu: 'UYU',
581
+ Uzs: 'UZS',
582
+ Vef: 'VEF',
583
+ Vnd: 'VND',
584
+ Xaf: 'XAF',
585
+ Xof: 'XOF',
586
+ Yer: 'YER',
587
+ Zar: 'ZAR',
588
+ Zmk: 'ZMK'
589
+ };
590
+ exports.MemberRoleEnum = {
591
+ Member: 'MEMBER',
592
+ Admin: 'ADMIN',
593
+ Deleted: 'DELETED'
594
+ };
595
+ exports.MemberStatusEnum = {
596
+ Registered: 'REGISTERED',
597
+ Invited: 'INVITED'
598
+ };
599
+ exports.MemberBaseRoleEnum = {
600
+ Member: 'MEMBER',
601
+ Admin: 'ADMIN',
602
+ Deleted: 'DELETED'
603
+ };
604
+ exports.MemberBaseStatusEnum = {
605
+ Registered: 'REGISTERED',
606
+ Invited: 'INVITED'
607
+ };
608
+ exports.MemberWithEventsRoleEnum = {
609
+ Member: 'MEMBER',
610
+ Admin: 'ADMIN',
611
+ Deleted: 'DELETED'
612
+ };
613
+ exports.MemberWithEventsStatusEnum = {
614
+ Registered: 'REGISTERED',
615
+ Invited: 'INVITED'
616
+ };
617
+ exports.MemberWithoutEventsRoleEnum = {
618
+ Member: 'MEMBER',
619
+ Admin: 'ADMIN',
620
+ Deleted: 'DELETED'
621
+ };
622
+ exports.MemberWithoutEventsStatusEnum = {
623
+ Registered: 'REGISTERED',
624
+ Invited: 'INVITED'
625
+ };
626
+ exports.OrderStatusEnum = {
627
+ Canceled: 'CANCELED',
628
+ Cart: 'CART',
629
+ Executed: 'EXECUTED',
630
+ Failed: 'FAILED',
631
+ PendingApproval: 'PENDING APPROVAL',
632
+ PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL'
633
+ };
634
+ exports.OrderBaseStatusEnum = {
635
+ Canceled: 'CANCELED',
636
+ Cart: 'CART',
637
+ Executed: 'EXECUTED',
638
+ Failed: 'FAILED',
639
+ PendingApproval: 'PENDING APPROVAL',
640
+ PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL'
641
+ };
642
+ exports.OrderBasePaymentChannelEnum = {
643
+ Ui: 'UI',
644
+ Api: 'API',
645
+ Embed: 'EMBED',
646
+ Decipher: 'DECIPHER',
647
+ Qualtrics: 'QUALTRICS',
648
+ Typeform: 'TYPEFORM',
649
+ SurveyMonkey: 'SURVEY MONKEY'
650
+ };
651
+ /**
652
+ * Execution status of a given order <table> <thead> <tr> <th> Status </th> <th> Description </th> </tr> </thead> <tbody> <tr> <td> <code> CANCELED </code> </td> <td> The order and all of its rewards were canceled. </td> </tr> <tr> <td> <code> CART </code> </td> <td> The order has been created, but hasn\'t yet been processed. </td> </tr> <tr> <td> <code> EXECUTED </code> </td> <td> The order has been executed. Payment has been handled and rewards are being delivered (if applicable). </td> </tr> <tr> <td> <code> FAILED </code> </td> <td> The order could not be processed due to an error. E.g. due to insufficient funds in the account. </td> </tr> <tr> <td> <code> PENDING APPROVAL </code> </td> <td> The order has been created but needs approval to be executed. </td> </tr> <tr> <td> <code> PENDING INTERNAL PAYMENT APPROVAL </code> </td> <td> The order has been created but it is under review and requires approval from our team. </td> </tr> </tbody> </table>
653
+ * @export
654
+ * @enum {string}
655
+ */
656
+ exports.OrderStatus = {
657
+ Canceled: 'CANCELED',
658
+ Cart: 'CART',
659
+ Executed: 'EXECUTED',
660
+ Failed: 'FAILED',
661
+ PendingApproval: 'PENDING APPROVAL',
662
+ PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL'
663
+ };
664
+ exports.OrderWithLinkStatusEnum = {
665
+ Canceled: 'CANCELED',
666
+ Cart: 'CART',
667
+ Executed: 'EXECUTED',
668
+ Failed: 'FAILED',
669
+ PendingApproval: 'PENDING APPROVAL',
670
+ PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL'
671
+ };
672
+ exports.OrderWithoutLinkStatusEnum = {
673
+ Canceled: 'CANCELED',
674
+ Cart: 'CART',
675
+ Executed: 'EXECUTED',
676
+ Failed: 'FAILED',
677
+ PendingApproval: 'PENDING APPROVAL',
678
+ PendingInternalPaymentApproval: 'PENDING INTERNAL PAYMENT APPROVAL'
679
+ };
680
+ exports.OrganizationStatusEnum = {
681
+ Pending: 'PENDING',
682
+ Approved: 'APPROVED',
683
+ Rejected: 'REJECTED'
684
+ };
685
+ exports.PaymentDetailsChannelEnum = {
686
+ Ui: 'UI',
687
+ Api: 'API',
688
+ Embed: 'EMBED',
689
+ Decipher: 'DECIPHER',
690
+ Qualtrics: 'QUALTRICS',
691
+ Typeform: 'TYPEFORM',
692
+ SurveyMonkey: 'SURVEY MONKEY'
693
+ };
694
+ exports.ProductCategoryEnum = {
695
+ Ach: 'ach',
696
+ Charity: 'charity',
697
+ MerchantCard: 'merchant_card',
698
+ Paypal: 'paypal',
699
+ Venmo: 'venmo',
700
+ VisaCard: 'visa_card'
701
+ };
702
+ exports.ProductCurrencyCodesEnum = {
703
+ Usd: 'USD',
704
+ Cad: 'CAD',
705
+ Eur: 'EUR',
706
+ Aed: 'AED',
707
+ Afn: 'AFN',
708
+ All: 'ALL',
709
+ Amd: 'AMD',
710
+ Ars: 'ARS',
711
+ Aud: 'AUD',
712
+ Azn: 'AZN',
713
+ Bam: 'BAM',
714
+ Bdt: 'BDT',
715
+ Bgn: 'BGN',
716
+ Bhd: 'BHD',
717
+ Bif: 'BIF',
718
+ Bnd: 'BND',
719
+ Bob: 'BOB',
720
+ Brl: 'BRL',
721
+ Bwp: 'BWP',
722
+ Byr: 'BYR',
723
+ Bzd: 'BZD',
724
+ Cdf: 'CDF',
725
+ Chf: 'CHF',
726
+ Clp: 'CLP',
727
+ Cny: 'CNY',
728
+ Cop: 'COP',
729
+ Crc: 'CRC',
730
+ Cve: 'CVE',
731
+ Czk: 'CZK',
732
+ Djf: 'DJF',
733
+ Dkk: 'DKK',
734
+ Dop: 'DOP',
735
+ Dzd: 'DZD',
736
+ Eek: 'EEK',
737
+ Egp: 'EGP',
738
+ Ern: 'ERN',
739
+ Etb: 'ETB',
740
+ Gbp: 'GBP',
741
+ Gel: 'GEL',
742
+ Ghs: 'GHS',
743
+ Gnf: 'GNF',
744
+ Gtq: 'GTQ',
745
+ Hkd: 'HKD',
746
+ Hnl: 'HNL',
747
+ Hrk: 'HRK',
748
+ Huf: 'HUF',
749
+ Idr: 'IDR',
750
+ Ils: 'ILS',
751
+ Inr: 'INR',
752
+ Iqd: 'IQD',
753
+ Irr: 'IRR',
754
+ Isk: 'ISK',
755
+ Jmd: 'JMD',
756
+ Jod: 'JOD',
757
+ Jpy: 'JPY',
758
+ Kes: 'KES',
759
+ Khr: 'KHR',
760
+ Krw: 'KRW',
761
+ Kwd: 'KWD',
762
+ Kzt: 'KZT',
763
+ Lbp: 'LBP',
764
+ Lkr: 'LKR',
765
+ Ltl: 'LTL',
766
+ Lvl: 'LVL',
767
+ Mad: 'MAD',
768
+ Mdl: 'MDL',
769
+ Mga: 'MGA',
770
+ Mkd: 'MKD',
771
+ Mmk: 'MMK',
772
+ Mop: 'MOP',
773
+ Mur: 'MUR',
774
+ Mxn: 'MXN',
775
+ Myr: 'MYR',
776
+ Mzn: 'MZN',
777
+ Nad: 'NAD',
778
+ Ngn: 'NGN',
779
+ Nio: 'NIO',
780
+ Nok: 'NOK',
781
+ Npr: 'NPR',
782
+ Nzd: 'NZD',
783
+ Omr: 'OMR',
784
+ Pab: 'PAB',
785
+ Pen: 'PEN',
786
+ Php: 'PHP',
787
+ Pkr: 'PKR',
788
+ Pln: 'PLN',
789
+ Pyg: 'PYG',
790
+ Qar: 'QAR',
791
+ Ron: 'RON',
792
+ Rsd: 'RSD',
793
+ Rub: 'RUB',
794
+ Rwf: 'RWF',
795
+ Sar: 'SAR',
796
+ Sdg: 'SDG',
797
+ Sek: 'SEK',
798
+ Sgd: 'SGD',
799
+ Sos: 'SOS',
800
+ Syp: 'SYP',
801
+ Thb: 'THB',
802
+ Tnd: 'TND',
803
+ Top: 'TOP',
804
+ Try: 'TRY',
805
+ Ttd: 'TTD',
806
+ Twd: 'TWD',
807
+ Tzs: 'TZS',
808
+ Uah: 'UAH',
809
+ Ugx: 'UGX',
810
+ Uyu: 'UYU',
811
+ Uzs: 'UZS',
812
+ Vef: 'VEF',
813
+ Vnd: 'VND',
814
+ Xaf: 'XAF',
815
+ Xof: 'XOF',
816
+ Yer: 'YER',
817
+ Zar: 'ZAR',
818
+ Zmk: 'ZMK'
819
+ };
820
+ exports.RewardValueCurrencyCodeEnum = {
821
+ Usd: 'USD',
822
+ Cad: 'CAD',
823
+ Eur: 'EUR',
824
+ Aed: 'AED',
825
+ Afn: 'AFN',
826
+ All: 'ALL',
827
+ Amd: 'AMD',
828
+ Ars: 'ARS',
829
+ Aud: 'AUD',
830
+ Azn: 'AZN',
831
+ Bam: 'BAM',
832
+ Bdt: 'BDT',
833
+ Bgn: 'BGN',
834
+ Bhd: 'BHD',
835
+ Bif: 'BIF',
836
+ Bnd: 'BND',
837
+ Bob: 'BOB',
838
+ Brl: 'BRL',
839
+ Bwp: 'BWP',
840
+ Byr: 'BYR',
841
+ Bzd: 'BZD',
842
+ Cdf: 'CDF',
843
+ Chf: 'CHF',
844
+ Clp: 'CLP',
845
+ Cny: 'CNY',
846
+ Cop: 'COP',
847
+ Crc: 'CRC',
848
+ Cve: 'CVE',
849
+ Czk: 'CZK',
850
+ Djf: 'DJF',
851
+ Dkk: 'DKK',
852
+ Dop: 'DOP',
853
+ Dzd: 'DZD',
854
+ Eek: 'EEK',
855
+ Egp: 'EGP',
856
+ Ern: 'ERN',
857
+ Etb: 'ETB',
858
+ Gbp: 'GBP',
859
+ Gel: 'GEL',
860
+ Ghs: 'GHS',
861
+ Gnf: 'GNF',
862
+ Gtq: 'GTQ',
863
+ Hkd: 'HKD',
864
+ Hnl: 'HNL',
865
+ Hrk: 'HRK',
866
+ Huf: 'HUF',
867
+ Idr: 'IDR',
868
+ Ils: 'ILS',
869
+ Inr: 'INR',
870
+ Iqd: 'IQD',
871
+ Irr: 'IRR',
872
+ Isk: 'ISK',
873
+ Jmd: 'JMD',
874
+ Jod: 'JOD',
875
+ Jpy: 'JPY',
876
+ Kes: 'KES',
877
+ Khr: 'KHR',
878
+ Krw: 'KRW',
879
+ Kwd: 'KWD',
880
+ Kzt: 'KZT',
881
+ Lbp: 'LBP',
882
+ Lkr: 'LKR',
883
+ Ltl: 'LTL',
884
+ Lvl: 'LVL',
885
+ Mad: 'MAD',
886
+ Mdl: 'MDL',
887
+ Mga: 'MGA',
888
+ Mkd: 'MKD',
889
+ Mmk: 'MMK',
890
+ Mop: 'MOP',
891
+ Mur: 'MUR',
892
+ Mxn: 'MXN',
893
+ Myr: 'MYR',
894
+ Mzn: 'MZN',
895
+ Nad: 'NAD',
896
+ Ngn: 'NGN',
897
+ Nio: 'NIO',
898
+ Nok: 'NOK',
899
+ Npr: 'NPR',
900
+ Nzd: 'NZD',
901
+ Omr: 'OMR',
902
+ Pab: 'PAB',
903
+ Pen: 'PEN',
904
+ Php: 'PHP',
905
+ Pkr: 'PKR',
906
+ Pln: 'PLN',
907
+ Pyg: 'PYG',
908
+ Qar: 'QAR',
909
+ Ron: 'RON',
910
+ Rsd: 'RSD',
911
+ Rub: 'RUB',
912
+ Rwf: 'RWF',
913
+ Sar: 'SAR',
914
+ Sdg: 'SDG',
915
+ Sek: 'SEK',
916
+ Sgd: 'SGD',
917
+ Sos: 'SOS',
918
+ Syp: 'SYP',
919
+ Thb: 'THB',
920
+ Tnd: 'TND',
921
+ Top: 'TOP',
922
+ Try: 'TRY',
923
+ Ttd: 'TTD',
924
+ Twd: 'TWD',
925
+ Tzs: 'TZS',
926
+ Uah: 'UAH',
927
+ Ugx: 'UGX',
928
+ Uyu: 'UYU',
929
+ Uzs: 'UZS',
930
+ Vef: 'VEF',
931
+ Vnd: 'VND',
932
+ Xaf: 'XAF',
933
+ Xof: 'XOF',
934
+ Yer: 'YER',
935
+ Zar: 'ZAR',
936
+ Zmk: 'ZMK'
937
+ };
938
+ exports.RewardWithLinkDeliveryMethodEnum = {
939
+ Email: 'EMAIL',
940
+ Link: 'LINK',
941
+ Phone: 'PHONE'
942
+ };
943
+ exports.RewardWithLinkDeliveryStatusEnum = {
944
+ Scheduled: 'SCHEDULED',
945
+ Failed: 'FAILED',
946
+ Succeeded: 'SUCCEEDED',
947
+ Pending: 'PENDING'
948
+ };
949
+ exports.RewardWithoutLinkDeliveryMethodEnum = {
950
+ Email: 'EMAIL',
951
+ Link: 'LINK',
952
+ Phone: 'PHONE'
953
+ };
954
+ exports.RewardWithoutLinkDeliveryStatusEnum = {
955
+ Scheduled: 'SCHEDULED',
956
+ Failed: 'FAILED',
957
+ Succeeded: 'SUCCEEDED',
958
+ Pending: 'PENDING'
959
+ };
960
+ /**
961
+ * BalanceTransactionsApi - axios parameter creator
962
+ * @export
963
+ */
964
+ const BalanceTransactionsApiAxiosParamCreator = function (configuration) {
965
+ return {
966
+ /**
967
+ * Fetch a list of all balance transactions on your account.
968
+ * @summary List balance transactions
969
+ * @param {number} [offset] Offsets the returned list by the given number of transactions. The returned transactions are ordered (and offsetted) by their creation date (DESC).
970
+ * @param {number} [limit] Limits the number of transactions listed. The default value is 10.
971
+ * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime.
972
+ * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime.
973
+ * @param {*} [options] Override http request option.
974
+ * @throws {RequiredError}
975
+ */
976
+ listBalanceTransactions: (offset_1, limit_1, createdAtGte_1, createdAtLte_1, ...args_1) => __awaiter(this, [offset_1, limit_1, createdAtGte_1, createdAtLte_1, ...args_1], void 0, function* (offset, limit, createdAtGte, createdAtLte, options = {}) {
977
+ const localVarPath = `/balance_transactions`;
978
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
979
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
980
+ let baseOptions;
981
+ if (configuration) {
982
+ baseOptions = configuration.baseOptions;
983
+ }
984
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
985
+ const localVarHeaderParameter = {};
986
+ const localVarQueryParameter = {};
987
+ // authentication BearerApiKey required
988
+ // http bearer authentication required
989
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
990
+ if (offset !== undefined) {
991
+ localVarQueryParameter['offset'] = offset;
992
+ }
993
+ if (limit !== undefined) {
994
+ localVarQueryParameter['limit'] = limit;
995
+ }
996
+ if (createdAtGte !== undefined) {
997
+ localVarQueryParameter['created_at[gte]'] = createdAtGte;
998
+ }
999
+ if (createdAtLte !== undefined) {
1000
+ localVarQueryParameter['created_at[lte]'] = createdAtLte;
1001
+ }
1002
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1003
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1004
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1005
+ return {
1006
+ url: (0, common_1.toPathString)(localVarUrlObj),
1007
+ options: localVarRequestOptions,
1008
+ };
1009
+ }),
1010
+ };
1011
+ };
1012
+ exports.BalanceTransactionsApiAxiosParamCreator = BalanceTransactionsApiAxiosParamCreator;
1013
+ /**
1014
+ * BalanceTransactionsApi - functional programming interface
1015
+ * @export
1016
+ */
1017
+ const BalanceTransactionsApiFp = function (configuration) {
1018
+ const localVarAxiosParamCreator = (0, exports.BalanceTransactionsApiAxiosParamCreator)(configuration);
1019
+ return {
1020
+ /**
1021
+ * Fetch a list of all balance transactions on your account.
1022
+ * @summary List balance transactions
1023
+ * @param {number} [offset] Offsets the returned list by the given number of transactions. The returned transactions are ordered (and offsetted) by their creation date (DESC).
1024
+ * @param {number} [limit] Limits the number of transactions listed. The default value is 10.
1025
+ * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime.
1026
+ * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime.
1027
+ * @param {*} [options] Override http request option.
1028
+ * @throws {RequiredError}
1029
+ */
1030
+ listBalanceTransactions(offset, limit, createdAtGte, createdAtLte, options) {
1031
+ return __awaiter(this, void 0, void 0, function* () {
1032
+ var _a, _b, _c;
1033
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listBalanceTransactions(offset, limit, createdAtGte, createdAtLte, options);
1034
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1035
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['BalanceTransactionsApi.listBalanceTransactions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1036
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1037
+ });
1038
+ },
1039
+ };
1040
+ };
1041
+ exports.BalanceTransactionsApiFp = BalanceTransactionsApiFp;
1042
+ /**
1043
+ * BalanceTransactionsApi - factory interface
1044
+ * @export
1045
+ */
1046
+ const BalanceTransactionsApiFactory = function (configuration, basePath, axios) {
1047
+ const localVarFp = (0, exports.BalanceTransactionsApiFp)(configuration);
1048
+ return {
1049
+ /**
1050
+ * Fetch a list of all balance transactions on your account.
1051
+ * @summary List balance transactions
1052
+ * @param {number} [offset] Offsets the returned list by the given number of transactions. The returned transactions are ordered (and offsetted) by their creation date (DESC).
1053
+ * @param {number} [limit] Limits the number of transactions listed. The default value is 10.
1054
+ * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime.
1055
+ * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime.
1056
+ * @param {*} [options] Override http request option.
1057
+ * @throws {RequiredError}
1058
+ */
1059
+ listBalanceTransactions(offset, limit, createdAtGte, createdAtLte, options) {
1060
+ return localVarFp.listBalanceTransactions(offset, limit, createdAtGte, createdAtLte, options).then((request) => request(axios, basePath));
1061
+ },
1062
+ };
1063
+ };
1064
+ exports.BalanceTransactionsApiFactory = BalanceTransactionsApiFactory;
1065
+ /**
1066
+ * BalanceTransactionsApi - object-oriented interface
1067
+ * @export
1068
+ * @class BalanceTransactionsApi
1069
+ * @extends {BaseAPI}
1070
+ */
1071
+ class BalanceTransactionsApi extends base_1.BaseAPI {
1072
+ /**
1073
+ * Fetch a list of all balance transactions on your account.
1074
+ * @summary List balance transactions
1075
+ * @param {number} [offset] Offsets the returned list by the given number of transactions. The returned transactions are ordered (and offsetted) by their creation date (DESC).
1076
+ * @param {number} [limit] Limits the number of transactions listed. The default value is 10.
1077
+ * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime.
1078
+ * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime.
1079
+ * @param {*} [options] Override http request option.
1080
+ * @throws {RequiredError}
1081
+ * @memberof BalanceTransactionsApi
1082
+ */
1083
+ listBalanceTransactions(offset, limit, createdAtGte, createdAtLte, options) {
1084
+ return (0, exports.BalanceTransactionsApiFp)(this.configuration).listBalanceTransactions(offset, limit, createdAtGte, createdAtLte, options).then((request) => request(this.axios, this.basePath));
1085
+ }
1086
+ }
1087
+ exports.BalanceTransactionsApi = BalanceTransactionsApi;
1088
+ /**
1089
+ * CampaignsApi - axios parameter creator
1090
+ * @export
1091
+ */
1092
+ const CampaignsApiAxiosParamCreator = function (configuration) {
1093
+ return {
1094
+ /**
1095
+ * Retrieve a campaign, identified by the given `id` in the URL
1096
+ * @summary Retrieve campaign
1097
+ * @param {string} id ID of the campaign that should be retrieved
1098
+ * @param {*} [options] Override http request option.
1099
+ * @throws {RequiredError}
1100
+ */
1101
+ getCampaign: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
1102
+ // verify required parameter 'id' is not null or undefined
1103
+ (0, common_1.assertParamExists)('getCampaign', 'id', id);
1104
+ const localVarPath = `/campaigns/{id}`
1105
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1106
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1107
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1108
+ let baseOptions;
1109
+ if (configuration) {
1110
+ baseOptions = configuration.baseOptions;
1111
+ }
1112
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1113
+ const localVarHeaderParameter = {};
1114
+ const localVarQueryParameter = {};
1115
+ // authentication BearerApiKey required
1116
+ // http bearer authentication required
1117
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1118
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1119
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1120
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1121
+ return {
1122
+ url: (0, common_1.toPathString)(localVarUrlObj),
1123
+ options: localVarRequestOptions,
1124
+ };
1125
+ }),
1126
+ /**
1127
+ * Retrieve a list of all campaigns created in your account
1128
+ * @summary List campaigns
1129
+ * @param {*} [options] Override http request option.
1130
+ * @throws {RequiredError}
1131
+ */
1132
+ listCampaigns: (...args_2) => __awaiter(this, [...args_2], void 0, function* (options = {}) {
1133
+ const localVarPath = `/campaigns`;
1134
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1135
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1136
+ let baseOptions;
1137
+ if (configuration) {
1138
+ baseOptions = configuration.baseOptions;
1139
+ }
1140
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1141
+ const localVarHeaderParameter = {};
1142
+ const localVarQueryParameter = {};
1143
+ // authentication BearerApiKey required
1144
+ // http bearer authentication required
1145
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1146
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1147
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1148
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1149
+ return {
1150
+ url: (0, common_1.toPathString)(localVarUrlObj),
1151
+ options: localVarRequestOptions,
1152
+ };
1153
+ }),
1154
+ };
1155
+ };
1156
+ exports.CampaignsApiAxiosParamCreator = CampaignsApiAxiosParamCreator;
1157
+ /**
1158
+ * CampaignsApi - functional programming interface
1159
+ * @export
1160
+ */
1161
+ const CampaignsApiFp = function (configuration) {
1162
+ const localVarAxiosParamCreator = (0, exports.CampaignsApiAxiosParamCreator)(configuration);
1163
+ return {
1164
+ /**
1165
+ * Retrieve a campaign, identified by the given `id` in the URL
1166
+ * @summary Retrieve campaign
1167
+ * @param {string} id ID of the campaign that should be retrieved
1168
+ * @param {*} [options] Override http request option.
1169
+ * @throws {RequiredError}
1170
+ */
1171
+ getCampaign(id, options) {
1172
+ return __awaiter(this, void 0, void 0, function* () {
1173
+ var _a, _b, _c;
1174
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getCampaign(id, options);
1175
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1176
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CampaignsApi.getCampaign']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1177
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1178
+ });
1179
+ },
1180
+ /**
1181
+ * Retrieve a list of all campaigns created in your account
1182
+ * @summary List campaigns
1183
+ * @param {*} [options] Override http request option.
1184
+ * @throws {RequiredError}
1185
+ */
1186
+ listCampaigns(options) {
1187
+ return __awaiter(this, void 0, void 0, function* () {
1188
+ var _a, _b, _c;
1189
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listCampaigns(options);
1190
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1191
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CampaignsApi.listCampaigns']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1192
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1193
+ });
1194
+ },
1195
+ };
1196
+ };
1197
+ exports.CampaignsApiFp = CampaignsApiFp;
1198
+ /**
1199
+ * CampaignsApi - factory interface
1200
+ * @export
1201
+ */
1202
+ const CampaignsApiFactory = function (configuration, basePath, axios) {
1203
+ const localVarFp = (0, exports.CampaignsApiFp)(configuration);
1204
+ return {
1205
+ /**
1206
+ * Retrieve a campaign, identified by the given `id` in the URL
1207
+ * @summary Retrieve campaign
1208
+ * @param {string} id ID of the campaign that should be retrieved
1209
+ * @param {*} [options] Override http request option.
1210
+ * @throws {RequiredError}
1211
+ */
1212
+ getCampaign(id, options) {
1213
+ return localVarFp.getCampaign(id, options).then((request) => request(axios, basePath));
1214
+ },
1215
+ /**
1216
+ * Retrieve a list of all campaigns created in your account
1217
+ * @summary List campaigns
1218
+ * @param {*} [options] Override http request option.
1219
+ * @throws {RequiredError}
1220
+ */
1221
+ listCampaigns(options) {
1222
+ return localVarFp.listCampaigns(options).then((request) => request(axios, basePath));
1223
+ },
1224
+ };
1225
+ };
1226
+ exports.CampaignsApiFactory = CampaignsApiFactory;
1227
+ /**
1228
+ * CampaignsApi - object-oriented interface
1229
+ * @export
1230
+ * @class CampaignsApi
1231
+ * @extends {BaseAPI}
1232
+ */
1233
+ class CampaignsApi extends base_1.BaseAPI {
1234
+ /**
1235
+ * Retrieve a campaign, identified by the given `id` in the URL
1236
+ * @summary Retrieve campaign
1237
+ * @param {string} id ID of the campaign that should be retrieved
1238
+ * @param {*} [options] Override http request option.
1239
+ * @throws {RequiredError}
1240
+ * @memberof CampaignsApi
1241
+ */
1242
+ getCampaign(id, options) {
1243
+ return (0, exports.CampaignsApiFp)(this.configuration).getCampaign(id, options).then((request) => request(this.axios, this.basePath));
1244
+ }
1245
+ /**
1246
+ * Retrieve a list of all campaigns created in your account
1247
+ * @summary List campaigns
1248
+ * @param {*} [options] Override http request option.
1249
+ * @throws {RequiredError}
1250
+ * @memberof CampaignsApi
1251
+ */
1252
+ listCampaigns(options) {
1253
+ return (0, exports.CampaignsApiFp)(this.configuration).listCampaigns(options).then((request) => request(this.axios, this.basePath));
1254
+ }
1255
+ }
1256
+ exports.CampaignsApi = CampaignsApi;
1257
+ /**
1258
+ * FieldsApi - axios parameter creator
1259
+ * @export
1260
+ */
1261
+ const FieldsApiAxiosParamCreator = function (configuration) {
1262
+ return {
1263
+ /**
1264
+ * For reporting and analytics purposes, custom fields can be associated with rewards generated through the API. Custom fields must be first added by members of your admin team through the Tremendous Dashboard.
1265
+ * @summary List fields
1266
+ * @param {*} [options] Override http request option.
1267
+ * @throws {RequiredError}
1268
+ */
1269
+ listFields: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
1270
+ const localVarPath = `/fields`;
1271
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1272
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1273
+ let baseOptions;
1274
+ if (configuration) {
1275
+ baseOptions = configuration.baseOptions;
1276
+ }
1277
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1278
+ const localVarHeaderParameter = {};
1279
+ const localVarQueryParameter = {};
1280
+ // authentication BearerApiKey required
1281
+ // http bearer authentication required
1282
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1283
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1284
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1285
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1286
+ return {
1287
+ url: (0, common_1.toPathString)(localVarUrlObj),
1288
+ options: localVarRequestOptions,
1289
+ };
1290
+ }),
1291
+ };
1292
+ };
1293
+ exports.FieldsApiAxiosParamCreator = FieldsApiAxiosParamCreator;
1294
+ /**
1295
+ * FieldsApi - functional programming interface
1296
+ * @export
1297
+ */
1298
+ const FieldsApiFp = function (configuration) {
1299
+ const localVarAxiosParamCreator = (0, exports.FieldsApiAxiosParamCreator)(configuration);
1300
+ return {
1301
+ /**
1302
+ * For reporting and analytics purposes, custom fields can be associated with rewards generated through the API. Custom fields must be first added by members of your admin team through the Tremendous Dashboard.
1303
+ * @summary List fields
1304
+ * @param {*} [options] Override http request option.
1305
+ * @throws {RequiredError}
1306
+ */
1307
+ listFields(options) {
1308
+ return __awaiter(this, void 0, void 0, function* () {
1309
+ var _a, _b, _c;
1310
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listFields(options);
1311
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1312
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FieldsApi.listFields']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1313
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1314
+ });
1315
+ },
1316
+ };
1317
+ };
1318
+ exports.FieldsApiFp = FieldsApiFp;
1319
+ /**
1320
+ * FieldsApi - factory interface
1321
+ * @export
1322
+ */
1323
+ const FieldsApiFactory = function (configuration, basePath, axios) {
1324
+ const localVarFp = (0, exports.FieldsApiFp)(configuration);
1325
+ return {
1326
+ /**
1327
+ * For reporting and analytics purposes, custom fields can be associated with rewards generated through the API. Custom fields must be first added by members of your admin team through the Tremendous Dashboard.
1328
+ * @summary List fields
1329
+ * @param {*} [options] Override http request option.
1330
+ * @throws {RequiredError}
1331
+ */
1332
+ listFields(options) {
1333
+ return localVarFp.listFields(options).then((request) => request(axios, basePath));
1334
+ },
1335
+ };
1336
+ };
1337
+ exports.FieldsApiFactory = FieldsApiFactory;
1338
+ /**
1339
+ * FieldsApi - object-oriented interface
1340
+ * @export
1341
+ * @class FieldsApi
1342
+ * @extends {BaseAPI}
1343
+ */
1344
+ class FieldsApi extends base_1.BaseAPI {
1345
+ /**
1346
+ * For reporting and analytics purposes, custom fields can be associated with rewards generated through the API. Custom fields must be first added by members of your admin team through the Tremendous Dashboard.
1347
+ * @summary List fields
1348
+ * @param {*} [options] Override http request option.
1349
+ * @throws {RequiredError}
1350
+ * @memberof FieldsApi
1351
+ */
1352
+ listFields(options) {
1353
+ return (0, exports.FieldsApiFp)(this.configuration).listFields(options).then((request) => request(this.axios, this.basePath));
1354
+ }
1355
+ }
1356
+ exports.FieldsApi = FieldsApi;
1357
+ /**
1358
+ * FundingSourcesApi - axios parameter creator
1359
+ * @export
1360
+ */
1361
+ const FundingSourcesApiAxiosParamCreator = function (configuration) {
1362
+ return {
1363
+ /**
1364
+ * Retrieve a funding source, identified by the given `id` in the URL
1365
+ * @summary Retrieve funding source
1366
+ * @param {string} id ID of the funding source that should be retrieved
1367
+ * @param {*} [options] Override http request option.
1368
+ * @throws {RequiredError}
1369
+ */
1370
+ getFundingSource: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
1371
+ // verify required parameter 'id' is not null or undefined
1372
+ (0, common_1.assertParamExists)('getFundingSource', 'id', id);
1373
+ const localVarPath = `/funding_sources/{id}`
1374
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1375
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1376
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1377
+ let baseOptions;
1378
+ if (configuration) {
1379
+ baseOptions = configuration.baseOptions;
1380
+ }
1381
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1382
+ const localVarHeaderParameter = {};
1383
+ const localVarQueryParameter = {};
1384
+ // authentication BearerApiKey required
1385
+ // http bearer authentication required
1386
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1387
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1388
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1389
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1390
+ return {
1391
+ url: (0, common_1.toPathString)(localVarUrlObj),
1392
+ options: localVarRequestOptions,
1393
+ };
1394
+ }),
1395
+ /**
1396
+ * Retrieve a list of all funding sources available for ordering through the API in your organization\'s account.
1397
+ * @summary List funding sources
1398
+ * @param {*} [options] Override http request option.
1399
+ * @throws {RequiredError}
1400
+ */
1401
+ listFundingSources: (...args_2) => __awaiter(this, [...args_2], void 0, function* (options = {}) {
1402
+ const localVarPath = `/funding_sources`;
1403
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1404
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1405
+ let baseOptions;
1406
+ if (configuration) {
1407
+ baseOptions = configuration.baseOptions;
1408
+ }
1409
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1410
+ const localVarHeaderParameter = {};
1411
+ const localVarQueryParameter = {};
1412
+ // authentication BearerApiKey required
1413
+ // http bearer authentication required
1414
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1415
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1416
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1417
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1418
+ return {
1419
+ url: (0, common_1.toPathString)(localVarUrlObj),
1420
+ options: localVarRequestOptions,
1421
+ };
1422
+ }),
1423
+ };
1424
+ };
1425
+ exports.FundingSourcesApiAxiosParamCreator = FundingSourcesApiAxiosParamCreator;
1426
+ /**
1427
+ * FundingSourcesApi - functional programming interface
1428
+ * @export
1429
+ */
1430
+ const FundingSourcesApiFp = function (configuration) {
1431
+ const localVarAxiosParamCreator = (0, exports.FundingSourcesApiAxiosParamCreator)(configuration);
1432
+ return {
1433
+ /**
1434
+ * Retrieve a funding source, identified by the given `id` in the URL
1435
+ * @summary Retrieve funding source
1436
+ * @param {string} id ID of the funding source that should be retrieved
1437
+ * @param {*} [options] Override http request option.
1438
+ * @throws {RequiredError}
1439
+ */
1440
+ getFundingSource(id, options) {
1441
+ return __awaiter(this, void 0, void 0, function* () {
1442
+ var _a, _b, _c;
1443
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getFundingSource(id, options);
1444
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1445
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FundingSourcesApi.getFundingSource']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1446
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1447
+ });
1448
+ },
1449
+ /**
1450
+ * Retrieve a list of all funding sources available for ordering through the API in your organization\'s account.
1451
+ * @summary List funding sources
1452
+ * @param {*} [options] Override http request option.
1453
+ * @throws {RequiredError}
1454
+ */
1455
+ listFundingSources(options) {
1456
+ return __awaiter(this, void 0, void 0, function* () {
1457
+ var _a, _b, _c;
1458
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listFundingSources(options);
1459
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1460
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FundingSourcesApi.listFundingSources']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1461
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1462
+ });
1463
+ },
1464
+ };
1465
+ };
1466
+ exports.FundingSourcesApiFp = FundingSourcesApiFp;
1467
+ /**
1468
+ * FundingSourcesApi - factory interface
1469
+ * @export
1470
+ */
1471
+ const FundingSourcesApiFactory = function (configuration, basePath, axios) {
1472
+ const localVarFp = (0, exports.FundingSourcesApiFp)(configuration);
1473
+ return {
1474
+ /**
1475
+ * Retrieve a funding source, identified by the given `id` in the URL
1476
+ * @summary Retrieve funding source
1477
+ * @param {string} id ID of the funding source that should be retrieved
1478
+ * @param {*} [options] Override http request option.
1479
+ * @throws {RequiredError}
1480
+ */
1481
+ getFundingSource(id, options) {
1482
+ return localVarFp.getFundingSource(id, options).then((request) => request(axios, basePath));
1483
+ },
1484
+ /**
1485
+ * Retrieve a list of all funding sources available for ordering through the API in your organization\'s account.
1486
+ * @summary List funding sources
1487
+ * @param {*} [options] Override http request option.
1488
+ * @throws {RequiredError}
1489
+ */
1490
+ listFundingSources(options) {
1491
+ return localVarFp.listFundingSources(options).then((request) => request(axios, basePath));
1492
+ },
1493
+ };
1494
+ };
1495
+ exports.FundingSourcesApiFactory = FundingSourcesApiFactory;
1496
+ /**
1497
+ * FundingSourcesApi - object-oriented interface
1498
+ * @export
1499
+ * @class FundingSourcesApi
1500
+ * @extends {BaseAPI}
1501
+ */
1502
+ class FundingSourcesApi extends base_1.BaseAPI {
1503
+ /**
1504
+ * Retrieve a funding source, identified by the given `id` in the URL
1505
+ * @summary Retrieve funding source
1506
+ * @param {string} id ID of the funding source that should be retrieved
1507
+ * @param {*} [options] Override http request option.
1508
+ * @throws {RequiredError}
1509
+ * @memberof FundingSourcesApi
1510
+ */
1511
+ getFundingSource(id, options) {
1512
+ return (0, exports.FundingSourcesApiFp)(this.configuration).getFundingSource(id, options).then((request) => request(this.axios, this.basePath));
1513
+ }
1514
+ /**
1515
+ * Retrieve a list of all funding sources available for ordering through the API in your organization\'s account.
1516
+ * @summary List funding sources
1517
+ * @param {*} [options] Override http request option.
1518
+ * @throws {RequiredError}
1519
+ * @memberof FundingSourcesApi
1520
+ */
1521
+ listFundingSources(options) {
1522
+ return (0, exports.FundingSourcesApiFp)(this.configuration).listFundingSources(options).then((request) => request(this.axios, this.basePath));
1523
+ }
1524
+ }
1525
+ exports.FundingSourcesApi = FundingSourcesApi;
1526
+ /**
1527
+ * InvoicesApi - axios parameter creator
1528
+ * @export
1529
+ */
1530
+ const InvoicesApiAxiosParamCreator = function (configuration) {
1531
+ return {
1532
+ /**
1533
+ * Creating an invoice is the way for your organization to fund your account\'s balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account\'s balance ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">po_number</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference to the purchase order number within your organization</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the invoice in USD</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">memo</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>A note to be included in the invoice. This is for your internal use and will not be visible to the recipient.</p> </td></tr> </tbody> </table> </div>
1534
+ * @summary Create invoice
1535
+ * @param {CreateInvoiceRequest} createInvoiceRequest Invoice details
1536
+ * @param {*} [options] Override http request option.
1537
+ * @throws {RequiredError}
1538
+ */
1539
+ createInvoice: (createInvoiceRequest_1, ...args_1) => __awaiter(this, [createInvoiceRequest_1, ...args_1], void 0, function* (createInvoiceRequest, options = {}) {
1540
+ // verify required parameter 'createInvoiceRequest' is not null or undefined
1541
+ (0, common_1.assertParamExists)('createInvoice', 'createInvoiceRequest', createInvoiceRequest);
1542
+ const localVarPath = `/invoices`;
1543
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1544
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1545
+ let baseOptions;
1546
+ if (configuration) {
1547
+ baseOptions = configuration.baseOptions;
1548
+ }
1549
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1550
+ const localVarHeaderParameter = {};
1551
+ const localVarQueryParameter = {};
1552
+ // authentication BearerApiKey required
1553
+ // http bearer authentication required
1554
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1555
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1556
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1557
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1558
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1559
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createInvoiceRequest, localVarRequestOptions, configuration);
1560
+ return {
1561
+ url: (0, common_1.toPathString)(localVarUrlObj),
1562
+ options: localVarRequestOptions,
1563
+ };
1564
+ }),
1565
+ /**
1566
+ * Removes an invoice. This has no further consequences but is a rather cosmetic operation.
1567
+ * @summary Delete invoice
1568
+ * @param {string} id ID of the invoice that should be retrieved
1569
+ * @param {*} [options] Override http request option.
1570
+ * @throws {RequiredError}
1571
+ */
1572
+ deleteInvoices: (id_1, ...args_2) => __awaiter(this, [id_1, ...args_2], void 0, function* (id, options = {}) {
1573
+ // verify required parameter 'id' is not null or undefined
1574
+ (0, common_1.assertParamExists)('deleteInvoices', 'id', id);
1575
+ const localVarPath = `/invoices/{id}`
1576
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1577
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1578
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1579
+ let baseOptions;
1580
+ if (configuration) {
1581
+ baseOptions = configuration.baseOptions;
1582
+ }
1583
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
1584
+ const localVarHeaderParameter = {};
1585
+ const localVarQueryParameter = {};
1586
+ // authentication BearerApiKey required
1587
+ // http bearer authentication required
1588
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1589
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1590
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1591
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1592
+ return {
1593
+ url: (0, common_1.toPathString)(localVarUrlObj),
1594
+ options: localVarRequestOptions,
1595
+ };
1596
+ }),
1597
+ /**
1598
+ * Generates a CSV version for an invoice listing the associated rewards and orders
1599
+ * @summary Retrieve invoice as CSV
1600
+ * @param {string} id ID of the Invoice for that the CSV should be generated
1601
+ * @param {*} [options] Override http request option.
1602
+ * @throws {RequiredError}
1603
+ */
1604
+ downloadInvoiceCsv: (id_2, ...args_3) => __awaiter(this, [id_2, ...args_3], void 0, function* (id, options = {}) {
1605
+ // verify required parameter 'id' is not null or undefined
1606
+ (0, common_1.assertParamExists)('downloadInvoiceCsv', 'id', id);
1607
+ const localVarPath = `/invoices/{id}/csv`
1608
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1609
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1610
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1611
+ let baseOptions;
1612
+ if (configuration) {
1613
+ baseOptions = configuration.baseOptions;
1614
+ }
1615
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1616
+ const localVarHeaderParameter = {};
1617
+ const localVarQueryParameter = {};
1618
+ // authentication BearerApiKey required
1619
+ // http bearer authentication required
1620
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1621
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1622
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1623
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1624
+ return {
1625
+ url: (0, common_1.toPathString)(localVarUrlObj),
1626
+ options: localVarRequestOptions,
1627
+ };
1628
+ }),
1629
+ /**
1630
+ * Generates a PDF version for an invoice
1631
+ * @summary Retrieve invoice as PDF
1632
+ * @param {string} id ID of the Invoice for that the PDF should be generated
1633
+ * @param {*} [options] Override http request option.
1634
+ * @throws {RequiredError}
1635
+ */
1636
+ downloadInvoicePdf: (id_3, ...args_4) => __awaiter(this, [id_3, ...args_4], void 0, function* (id, options = {}) {
1637
+ // verify required parameter 'id' is not null or undefined
1638
+ (0, common_1.assertParamExists)('downloadInvoicePdf', 'id', id);
1639
+ const localVarPath = `/invoices/{id}/pdf`
1640
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1641
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1642
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1643
+ let baseOptions;
1644
+ if (configuration) {
1645
+ baseOptions = configuration.baseOptions;
1646
+ }
1647
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1648
+ const localVarHeaderParameter = {};
1649
+ const localVarQueryParameter = {};
1650
+ // authentication BearerApiKey required
1651
+ // http bearer authentication required
1652
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1653
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1654
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1655
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1656
+ return {
1657
+ url: (0, common_1.toPathString)(localVarUrlObj),
1658
+ options: localVarRequestOptions,
1659
+ };
1660
+ }),
1661
+ /**
1662
+ * Retrieve an invoice, identified by the given `id` in the URL > 📘 Deleted Invoices > > This endpoint can be used to retrieve details on deleted invoices > that the list of invoices omits.
1663
+ * @summary Retrieve invoice
1664
+ * @param {string} id ID of the invoice that should be retrieved
1665
+ * @param {*} [options] Override http request option.
1666
+ * @throws {RequiredError}
1667
+ */
1668
+ getInvoice: (id_4, ...args_5) => __awaiter(this, [id_4, ...args_5], void 0, function* (id, options = {}) {
1669
+ // verify required parameter 'id' is not null or undefined
1670
+ (0, common_1.assertParamExists)('getInvoice', 'id', id);
1671
+ const localVarPath = `/invoices/{id}`
1672
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
1673
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1674
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1675
+ let baseOptions;
1676
+ if (configuration) {
1677
+ baseOptions = configuration.baseOptions;
1678
+ }
1679
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1680
+ const localVarHeaderParameter = {};
1681
+ const localVarQueryParameter = {};
1682
+ // authentication BearerApiKey required
1683
+ // http bearer authentication required
1684
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1685
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1686
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1687
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1688
+ return {
1689
+ url: (0, common_1.toPathString)(localVarUrlObj),
1690
+ options: localVarRequestOptions,
1691
+ };
1692
+ }),
1693
+ /**
1694
+ * Fetch a list of all invoices on your account. > 🚧 Deleted invoices are omitted > > The response does not include any previously deleted invoices.
1695
+ * @summary List invoices
1696
+ * @param {number} [offset] Offsets the returned list by the given number of invoices. The returned invoices are ordered (and offsetted) by their creation date (DESC).
1697
+ * @param {number} [limit] Limits the number of invoices listed. The maximum and default value is 10.
1698
+ * @param {*} [options] Override http request option.
1699
+ * @throws {RequiredError}
1700
+ */
1701
+ listInvoices: (offset_1, limit_1, ...args_6) => __awaiter(this, [offset_1, limit_1, ...args_6], void 0, function* (offset, limit, options = {}) {
1702
+ const localVarPath = `/invoices`;
1703
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1704
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1705
+ let baseOptions;
1706
+ if (configuration) {
1707
+ baseOptions = configuration.baseOptions;
1708
+ }
1709
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1710
+ const localVarHeaderParameter = {};
1711
+ const localVarQueryParameter = {};
1712
+ // authentication BearerApiKey required
1713
+ // http bearer authentication required
1714
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1715
+ if (offset !== undefined) {
1716
+ localVarQueryParameter['offset'] = offset;
1717
+ }
1718
+ if (limit !== undefined) {
1719
+ localVarQueryParameter['limit'] = limit;
1720
+ }
1721
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1722
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1723
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1724
+ return {
1725
+ url: (0, common_1.toPathString)(localVarUrlObj),
1726
+ options: localVarRequestOptions,
1727
+ };
1728
+ }),
1729
+ };
1730
+ };
1731
+ exports.InvoicesApiAxiosParamCreator = InvoicesApiAxiosParamCreator;
1732
+ /**
1733
+ * InvoicesApi - functional programming interface
1734
+ * @export
1735
+ */
1736
+ const InvoicesApiFp = function (configuration) {
1737
+ const localVarAxiosParamCreator = (0, exports.InvoicesApiAxiosParamCreator)(configuration);
1738
+ return {
1739
+ /**
1740
+ * Creating an invoice is the way for your organization to fund your account\'s balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account\'s balance ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">po_number</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference to the purchase order number within your organization</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the invoice in USD</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">memo</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>A note to be included in the invoice. This is for your internal use and will not be visible to the recipient.</p> </td></tr> </tbody> </table> </div>
1741
+ * @summary Create invoice
1742
+ * @param {CreateInvoiceRequest} createInvoiceRequest Invoice details
1743
+ * @param {*} [options] Override http request option.
1744
+ * @throws {RequiredError}
1745
+ */
1746
+ createInvoice(createInvoiceRequest, options) {
1747
+ return __awaiter(this, void 0, void 0, function* () {
1748
+ var _a, _b, _c;
1749
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createInvoice(createInvoiceRequest, options);
1750
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1751
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvoicesApi.createInvoice']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1752
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1753
+ });
1754
+ },
1755
+ /**
1756
+ * Removes an invoice. This has no further consequences but is a rather cosmetic operation.
1757
+ * @summary Delete invoice
1758
+ * @param {string} id ID of the invoice that should be retrieved
1759
+ * @param {*} [options] Override http request option.
1760
+ * @throws {RequiredError}
1761
+ */
1762
+ deleteInvoices(id, options) {
1763
+ return __awaiter(this, void 0, void 0, function* () {
1764
+ var _a, _b, _c;
1765
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteInvoices(id, options);
1766
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1767
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvoicesApi.deleteInvoices']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1768
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1769
+ });
1770
+ },
1771
+ /**
1772
+ * Generates a CSV version for an invoice listing the associated rewards and orders
1773
+ * @summary Retrieve invoice as CSV
1774
+ * @param {string} id ID of the Invoice for that the CSV should be generated
1775
+ * @param {*} [options] Override http request option.
1776
+ * @throws {RequiredError}
1777
+ */
1778
+ downloadInvoiceCsv(id, options) {
1779
+ return __awaiter(this, void 0, void 0, function* () {
1780
+ var _a, _b, _c;
1781
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadInvoiceCsv(id, options);
1782
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1783
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvoicesApi.downloadInvoiceCsv']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1784
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1785
+ });
1786
+ },
1787
+ /**
1788
+ * Generates a PDF version for an invoice
1789
+ * @summary Retrieve invoice as PDF
1790
+ * @param {string} id ID of the Invoice for that the PDF should be generated
1791
+ * @param {*} [options] Override http request option.
1792
+ * @throws {RequiredError}
1793
+ */
1794
+ downloadInvoicePdf(id, options) {
1795
+ return __awaiter(this, void 0, void 0, function* () {
1796
+ var _a, _b, _c;
1797
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadInvoicePdf(id, options);
1798
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1799
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvoicesApi.downloadInvoicePdf']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1800
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1801
+ });
1802
+ },
1803
+ /**
1804
+ * Retrieve an invoice, identified by the given `id` in the URL > 📘 Deleted Invoices > > This endpoint can be used to retrieve details on deleted invoices > that the list of invoices omits.
1805
+ * @summary Retrieve invoice
1806
+ * @param {string} id ID of the invoice that should be retrieved
1807
+ * @param {*} [options] Override http request option.
1808
+ * @throws {RequiredError}
1809
+ */
1810
+ getInvoice(id, options) {
1811
+ return __awaiter(this, void 0, void 0, function* () {
1812
+ var _a, _b, _c;
1813
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getInvoice(id, options);
1814
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1815
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvoicesApi.getInvoice']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1816
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1817
+ });
1818
+ },
1819
+ /**
1820
+ * Fetch a list of all invoices on your account. > 🚧 Deleted invoices are omitted > > The response does not include any previously deleted invoices.
1821
+ * @summary List invoices
1822
+ * @param {number} [offset] Offsets the returned list by the given number of invoices. The returned invoices are ordered (and offsetted) by their creation date (DESC).
1823
+ * @param {number} [limit] Limits the number of invoices listed. The maximum and default value is 10.
1824
+ * @param {*} [options] Override http request option.
1825
+ * @throws {RequiredError}
1826
+ */
1827
+ listInvoices(offset, limit, options) {
1828
+ return __awaiter(this, void 0, void 0, function* () {
1829
+ var _a, _b, _c;
1830
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listInvoices(offset, limit, options);
1831
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1832
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InvoicesApi.listInvoices']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1833
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1834
+ });
1835
+ },
1836
+ };
1837
+ };
1838
+ exports.InvoicesApiFp = InvoicesApiFp;
1839
+ /**
1840
+ * InvoicesApi - factory interface
1841
+ * @export
1842
+ */
1843
+ const InvoicesApiFactory = function (configuration, basePath, axios) {
1844
+ const localVarFp = (0, exports.InvoicesApiFp)(configuration);
1845
+ return {
1846
+ /**
1847
+ * Creating an invoice is the way for your organization to fund your account\'s balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account\'s balance ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">po_number</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference to the purchase order number within your organization</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the invoice in USD</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">memo</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>A note to be included in the invoice. This is for your internal use and will not be visible to the recipient.</p> </td></tr> </tbody> </table> </div>
1848
+ * @summary Create invoice
1849
+ * @param {CreateInvoiceRequest} createInvoiceRequest Invoice details
1850
+ * @param {*} [options] Override http request option.
1851
+ * @throws {RequiredError}
1852
+ */
1853
+ createInvoice(createInvoiceRequest, options) {
1854
+ return localVarFp.createInvoice(createInvoiceRequest, options).then((request) => request(axios, basePath));
1855
+ },
1856
+ /**
1857
+ * Removes an invoice. This has no further consequences but is a rather cosmetic operation.
1858
+ * @summary Delete invoice
1859
+ * @param {string} id ID of the invoice that should be retrieved
1860
+ * @param {*} [options] Override http request option.
1861
+ * @throws {RequiredError}
1862
+ */
1863
+ deleteInvoices(id, options) {
1864
+ return localVarFp.deleteInvoices(id, options).then((request) => request(axios, basePath));
1865
+ },
1866
+ /**
1867
+ * Generates a CSV version for an invoice listing the associated rewards and orders
1868
+ * @summary Retrieve invoice as CSV
1869
+ * @param {string} id ID of the Invoice for that the CSV should be generated
1870
+ * @param {*} [options] Override http request option.
1871
+ * @throws {RequiredError}
1872
+ */
1873
+ downloadInvoiceCsv(id, options) {
1874
+ return localVarFp.downloadInvoiceCsv(id, options).then((request) => request(axios, basePath));
1875
+ },
1876
+ /**
1877
+ * Generates a PDF version for an invoice
1878
+ * @summary Retrieve invoice as PDF
1879
+ * @param {string} id ID of the Invoice for that the PDF should be generated
1880
+ * @param {*} [options] Override http request option.
1881
+ * @throws {RequiredError}
1882
+ */
1883
+ downloadInvoicePdf(id, options) {
1884
+ return localVarFp.downloadInvoicePdf(id, options).then((request) => request(axios, basePath));
1885
+ },
1886
+ /**
1887
+ * Retrieve an invoice, identified by the given `id` in the URL > 📘 Deleted Invoices > > This endpoint can be used to retrieve details on deleted invoices > that the list of invoices omits.
1888
+ * @summary Retrieve invoice
1889
+ * @param {string} id ID of the invoice that should be retrieved
1890
+ * @param {*} [options] Override http request option.
1891
+ * @throws {RequiredError}
1892
+ */
1893
+ getInvoice(id, options) {
1894
+ return localVarFp.getInvoice(id, options).then((request) => request(axios, basePath));
1895
+ },
1896
+ /**
1897
+ * Fetch a list of all invoices on your account. > 🚧 Deleted invoices are omitted > > The response does not include any previously deleted invoices.
1898
+ * @summary List invoices
1899
+ * @param {number} [offset] Offsets the returned list by the given number of invoices. The returned invoices are ordered (and offsetted) by their creation date (DESC).
1900
+ * @param {number} [limit] Limits the number of invoices listed. The maximum and default value is 10.
1901
+ * @param {*} [options] Override http request option.
1902
+ * @throws {RequiredError}
1903
+ */
1904
+ listInvoices(offset, limit, options) {
1905
+ return localVarFp.listInvoices(offset, limit, options).then((request) => request(axios, basePath));
1906
+ },
1907
+ };
1908
+ };
1909
+ exports.InvoicesApiFactory = InvoicesApiFactory;
1910
+ /**
1911
+ * InvoicesApi - object-oriented interface
1912
+ * @export
1913
+ * @class InvoicesApi
1914
+ * @extends {BaseAPI}
1915
+ */
1916
+ class InvoicesApi extends base_1.BaseAPI {
1917
+ /**
1918
+ * Creating an invoice is the way for your organization to fund your account\'s balance. 1. Create an invoice 2. Pay the invoice 3. Funds get added to your account\'s balance ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">po_number</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference to the purchase order number within your organization</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">amount</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the invoice in USD</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">memo</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>A note to be included in the invoice. This is for your internal use and will not be visible to the recipient.</p> </td></tr> </tbody> </table> </div>
1919
+ * @summary Create invoice
1920
+ * @param {CreateInvoiceRequest} createInvoiceRequest Invoice details
1921
+ * @param {*} [options] Override http request option.
1922
+ * @throws {RequiredError}
1923
+ * @memberof InvoicesApi
1924
+ */
1925
+ createInvoice(createInvoiceRequest, options) {
1926
+ return (0, exports.InvoicesApiFp)(this.configuration).createInvoice(createInvoiceRequest, options).then((request) => request(this.axios, this.basePath));
1927
+ }
1928
+ /**
1929
+ * Removes an invoice. This has no further consequences but is a rather cosmetic operation.
1930
+ * @summary Delete invoice
1931
+ * @param {string} id ID of the invoice that should be retrieved
1932
+ * @param {*} [options] Override http request option.
1933
+ * @throws {RequiredError}
1934
+ * @memberof InvoicesApi
1935
+ */
1936
+ deleteInvoices(id, options) {
1937
+ return (0, exports.InvoicesApiFp)(this.configuration).deleteInvoices(id, options).then((request) => request(this.axios, this.basePath));
1938
+ }
1939
+ /**
1940
+ * Generates a CSV version for an invoice listing the associated rewards and orders
1941
+ * @summary Retrieve invoice as CSV
1942
+ * @param {string} id ID of the Invoice for that the CSV should be generated
1943
+ * @param {*} [options] Override http request option.
1944
+ * @throws {RequiredError}
1945
+ * @memberof InvoicesApi
1946
+ */
1947
+ downloadInvoiceCsv(id, options) {
1948
+ return (0, exports.InvoicesApiFp)(this.configuration).downloadInvoiceCsv(id, options).then((request) => request(this.axios, this.basePath));
1949
+ }
1950
+ /**
1951
+ * Generates a PDF version for an invoice
1952
+ * @summary Retrieve invoice as PDF
1953
+ * @param {string} id ID of the Invoice for that the PDF should be generated
1954
+ * @param {*} [options] Override http request option.
1955
+ * @throws {RequiredError}
1956
+ * @memberof InvoicesApi
1957
+ */
1958
+ downloadInvoicePdf(id, options) {
1959
+ return (0, exports.InvoicesApiFp)(this.configuration).downloadInvoicePdf(id, options).then((request) => request(this.axios, this.basePath));
1960
+ }
1961
+ /**
1962
+ * Retrieve an invoice, identified by the given `id` in the URL > 📘 Deleted Invoices > > This endpoint can be used to retrieve details on deleted invoices > that the list of invoices omits.
1963
+ * @summary Retrieve invoice
1964
+ * @param {string} id ID of the invoice that should be retrieved
1965
+ * @param {*} [options] Override http request option.
1966
+ * @throws {RequiredError}
1967
+ * @memberof InvoicesApi
1968
+ */
1969
+ getInvoice(id, options) {
1970
+ return (0, exports.InvoicesApiFp)(this.configuration).getInvoice(id, options).then((request) => request(this.axios, this.basePath));
1971
+ }
1972
+ /**
1973
+ * Fetch a list of all invoices on your account. > 🚧 Deleted invoices are omitted > > The response does not include any previously deleted invoices.
1974
+ * @summary List invoices
1975
+ * @param {number} [offset] Offsets the returned list by the given number of invoices. The returned invoices are ordered (and offsetted) by their creation date (DESC).
1976
+ * @param {number} [limit] Limits the number of invoices listed. The maximum and default value is 10.
1977
+ * @param {*} [options] Override http request option.
1978
+ * @throws {RequiredError}
1979
+ * @memberof InvoicesApi
1980
+ */
1981
+ listInvoices(offset, limit, options) {
1982
+ return (0, exports.InvoicesApiFp)(this.configuration).listInvoices(offset, limit, options).then((request) => request(this.axios, this.basePath));
1983
+ }
1984
+ }
1985
+ exports.InvoicesApi = InvoicesApi;
1986
+ /**
1987
+ * MembersApi - axios parameter creator
1988
+ * @export
1989
+ */
1990
+ const MembersApiAxiosParamCreator = function (configuration) {
1991
+ return {
1992
+ /**
1993
+ * Each organization has one or more users that can access and manage that organization. These users are called members. Members can take actions via the Tremendous web dashboard directly. These actions include adding funding sources to the organization, creating Campaigns, and more. ### Permissions Members can have one of two roles that determine their permissions within the organization: 1. `MEMBER`: Limited permissions. Can view their own reward and order histories only. 2. `ADMIN`: Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization. To create members of a sub-organizations [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the create member request. ### Inviting new members After creating a member, an automatic invite is sent to the email address. If the user is not registered yet, that person will then need to sign up for a Tremendous account. > ❗️ Automatic invitations are not available in the sandbox > > You must manually use the returned `invite_url` field in the payload instead.
1994
+ * @summary Create member
1995
+ * @param {CreateMemberRequest} createMemberRequest Member details
1996
+ * @param {*} [options] Override http request option.
1997
+ * @throws {RequiredError}
1998
+ */
1999
+ createMember: (createMemberRequest_1, ...args_1) => __awaiter(this, [createMemberRequest_1, ...args_1], void 0, function* (createMemberRequest, options = {}) {
2000
+ // verify required parameter 'createMemberRequest' is not null or undefined
2001
+ (0, common_1.assertParamExists)('createMember', 'createMemberRequest', createMemberRequest);
2002
+ const localVarPath = `/members`;
2003
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2004
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2005
+ let baseOptions;
2006
+ if (configuration) {
2007
+ baseOptions = configuration.baseOptions;
2008
+ }
2009
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2010
+ const localVarHeaderParameter = {};
2011
+ const localVarQueryParameter = {};
2012
+ // authentication BearerApiKey required
2013
+ // http bearer authentication required
2014
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2015
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2016
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2017
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2018
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2019
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createMemberRequest, localVarRequestOptions, configuration);
2020
+ return {
2021
+ url: (0, common_1.toPathString)(localVarUrlObj),
2022
+ options: localVarRequestOptions,
2023
+ };
2024
+ }),
2025
+ /**
2026
+ *
2027
+ * @summary Retrieve member
2028
+ * @param {string} id ID of the member to retrieve
2029
+ * @param {*} [options] Override http request option.
2030
+ * @throws {RequiredError}
2031
+ */
2032
+ getMember: (id_1, ...args_2) => __awaiter(this, [id_1, ...args_2], void 0, function* (id, options = {}) {
2033
+ // verify required parameter 'id' is not null or undefined
2034
+ (0, common_1.assertParamExists)('getMember', 'id', id);
2035
+ const localVarPath = `/members/{id}`
2036
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2037
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2038
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2039
+ let baseOptions;
2040
+ if (configuration) {
2041
+ baseOptions = configuration.baseOptions;
2042
+ }
2043
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2044
+ const localVarHeaderParameter = {};
2045
+ const localVarQueryParameter = {};
2046
+ // authentication BearerApiKey required
2047
+ // http bearer authentication required
2048
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2049
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2050
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2051
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2052
+ return {
2053
+ url: (0, common_1.toPathString)(localVarUrlObj),
2054
+ options: localVarRequestOptions,
2055
+ };
2056
+ }),
2057
+ /**
2058
+ * To list members of a sub-organization [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the list members request.
2059
+ * @summary List members
2060
+ * @param {*} [options] Override http request option.
2061
+ * @throws {RequiredError}
2062
+ */
2063
+ listMembers: (...args_3) => __awaiter(this, [...args_3], void 0, function* (options = {}) {
2064
+ const localVarPath = `/members`;
2065
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2066
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2067
+ let baseOptions;
2068
+ if (configuration) {
2069
+ baseOptions = configuration.baseOptions;
2070
+ }
2071
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2072
+ const localVarHeaderParameter = {};
2073
+ const localVarQueryParameter = {};
2074
+ // authentication BearerApiKey required
2075
+ // http bearer authentication required
2076
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2077
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2078
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2079
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2080
+ return {
2081
+ url: (0, common_1.toPathString)(localVarUrlObj),
2082
+ options: localVarRequestOptions,
2083
+ };
2084
+ }),
2085
+ };
2086
+ };
2087
+ exports.MembersApiAxiosParamCreator = MembersApiAxiosParamCreator;
2088
+ /**
2089
+ * MembersApi - functional programming interface
2090
+ * @export
2091
+ */
2092
+ const MembersApiFp = function (configuration) {
2093
+ const localVarAxiosParamCreator = (0, exports.MembersApiAxiosParamCreator)(configuration);
2094
+ return {
2095
+ /**
2096
+ * Each organization has one or more users that can access and manage that organization. These users are called members. Members can take actions via the Tremendous web dashboard directly. These actions include adding funding sources to the organization, creating Campaigns, and more. ### Permissions Members can have one of two roles that determine their permissions within the organization: 1. `MEMBER`: Limited permissions. Can view their own reward and order histories only. 2. `ADMIN`: Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization. To create members of a sub-organizations [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the create member request. ### Inviting new members After creating a member, an automatic invite is sent to the email address. If the user is not registered yet, that person will then need to sign up for a Tremendous account. > ❗️ Automatic invitations are not available in the sandbox > > You must manually use the returned `invite_url` field in the payload instead.
2097
+ * @summary Create member
2098
+ * @param {CreateMemberRequest} createMemberRequest Member details
2099
+ * @param {*} [options] Override http request option.
2100
+ * @throws {RequiredError}
2101
+ */
2102
+ createMember(createMemberRequest, options) {
2103
+ return __awaiter(this, void 0, void 0, function* () {
2104
+ var _a, _b, _c;
2105
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createMember(createMemberRequest, options);
2106
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2107
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['MembersApi.createMember']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2108
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2109
+ });
2110
+ },
2111
+ /**
2112
+ *
2113
+ * @summary Retrieve member
2114
+ * @param {string} id ID of the member to retrieve
2115
+ * @param {*} [options] Override http request option.
2116
+ * @throws {RequiredError}
2117
+ */
2118
+ getMember(id, options) {
2119
+ return __awaiter(this, void 0, void 0, function* () {
2120
+ var _a, _b, _c;
2121
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getMember(id, options);
2122
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2123
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['MembersApi.getMember']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2124
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2125
+ });
2126
+ },
2127
+ /**
2128
+ * To list members of a sub-organization [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the list members request.
2129
+ * @summary List members
2130
+ * @param {*} [options] Override http request option.
2131
+ * @throws {RequiredError}
2132
+ */
2133
+ listMembers(options) {
2134
+ return __awaiter(this, void 0, void 0, function* () {
2135
+ var _a, _b, _c;
2136
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listMembers(options);
2137
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2138
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['MembersApi.listMembers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2139
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2140
+ });
2141
+ },
2142
+ };
2143
+ };
2144
+ exports.MembersApiFp = MembersApiFp;
2145
+ /**
2146
+ * MembersApi - factory interface
2147
+ * @export
2148
+ */
2149
+ const MembersApiFactory = function (configuration, basePath, axios) {
2150
+ const localVarFp = (0, exports.MembersApiFp)(configuration);
2151
+ return {
2152
+ /**
2153
+ * Each organization has one or more users that can access and manage that organization. These users are called members. Members can take actions via the Tremendous web dashboard directly. These actions include adding funding sources to the organization, creating Campaigns, and more. ### Permissions Members can have one of two roles that determine their permissions within the organization: 1. `MEMBER`: Limited permissions. Can view their own reward and order histories only. 2. `ADMIN`: Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization. To create members of a sub-organizations [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the create member request. ### Inviting new members After creating a member, an automatic invite is sent to the email address. If the user is not registered yet, that person will then need to sign up for a Tremendous account. > ❗️ Automatic invitations are not available in the sandbox > > You must manually use the returned `invite_url` field in the payload instead.
2154
+ * @summary Create member
2155
+ * @param {CreateMemberRequest} createMemberRequest Member details
2156
+ * @param {*} [options] Override http request option.
2157
+ * @throws {RequiredError}
2158
+ */
2159
+ createMember(createMemberRequest, options) {
2160
+ return localVarFp.createMember(createMemberRequest, options).then((request) => request(axios, basePath));
2161
+ },
2162
+ /**
2163
+ *
2164
+ * @summary Retrieve member
2165
+ * @param {string} id ID of the member to retrieve
2166
+ * @param {*} [options] Override http request option.
2167
+ * @throws {RequiredError}
2168
+ */
2169
+ getMember(id, options) {
2170
+ return localVarFp.getMember(id, options).then((request) => request(axios, basePath));
2171
+ },
2172
+ /**
2173
+ * To list members of a sub-organization [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the list members request.
2174
+ * @summary List members
2175
+ * @param {*} [options] Override http request option.
2176
+ * @throws {RequiredError}
2177
+ */
2178
+ listMembers(options) {
2179
+ return localVarFp.listMembers(options).then((request) => request(axios, basePath));
2180
+ },
2181
+ };
2182
+ };
2183
+ exports.MembersApiFactory = MembersApiFactory;
2184
+ /**
2185
+ * MembersApi - object-oriented interface
2186
+ * @export
2187
+ * @class MembersApi
2188
+ * @extends {BaseAPI}
2189
+ */
2190
+ class MembersApi extends base_1.BaseAPI {
2191
+ /**
2192
+ * Each organization has one or more users that can access and manage that organization. These users are called members. Members can take actions via the Tremendous web dashboard directly. These actions include adding funding sources to the organization, creating Campaigns, and more. ### Permissions Members can have one of two roles that determine their permissions within the organization: 1. `MEMBER`: Limited permissions. Can view their own reward and order histories only. 2. `ADMIN`: Update organization settings, invite other members to the organization, and view all member order and reward histories within their organization. To create members of a sub-organizations [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the create member request. ### Inviting new members After creating a member, an automatic invite is sent to the email address. If the user is not registered yet, that person will then need to sign up for a Tremendous account. > ❗️ Automatic invitations are not available in the sandbox > > You must manually use the returned `invite_url` field in the payload instead.
2193
+ * @summary Create member
2194
+ * @param {CreateMemberRequest} createMemberRequest Member details
2195
+ * @param {*} [options] Override http request option.
2196
+ * @throws {RequiredError}
2197
+ * @memberof MembersApi
2198
+ */
2199
+ createMember(createMemberRequest, options) {
2200
+ return (0, exports.MembersApiFp)(this.configuration).createMember(createMemberRequest, options).then((request) => request(this.axios, this.basePath));
2201
+ }
2202
+ /**
2203
+ *
2204
+ * @summary Retrieve member
2205
+ * @param {string} id ID of the member to retrieve
2206
+ * @param {*} [options] Override http request option.
2207
+ * @throws {RequiredError}
2208
+ * @memberof MembersApi
2209
+ */
2210
+ getMember(id, options) {
2211
+ return (0, exports.MembersApiFp)(this.configuration).getMember(id, options).then((request) => request(this.axios, this.basePath));
2212
+ }
2213
+ /**
2214
+ * To list members of a sub-organization [create an API key for that organization](/reference/post_organizations-id-create-api-key) first, then use the new API key in the list members request.
2215
+ * @summary List members
2216
+ * @param {*} [options] Override http request option.
2217
+ * @throws {RequiredError}
2218
+ * @memberof MembersApi
2219
+ */
2220
+ listMembers(options) {
2221
+ return (0, exports.MembersApiFp)(this.configuration).listMembers(options).then((request) => request(this.axios, this.basePath));
2222
+ }
2223
+ }
2224
+ exports.MembersApi = MembersApi;
2225
+ /**
2226
+ * OrdersApi - axios parameter creator
2227
+ * @export
2228
+ */
2229
+ const OrdersApiAxiosParamCreator = function (configuration) {
2230
+ return {
2231
+ /**
2232
+ * Approves an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard.
2233
+ * @summary Approve order
2234
+ * @param {string} id ID of the order that should be approved. In case the order has an &#x60;external_id&#x60; reference supplied by the customer on creation, it\&#39;s possible to use it instead.
2235
+ * @param {*} [options] Override http request option.
2236
+ * @throws {RequiredError}
2237
+ */
2238
+ approveOrder: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
2239
+ // verify required parameter 'id' is not null or undefined
2240
+ (0, common_1.assertParamExists)('approveOrder', 'id', id);
2241
+ const localVarPath = `/order_approvals/{id}/approve`
2242
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2243
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2244
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2245
+ let baseOptions;
2246
+ if (configuration) {
2247
+ baseOptions = configuration.baseOptions;
2248
+ }
2249
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2250
+ const localVarHeaderParameter = {};
2251
+ const localVarQueryParameter = {};
2252
+ // authentication BearerApiKey required
2253
+ // http bearer authentication required
2254
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2255
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2256
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2257
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2258
+ return {
2259
+ url: (0, common_1.toPathString)(localVarUrlObj),
2260
+ options: localVarRequestOptions,
2261
+ };
2262
+ }),
2263
+ /**
2264
+ * Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > <strong><a style=\"display: block; margin-top: 20px;\" href=\"/docs/sending-rewards-intro\">Check it out!</a></strong> ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">external_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference for this order, supplied by the customer.</p> <p>When set, <code>external_id</code> makes order idempotent. All requests that use the same <code>external_id</code> after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a <code>201</code> response code. These responses <strong>fail</strong> to create any further orders.</p> <p>It also allows for retrieving by <code>external_id</code> instead of <code>id</code> only.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">payment</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">funding_source_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the funding source that will be used to pay for the order. Use <code>balance</code> to use your Tremendous&#39;s balance.</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">reward</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>A single reward, sent to a recipient. A reward is always part of an order.</p> <p>Either <code>products</code> or <code>campaign_id</code> must be specified.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the reward</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the order this reward is part of.</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date-time</span></td><td><p>Date the reward was created</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">products</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.</p> <p>Providing a <code>products</code> array will override the products made available by the campaign specified using the <code>campaign_id</code> property unless the <code>products</code> array is empty. It will <em>not</em> override other campaign attributes, like the message and customization of the look and feel.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">denomination</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the reward</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency_code</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the reward</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">recipient</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details of the recipient of the reward</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Name of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">email</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Email address of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">phone</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">deliver_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">custom_fields</code> </div> </td><td><span class=\"property-type\">array</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show array item type</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the custom field</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Value of the custom field</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">language</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Set this to translate the redemption experience for this reward. Pass a 2-letter <a href=\"https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\">ISO-639-1 code</a> for the desired language. Defaults to <code>en</code>.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details on how the reward is delivered to the recipient.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>How to deliver the reward to the recipient.</p> <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be delivered to the recipient out-of-band.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://tremendous.readme.io/reference/core-funding-source-index). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://tremendous.readme.io/reference/sandbox). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it\'s recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same external_id are idempotent. Submitting an order with an already existing `external_id`, will result in a `201` response code. In this case the response will return a representation of the already existing order in the response body.
2265
+ * @summary Create order
2266
+ * @param {CreateOrderRequest} createOrderRequest Order to create
2267
+ * @param {*} [options] Override http request option.
2268
+ * @throws {RequiredError}
2269
+ */
2270
+ createOrder: (createOrderRequest_1, ...args_2) => __awaiter(this, [createOrderRequest_1, ...args_2], void 0, function* (createOrderRequest, options = {}) {
2271
+ // verify required parameter 'createOrderRequest' is not null or undefined
2272
+ (0, common_1.assertParamExists)('createOrder', 'createOrderRequest', createOrderRequest);
2273
+ const localVarPath = `/orders`;
2274
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2275
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2276
+ let baseOptions;
2277
+ if (configuration) {
2278
+ baseOptions = configuration.baseOptions;
2279
+ }
2280
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2281
+ const localVarHeaderParameter = {};
2282
+ const localVarQueryParameter = {};
2283
+ // authentication BearerApiKey required
2284
+ // http bearer authentication required
2285
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2286
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2287
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2288
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2289
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2290
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createOrderRequest, localVarRequestOptions, configuration);
2291
+ return {
2292
+ url: (0, common_1.toPathString)(localVarUrlObj),
2293
+ options: localVarRequestOptions,
2294
+ };
2295
+ }),
2296
+ /**
2297
+ * Retrieve the order, identified by the given `id` in the URL
2298
+ * @summary Retrieve order
2299
+ * @param {string} id ID of the order that should be retrieved. In case the order has an &#x60;external_id&#x60; reference supplied by the customer on creation, it\&#39;s possible to use it instead.
2300
+ * @param {*} [options] Override http request option.
2301
+ * @throws {RequiredError}
2302
+ */
2303
+ getOrder: (id_2, ...args_3) => __awaiter(this, [id_2, ...args_3], void 0, function* (id, options = {}) {
2304
+ // verify required parameter 'id' is not null or undefined
2305
+ (0, common_1.assertParamExists)('getOrder', 'id', id);
2306
+ const localVarPath = `/orders/{id}`
2307
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2308
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2309
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2310
+ let baseOptions;
2311
+ if (configuration) {
2312
+ baseOptions = configuration.baseOptions;
2313
+ }
2314
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2315
+ const localVarHeaderParameter = {};
2316
+ const localVarQueryParameter = {};
2317
+ // authentication BearerApiKey required
2318
+ // http bearer authentication required
2319
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2320
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2321
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2322
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2323
+ return {
2324
+ url: (0, common_1.toPathString)(localVarUrlObj),
2325
+ options: localVarRequestOptions,
2326
+ };
2327
+ }),
2328
+ /**
2329
+ * Retrieve a list of orders
2330
+ * @summary List orders
2331
+ * @param {number} [offset] Offsets the returned list by the given number of orders. The returned orders are ordered (and offsetted) by their creation date (DESC).
2332
+ * @param {string} [campaignId] Only return results with a matching campaign_id.
2333
+ * @param {string} [externalId] Only return results with a matching external_id.
2334
+ * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime.
2335
+ * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime.
2336
+ * @param {number} [limit] Limits the number of orders listed. The maximum value is 100 and the default is 10.
2337
+ * @param {*} [options] Override http request option.
2338
+ * @throws {RequiredError}
2339
+ */
2340
+ listOrders: (offset_1, campaignId_1, externalId_1, createdAtGte_1, createdAtLte_1, limit_1, ...args_4) => __awaiter(this, [offset_1, campaignId_1, externalId_1, createdAtGte_1, createdAtLte_1, limit_1, ...args_4], void 0, function* (offset, campaignId, externalId, createdAtGte, createdAtLte, limit, options = {}) {
2341
+ const localVarPath = `/orders`;
2342
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2343
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2344
+ let baseOptions;
2345
+ if (configuration) {
2346
+ baseOptions = configuration.baseOptions;
2347
+ }
2348
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2349
+ const localVarHeaderParameter = {};
2350
+ const localVarQueryParameter = {};
2351
+ // authentication BearerApiKey required
2352
+ // http bearer authentication required
2353
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2354
+ if (offset !== undefined) {
2355
+ localVarQueryParameter['offset'] = offset;
2356
+ }
2357
+ if (campaignId !== undefined) {
2358
+ localVarQueryParameter['campaign_id'] = campaignId;
2359
+ }
2360
+ if (externalId !== undefined) {
2361
+ localVarQueryParameter['external_id'] = externalId;
2362
+ }
2363
+ if (createdAtGte !== undefined) {
2364
+ localVarQueryParameter['created_at[gte]'] = createdAtGte;
2365
+ }
2366
+ if (createdAtLte !== undefined) {
2367
+ localVarQueryParameter['created_at[lte]'] = createdAtLte;
2368
+ }
2369
+ if (limit !== undefined) {
2370
+ localVarQueryParameter['limit'] = limit;
2371
+ }
2372
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2373
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2374
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2375
+ return {
2376
+ url: (0, common_1.toPathString)(localVarUrlObj),
2377
+ options: localVarRequestOptions,
2378
+ };
2379
+ }),
2380
+ /**
2381
+ * Rejects an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard.
2382
+ * @summary Reject order
2383
+ * @param {string} id ID of the order that should be rejected. In case the order has an &#x60;external_id&#x60; reference supplied by the customer on creation, it\&#39;s possible to use it instead.
2384
+ * @param {*} [options] Override http request option.
2385
+ * @throws {RequiredError}
2386
+ */
2387
+ rejectOrder: (id_3, ...args_5) => __awaiter(this, [id_3, ...args_5], void 0, function* (id, options = {}) {
2388
+ // verify required parameter 'id' is not null or undefined
2389
+ (0, common_1.assertParamExists)('rejectOrder', 'id', id);
2390
+ const localVarPath = `/order_approvals/{id}/reject`
2391
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2392
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2393
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2394
+ let baseOptions;
2395
+ if (configuration) {
2396
+ baseOptions = configuration.baseOptions;
2397
+ }
2398
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2399
+ const localVarHeaderParameter = {};
2400
+ const localVarQueryParameter = {};
2401
+ // authentication BearerApiKey required
2402
+ // http bearer authentication required
2403
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2404
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2405
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2406
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2407
+ return {
2408
+ url: (0, common_1.toPathString)(localVarUrlObj),
2409
+ options: localVarRequestOptions,
2410
+ };
2411
+ }),
2412
+ };
2413
+ };
2414
+ exports.OrdersApiAxiosParamCreator = OrdersApiAxiosParamCreator;
2415
+ /**
2416
+ * OrdersApi - functional programming interface
2417
+ * @export
2418
+ */
2419
+ const OrdersApiFp = function (configuration) {
2420
+ const localVarAxiosParamCreator = (0, exports.OrdersApiAxiosParamCreator)(configuration);
2421
+ return {
2422
+ /**
2423
+ * Approves an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard.
2424
+ * @summary Approve order
2425
+ * @param {string} id ID of the order that should be approved. In case the order has an &#x60;external_id&#x60; reference supplied by the customer on creation, it\&#39;s possible to use it instead.
2426
+ * @param {*} [options] Override http request option.
2427
+ * @throws {RequiredError}
2428
+ */
2429
+ approveOrder(id, options) {
2430
+ return __awaiter(this, void 0, void 0, function* () {
2431
+ var _a, _b, _c;
2432
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.approveOrder(id, options);
2433
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2434
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.approveOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2435
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2436
+ });
2437
+ },
2438
+ /**
2439
+ * Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > <strong><a style=\"display: block; margin-top: 20px;\" href=\"/docs/sending-rewards-intro\">Check it out!</a></strong> ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">external_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference for this order, supplied by the customer.</p> <p>When set, <code>external_id</code> makes order idempotent. All requests that use the same <code>external_id</code> after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a <code>201</code> response code. These responses <strong>fail</strong> to create any further orders.</p> <p>It also allows for retrieving by <code>external_id</code> instead of <code>id</code> only.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">payment</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">funding_source_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the funding source that will be used to pay for the order. Use <code>balance</code> to use your Tremendous&#39;s balance.</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">reward</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>A single reward, sent to a recipient. A reward is always part of an order.</p> <p>Either <code>products</code> or <code>campaign_id</code> must be specified.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the reward</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the order this reward is part of.</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date-time</span></td><td><p>Date the reward was created</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">products</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.</p> <p>Providing a <code>products</code> array will override the products made available by the campaign specified using the <code>campaign_id</code> property unless the <code>products</code> array is empty. It will <em>not</em> override other campaign attributes, like the message and customization of the look and feel.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">denomination</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the reward</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency_code</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the reward</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">recipient</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details of the recipient of the reward</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Name of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">email</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Email address of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">phone</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">deliver_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">custom_fields</code> </div> </td><td><span class=\"property-type\">array</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show array item type</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the custom field</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Value of the custom field</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">language</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Set this to translate the redemption experience for this reward. Pass a 2-letter <a href=\"https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\">ISO-639-1 code</a> for the desired language. Defaults to <code>en</code>.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details on how the reward is delivered to the recipient.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>How to deliver the reward to the recipient.</p> <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be delivered to the recipient out-of-band.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://tremendous.readme.io/reference/core-funding-source-index). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://tremendous.readme.io/reference/sandbox). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it\'s recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same external_id are idempotent. Submitting an order with an already existing `external_id`, will result in a `201` response code. In this case the response will return a representation of the already existing order in the response body.
2440
+ * @summary Create order
2441
+ * @param {CreateOrderRequest} createOrderRequest Order to create
2442
+ * @param {*} [options] Override http request option.
2443
+ * @throws {RequiredError}
2444
+ */
2445
+ createOrder(createOrderRequest, options) {
2446
+ return __awaiter(this, void 0, void 0, function* () {
2447
+ var _a, _b, _c;
2448
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createOrder(createOrderRequest, options);
2449
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2450
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.createOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2451
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2452
+ });
2453
+ },
2454
+ /**
2455
+ * Retrieve the order, identified by the given `id` in the URL
2456
+ * @summary Retrieve order
2457
+ * @param {string} id ID of the order that should be retrieved. In case the order has an &#x60;external_id&#x60; reference supplied by the customer on creation, it\&#39;s possible to use it instead.
2458
+ * @param {*} [options] Override http request option.
2459
+ * @throws {RequiredError}
2460
+ */
2461
+ getOrder(id, options) {
2462
+ return __awaiter(this, void 0, void 0, function* () {
2463
+ var _a, _b, _c;
2464
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrder(id, options);
2465
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2466
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.getOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2467
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2468
+ });
2469
+ },
2470
+ /**
2471
+ * Retrieve a list of orders
2472
+ * @summary List orders
2473
+ * @param {number} [offset] Offsets the returned list by the given number of orders. The returned orders are ordered (and offsetted) by their creation date (DESC).
2474
+ * @param {string} [campaignId] Only return results with a matching campaign_id.
2475
+ * @param {string} [externalId] Only return results with a matching external_id.
2476
+ * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime.
2477
+ * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime.
2478
+ * @param {number} [limit] Limits the number of orders listed. The maximum value is 100 and the default is 10.
2479
+ * @param {*} [options] Override http request option.
2480
+ * @throws {RequiredError}
2481
+ */
2482
+ listOrders(offset, campaignId, externalId, createdAtGte, createdAtLte, limit, options) {
2483
+ return __awaiter(this, void 0, void 0, function* () {
2484
+ var _a, _b, _c;
2485
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listOrders(offset, campaignId, externalId, createdAtGte, createdAtLte, limit, options);
2486
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2487
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.listOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2488
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2489
+ });
2490
+ },
2491
+ /**
2492
+ * Rejects an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard.
2493
+ * @summary Reject order
2494
+ * @param {string} id ID of the order that should be rejected. In case the order has an &#x60;external_id&#x60; reference supplied by the customer on creation, it\&#39;s possible to use it instead.
2495
+ * @param {*} [options] Override http request option.
2496
+ * @throws {RequiredError}
2497
+ */
2498
+ rejectOrder(id, options) {
2499
+ return __awaiter(this, void 0, void 0, function* () {
2500
+ var _a, _b, _c;
2501
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.rejectOrder(id, options);
2502
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2503
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.rejectOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2504
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2505
+ });
2506
+ },
2507
+ };
2508
+ };
2509
+ exports.OrdersApiFp = OrdersApiFp;
2510
+ /**
2511
+ * OrdersApi - factory interface
2512
+ * @export
2513
+ */
2514
+ const OrdersApiFactory = function (configuration, basePath, axios) {
2515
+ const localVarFp = (0, exports.OrdersApiFp)(configuration);
2516
+ return {
2517
+ /**
2518
+ * Approves an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard.
2519
+ * @summary Approve order
2520
+ * @param {string} id ID of the order that should be approved. In case the order has an &#x60;external_id&#x60; reference supplied by the customer on creation, it\&#39;s possible to use it instead.
2521
+ * @param {*} [options] Override http request option.
2522
+ * @throws {RequiredError}
2523
+ */
2524
+ approveOrder(id, options) {
2525
+ return localVarFp.approveOrder(id, options).then((request) => request(axios, basePath));
2526
+ },
2527
+ /**
2528
+ * Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > <strong><a style=\"display: block; margin-top: 20px;\" href=\"/docs/sending-rewards-intro\">Check it out!</a></strong> ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">external_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference for this order, supplied by the customer.</p> <p>When set, <code>external_id</code> makes order idempotent. All requests that use the same <code>external_id</code> after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a <code>201</code> response code. These responses <strong>fail</strong> to create any further orders.</p> <p>It also allows for retrieving by <code>external_id</code> instead of <code>id</code> only.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">payment</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">funding_source_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the funding source that will be used to pay for the order. Use <code>balance</code> to use your Tremendous&#39;s balance.</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">reward</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>A single reward, sent to a recipient. A reward is always part of an order.</p> <p>Either <code>products</code> or <code>campaign_id</code> must be specified.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the reward</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the order this reward is part of.</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date-time</span></td><td><p>Date the reward was created</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">products</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.</p> <p>Providing a <code>products</code> array will override the products made available by the campaign specified using the <code>campaign_id</code> property unless the <code>products</code> array is empty. It will <em>not</em> override other campaign attributes, like the message and customization of the look and feel.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">denomination</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the reward</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency_code</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the reward</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">recipient</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details of the recipient of the reward</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Name of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">email</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Email address of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">phone</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">deliver_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">custom_fields</code> </div> </td><td><span class=\"property-type\">array</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show array item type</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the custom field</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Value of the custom field</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">language</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Set this to translate the redemption experience for this reward. Pass a 2-letter <a href=\"https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\">ISO-639-1 code</a> for the desired language. Defaults to <code>en</code>.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details on how the reward is delivered to the recipient.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>How to deliver the reward to the recipient.</p> <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be delivered to the recipient out-of-band.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://tremendous.readme.io/reference/core-funding-source-index). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://tremendous.readme.io/reference/sandbox). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it\'s recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same external_id are idempotent. Submitting an order with an already existing `external_id`, will result in a `201` response code. In this case the response will return a representation of the already existing order in the response body.
2529
+ * @summary Create order
2530
+ * @param {CreateOrderRequest} createOrderRequest Order to create
2531
+ * @param {*} [options] Override http request option.
2532
+ * @throws {RequiredError}
2533
+ */
2534
+ createOrder(createOrderRequest, options) {
2535
+ return localVarFp.createOrder(createOrderRequest, options).then((request) => request(axios, basePath));
2536
+ },
2537
+ /**
2538
+ * Retrieve the order, identified by the given `id` in the URL
2539
+ * @summary Retrieve order
2540
+ * @param {string} id ID of the order that should be retrieved. In case the order has an &#x60;external_id&#x60; reference supplied by the customer on creation, it\&#39;s possible to use it instead.
2541
+ * @param {*} [options] Override http request option.
2542
+ * @throws {RequiredError}
2543
+ */
2544
+ getOrder(id, options) {
2545
+ return localVarFp.getOrder(id, options).then((request) => request(axios, basePath));
2546
+ },
2547
+ /**
2548
+ * Retrieve a list of orders
2549
+ * @summary List orders
2550
+ * @param {number} [offset] Offsets the returned list by the given number of orders. The returned orders are ordered (and offsetted) by their creation date (DESC).
2551
+ * @param {string} [campaignId] Only return results with a matching campaign_id.
2552
+ * @param {string} [externalId] Only return results with a matching external_id.
2553
+ * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime.
2554
+ * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime.
2555
+ * @param {number} [limit] Limits the number of orders listed. The maximum value is 100 and the default is 10.
2556
+ * @param {*} [options] Override http request option.
2557
+ * @throws {RequiredError}
2558
+ */
2559
+ listOrders(offset, campaignId, externalId, createdAtGte, createdAtLte, limit, options) {
2560
+ return localVarFp.listOrders(offset, campaignId, externalId, createdAtGte, createdAtLte, limit, options).then((request) => request(axios, basePath));
2561
+ },
2562
+ /**
2563
+ * Rejects an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard.
2564
+ * @summary Reject order
2565
+ * @param {string} id ID of the order that should be rejected. In case the order has an &#x60;external_id&#x60; reference supplied by the customer on creation, it\&#39;s possible to use it instead.
2566
+ * @param {*} [options] Override http request option.
2567
+ * @throws {RequiredError}
2568
+ */
2569
+ rejectOrder(id, options) {
2570
+ return localVarFp.rejectOrder(id, options).then((request) => request(axios, basePath));
2571
+ },
2572
+ };
2573
+ };
2574
+ exports.OrdersApiFactory = OrdersApiFactory;
2575
+ /**
2576
+ * OrdersApi - object-oriented interface
2577
+ * @export
2578
+ * @class OrdersApi
2579
+ * @extends {BaseAPI}
2580
+ */
2581
+ class OrdersApi extends base_1.BaseAPI {
2582
+ /**
2583
+ * Approves an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard.
2584
+ * @summary Approve order
2585
+ * @param {string} id ID of the order that should be approved. In case the order has an &#x60;external_id&#x60; reference supplied by the customer on creation, it\&#39;s possible to use it instead.
2586
+ * @param {*} [options] Override http request option.
2587
+ * @throws {RequiredError}
2588
+ * @memberof OrdersApi
2589
+ */
2590
+ approveOrder(id, options) {
2591
+ return (0, exports.OrdersApiFp)(this.configuration).approveOrder(id, options).then((request) => request(this.axios, this.basePath));
2592
+ }
2593
+ /**
2594
+ * Every time you want to send out a reward through Tremendous you need to create an order for it. > 📘 Getting started with your first order > > Our step-by-step guide walks you through everything you need > to send your first gift card through the Tremendous API: > > <strong><a style=\"display: block; margin-top: 20px;\" href=\"/docs/sending-rewards-intro\">Check it out!</a></strong> ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">external_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Reference for this order, supplied by the customer.</p> <p>When set, <code>external_id</code> makes order idempotent. All requests that use the same <code>external_id</code> after the initial order creation, will result in a response that returns the data of the initially created order. The response will have a <code>201</code> response code. These responses <strong>fail</strong> to create any further orders.</p> <p>It also allows for retrieving by <code>external_id</code> instead of <code>id</code> only.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">payment</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">funding_source_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the funding source that will be used to pay for the order. Use <code>balance</code> to use your Tremendous&#39;s balance.</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">reward</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>A single reward, sent to a recipient. A reward is always part of an order.</p> <p>Either <code>products</code> or <code>campaign_id</code> must be specified.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the reward</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">order_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the order this reward is part of.</p> </td></tr> <tr class=\"property-conditional-hint-response-only\"><td><div class=\"property-name\"> <code class=\"property-name\">created_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date-time</span></td><td><p>Date the reward was created</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">campaign_id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>ID of the campaign in your account, that defines the available products (different gift cards, charity, etc.) that the recipient can choose from.</p> </td></tr> <tr class=\"property-conditional-hint-request-only\"><td><div class=\"property-name\"> <code class=\"property-name\">products</code> </div> </td><td><span class=\"property-type\">array</span> <span class=\"property-format\">string</span></td><td><p>List of IDs of product (different gift cards, charity, etc.) that will be available to the recipient to choose from.</p> <p>Providing a <code>products</code> array will override the products made available by the campaign specified using the <code>campaign_id</code> property unless the <code>products</code> array is empty. It will <em>not</em> override other campaign attributes, like the message and customization of the look and feel.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">object</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">denomination</code> </div> </td><td><span class=\"property-type\">number</span> <span class=\"property-format\">double</span></td><td><p>Amount of the reward</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">currency_code</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Currency of the reward</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">recipient</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details of the recipient of the reward</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">name</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Name of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">email</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Email address of the recipient</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">phone</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Phone number of the recipient. For non-US phone numbers, specify the country code (prefixed with +).</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">deliver_at</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">date</span></td><td><p>Timestamp of reward delivery within the next year. Note that if date-time is provided, the time values will be ignored.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">custom_fields</code> </div> </td><td><span class=\"property-type\">array</span></td><td></td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show array item type</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">id</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Tremendous ID of the custom field</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">value</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Value of the custom field</p> </td></tr> </tbody> </table> </tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">language</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>Set this to translate the redemption experience for this reward. Pass a 2-letter <a href=\"https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\">ISO-639-1 code</a> for the desired language. Defaults to <code>en</code>.</p> </td></tr> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">delivery</code> </div> </td><td><span class=\"property-type\">object</span></td><td><p>Details on how the reward is delivered to the recipient.</p> </td></tr> <tr> <td colspan=\"3\"> <details> <summary>Show object properties</summary> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">method</code> </div> </td><td><span class=\"property-type\">string</span></td><td><p>How to deliver the reward to the recipient.</p> <table> <thead> <tr> <th>Delivery Method</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>EMAIL</code></td> <td>Deliver the reward to the recipient by email</td> </tr> <tr> <td><code>LINK</code></td> <td> <p>Deliver the reward to the recipient via a link.</p> <p>The link can be retrieved on a successfully ordered reward via the <code>/rewards</code> or <code>/rewards/{id}</code> endpoint. That link must then be delivered to the recipient out-of-band.</p> </td> </tr> <tr> <td><code>PHONE</code></td> <td>Deliver the reward to the recipient by SMS</td> </tr> </tbody> </table> </td></tr> </tbody> </table> </tr> </tbody> </table> </tr> </tbody> </table> </div> ### Funding sources There are different ways to pay for gift cards and rewards on Tremendous. Every payment mechanism is called a \"funding source\". You can retrieve a list of all available funding sources by using the [Funding sources API endpoint](https://tremendous.readme.io/reference/core-funding-source-index). The Tremendous API sandbox environment comes with a single funding source that allows you to spend up to $5,000 in *fake money* to test the API. [Learn more about the sandbox environment](https://tremendous.readme.io/reference/sandbox). The HTTP status code `200` on the response will be used to indicate success. After processing successfully the reward gets queued to be delivered to it\'s recipient (for delivery method `EMAIL` and `PHONE`). Delivery will happen asynchronously, after the response has been sent. ### Idempotence Requests issued with the same external_id are idempotent. Submitting an order with an already existing `external_id`, will result in a `201` response code. In this case the response will return a representation of the already existing order in the response body.
2595
+ * @summary Create order
2596
+ * @param {CreateOrderRequest} createOrderRequest Order to create
2597
+ * @param {*} [options] Override http request option.
2598
+ * @throws {RequiredError}
2599
+ * @memberof OrdersApi
2600
+ */
2601
+ createOrder(createOrderRequest, options) {
2602
+ return (0, exports.OrdersApiFp)(this.configuration).createOrder(createOrderRequest, options).then((request) => request(this.axios, this.basePath));
2603
+ }
2604
+ /**
2605
+ * Retrieve the order, identified by the given `id` in the URL
2606
+ * @summary Retrieve order
2607
+ * @param {string} id ID of the order that should be retrieved. In case the order has an &#x60;external_id&#x60; reference supplied by the customer on creation, it\&#39;s possible to use it instead.
2608
+ * @param {*} [options] Override http request option.
2609
+ * @throws {RequiredError}
2610
+ * @memberof OrdersApi
2611
+ */
2612
+ getOrder(id, options) {
2613
+ return (0, exports.OrdersApiFp)(this.configuration).getOrder(id, options).then((request) => request(this.axios, this.basePath));
2614
+ }
2615
+ /**
2616
+ * Retrieve a list of orders
2617
+ * @summary List orders
2618
+ * @param {number} [offset] Offsets the returned list by the given number of orders. The returned orders are ordered (and offsetted) by their creation date (DESC).
2619
+ * @param {string} [campaignId] Only return results with a matching campaign_id.
2620
+ * @param {string} [externalId] Only return results with a matching external_id.
2621
+ * @param {string} [createdAtGte] Only return results where the created_at field is greater than or equal to the supplied value. The string needs to be an ISO 8601 datetime.
2622
+ * @param {string} [createdAtLte] Only return results where the created_at field is less than or equal to the supplied value. The string needs to be an ISO 8601 datetime.
2623
+ * @param {number} [limit] Limits the number of orders listed. The maximum value is 100 and the default is 10.
2624
+ * @param {*} [options] Override http request option.
2625
+ * @throws {RequiredError}
2626
+ * @memberof OrdersApi
2627
+ */
2628
+ listOrders(offset, campaignId, externalId, createdAtGte, createdAtLte, limit, options) {
2629
+ return (0, exports.OrdersApiFp)(this.configuration).listOrders(offset, campaignId, externalId, createdAtGte, createdAtLte, limit, options).then((request) => request(this.axios, this.basePath));
2630
+ }
2631
+ /**
2632
+ * Rejects an order that is pending review, identified by the given `id` in the URL. Approvals is a feature that requires orders to be approved by an organization admin before they are sent out. To enable approvals for your organization, please enable \'Allow approvals via API\' via the organization\'\'s \'Order Approvals\' settings from the Tremendous dashboard.
2633
+ * @summary Reject order
2634
+ * @param {string} id ID of the order that should be rejected. In case the order has an &#x60;external_id&#x60; reference supplied by the customer on creation, it\&#39;s possible to use it instead.
2635
+ * @param {*} [options] Override http request option.
2636
+ * @throws {RequiredError}
2637
+ * @memberof OrdersApi
2638
+ */
2639
+ rejectOrder(id, options) {
2640
+ return (0, exports.OrdersApiFp)(this.configuration).rejectOrder(id, options).then((request) => request(this.axios, this.basePath));
2641
+ }
2642
+ }
2643
+ exports.OrdersApi = OrdersApi;
2644
+ /**
2645
+ * OrganizationsApi - axios parameter creator
2646
+ * @export
2647
+ */
2648
+ const OrganizationsApiAxiosParamCreator = function (configuration) {
2649
+ return {
2650
+ /**
2651
+ * Creates a new API key. The API key used to make the request will remain active. Created API keys are generated randomly and returned in the response. **You cannot retrieve them again.**
2652
+ * @summary Create API key
2653
+ * @param {*} [options] Override http request option.
2654
+ * @throws {RequiredError}
2655
+ */
2656
+ createApiKey: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
2657
+ const localVarPath = `/organizations/create_api_key`;
2658
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2659
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2660
+ let baseOptions;
2661
+ if (configuration) {
2662
+ baseOptions = configuration.baseOptions;
2663
+ }
2664
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2665
+ const localVarHeaderParameter = {};
2666
+ const localVarQueryParameter = {};
2667
+ // authentication BearerApiKey required
2668
+ // http bearer authentication required
2669
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2670
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2671
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2672
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2673
+ return {
2674
+ url: (0, common_1.toPathString)(localVarUrlObj),
2675
+ options: localVarRequestOptions,
2676
+ };
2677
+ }),
2678
+ /**
2679
+ * Organizations are a way to separate different parts of your business within the same Tremendous account. You can assign users in your Tremendous team as members to any organization. Users can be members of multiple organizations at once. API keys belong to a single organization. The API key used in a request determines on behalf of which organization the request is carried out. **Important note:** When creating an organization, you are required to either pass `with_api_key` or `copy_settings[user]` in the request body as `true`. This ensures that your new Organization can either be accessed via the API or the Dashboard.
2680
+ * @summary Create organization
2681
+ * @param {CreateOrganizationRequest} createOrganizationRequest Organization details
2682
+ * @param {*} [options] Override http request option.
2683
+ * @throws {RequiredError}
2684
+ */
2685
+ createOrganization: (createOrganizationRequest_1, ...args_2) => __awaiter(this, [createOrganizationRequest_1, ...args_2], void 0, function* (createOrganizationRequest, options = {}) {
2686
+ // verify required parameter 'createOrganizationRequest' is not null or undefined
2687
+ (0, common_1.assertParamExists)('createOrganization', 'createOrganizationRequest', createOrganizationRequest);
2688
+ const localVarPath = `/organizations`;
2689
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2690
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2691
+ let baseOptions;
2692
+ if (configuration) {
2693
+ baseOptions = configuration.baseOptions;
2694
+ }
2695
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2696
+ const localVarHeaderParameter = {};
2697
+ const localVarQueryParameter = {};
2698
+ // authentication BearerApiKey required
2699
+ // http bearer authentication required
2700
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2701
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2702
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2703
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2704
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2705
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createOrganizationRequest, localVarRequestOptions, configuration);
2706
+ return {
2707
+ url: (0, common_1.toPathString)(localVarUrlObj),
2708
+ options: localVarRequestOptions,
2709
+ };
2710
+ }),
2711
+ /**
2712
+ *
2713
+ * @summary Retrieve organization
2714
+ * @param {string} id ID of the organization to retrieve
2715
+ * @param {*} [options] Override http request option.
2716
+ * @throws {RequiredError}
2717
+ */
2718
+ getOrganization: (id_1, ...args_3) => __awaiter(this, [id_1, ...args_3], void 0, function* (id, options = {}) {
2719
+ // verify required parameter 'id' is not null or undefined
2720
+ (0, common_1.assertParamExists)('getOrganization', 'id', id);
2721
+ const localVarPath = `/organizations/{id}`
2722
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2723
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2724
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2725
+ let baseOptions;
2726
+ if (configuration) {
2727
+ baseOptions = configuration.baseOptions;
2728
+ }
2729
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2730
+ const localVarHeaderParameter = {};
2731
+ const localVarQueryParameter = {};
2732
+ // authentication BearerApiKey required
2733
+ // http bearer authentication required
2734
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2735
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2736
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2737
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2738
+ return {
2739
+ url: (0, common_1.toPathString)(localVarUrlObj),
2740
+ options: localVarRequestOptions,
2741
+ };
2742
+ }),
2743
+ /**
2744
+ * The returned list only includes the organization to which the API key belongs to, that is used for the request.
2745
+ * @summary List organizations
2746
+ * @param {*} [options] Override http request option.
2747
+ * @throws {RequiredError}
2748
+ */
2749
+ listOrganizations: (...args_4) => __awaiter(this, [...args_4], void 0, function* (options = {}) {
2750
+ const localVarPath = `/organizations`;
2751
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2752
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2753
+ let baseOptions;
2754
+ if (configuration) {
2755
+ baseOptions = configuration.baseOptions;
2756
+ }
2757
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2758
+ const localVarHeaderParameter = {};
2759
+ const localVarQueryParameter = {};
2760
+ // authentication BearerApiKey required
2761
+ // http bearer authentication required
2762
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2763
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2764
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2765
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2766
+ return {
2767
+ url: (0, common_1.toPathString)(localVarUrlObj),
2768
+ options: localVarRequestOptions,
2769
+ };
2770
+ }),
2771
+ };
2772
+ };
2773
+ exports.OrganizationsApiAxiosParamCreator = OrganizationsApiAxiosParamCreator;
2774
+ /**
2775
+ * OrganizationsApi - functional programming interface
2776
+ * @export
2777
+ */
2778
+ const OrganizationsApiFp = function (configuration) {
2779
+ const localVarAxiosParamCreator = (0, exports.OrganizationsApiAxiosParamCreator)(configuration);
2780
+ return {
2781
+ /**
2782
+ * Creates a new API key. The API key used to make the request will remain active. Created API keys are generated randomly and returned in the response. **You cannot retrieve them again.**
2783
+ * @summary Create API key
2784
+ * @param {*} [options] Override http request option.
2785
+ * @throws {RequiredError}
2786
+ */
2787
+ createApiKey(options) {
2788
+ return __awaiter(this, void 0, void 0, function* () {
2789
+ var _a, _b, _c;
2790
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createApiKey(options);
2791
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2792
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrganizationsApi.createApiKey']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2793
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2794
+ });
2795
+ },
2796
+ /**
2797
+ * Organizations are a way to separate different parts of your business within the same Tremendous account. You can assign users in your Tremendous team as members to any organization. Users can be members of multiple organizations at once. API keys belong to a single organization. The API key used in a request determines on behalf of which organization the request is carried out. **Important note:** When creating an organization, you are required to either pass `with_api_key` or `copy_settings[user]` in the request body as `true`. This ensures that your new Organization can either be accessed via the API or the Dashboard.
2798
+ * @summary Create organization
2799
+ * @param {CreateOrganizationRequest} createOrganizationRequest Organization details
2800
+ * @param {*} [options] Override http request option.
2801
+ * @throws {RequiredError}
2802
+ */
2803
+ createOrganization(createOrganizationRequest, options) {
2804
+ return __awaiter(this, void 0, void 0, function* () {
2805
+ var _a, _b, _c;
2806
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createOrganization(createOrganizationRequest, options);
2807
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2808
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrganizationsApi.createOrganization']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2809
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2810
+ });
2811
+ },
2812
+ /**
2813
+ *
2814
+ * @summary Retrieve organization
2815
+ * @param {string} id ID of the organization to retrieve
2816
+ * @param {*} [options] Override http request option.
2817
+ * @throws {RequiredError}
2818
+ */
2819
+ getOrganization(id, options) {
2820
+ return __awaiter(this, void 0, void 0, function* () {
2821
+ var _a, _b, _c;
2822
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrganization(id, options);
2823
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2824
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrganizationsApi.getOrganization']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2825
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2826
+ });
2827
+ },
2828
+ /**
2829
+ * The returned list only includes the organization to which the API key belongs to, that is used for the request.
2830
+ * @summary List organizations
2831
+ * @param {*} [options] Override http request option.
2832
+ * @throws {RequiredError}
2833
+ */
2834
+ listOrganizations(options) {
2835
+ return __awaiter(this, void 0, void 0, function* () {
2836
+ var _a, _b, _c;
2837
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listOrganizations(options);
2838
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2839
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrganizationsApi.listOrganizations']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2840
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2841
+ });
2842
+ },
2843
+ };
2844
+ };
2845
+ exports.OrganizationsApiFp = OrganizationsApiFp;
2846
+ /**
2847
+ * OrganizationsApi - factory interface
2848
+ * @export
2849
+ */
2850
+ const OrganizationsApiFactory = function (configuration, basePath, axios) {
2851
+ const localVarFp = (0, exports.OrganizationsApiFp)(configuration);
2852
+ return {
2853
+ /**
2854
+ * Creates a new API key. The API key used to make the request will remain active. Created API keys are generated randomly and returned in the response. **You cannot retrieve them again.**
2855
+ * @summary Create API key
2856
+ * @param {*} [options] Override http request option.
2857
+ * @throws {RequiredError}
2858
+ */
2859
+ createApiKey(options) {
2860
+ return localVarFp.createApiKey(options).then((request) => request(axios, basePath));
2861
+ },
2862
+ /**
2863
+ * Organizations are a way to separate different parts of your business within the same Tremendous account. You can assign users in your Tremendous team as members to any organization. Users can be members of multiple organizations at once. API keys belong to a single organization. The API key used in a request determines on behalf of which organization the request is carried out. **Important note:** When creating an organization, you are required to either pass `with_api_key` or `copy_settings[user]` in the request body as `true`. This ensures that your new Organization can either be accessed via the API or the Dashboard.
2864
+ * @summary Create organization
2865
+ * @param {CreateOrganizationRequest} createOrganizationRequest Organization details
2866
+ * @param {*} [options] Override http request option.
2867
+ * @throws {RequiredError}
2868
+ */
2869
+ createOrganization(createOrganizationRequest, options) {
2870
+ return localVarFp.createOrganization(createOrganizationRequest, options).then((request) => request(axios, basePath));
2871
+ },
2872
+ /**
2873
+ *
2874
+ * @summary Retrieve organization
2875
+ * @param {string} id ID of the organization to retrieve
2876
+ * @param {*} [options] Override http request option.
2877
+ * @throws {RequiredError}
2878
+ */
2879
+ getOrganization(id, options) {
2880
+ return localVarFp.getOrganization(id, options).then((request) => request(axios, basePath));
2881
+ },
2882
+ /**
2883
+ * The returned list only includes the organization to which the API key belongs to, that is used for the request.
2884
+ * @summary List organizations
2885
+ * @param {*} [options] Override http request option.
2886
+ * @throws {RequiredError}
2887
+ */
2888
+ listOrganizations(options) {
2889
+ return localVarFp.listOrganizations(options).then((request) => request(axios, basePath));
2890
+ },
2891
+ };
2892
+ };
2893
+ exports.OrganizationsApiFactory = OrganizationsApiFactory;
2894
+ /**
2895
+ * OrganizationsApi - object-oriented interface
2896
+ * @export
2897
+ * @class OrganizationsApi
2898
+ * @extends {BaseAPI}
2899
+ */
2900
+ class OrganizationsApi extends base_1.BaseAPI {
2901
+ /**
2902
+ * Creates a new API key. The API key used to make the request will remain active. Created API keys are generated randomly and returned in the response. **You cannot retrieve them again.**
2903
+ * @summary Create API key
2904
+ * @param {*} [options] Override http request option.
2905
+ * @throws {RequiredError}
2906
+ * @memberof OrganizationsApi
2907
+ */
2908
+ createApiKey(options) {
2909
+ return (0, exports.OrganizationsApiFp)(this.configuration).createApiKey(options).then((request) => request(this.axios, this.basePath));
2910
+ }
2911
+ /**
2912
+ * Organizations are a way to separate different parts of your business within the same Tremendous account. You can assign users in your Tremendous team as members to any organization. Users can be members of multiple organizations at once. API keys belong to a single organization. The API key used in a request determines on behalf of which organization the request is carried out. **Important note:** When creating an organization, you are required to either pass `with_api_key` or `copy_settings[user]` in the request body as `true`. This ensures that your new Organization can either be accessed via the API or the Dashboard.
2913
+ * @summary Create organization
2914
+ * @param {CreateOrganizationRequest} createOrganizationRequest Organization details
2915
+ * @param {*} [options] Override http request option.
2916
+ * @throws {RequiredError}
2917
+ * @memberof OrganizationsApi
2918
+ */
2919
+ createOrganization(createOrganizationRequest, options) {
2920
+ return (0, exports.OrganizationsApiFp)(this.configuration).createOrganization(createOrganizationRequest, options).then((request) => request(this.axios, this.basePath));
2921
+ }
2922
+ /**
2923
+ *
2924
+ * @summary Retrieve organization
2925
+ * @param {string} id ID of the organization to retrieve
2926
+ * @param {*} [options] Override http request option.
2927
+ * @throws {RequiredError}
2928
+ * @memberof OrganizationsApi
2929
+ */
2930
+ getOrganization(id, options) {
2931
+ return (0, exports.OrganizationsApiFp)(this.configuration).getOrganization(id, options).then((request) => request(this.axios, this.basePath));
2932
+ }
2933
+ /**
2934
+ * The returned list only includes the organization to which the API key belongs to, that is used for the request.
2935
+ * @summary List organizations
2936
+ * @param {*} [options] Override http request option.
2937
+ * @throws {RequiredError}
2938
+ * @memberof OrganizationsApi
2939
+ */
2940
+ listOrganizations(options) {
2941
+ return (0, exports.OrganizationsApiFp)(this.configuration).listOrganizations(options).then((request) => request(this.axios, this.basePath));
2942
+ }
2943
+ }
2944
+ exports.OrganizationsApi = OrganizationsApi;
2945
+ /**
2946
+ * ProductsApi - axios parameter creator
2947
+ * @export
2948
+ */
2949
+ const ProductsApiAxiosParamCreator = function (configuration) {
2950
+ return {
2951
+ /**
2952
+ * Retrieve a product, identified by the given `id` in the URL
2953
+ * @summary Retrieve product
2954
+ * @param {string} id ID of the product that should be retrieved
2955
+ * @param {*} [options] Override http request option.
2956
+ * @throws {RequiredError}
2957
+ */
2958
+ getProduct: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
2959
+ // verify required parameter 'id' is not null or undefined
2960
+ (0, common_1.assertParamExists)('getProduct', 'id', id);
2961
+ const localVarPath = `/products/{id}`
2962
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
2963
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2964
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2965
+ let baseOptions;
2966
+ if (configuration) {
2967
+ baseOptions = configuration.baseOptions;
2968
+ }
2969
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2970
+ const localVarHeaderParameter = {};
2971
+ const localVarQueryParameter = {};
2972
+ // authentication BearerApiKey required
2973
+ // http bearer authentication required
2974
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2975
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2976
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2977
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2978
+ return {
2979
+ url: (0, common_1.toPathString)(localVarUrlObj),
2980
+ options: localVarRequestOptions,
2981
+ };
2982
+ }),
2983
+ /**
2984
+ * Retrieve a list of available products
2985
+ * @summary List products
2986
+ * @param {string} [country] Comma-separated list of [Alpha-2 country codes](https://www.iban.com/country-codes), used to only retrieve products available in the provided countries
2987
+ * @param {string} [currency] Comma-separated list of [currency codes](https://www.iban.com/currency-codes), used to only retrieve products available in the provided currencies
2988
+ * @param {*} [options] Override http request option.
2989
+ * @throws {RequiredError}
2990
+ */
2991
+ listProducts: (country_1, currency_1, ...args_2) => __awaiter(this, [country_1, currency_1, ...args_2], void 0, function* (country, currency, options = {}) {
2992
+ const localVarPath = `/products`;
2993
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2994
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2995
+ let baseOptions;
2996
+ if (configuration) {
2997
+ baseOptions = configuration.baseOptions;
2998
+ }
2999
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3000
+ const localVarHeaderParameter = {};
3001
+ const localVarQueryParameter = {};
3002
+ // authentication BearerApiKey required
3003
+ // http bearer authentication required
3004
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3005
+ if (country !== undefined) {
3006
+ localVarQueryParameter['country'] = country;
3007
+ }
3008
+ if (currency !== undefined) {
3009
+ localVarQueryParameter['currency'] = currency;
3010
+ }
3011
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3012
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3013
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3014
+ return {
3015
+ url: (0, common_1.toPathString)(localVarUrlObj),
3016
+ options: localVarRequestOptions,
3017
+ };
3018
+ }),
3019
+ };
3020
+ };
3021
+ exports.ProductsApiAxiosParamCreator = ProductsApiAxiosParamCreator;
3022
+ /**
3023
+ * ProductsApi - functional programming interface
3024
+ * @export
3025
+ */
3026
+ const ProductsApiFp = function (configuration) {
3027
+ const localVarAxiosParamCreator = (0, exports.ProductsApiAxiosParamCreator)(configuration);
3028
+ return {
3029
+ /**
3030
+ * Retrieve a product, identified by the given `id` in the URL
3031
+ * @summary Retrieve product
3032
+ * @param {string} id ID of the product that should be retrieved
3033
+ * @param {*} [options] Override http request option.
3034
+ * @throws {RequiredError}
3035
+ */
3036
+ getProduct(id, options) {
3037
+ return __awaiter(this, void 0, void 0, function* () {
3038
+ var _a, _b, _c;
3039
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getProduct(id, options);
3040
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3041
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ProductsApi.getProduct']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3042
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3043
+ });
3044
+ },
3045
+ /**
3046
+ * Retrieve a list of available products
3047
+ * @summary List products
3048
+ * @param {string} [country] Comma-separated list of [Alpha-2 country codes](https://www.iban.com/country-codes), used to only retrieve products available in the provided countries
3049
+ * @param {string} [currency] Comma-separated list of [currency codes](https://www.iban.com/currency-codes), used to only retrieve products available in the provided currencies
3050
+ * @param {*} [options] Override http request option.
3051
+ * @throws {RequiredError}
3052
+ */
3053
+ listProducts(country, currency, options) {
3054
+ return __awaiter(this, void 0, void 0, function* () {
3055
+ var _a, _b, _c;
3056
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listProducts(country, currency, options);
3057
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3058
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ProductsApi.listProducts']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3059
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3060
+ });
3061
+ },
3062
+ };
3063
+ };
3064
+ exports.ProductsApiFp = ProductsApiFp;
3065
+ /**
3066
+ * ProductsApi - factory interface
3067
+ * @export
3068
+ */
3069
+ const ProductsApiFactory = function (configuration, basePath, axios) {
3070
+ const localVarFp = (0, exports.ProductsApiFp)(configuration);
3071
+ return {
3072
+ /**
3073
+ * Retrieve a product, identified by the given `id` in the URL
3074
+ * @summary Retrieve product
3075
+ * @param {string} id ID of the product that should be retrieved
3076
+ * @param {*} [options] Override http request option.
3077
+ * @throws {RequiredError}
3078
+ */
3079
+ getProduct(id, options) {
3080
+ return localVarFp.getProduct(id, options).then((request) => request(axios, basePath));
3081
+ },
3082
+ /**
3083
+ * Retrieve a list of available products
3084
+ * @summary List products
3085
+ * @param {string} [country] Comma-separated list of [Alpha-2 country codes](https://www.iban.com/country-codes), used to only retrieve products available in the provided countries
3086
+ * @param {string} [currency] Comma-separated list of [currency codes](https://www.iban.com/currency-codes), used to only retrieve products available in the provided currencies
3087
+ * @param {*} [options] Override http request option.
3088
+ * @throws {RequiredError}
3089
+ */
3090
+ listProducts(country, currency, options) {
3091
+ return localVarFp.listProducts(country, currency, options).then((request) => request(axios, basePath));
3092
+ },
3093
+ };
3094
+ };
3095
+ exports.ProductsApiFactory = ProductsApiFactory;
3096
+ /**
3097
+ * ProductsApi - object-oriented interface
3098
+ * @export
3099
+ * @class ProductsApi
3100
+ * @extends {BaseAPI}
3101
+ */
3102
+ class ProductsApi extends base_1.BaseAPI {
3103
+ /**
3104
+ * Retrieve a product, identified by the given `id` in the URL
3105
+ * @summary Retrieve product
3106
+ * @param {string} id ID of the product that should be retrieved
3107
+ * @param {*} [options] Override http request option.
3108
+ * @throws {RequiredError}
3109
+ * @memberof ProductsApi
3110
+ */
3111
+ getProduct(id, options) {
3112
+ return (0, exports.ProductsApiFp)(this.configuration).getProduct(id, options).then((request) => request(this.axios, this.basePath));
3113
+ }
3114
+ /**
3115
+ * Retrieve a list of available products
3116
+ * @summary List products
3117
+ * @param {string} [country] Comma-separated list of [Alpha-2 country codes](https://www.iban.com/country-codes), used to only retrieve products available in the provided countries
3118
+ * @param {string} [currency] Comma-separated list of [currency codes](https://www.iban.com/currency-codes), used to only retrieve products available in the provided currencies
3119
+ * @param {*} [options] Override http request option.
3120
+ * @throws {RequiredError}
3121
+ * @memberof ProductsApi
3122
+ */
3123
+ listProducts(country, currency, options) {
3124
+ return (0, exports.ProductsApiFp)(this.configuration).listProducts(country, currency, options).then((request) => request(this.axios, this.basePath));
3125
+ }
3126
+ }
3127
+ exports.ProductsApi = ProductsApi;
3128
+ /**
3129
+ * RewardsApi - axios parameter creator
3130
+ * @export
3131
+ */
3132
+ const RewardsApiAxiosParamCreator = function (configuration) {
3133
+ return {
3134
+ /**
3135
+ * Generate a redemption link for the reward identified by the `id` in the URL
3136
+ * @summary Generate a reward URL
3137
+ * @param {string} id ID of the reward
3138
+ * @param {*} [options] Override http request option.
3139
+ * @throws {RequiredError}
3140
+ */
3141
+ generateRewardLink: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
3142
+ // verify required parameter 'id' is not null or undefined
3143
+ (0, common_1.assertParamExists)('generateRewardLink', 'id', id);
3144
+ const localVarPath = `/rewards/{id}/generate_link`
3145
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3146
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3147
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3148
+ let baseOptions;
3149
+ if (configuration) {
3150
+ baseOptions = configuration.baseOptions;
3151
+ }
3152
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3153
+ const localVarHeaderParameter = {};
3154
+ const localVarQueryParameter = {};
3155
+ // authentication BearerApiKey required
3156
+ // http bearer authentication required
3157
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3158
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3159
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3160
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3161
+ return {
3162
+ url: (0, common_1.toPathString)(localVarUrlObj),
3163
+ options: localVarRequestOptions,
3164
+ };
3165
+ }),
3166
+ /**
3167
+ * Generate a temporary reward token identified by the `id` in the URL. These tokens are needed to render a reward when using [Tremendous Embed](https://github.com/tremendous-rewards/embed/blob/master/docs/documentation.md). The token is valid for 24 hours.
3168
+ * @summary Generate a reward token
3169
+ * @param {string} id ID of the reward
3170
+ * @param {*} [options] Override http request option.
3171
+ * @throws {RequiredError}
3172
+ */
3173
+ generateRewardToken: (id_2, ...args_2) => __awaiter(this, [id_2, ...args_2], void 0, function* (id, options = {}) {
3174
+ // verify required parameter 'id' is not null or undefined
3175
+ (0, common_1.assertParamExists)('generateRewardToken', 'id', id);
3176
+ const localVarPath = `/rewards/{id}/generate_embed_token`
3177
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3178
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3179
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3180
+ let baseOptions;
3181
+ if (configuration) {
3182
+ baseOptions = configuration.baseOptions;
3183
+ }
3184
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3185
+ const localVarHeaderParameter = {};
3186
+ const localVarQueryParameter = {};
3187
+ // authentication BearerApiKey required
3188
+ // http bearer authentication required
3189
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3190
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3191
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3192
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3193
+ return {
3194
+ url: (0, common_1.toPathString)(localVarUrlObj),
3195
+ options: localVarRequestOptions,
3196
+ };
3197
+ }),
3198
+ /**
3199
+ * Retrieve the reward, identified by the given `id` in the URL
3200
+ * @summary Retrieve single reward
3201
+ * @param {string} id ID of the reward that should be retrieved
3202
+ * @param {*} [options] Override http request option.
3203
+ * @throws {RequiredError}
3204
+ */
3205
+ getReward: (id_3, ...args_3) => __awaiter(this, [id_3, ...args_3], void 0, function* (id, options = {}) {
3206
+ // verify required parameter 'id' is not null or undefined
3207
+ (0, common_1.assertParamExists)('getReward', 'id', id);
3208
+ const localVarPath = `/rewards/{id}`
3209
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3210
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3211
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3212
+ let baseOptions;
3213
+ if (configuration) {
3214
+ baseOptions = configuration.baseOptions;
3215
+ }
3216
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3217
+ const localVarHeaderParameter = {};
3218
+ const localVarQueryParameter = {};
3219
+ // authentication BearerApiKey required
3220
+ // http bearer authentication required
3221
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3222
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3223
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3224
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3225
+ return {
3226
+ url: (0, common_1.toPathString)(localVarUrlObj),
3227
+ options: localVarRequestOptions,
3228
+ };
3229
+ }),
3230
+ /**
3231
+ * Retrieve a list of all created rewards
3232
+ * @summary List rewards
3233
+ * @param {number} [offset] Offsets the returned list by the given number of rewards. The returned rewards are ordered (and offsetted) by their creation date (DESC).
3234
+ * @param {*} [options] Override http request option.
3235
+ * @throws {RequiredError}
3236
+ */
3237
+ listRewards: (offset_1, ...args_4) => __awaiter(this, [offset_1, ...args_4], void 0, function* (offset, options = {}) {
3238
+ const localVarPath = `/rewards`;
3239
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3240
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3241
+ let baseOptions;
3242
+ if (configuration) {
3243
+ baseOptions = configuration.baseOptions;
3244
+ }
3245
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3246
+ const localVarHeaderParameter = {};
3247
+ const localVarQueryParameter = {};
3248
+ // authentication BearerApiKey required
3249
+ // http bearer authentication required
3250
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3251
+ if (offset !== undefined) {
3252
+ localVarQueryParameter['offset'] = offset;
3253
+ }
3254
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3255
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3256
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3257
+ return {
3258
+ url: (0, common_1.toPathString)(localVarUrlObj),
3259
+ options: localVarRequestOptions,
3260
+ };
3261
+ }),
3262
+ /**
3263
+ * Resends a reward, identified by the given `id` in the URL, to its recipient.
3264
+ * @summary Resend reward
3265
+ * @param {string} id ID of the reward that should be resent
3266
+ * @param {*} [options] Override http request option.
3267
+ * @throws {RequiredError}
3268
+ */
3269
+ resendReward: (id_4, ...args_5) => __awaiter(this, [id_4, ...args_5], void 0, function* (id, options = {}) {
3270
+ // verify required parameter 'id' is not null or undefined
3271
+ (0, common_1.assertParamExists)('resendReward', 'id', id);
3272
+ const localVarPath = `/rewards/{id}/resend`
3273
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3274
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3275
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3276
+ let baseOptions;
3277
+ if (configuration) {
3278
+ baseOptions = configuration.baseOptions;
3279
+ }
3280
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3281
+ const localVarHeaderParameter = {};
3282
+ const localVarQueryParameter = {};
3283
+ // authentication BearerApiKey required
3284
+ // http bearer authentication required
3285
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3286
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3287
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3288
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3289
+ return {
3290
+ url: (0, common_1.toPathString)(localVarUrlObj),
3291
+ options: localVarRequestOptions,
3292
+ };
3293
+ }),
3294
+ };
3295
+ };
3296
+ exports.RewardsApiAxiosParamCreator = RewardsApiAxiosParamCreator;
3297
+ /**
3298
+ * RewardsApi - functional programming interface
3299
+ * @export
3300
+ */
3301
+ const RewardsApiFp = function (configuration) {
3302
+ const localVarAxiosParamCreator = (0, exports.RewardsApiAxiosParamCreator)(configuration);
3303
+ return {
3304
+ /**
3305
+ * Generate a redemption link for the reward identified by the `id` in the URL
3306
+ * @summary Generate a reward URL
3307
+ * @param {string} id ID of the reward
3308
+ * @param {*} [options] Override http request option.
3309
+ * @throws {RequiredError}
3310
+ */
3311
+ generateRewardLink(id, options) {
3312
+ return __awaiter(this, void 0, void 0, function* () {
3313
+ var _a, _b, _c;
3314
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.generateRewardLink(id, options);
3315
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3316
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.generateRewardLink']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3317
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3318
+ });
3319
+ },
3320
+ /**
3321
+ * Generate a temporary reward token identified by the `id` in the URL. These tokens are needed to render a reward when using [Tremendous Embed](https://github.com/tremendous-rewards/embed/blob/master/docs/documentation.md). The token is valid for 24 hours.
3322
+ * @summary Generate a reward token
3323
+ * @param {string} id ID of the reward
3324
+ * @param {*} [options] Override http request option.
3325
+ * @throws {RequiredError}
3326
+ */
3327
+ generateRewardToken(id, options) {
3328
+ return __awaiter(this, void 0, void 0, function* () {
3329
+ var _a, _b, _c;
3330
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.generateRewardToken(id, options);
3331
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3332
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.generateRewardToken']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3333
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3334
+ });
3335
+ },
3336
+ /**
3337
+ * Retrieve the reward, identified by the given `id` in the URL
3338
+ * @summary Retrieve single reward
3339
+ * @param {string} id ID of the reward that should be retrieved
3340
+ * @param {*} [options] Override http request option.
3341
+ * @throws {RequiredError}
3342
+ */
3343
+ getReward(id, options) {
3344
+ return __awaiter(this, void 0, void 0, function* () {
3345
+ var _a, _b, _c;
3346
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getReward(id, options);
3347
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3348
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.getReward']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3349
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3350
+ });
3351
+ },
3352
+ /**
3353
+ * Retrieve a list of all created rewards
3354
+ * @summary List rewards
3355
+ * @param {number} [offset] Offsets the returned list by the given number of rewards. The returned rewards are ordered (and offsetted) by their creation date (DESC).
3356
+ * @param {*} [options] Override http request option.
3357
+ * @throws {RequiredError}
3358
+ */
3359
+ listRewards(offset, options) {
3360
+ return __awaiter(this, void 0, void 0, function* () {
3361
+ var _a, _b, _c;
3362
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listRewards(offset, options);
3363
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3364
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.listRewards']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3365
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3366
+ });
3367
+ },
3368
+ /**
3369
+ * Resends a reward, identified by the given `id` in the URL, to its recipient.
3370
+ * @summary Resend reward
3371
+ * @param {string} id ID of the reward that should be resent
3372
+ * @param {*} [options] Override http request option.
3373
+ * @throws {RequiredError}
3374
+ */
3375
+ resendReward(id, options) {
3376
+ return __awaiter(this, void 0, void 0, function* () {
3377
+ var _a, _b, _c;
3378
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.resendReward(id, options);
3379
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3380
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.resendReward']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3381
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3382
+ });
3383
+ },
3384
+ };
3385
+ };
3386
+ exports.RewardsApiFp = RewardsApiFp;
3387
+ /**
3388
+ * RewardsApi - factory interface
3389
+ * @export
3390
+ */
3391
+ const RewardsApiFactory = function (configuration, basePath, axios) {
3392
+ const localVarFp = (0, exports.RewardsApiFp)(configuration);
3393
+ return {
3394
+ /**
3395
+ * Generate a redemption link for the reward identified by the `id` in the URL
3396
+ * @summary Generate a reward URL
3397
+ * @param {string} id ID of the reward
3398
+ * @param {*} [options] Override http request option.
3399
+ * @throws {RequiredError}
3400
+ */
3401
+ generateRewardLink(id, options) {
3402
+ return localVarFp.generateRewardLink(id, options).then((request) => request(axios, basePath));
3403
+ },
3404
+ /**
3405
+ * Generate a temporary reward token identified by the `id` in the URL. These tokens are needed to render a reward when using [Tremendous Embed](https://github.com/tremendous-rewards/embed/blob/master/docs/documentation.md). The token is valid for 24 hours.
3406
+ * @summary Generate a reward token
3407
+ * @param {string} id ID of the reward
3408
+ * @param {*} [options] Override http request option.
3409
+ * @throws {RequiredError}
3410
+ */
3411
+ generateRewardToken(id, options) {
3412
+ return localVarFp.generateRewardToken(id, options).then((request) => request(axios, basePath));
3413
+ },
3414
+ /**
3415
+ * Retrieve the reward, identified by the given `id` in the URL
3416
+ * @summary Retrieve single reward
3417
+ * @param {string} id ID of the reward that should be retrieved
3418
+ * @param {*} [options] Override http request option.
3419
+ * @throws {RequiredError}
3420
+ */
3421
+ getReward(id, options) {
3422
+ return localVarFp.getReward(id, options).then((request) => request(axios, basePath));
3423
+ },
3424
+ /**
3425
+ * Retrieve a list of all created rewards
3426
+ * @summary List rewards
3427
+ * @param {number} [offset] Offsets the returned list by the given number of rewards. The returned rewards are ordered (and offsetted) by their creation date (DESC).
3428
+ * @param {*} [options] Override http request option.
3429
+ * @throws {RequiredError}
3430
+ */
3431
+ listRewards(offset, options) {
3432
+ return localVarFp.listRewards(offset, options).then((request) => request(axios, basePath));
3433
+ },
3434
+ /**
3435
+ * Resends a reward, identified by the given `id` in the URL, to its recipient.
3436
+ * @summary Resend reward
3437
+ * @param {string} id ID of the reward that should be resent
3438
+ * @param {*} [options] Override http request option.
3439
+ * @throws {RequiredError}
3440
+ */
3441
+ resendReward(id, options) {
3442
+ return localVarFp.resendReward(id, options).then((request) => request(axios, basePath));
3443
+ },
3444
+ };
3445
+ };
3446
+ exports.RewardsApiFactory = RewardsApiFactory;
3447
+ /**
3448
+ * RewardsApi - object-oriented interface
3449
+ * @export
3450
+ * @class RewardsApi
3451
+ * @extends {BaseAPI}
3452
+ */
3453
+ class RewardsApi extends base_1.BaseAPI {
3454
+ /**
3455
+ * Generate a redemption link for the reward identified by the `id` in the URL
3456
+ * @summary Generate a reward URL
3457
+ * @param {string} id ID of the reward
3458
+ * @param {*} [options] Override http request option.
3459
+ * @throws {RequiredError}
3460
+ * @memberof RewardsApi
3461
+ */
3462
+ generateRewardLink(id, options) {
3463
+ return (0, exports.RewardsApiFp)(this.configuration).generateRewardLink(id, options).then((request) => request(this.axios, this.basePath));
3464
+ }
3465
+ /**
3466
+ * Generate a temporary reward token identified by the `id` in the URL. These tokens are needed to render a reward when using [Tremendous Embed](https://github.com/tremendous-rewards/embed/blob/master/docs/documentation.md). The token is valid for 24 hours.
3467
+ * @summary Generate a reward token
3468
+ * @param {string} id ID of the reward
3469
+ * @param {*} [options] Override http request option.
3470
+ * @throws {RequiredError}
3471
+ * @memberof RewardsApi
3472
+ */
3473
+ generateRewardToken(id, options) {
3474
+ return (0, exports.RewardsApiFp)(this.configuration).generateRewardToken(id, options).then((request) => request(this.axios, this.basePath));
3475
+ }
3476
+ /**
3477
+ * Retrieve the reward, identified by the given `id` in the URL
3478
+ * @summary Retrieve single reward
3479
+ * @param {string} id ID of the reward that should be retrieved
3480
+ * @param {*} [options] Override http request option.
3481
+ * @throws {RequiredError}
3482
+ * @memberof RewardsApi
3483
+ */
3484
+ getReward(id, options) {
3485
+ return (0, exports.RewardsApiFp)(this.configuration).getReward(id, options).then((request) => request(this.axios, this.basePath));
3486
+ }
3487
+ /**
3488
+ * Retrieve a list of all created rewards
3489
+ * @summary List rewards
3490
+ * @param {number} [offset] Offsets the returned list by the given number of rewards. The returned rewards are ordered (and offsetted) by their creation date (DESC).
3491
+ * @param {*} [options] Override http request option.
3492
+ * @throws {RequiredError}
3493
+ * @memberof RewardsApi
3494
+ */
3495
+ listRewards(offset, options) {
3496
+ return (0, exports.RewardsApiFp)(this.configuration).listRewards(offset, options).then((request) => request(this.axios, this.basePath));
3497
+ }
3498
+ /**
3499
+ * Resends a reward, identified by the given `id` in the URL, to its recipient.
3500
+ * @summary Resend reward
3501
+ * @param {string} id ID of the reward that should be resent
3502
+ * @param {*} [options] Override http request option.
3503
+ * @throws {RequiredError}
3504
+ * @memberof RewardsApi
3505
+ */
3506
+ resendReward(id, options) {
3507
+ return (0, exports.RewardsApiFp)(this.configuration).resendReward(id, options).then((request) => request(this.axios, this.basePath));
3508
+ }
3509
+ }
3510
+ exports.RewardsApi = RewardsApi;
3511
+ /**
3512
+ * WebhooksApi - axios parameter creator
3513
+ * @export
3514
+ */
3515
+ const WebhooksApiAxiosParamCreator = function (configuration) {
3516
+ return {
3517
+ /**
3518
+ * Tremendous uses webhooks as a notification system for various events that happen in your account. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) Every organization can define a single webhook endpoint where we send requests to, whenever an event happens. This endpoint allows you to setup that endpoint. The URL of the endpoint can be changed by making a request to this endpoint again with the new URL. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">url</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">uri</span></td><td><p>URL the webhook will make requests to</p> </td></tr> </tbody> </table> </div>
3519
+ * @summary Create webhook
3520
+ * @param {CreateWebhookRequest} createWebhookRequest Webhook details
3521
+ * @param {*} [options] Override http request option.
3522
+ * @throws {RequiredError}
3523
+ */
3524
+ createWebhook: (createWebhookRequest_1, ...args_1) => __awaiter(this, [createWebhookRequest_1, ...args_1], void 0, function* (createWebhookRequest, options = {}) {
3525
+ // verify required parameter 'createWebhookRequest' is not null or undefined
3526
+ (0, common_1.assertParamExists)('createWebhook', 'createWebhookRequest', createWebhookRequest);
3527
+ const localVarPath = `/webhooks`;
3528
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3529
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3530
+ let baseOptions;
3531
+ if (configuration) {
3532
+ baseOptions = configuration.baseOptions;
3533
+ }
3534
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3535
+ const localVarHeaderParameter = {};
3536
+ const localVarQueryParameter = {};
3537
+ // authentication BearerApiKey required
3538
+ // http bearer authentication required
3539
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3540
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3541
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3542
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3543
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3544
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createWebhookRequest, localVarRequestOptions, configuration);
3545
+ return {
3546
+ url: (0, common_1.toPathString)(localVarUrlObj),
3547
+ options: localVarRequestOptions,
3548
+ };
3549
+ }),
3550
+ /**
3551
+ * > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
3552
+ * @summary Retrieve webhook
3553
+ * @param {string} id ID of the webhook to retrieve
3554
+ * @param {*} [options] Override http request option.
3555
+ * @throws {RequiredError}
3556
+ */
3557
+ getWebhook: (id_1, ...args_2) => __awaiter(this, [id_1, ...args_2], void 0, function* (id, options = {}) {
3558
+ // verify required parameter 'id' is not null or undefined
3559
+ (0, common_1.assertParamExists)('getWebhook', 'id', id);
3560
+ const localVarPath = `/webhooks/{id}`
3561
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3562
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3563
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3564
+ let baseOptions;
3565
+ if (configuration) {
3566
+ baseOptions = configuration.baseOptions;
3567
+ }
3568
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3569
+ const localVarHeaderParameter = {};
3570
+ const localVarQueryParameter = {};
3571
+ // authentication BearerApiKey required
3572
+ // http bearer authentication required
3573
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3574
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3575
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3576
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3577
+ return {
3578
+ url: (0, common_1.toPathString)(localVarUrlObj),
3579
+ options: localVarRequestOptions,
3580
+ };
3581
+ }),
3582
+ /**
3583
+ * Lists all event types that can be sent to the configured webhook endpoint. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
3584
+ * @summary List events
3585
+ * @param {string} id ID of the webhook to list the events for
3586
+ * @param {*} [options] Override http request option.
3587
+ * @throws {RequiredError}
3588
+ */
3589
+ listWebhookEvents: (id_2, ...args_3) => __awaiter(this, [id_2, ...args_3], void 0, function* (id, options = {}) {
3590
+ // verify required parameter 'id' is not null or undefined
3591
+ (0, common_1.assertParamExists)('listWebhookEvents', 'id', id);
3592
+ const localVarPath = `/webhooks/{id}/events`
3593
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3594
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3595
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3596
+ let baseOptions;
3597
+ if (configuration) {
3598
+ baseOptions = configuration.baseOptions;
3599
+ }
3600
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3601
+ const localVarHeaderParameter = {};
3602
+ const localVarQueryParameter = {};
3603
+ // authentication BearerApiKey required
3604
+ // http bearer authentication required
3605
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3606
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3607
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3608
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3609
+ return {
3610
+ url: (0, common_1.toPathString)(localVarUrlObj),
3611
+ options: localVarRequestOptions,
3612
+ };
3613
+ }),
3614
+ /**
3615
+ * Every organization can only have one webhook. This endpoint shows the details about that webhook. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
3616
+ * @summary List webhooks
3617
+ * @param {*} [options] Override http request option.
3618
+ * @throws {RequiredError}
3619
+ */
3620
+ listWebhooks: (...args_4) => __awaiter(this, [...args_4], void 0, function* (options = {}) {
3621
+ const localVarPath = `/webhooks`;
3622
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3623
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3624
+ let baseOptions;
3625
+ if (configuration) {
3626
+ baseOptions = configuration.baseOptions;
3627
+ }
3628
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3629
+ const localVarHeaderParameter = {};
3630
+ const localVarQueryParameter = {};
3631
+ // authentication BearerApiKey required
3632
+ // http bearer authentication required
3633
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3634
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3635
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3636
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3637
+ return {
3638
+ url: (0, common_1.toPathString)(localVarUrlObj),
3639
+ options: localVarRequestOptions,
3640
+ };
3641
+ }),
3642
+ /**
3643
+ * Making a request to this endpoint will cause our system to trigger a webhook for the specified event. This can be very useful when testing the setup that processes webhooks on your end. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
3644
+ * @summary Test webhook
3645
+ * @param {string} id ID of the webhook to test
3646
+ * @param {SimulateWebhookRequest} simulateWebhookRequest Webhook details
3647
+ * @param {*} [options] Override http request option.
3648
+ * @throws {RequiredError}
3649
+ */
3650
+ simulateWebhook: (id_3, simulateWebhookRequest_1, ...args_5) => __awaiter(this, [id_3, simulateWebhookRequest_1, ...args_5], void 0, function* (id, simulateWebhookRequest, options = {}) {
3651
+ // verify required parameter 'id' is not null or undefined
3652
+ (0, common_1.assertParamExists)('simulateWebhook', 'id', id);
3653
+ // verify required parameter 'simulateWebhookRequest' is not null or undefined
3654
+ (0, common_1.assertParamExists)('simulateWebhook', 'simulateWebhookRequest', simulateWebhookRequest);
3655
+ const localVarPath = `/webhooks/{id}/simulate`
3656
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
3657
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3658
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3659
+ let baseOptions;
3660
+ if (configuration) {
3661
+ baseOptions = configuration.baseOptions;
3662
+ }
3663
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3664
+ const localVarHeaderParameter = {};
3665
+ const localVarQueryParameter = {};
3666
+ // authentication BearerApiKey required
3667
+ // http bearer authentication required
3668
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
3669
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3670
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3671
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3672
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3673
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(simulateWebhookRequest, localVarRequestOptions, configuration);
3674
+ return {
3675
+ url: (0, common_1.toPathString)(localVarUrlObj),
3676
+ options: localVarRequestOptions,
3677
+ };
3678
+ }),
3679
+ };
3680
+ };
3681
+ exports.WebhooksApiAxiosParamCreator = WebhooksApiAxiosParamCreator;
3682
+ /**
3683
+ * WebhooksApi - functional programming interface
3684
+ * @export
3685
+ */
3686
+ const WebhooksApiFp = function (configuration) {
3687
+ const localVarAxiosParamCreator = (0, exports.WebhooksApiAxiosParamCreator)(configuration);
3688
+ return {
3689
+ /**
3690
+ * Tremendous uses webhooks as a notification system for various events that happen in your account. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) Every organization can define a single webhook endpoint where we send requests to, whenever an event happens. This endpoint allows you to setup that endpoint. The URL of the endpoint can be changed by making a request to this endpoint again with the new URL. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">url</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">uri</span></td><td><p>URL the webhook will make requests to</p> </td></tr> </tbody> </table> </div>
3691
+ * @summary Create webhook
3692
+ * @param {CreateWebhookRequest} createWebhookRequest Webhook details
3693
+ * @param {*} [options] Override http request option.
3694
+ * @throws {RequiredError}
3695
+ */
3696
+ createWebhook(createWebhookRequest, options) {
3697
+ return __awaiter(this, void 0, void 0, function* () {
3698
+ var _a, _b, _c;
3699
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createWebhook(createWebhookRequest, options);
3700
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3701
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.createWebhook']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3702
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3703
+ });
3704
+ },
3705
+ /**
3706
+ * > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
3707
+ * @summary Retrieve webhook
3708
+ * @param {string} id ID of the webhook to retrieve
3709
+ * @param {*} [options] Override http request option.
3710
+ * @throws {RequiredError}
3711
+ */
3712
+ getWebhook(id, options) {
3713
+ return __awaiter(this, void 0, void 0, function* () {
3714
+ var _a, _b, _c;
3715
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getWebhook(id, options);
3716
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3717
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.getWebhook']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3718
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3719
+ });
3720
+ },
3721
+ /**
3722
+ * Lists all event types that can be sent to the configured webhook endpoint. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
3723
+ * @summary List events
3724
+ * @param {string} id ID of the webhook to list the events for
3725
+ * @param {*} [options] Override http request option.
3726
+ * @throws {RequiredError}
3727
+ */
3728
+ listWebhookEvents(id, options) {
3729
+ return __awaiter(this, void 0, void 0, function* () {
3730
+ var _a, _b, _c;
3731
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listWebhookEvents(id, options);
3732
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3733
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.listWebhookEvents']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3734
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3735
+ });
3736
+ },
3737
+ /**
3738
+ * Every organization can only have one webhook. This endpoint shows the details about that webhook. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
3739
+ * @summary List webhooks
3740
+ * @param {*} [options] Override http request option.
3741
+ * @throws {RequiredError}
3742
+ */
3743
+ listWebhooks(options) {
3744
+ return __awaiter(this, void 0, void 0, function* () {
3745
+ var _a, _b, _c;
3746
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listWebhooks(options);
3747
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3748
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.listWebhooks']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3749
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3750
+ });
3751
+ },
3752
+ /**
3753
+ * Making a request to this endpoint will cause our system to trigger a webhook for the specified event. This can be very useful when testing the setup that processes webhooks on your end. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
3754
+ * @summary Test webhook
3755
+ * @param {string} id ID of the webhook to test
3756
+ * @param {SimulateWebhookRequest} simulateWebhookRequest Webhook details
3757
+ * @param {*} [options] Override http request option.
3758
+ * @throws {RequiredError}
3759
+ */
3760
+ simulateWebhook(id, simulateWebhookRequest, options) {
3761
+ return __awaiter(this, void 0, void 0, function* () {
3762
+ var _a, _b, _c;
3763
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.simulateWebhook(id, simulateWebhookRequest, options);
3764
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3765
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['WebhooksApi.simulateWebhook']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3766
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3767
+ });
3768
+ },
3769
+ };
3770
+ };
3771
+ exports.WebhooksApiFp = WebhooksApiFp;
3772
+ /**
3773
+ * WebhooksApi - factory interface
3774
+ * @export
3775
+ */
3776
+ const WebhooksApiFactory = function (configuration, basePath, axios) {
3777
+ const localVarFp = (0, exports.WebhooksApiFp)(configuration);
3778
+ return {
3779
+ /**
3780
+ * Tremendous uses webhooks as a notification system for various events that happen in your account. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) Every organization can define a single webhook endpoint where we send requests to, whenever an event happens. This endpoint allows you to setup that endpoint. The URL of the endpoint can be changed by making a request to this endpoint again with the new URL. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">url</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">uri</span></td><td><p>URL the webhook will make requests to</p> </td></tr> </tbody> </table> </div>
3781
+ * @summary Create webhook
3782
+ * @param {CreateWebhookRequest} createWebhookRequest Webhook details
3783
+ * @param {*} [options] Override http request option.
3784
+ * @throws {RequiredError}
3785
+ */
3786
+ createWebhook(createWebhookRequest, options) {
3787
+ return localVarFp.createWebhook(createWebhookRequest, options).then((request) => request(axios, basePath));
3788
+ },
3789
+ /**
3790
+ * > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
3791
+ * @summary Retrieve webhook
3792
+ * @param {string} id ID of the webhook to retrieve
3793
+ * @param {*} [options] Override http request option.
3794
+ * @throws {RequiredError}
3795
+ */
3796
+ getWebhook(id, options) {
3797
+ return localVarFp.getWebhook(id, options).then((request) => request(axios, basePath));
3798
+ },
3799
+ /**
3800
+ * Lists all event types that can be sent to the configured webhook endpoint. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
3801
+ * @summary List events
3802
+ * @param {string} id ID of the webhook to list the events for
3803
+ * @param {*} [options] Override http request option.
3804
+ * @throws {RequiredError}
3805
+ */
3806
+ listWebhookEvents(id, options) {
3807
+ return localVarFp.listWebhookEvents(id, options).then((request) => request(axios, basePath));
3808
+ },
3809
+ /**
3810
+ * Every organization can only have one webhook. This endpoint shows the details about that webhook. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
3811
+ * @summary List webhooks
3812
+ * @param {*} [options] Override http request option.
3813
+ * @throws {RequiredError}
3814
+ */
3815
+ listWebhooks(options) {
3816
+ return localVarFp.listWebhooks(options).then((request) => request(axios, basePath));
3817
+ },
3818
+ /**
3819
+ * Making a request to this endpoint will cause our system to trigger a webhook for the specified event. This can be very useful when testing the setup that processes webhooks on your end. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
3820
+ * @summary Test webhook
3821
+ * @param {string} id ID of the webhook to test
3822
+ * @param {SimulateWebhookRequest} simulateWebhookRequest Webhook details
3823
+ * @param {*} [options] Override http request option.
3824
+ * @throws {RequiredError}
3825
+ */
3826
+ simulateWebhook(id, simulateWebhookRequest, options) {
3827
+ return localVarFp.simulateWebhook(id, simulateWebhookRequest, options).then((request) => request(axios, basePath));
3828
+ },
3829
+ };
3830
+ };
3831
+ exports.WebhooksApiFactory = WebhooksApiFactory;
3832
+ /**
3833
+ * WebhooksApi - object-oriented interface
3834
+ * @export
3835
+ * @class WebhooksApi
3836
+ * @extends {BaseAPI}
3837
+ */
3838
+ class WebhooksApi extends base_1.BaseAPI {
3839
+ /**
3840
+ * Tremendous uses webhooks as a notification system for various events that happen in your account. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1) Every organization can define a single webhook endpoint where we send requests to, whenever an event happens. This endpoint allows you to setup that endpoint. The URL of the endpoint can be changed by making a request to this endpoint again with the new URL. ## Request body <div class=\"object-schema-request-schema\"> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody class=\"object-schema-table-body\"> <tr class=\"\"><td><div class=\"property-name\"> <code class=\"property-name\">url</code> </div> </td><td><span class=\"property-type\">string</span> <span class=\"property-format\">uri</span></td><td><p>URL the webhook will make requests to</p> </td></tr> </tbody> </table> </div>
3841
+ * @summary Create webhook
3842
+ * @param {CreateWebhookRequest} createWebhookRequest Webhook details
3843
+ * @param {*} [options] Override http request option.
3844
+ * @throws {RequiredError}
3845
+ * @memberof WebhooksApi
3846
+ */
3847
+ createWebhook(createWebhookRequest, options) {
3848
+ return (0, exports.WebhooksApiFp)(this.configuration).createWebhook(createWebhookRequest, options).then((request) => request(this.axios, this.basePath));
3849
+ }
3850
+ /**
3851
+ * > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
3852
+ * @summary Retrieve webhook
3853
+ * @param {string} id ID of the webhook to retrieve
3854
+ * @param {*} [options] Override http request option.
3855
+ * @throws {RequiredError}
3856
+ * @memberof WebhooksApi
3857
+ */
3858
+ getWebhook(id, options) {
3859
+ return (0, exports.WebhooksApiFp)(this.configuration).getWebhook(id, options).then((request) => request(this.axios, this.basePath));
3860
+ }
3861
+ /**
3862
+ * Lists all event types that can be sent to the configured webhook endpoint. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
3863
+ * @summary List events
3864
+ * @param {string} id ID of the webhook to list the events for
3865
+ * @param {*} [options] Override http request option.
3866
+ * @throws {RequiredError}
3867
+ * @memberof WebhooksApi
3868
+ */
3869
+ listWebhookEvents(id, options) {
3870
+ return (0, exports.WebhooksApiFp)(this.configuration).listWebhookEvents(id, options).then((request) => request(this.axios, this.basePath));
3871
+ }
3872
+ /**
3873
+ * Every organization can only have one webhook. This endpoint shows the details about that webhook. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
3874
+ * @summary List webhooks
3875
+ * @param {*} [options] Override http request option.
3876
+ * @throws {RequiredError}
3877
+ * @memberof WebhooksApi
3878
+ */
3879
+ listWebhooks(options) {
3880
+ return (0, exports.WebhooksApiFp)(this.configuration).listWebhooks(options).then((request) => request(this.axios, this.basePath));
3881
+ }
3882
+ /**
3883
+ * Making a request to this endpoint will cause our system to trigger a webhook for the specified event. This can be very useful when testing the setup that processes webhooks on your end. > 📘 Learn more about Webhooks > > Our guide explains everything you need to know about the Tremendous webhooks: > [Read it here](/docs/webhooks-1)
3884
+ * @summary Test webhook
3885
+ * @param {string} id ID of the webhook to test
3886
+ * @param {SimulateWebhookRequest} simulateWebhookRequest Webhook details
3887
+ * @param {*} [options] Override http request option.
3888
+ * @throws {RequiredError}
3889
+ * @memberof WebhooksApi
3890
+ */
3891
+ simulateWebhook(id, simulateWebhookRequest, options) {
3892
+ return (0, exports.WebhooksApiFp)(this.configuration).simulateWebhook(id, simulateWebhookRequest, options).then((request) => request(this.axios, this.basePath));
3893
+ }
3894
+ }
3895
+ exports.WebhooksApi = WebhooksApi;