lago-javascript-client 0.36.0-beta → 0.39.1-beta
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/esm/openapi/client.js +1141 -485
- package/package.json +1 -1
- package/script/openapi/client.js +1142 -486
- package/types/openapi/client.d.ts +3791 -1727
package/script/openapi/client.js
CHANGED
|
@@ -10,7 +10,540 @@
|
|
|
10
10
|
* ---------------------------------------------------------------
|
|
11
11
|
*/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.Api = exports.HttpClient = exports.ContentType = void 0;
|
|
13
|
+
exports.Api = exports.HttpClient = exports.ContentType = exports.Timezone = exports.Currency = exports.Country = void 0;
|
|
14
|
+
/** @example "US" */
|
|
15
|
+
var Country;
|
|
16
|
+
(function (Country) {
|
|
17
|
+
Country["AD"] = "AD";
|
|
18
|
+
Country["AE"] = "AE";
|
|
19
|
+
Country["AF"] = "AF";
|
|
20
|
+
Country["AG"] = "AG";
|
|
21
|
+
Country["AI"] = "AI";
|
|
22
|
+
Country["AL"] = "AL";
|
|
23
|
+
Country["AM"] = "AM";
|
|
24
|
+
Country["AO"] = "AO";
|
|
25
|
+
Country["AQ"] = "AQ";
|
|
26
|
+
Country["AR"] = "AR";
|
|
27
|
+
Country["AS"] = "AS";
|
|
28
|
+
Country["AT"] = "AT";
|
|
29
|
+
Country["AU"] = "AU";
|
|
30
|
+
Country["AW"] = "AW";
|
|
31
|
+
Country["AX"] = "AX";
|
|
32
|
+
Country["AZ"] = "AZ";
|
|
33
|
+
Country["BA"] = "BA";
|
|
34
|
+
Country["BB"] = "BB";
|
|
35
|
+
Country["BD"] = "BD";
|
|
36
|
+
Country["BE"] = "BE";
|
|
37
|
+
Country["BF"] = "BF";
|
|
38
|
+
Country["BG"] = "BG";
|
|
39
|
+
Country["BH"] = "BH";
|
|
40
|
+
Country["BI"] = "BI";
|
|
41
|
+
Country["BJ"] = "BJ";
|
|
42
|
+
Country["BL"] = "BL";
|
|
43
|
+
Country["BM"] = "BM";
|
|
44
|
+
Country["BN"] = "BN";
|
|
45
|
+
Country["BO"] = "BO";
|
|
46
|
+
Country["BQ"] = "BQ";
|
|
47
|
+
Country["BR"] = "BR";
|
|
48
|
+
Country["BS"] = "BS";
|
|
49
|
+
Country["BT"] = "BT";
|
|
50
|
+
Country["BV"] = "BV";
|
|
51
|
+
Country["BW"] = "BW";
|
|
52
|
+
Country["BY"] = "BY";
|
|
53
|
+
Country["BZ"] = "BZ";
|
|
54
|
+
Country["CA"] = "CA";
|
|
55
|
+
Country["CC"] = "CC";
|
|
56
|
+
Country["CD"] = "CD";
|
|
57
|
+
Country["CF"] = "CF";
|
|
58
|
+
Country["CG"] = "CG";
|
|
59
|
+
Country["CH"] = "CH";
|
|
60
|
+
Country["CI"] = "CI";
|
|
61
|
+
Country["CK"] = "CK";
|
|
62
|
+
Country["CL"] = "CL";
|
|
63
|
+
Country["CM"] = "CM";
|
|
64
|
+
Country["CN"] = "CN";
|
|
65
|
+
Country["CO"] = "CO";
|
|
66
|
+
Country["CR"] = "CR";
|
|
67
|
+
Country["CU"] = "CU";
|
|
68
|
+
Country["CV"] = "CV";
|
|
69
|
+
Country["CW"] = "CW";
|
|
70
|
+
Country["CX"] = "CX";
|
|
71
|
+
Country["CY"] = "CY";
|
|
72
|
+
Country["CZ"] = "CZ";
|
|
73
|
+
Country["DE"] = "DE";
|
|
74
|
+
Country["DJ"] = "DJ";
|
|
75
|
+
Country["DK"] = "DK";
|
|
76
|
+
Country["DM"] = "DM";
|
|
77
|
+
Country["DO"] = "DO";
|
|
78
|
+
Country["DZ"] = "DZ";
|
|
79
|
+
Country["EC"] = "EC";
|
|
80
|
+
Country["EE"] = "EE";
|
|
81
|
+
Country["EG"] = "EG";
|
|
82
|
+
Country["EH"] = "EH";
|
|
83
|
+
Country["ER"] = "ER";
|
|
84
|
+
Country["ES"] = "ES";
|
|
85
|
+
Country["ET"] = "ET";
|
|
86
|
+
Country["FI"] = "FI";
|
|
87
|
+
Country["FJ"] = "FJ";
|
|
88
|
+
Country["FK"] = "FK";
|
|
89
|
+
Country["FM"] = "FM";
|
|
90
|
+
Country["FO"] = "FO";
|
|
91
|
+
Country["FR"] = "FR";
|
|
92
|
+
Country["GA"] = "GA";
|
|
93
|
+
Country["GB"] = "GB";
|
|
94
|
+
Country["GD"] = "GD";
|
|
95
|
+
Country["GE"] = "GE";
|
|
96
|
+
Country["GF"] = "GF";
|
|
97
|
+
Country["GG"] = "GG";
|
|
98
|
+
Country["GH"] = "GH";
|
|
99
|
+
Country["GI"] = "GI";
|
|
100
|
+
Country["GL"] = "GL";
|
|
101
|
+
Country["GM"] = "GM";
|
|
102
|
+
Country["GN"] = "GN";
|
|
103
|
+
Country["GP"] = "GP";
|
|
104
|
+
Country["GQ"] = "GQ";
|
|
105
|
+
Country["GR"] = "GR";
|
|
106
|
+
Country["GS"] = "GS";
|
|
107
|
+
Country["GT"] = "GT";
|
|
108
|
+
Country["GU"] = "GU";
|
|
109
|
+
Country["GW"] = "GW";
|
|
110
|
+
Country["GY"] = "GY";
|
|
111
|
+
Country["HK"] = "HK";
|
|
112
|
+
Country["HM"] = "HM";
|
|
113
|
+
Country["HN"] = "HN";
|
|
114
|
+
Country["HR"] = "HR";
|
|
115
|
+
Country["HT"] = "HT";
|
|
116
|
+
Country["HU"] = "HU";
|
|
117
|
+
Country["ID"] = "ID";
|
|
118
|
+
Country["IE"] = "IE";
|
|
119
|
+
Country["IL"] = "IL";
|
|
120
|
+
Country["IM"] = "IM";
|
|
121
|
+
Country["IN"] = "IN";
|
|
122
|
+
Country["IO"] = "IO";
|
|
123
|
+
Country["IQ"] = "IQ";
|
|
124
|
+
Country["IR"] = "IR";
|
|
125
|
+
Country["IS"] = "IS";
|
|
126
|
+
Country["IT"] = "IT";
|
|
127
|
+
Country["JE"] = "JE";
|
|
128
|
+
Country["JM"] = "JM";
|
|
129
|
+
Country["JO"] = "JO";
|
|
130
|
+
Country["JP"] = "JP";
|
|
131
|
+
Country["KE"] = "KE";
|
|
132
|
+
Country["KG"] = "KG";
|
|
133
|
+
Country["KH"] = "KH";
|
|
134
|
+
Country["KI"] = "KI";
|
|
135
|
+
Country["KM"] = "KM";
|
|
136
|
+
Country["KN"] = "KN";
|
|
137
|
+
Country["KP"] = "KP";
|
|
138
|
+
Country["KR"] = "KR";
|
|
139
|
+
Country["KW"] = "KW";
|
|
140
|
+
Country["KY"] = "KY";
|
|
141
|
+
Country["KZ"] = "KZ";
|
|
142
|
+
Country["LA"] = "LA";
|
|
143
|
+
Country["LB"] = "LB";
|
|
144
|
+
Country["LC"] = "LC";
|
|
145
|
+
Country["LI"] = "LI";
|
|
146
|
+
Country["LK"] = "LK";
|
|
147
|
+
Country["LR"] = "LR";
|
|
148
|
+
Country["LS"] = "LS";
|
|
149
|
+
Country["LT"] = "LT";
|
|
150
|
+
Country["LU"] = "LU";
|
|
151
|
+
Country["LV"] = "LV";
|
|
152
|
+
Country["LY"] = "LY";
|
|
153
|
+
Country["MA"] = "MA";
|
|
154
|
+
Country["MC"] = "MC";
|
|
155
|
+
Country["MD"] = "MD";
|
|
156
|
+
Country["ME"] = "ME";
|
|
157
|
+
Country["MF"] = "MF";
|
|
158
|
+
Country["MG"] = "MG";
|
|
159
|
+
Country["MH"] = "MH";
|
|
160
|
+
Country["MK"] = "MK";
|
|
161
|
+
Country["ML"] = "ML";
|
|
162
|
+
Country["MM"] = "MM";
|
|
163
|
+
Country["MN"] = "MN";
|
|
164
|
+
Country["MO"] = "MO";
|
|
165
|
+
Country["MP"] = "MP";
|
|
166
|
+
Country["MQ"] = "MQ";
|
|
167
|
+
Country["MR"] = "MR";
|
|
168
|
+
Country["MS"] = "MS";
|
|
169
|
+
Country["MT"] = "MT";
|
|
170
|
+
Country["MU"] = "MU";
|
|
171
|
+
Country["MV"] = "MV";
|
|
172
|
+
Country["MW"] = "MW";
|
|
173
|
+
Country["MX"] = "MX";
|
|
174
|
+
Country["MY"] = "MY";
|
|
175
|
+
Country["MZ"] = "MZ";
|
|
176
|
+
Country["NA"] = "NA";
|
|
177
|
+
Country["NC"] = "NC";
|
|
178
|
+
Country["NE"] = "NE";
|
|
179
|
+
Country["NF"] = "NF";
|
|
180
|
+
Country["NG"] = "NG";
|
|
181
|
+
Country["NI"] = "NI";
|
|
182
|
+
Country["NL"] = "NL";
|
|
183
|
+
Country["NO"] = "NO";
|
|
184
|
+
Country["NP"] = "NP";
|
|
185
|
+
Country["NR"] = "NR";
|
|
186
|
+
Country["NU"] = "NU";
|
|
187
|
+
Country["NZ"] = "NZ";
|
|
188
|
+
Country["OM"] = "OM";
|
|
189
|
+
Country["PA"] = "PA";
|
|
190
|
+
Country["PE"] = "PE";
|
|
191
|
+
Country["PF"] = "PF";
|
|
192
|
+
Country["PG"] = "PG";
|
|
193
|
+
Country["PH"] = "PH";
|
|
194
|
+
Country["PK"] = "PK";
|
|
195
|
+
Country["PL"] = "PL";
|
|
196
|
+
Country["PM"] = "PM";
|
|
197
|
+
Country["PN"] = "PN";
|
|
198
|
+
Country["PR"] = "PR";
|
|
199
|
+
Country["PS"] = "PS";
|
|
200
|
+
Country["PT"] = "PT";
|
|
201
|
+
Country["PW"] = "PW";
|
|
202
|
+
Country["PY"] = "PY";
|
|
203
|
+
Country["QA"] = "QA";
|
|
204
|
+
Country["RE"] = "RE";
|
|
205
|
+
Country["RO"] = "RO";
|
|
206
|
+
Country["RS"] = "RS";
|
|
207
|
+
Country["RU"] = "RU";
|
|
208
|
+
Country["RW"] = "RW";
|
|
209
|
+
Country["SA"] = "SA";
|
|
210
|
+
Country["SB"] = "SB";
|
|
211
|
+
Country["SC"] = "SC";
|
|
212
|
+
Country["SD"] = "SD";
|
|
213
|
+
Country["SE"] = "SE";
|
|
214
|
+
Country["SG"] = "SG";
|
|
215
|
+
Country["SH"] = "SH";
|
|
216
|
+
Country["SI"] = "SI";
|
|
217
|
+
Country["SJ"] = "SJ";
|
|
218
|
+
Country["SK"] = "SK";
|
|
219
|
+
Country["SL"] = "SL";
|
|
220
|
+
Country["SM"] = "SM";
|
|
221
|
+
Country["SN"] = "SN";
|
|
222
|
+
Country["SO"] = "SO";
|
|
223
|
+
Country["SR"] = "SR";
|
|
224
|
+
Country["SS"] = "SS";
|
|
225
|
+
Country["ST"] = "ST";
|
|
226
|
+
Country["SV"] = "SV";
|
|
227
|
+
Country["SX"] = "SX";
|
|
228
|
+
Country["SY"] = "SY";
|
|
229
|
+
Country["SZ"] = "SZ";
|
|
230
|
+
Country["TC"] = "TC";
|
|
231
|
+
Country["TD"] = "TD";
|
|
232
|
+
Country["TF"] = "TF";
|
|
233
|
+
Country["TG"] = "TG";
|
|
234
|
+
Country["TH"] = "TH";
|
|
235
|
+
Country["TJ"] = "TJ";
|
|
236
|
+
Country["TK"] = "TK";
|
|
237
|
+
Country["TL"] = "TL";
|
|
238
|
+
Country["TM"] = "TM";
|
|
239
|
+
Country["TN"] = "TN";
|
|
240
|
+
Country["TO"] = "TO";
|
|
241
|
+
Country["TR"] = "TR";
|
|
242
|
+
Country["TT"] = "TT";
|
|
243
|
+
Country["TV"] = "TV";
|
|
244
|
+
Country["TW"] = "TW";
|
|
245
|
+
Country["TZ"] = "TZ";
|
|
246
|
+
Country["UA"] = "UA";
|
|
247
|
+
Country["UG"] = "UG";
|
|
248
|
+
Country["UM"] = "UM";
|
|
249
|
+
Country["US"] = "US";
|
|
250
|
+
Country["UY"] = "UY";
|
|
251
|
+
Country["UZ"] = "UZ";
|
|
252
|
+
Country["VA"] = "VA";
|
|
253
|
+
Country["VC"] = "VC";
|
|
254
|
+
Country["VE"] = "VE";
|
|
255
|
+
Country["VG"] = "VG";
|
|
256
|
+
Country["VI"] = "VI";
|
|
257
|
+
Country["VN"] = "VN";
|
|
258
|
+
Country["VU"] = "VU";
|
|
259
|
+
Country["WF"] = "WF";
|
|
260
|
+
Country["WS"] = "WS";
|
|
261
|
+
Country["YE"] = "YE";
|
|
262
|
+
Country["YT"] = "YT";
|
|
263
|
+
Country["ZA"] = "ZA";
|
|
264
|
+
Country["ZM"] = "ZM";
|
|
265
|
+
Country["ZW"] = "ZW";
|
|
266
|
+
})(Country = exports.Country || (exports.Country = {}));
|
|
267
|
+
/** @example "USD" */
|
|
268
|
+
var Currency;
|
|
269
|
+
(function (Currency) {
|
|
270
|
+
Currency["AED"] = "AED";
|
|
271
|
+
Currency["AFN"] = "AFN";
|
|
272
|
+
Currency["ALL"] = "ALL";
|
|
273
|
+
Currency["AMD"] = "AMD";
|
|
274
|
+
Currency["ANG"] = "ANG";
|
|
275
|
+
Currency["AOA"] = "AOA";
|
|
276
|
+
Currency["ARS"] = "ARS";
|
|
277
|
+
Currency["AUD"] = "AUD";
|
|
278
|
+
Currency["AWG"] = "AWG";
|
|
279
|
+
Currency["AZN"] = "AZN";
|
|
280
|
+
Currency["BAM"] = "BAM";
|
|
281
|
+
Currency["BBD"] = "BBD";
|
|
282
|
+
Currency["BDT"] = "BDT";
|
|
283
|
+
Currency["BGN"] = "BGN";
|
|
284
|
+
Currency["BIF"] = "BIF";
|
|
285
|
+
Currency["BMD"] = "BMD";
|
|
286
|
+
Currency["BND"] = "BND";
|
|
287
|
+
Currency["BOB"] = "BOB";
|
|
288
|
+
Currency["BRL"] = "BRL";
|
|
289
|
+
Currency["BSD"] = "BSD";
|
|
290
|
+
Currency["BWP"] = "BWP";
|
|
291
|
+
Currency["BYN"] = "BYN";
|
|
292
|
+
Currency["BZD"] = "BZD";
|
|
293
|
+
Currency["CAD"] = "CAD";
|
|
294
|
+
Currency["CDF"] = "CDF";
|
|
295
|
+
Currency["CHF"] = "CHF";
|
|
296
|
+
Currency["CLF"] = "CLF";
|
|
297
|
+
Currency["CLP"] = "CLP";
|
|
298
|
+
Currency["CNY"] = "CNY";
|
|
299
|
+
Currency["COP"] = "COP";
|
|
300
|
+
Currency["CRC"] = "CRC";
|
|
301
|
+
Currency["CVE"] = "CVE";
|
|
302
|
+
Currency["CZK"] = "CZK";
|
|
303
|
+
Currency["DJF"] = "DJF";
|
|
304
|
+
Currency["DKK"] = "DKK";
|
|
305
|
+
Currency["DOP"] = "DOP";
|
|
306
|
+
Currency["DZD"] = "DZD";
|
|
307
|
+
Currency["EGP"] = "EGP";
|
|
308
|
+
Currency["ETB"] = "ETB";
|
|
309
|
+
Currency["EUR"] = "EUR";
|
|
310
|
+
Currency["FJD"] = "FJD";
|
|
311
|
+
Currency["FKP"] = "FKP";
|
|
312
|
+
Currency["GBP"] = "GBP";
|
|
313
|
+
Currency["GEL"] = "GEL";
|
|
314
|
+
Currency["GIP"] = "GIP";
|
|
315
|
+
Currency["GMD"] = "GMD";
|
|
316
|
+
Currency["GNF"] = "GNF";
|
|
317
|
+
Currency["GTQ"] = "GTQ";
|
|
318
|
+
Currency["GYD"] = "GYD";
|
|
319
|
+
Currency["HKD"] = "HKD";
|
|
320
|
+
Currency["HNL"] = "HNL";
|
|
321
|
+
Currency["HRK"] = "HRK";
|
|
322
|
+
Currency["HTG"] = "HTG";
|
|
323
|
+
Currency["HUF"] = "HUF";
|
|
324
|
+
Currency["IDR"] = "IDR";
|
|
325
|
+
Currency["ILS"] = "ILS";
|
|
326
|
+
Currency["INR"] = "INR";
|
|
327
|
+
Currency["ISK"] = "ISK";
|
|
328
|
+
Currency["JMD"] = "JMD";
|
|
329
|
+
Currency["JPY"] = "JPY";
|
|
330
|
+
Currency["KES"] = "KES";
|
|
331
|
+
Currency["KGS"] = "KGS";
|
|
332
|
+
Currency["KHR"] = "KHR";
|
|
333
|
+
Currency["KMF"] = "KMF";
|
|
334
|
+
Currency["KRW"] = "KRW";
|
|
335
|
+
Currency["KYD"] = "KYD";
|
|
336
|
+
Currency["KZT"] = "KZT";
|
|
337
|
+
Currency["LAK"] = "LAK";
|
|
338
|
+
Currency["LBP"] = "LBP";
|
|
339
|
+
Currency["LKR"] = "LKR";
|
|
340
|
+
Currency["LRD"] = "LRD";
|
|
341
|
+
Currency["LSL"] = "LSL";
|
|
342
|
+
Currency["MAD"] = "MAD";
|
|
343
|
+
Currency["MDL"] = "MDL";
|
|
344
|
+
Currency["MGA"] = "MGA";
|
|
345
|
+
Currency["MKD"] = "MKD";
|
|
346
|
+
Currency["MMK"] = "MMK";
|
|
347
|
+
Currency["MNT"] = "MNT";
|
|
348
|
+
Currency["MOP"] = "MOP";
|
|
349
|
+
Currency["MRO"] = "MRO";
|
|
350
|
+
Currency["MUR"] = "MUR";
|
|
351
|
+
Currency["MVR"] = "MVR";
|
|
352
|
+
Currency["MWK"] = "MWK";
|
|
353
|
+
Currency["MXN"] = "MXN";
|
|
354
|
+
Currency["MYR"] = "MYR";
|
|
355
|
+
Currency["MZN"] = "MZN";
|
|
356
|
+
Currency["NAD"] = "NAD";
|
|
357
|
+
Currency["NGN"] = "NGN";
|
|
358
|
+
Currency["NIO"] = "NIO";
|
|
359
|
+
Currency["NOK"] = "NOK";
|
|
360
|
+
Currency["NPR"] = "NPR";
|
|
361
|
+
Currency["NZD"] = "NZD";
|
|
362
|
+
Currency["PAB"] = "PAB";
|
|
363
|
+
Currency["PEN"] = "PEN";
|
|
364
|
+
Currency["PGK"] = "PGK";
|
|
365
|
+
Currency["PHP"] = "PHP";
|
|
366
|
+
Currency["PKR"] = "PKR";
|
|
367
|
+
Currency["PLN"] = "PLN";
|
|
368
|
+
Currency["PYG"] = "PYG";
|
|
369
|
+
Currency["QAR"] = "QAR";
|
|
370
|
+
Currency["RON"] = "RON";
|
|
371
|
+
Currency["RSD"] = "RSD";
|
|
372
|
+
Currency["RUB"] = "RUB";
|
|
373
|
+
Currency["RWF"] = "RWF";
|
|
374
|
+
Currency["SAR"] = "SAR";
|
|
375
|
+
Currency["SBD"] = "SBD";
|
|
376
|
+
Currency["SCR"] = "SCR";
|
|
377
|
+
Currency["SEK"] = "SEK";
|
|
378
|
+
Currency["SGD"] = "SGD";
|
|
379
|
+
Currency["SHP"] = "SHP";
|
|
380
|
+
Currency["SLL"] = "SLL";
|
|
381
|
+
Currency["SOS"] = "SOS";
|
|
382
|
+
Currency["SRD"] = "SRD";
|
|
383
|
+
Currency["STD"] = "STD";
|
|
384
|
+
Currency["SZL"] = "SZL";
|
|
385
|
+
Currency["THB"] = "THB";
|
|
386
|
+
Currency["TJS"] = "TJS";
|
|
387
|
+
Currency["TOP"] = "TOP";
|
|
388
|
+
Currency["TRY"] = "TRY";
|
|
389
|
+
Currency["TTD"] = "TTD";
|
|
390
|
+
Currency["TWD"] = "TWD";
|
|
391
|
+
Currency["TZS"] = "TZS";
|
|
392
|
+
Currency["UAH"] = "UAH";
|
|
393
|
+
Currency["UGX"] = "UGX";
|
|
394
|
+
Currency["USD"] = "USD";
|
|
395
|
+
Currency["UYU"] = "UYU";
|
|
396
|
+
Currency["UZS"] = "UZS";
|
|
397
|
+
Currency["VND"] = "VND";
|
|
398
|
+
Currency["VUV"] = "VUV";
|
|
399
|
+
Currency["WST"] = "WST";
|
|
400
|
+
Currency["XAF"] = "XAF";
|
|
401
|
+
Currency["XCD"] = "XCD";
|
|
402
|
+
Currency["XOF"] = "XOF";
|
|
403
|
+
Currency["XPF"] = "XPF";
|
|
404
|
+
Currency["YER"] = "YER";
|
|
405
|
+
Currency["ZAR"] = "ZAR";
|
|
406
|
+
Currency["ZMW"] = "ZMW";
|
|
407
|
+
})(Currency = exports.Currency || (exports.Currency = {}));
|
|
408
|
+
/** @example "America/Los_Angeles" */
|
|
409
|
+
var Timezone;
|
|
410
|
+
(function (Timezone) {
|
|
411
|
+
Timezone["UTC"] = "UTC";
|
|
412
|
+
Timezone["AfricaAlgiers"] = "Africa/Algiers";
|
|
413
|
+
Timezone["AfricaCairo"] = "Africa/Cairo";
|
|
414
|
+
Timezone["AfricaCasablanca"] = "Africa/Casablanca";
|
|
415
|
+
Timezone["AfricaHarare"] = "Africa/Harare";
|
|
416
|
+
Timezone["AfricaJohannesburg"] = "Africa/Johannesburg";
|
|
417
|
+
Timezone["AfricaMonrovia"] = "Africa/Monrovia";
|
|
418
|
+
Timezone["AfricaNairobi"] = "Africa/Nairobi";
|
|
419
|
+
Timezone["AmericaArgentinaBuenosAires"] = "America/Argentina/Buenos_Aires";
|
|
420
|
+
Timezone["AmericaBogota"] = "America/Bogota";
|
|
421
|
+
Timezone["AmericaCaracas"] = "America/Caracas";
|
|
422
|
+
Timezone["AmericaChicago"] = "America/Chicago";
|
|
423
|
+
Timezone["AmericaChihuahua"] = "America/Chihuahua";
|
|
424
|
+
Timezone["AmericaDenver"] = "America/Denver";
|
|
425
|
+
Timezone["AmericaGodthab"] = "America/Godthab";
|
|
426
|
+
Timezone["AmericaGuatemala"] = "America/Guatemala";
|
|
427
|
+
Timezone["AmericaGuyana"] = "America/Guyana";
|
|
428
|
+
Timezone["AmericaHalifax"] = "America/Halifax";
|
|
429
|
+
Timezone["AmericaIndianaIndianapolis"] = "America/Indiana/Indianapolis";
|
|
430
|
+
Timezone["AmericaJuneau"] = "America/Juneau";
|
|
431
|
+
Timezone["AmericaLaPaz"] = "America/La_Paz";
|
|
432
|
+
Timezone["AmericaLima"] = "America/Lima";
|
|
433
|
+
Timezone["AmericaLosAngeles"] = "America/Los_Angeles";
|
|
434
|
+
Timezone["AmericaMazatlan"] = "America/Mazatlan";
|
|
435
|
+
Timezone["AmericaMexicoCity"] = "America/Mexico_City";
|
|
436
|
+
Timezone["AmericaMonterrey"] = "America/Monterrey";
|
|
437
|
+
Timezone["AmericaMontevideo"] = "America/Montevideo";
|
|
438
|
+
Timezone["AmericaNewYork"] = "America/New_York";
|
|
439
|
+
Timezone["AmericaPhoenix"] = "America/Phoenix";
|
|
440
|
+
Timezone["AmericaPuertoRico"] = "America/Puerto_Rico";
|
|
441
|
+
Timezone["AmericaRegina"] = "America/Regina";
|
|
442
|
+
Timezone["AmericaSantiago"] = "America/Santiago";
|
|
443
|
+
Timezone["AmericaSaoPaulo"] = "America/Sao_Paulo";
|
|
444
|
+
Timezone["AmericaStJohns"] = "America/St_Johns";
|
|
445
|
+
Timezone["AmericaTijuana"] = "America/Tijuana";
|
|
446
|
+
Timezone["AsiaAlmaty"] = "Asia/Almaty";
|
|
447
|
+
Timezone["AsiaBaghdad"] = "Asia/Baghdad";
|
|
448
|
+
Timezone["AsiaBaku"] = "Asia/Baku";
|
|
449
|
+
Timezone["AsiaBangkok"] = "Asia/Bangkok";
|
|
450
|
+
Timezone["AsiaChongqing"] = "Asia/Chongqing";
|
|
451
|
+
Timezone["AsiaColombo"] = "Asia/Colombo";
|
|
452
|
+
Timezone["AsiaDhaka"] = "Asia/Dhaka";
|
|
453
|
+
Timezone["AsiaHongKong"] = "Asia/Hong_Kong";
|
|
454
|
+
Timezone["AsiaIrkutsk"] = "Asia/Irkutsk";
|
|
455
|
+
Timezone["AsiaJakarta"] = "Asia/Jakarta";
|
|
456
|
+
Timezone["AsiaJerusalem"] = "Asia/Jerusalem";
|
|
457
|
+
Timezone["AsiaKabul"] = "Asia/Kabul";
|
|
458
|
+
Timezone["AsiaKamchatka"] = "Asia/Kamchatka";
|
|
459
|
+
Timezone["AsiaKarachi"] = "Asia/Karachi";
|
|
460
|
+
Timezone["AsiaKathmandu"] = "Asia/Kathmandu";
|
|
461
|
+
Timezone["AsiaKolkata"] = "Asia/Kolkata";
|
|
462
|
+
Timezone["AsiaKrasnoyarsk"] = "Asia/Krasnoyarsk";
|
|
463
|
+
Timezone["AsiaKualaLumpur"] = "Asia/Kuala_Lumpur";
|
|
464
|
+
Timezone["AsiaKuwait"] = "Asia/Kuwait";
|
|
465
|
+
Timezone["AsiaMagadan"] = "Asia/Magadan";
|
|
466
|
+
Timezone["AsiaMuscat"] = "Asia/Muscat";
|
|
467
|
+
Timezone["AsiaNovosibirsk"] = "Asia/Novosibirsk";
|
|
468
|
+
Timezone["AsiaRangoon"] = "Asia/Rangoon";
|
|
469
|
+
Timezone["AsiaRiyadh"] = "Asia/Riyadh";
|
|
470
|
+
Timezone["AsiaSeoul"] = "Asia/Seoul";
|
|
471
|
+
Timezone["AsiaShanghai"] = "Asia/Shanghai";
|
|
472
|
+
Timezone["AsiaSingapore"] = "Asia/Singapore";
|
|
473
|
+
Timezone["AsiaSrednekolymsk"] = "Asia/Srednekolymsk";
|
|
474
|
+
Timezone["AsiaTaipei"] = "Asia/Taipei";
|
|
475
|
+
Timezone["AsiaTashkent"] = "Asia/Tashkent";
|
|
476
|
+
Timezone["AsiaTbilisi"] = "Asia/Tbilisi";
|
|
477
|
+
Timezone["AsiaTehran"] = "Asia/Tehran";
|
|
478
|
+
Timezone["AsiaTokyo"] = "Asia/Tokyo";
|
|
479
|
+
Timezone["AsiaUlaanbaatar"] = "Asia/Ulaanbaatar";
|
|
480
|
+
Timezone["AsiaUrumqi"] = "Asia/Urumqi";
|
|
481
|
+
Timezone["AsiaVladivostok"] = "Asia/Vladivostok";
|
|
482
|
+
Timezone["AsiaYakutsk"] = "Asia/Yakutsk";
|
|
483
|
+
Timezone["AsiaYekaterinburg"] = "Asia/Yekaterinburg";
|
|
484
|
+
Timezone["AsiaYerevan"] = "Asia/Yerevan";
|
|
485
|
+
Timezone["AtlanticAzores"] = "Atlantic/Azores";
|
|
486
|
+
Timezone["AtlanticCapeVerde"] = "Atlantic/Cape_Verde";
|
|
487
|
+
Timezone["AtlanticSouthGeorgia"] = "Atlantic/South_Georgia";
|
|
488
|
+
Timezone["AustraliaAdelaide"] = "Australia/Adelaide";
|
|
489
|
+
Timezone["AustraliaBrisbane"] = "Australia/Brisbane";
|
|
490
|
+
Timezone["AustraliaDarwin"] = "Australia/Darwin";
|
|
491
|
+
Timezone["AustraliaHobart"] = "Australia/Hobart";
|
|
492
|
+
Timezone["AustraliaMelbourne"] = "Australia/Melbourne";
|
|
493
|
+
Timezone["AustraliaPerth"] = "Australia/Perth";
|
|
494
|
+
Timezone["AustraliaSydney"] = "Australia/Sydney";
|
|
495
|
+
Timezone["EuropeAmsterdam"] = "Europe/Amsterdam";
|
|
496
|
+
Timezone["EuropeAthens"] = "Europe/Athens";
|
|
497
|
+
Timezone["EuropeBelgrade"] = "Europe/Belgrade";
|
|
498
|
+
Timezone["EuropeBerlin"] = "Europe/Berlin";
|
|
499
|
+
Timezone["EuropeBratislava"] = "Europe/Bratislava";
|
|
500
|
+
Timezone["EuropeBrussels"] = "Europe/Brussels";
|
|
501
|
+
Timezone["EuropeBucharest"] = "Europe/Bucharest";
|
|
502
|
+
Timezone["EuropeBudapest"] = "Europe/Budapest";
|
|
503
|
+
Timezone["EuropeCopenhagen"] = "Europe/Copenhagen";
|
|
504
|
+
Timezone["EuropeDublin"] = "Europe/Dublin";
|
|
505
|
+
Timezone["EuropeHelsinki"] = "Europe/Helsinki";
|
|
506
|
+
Timezone["EuropeIstanbul"] = "Europe/Istanbul";
|
|
507
|
+
Timezone["EuropeKaliningrad"] = "Europe/Kaliningrad";
|
|
508
|
+
Timezone["EuropeKiev"] = "Europe/Kiev";
|
|
509
|
+
Timezone["EuropeLisbon"] = "Europe/Lisbon";
|
|
510
|
+
Timezone["EuropeLjubljana"] = "Europe/Ljubljana";
|
|
511
|
+
Timezone["EuropeLondon"] = "Europe/London";
|
|
512
|
+
Timezone["EuropeMadrid"] = "Europe/Madrid";
|
|
513
|
+
Timezone["EuropeMinsk"] = "Europe/Minsk";
|
|
514
|
+
Timezone["EuropeMoscow"] = "Europe/Moscow";
|
|
515
|
+
Timezone["EuropeParis"] = "Europe/Paris";
|
|
516
|
+
Timezone["EuropePrague"] = "Europe/Prague";
|
|
517
|
+
Timezone["EuropeRiga"] = "Europe/Riga";
|
|
518
|
+
Timezone["EuropeRome"] = "Europe/Rome";
|
|
519
|
+
Timezone["EuropeSamara"] = "Europe/Samara";
|
|
520
|
+
Timezone["EuropeSarajevo"] = "Europe/Sarajevo";
|
|
521
|
+
Timezone["EuropeSkopje"] = "Europe/Skopje";
|
|
522
|
+
Timezone["EuropeSofia"] = "Europe/Sofia";
|
|
523
|
+
Timezone["EuropeStockholm"] = "Europe/Stockholm";
|
|
524
|
+
Timezone["EuropeTallinn"] = "Europe/Tallinn";
|
|
525
|
+
Timezone["EuropeVienna"] = "Europe/Vienna";
|
|
526
|
+
Timezone["EuropeVilnius"] = "Europe/Vilnius";
|
|
527
|
+
Timezone["EuropeVolgograd"] = "Europe/Volgograd";
|
|
528
|
+
Timezone["EuropeWarsaw"] = "Europe/Warsaw";
|
|
529
|
+
Timezone["EuropeZagreb"] = "Europe/Zagreb";
|
|
530
|
+
Timezone["EuropeZurich"] = "Europe/Zurich";
|
|
531
|
+
Timezone["GMT12"] = "GMT+12";
|
|
532
|
+
Timezone["PacificApia"] = "Pacific/Apia";
|
|
533
|
+
Timezone["PacificAuckland"] = "Pacific/Auckland";
|
|
534
|
+
Timezone["PacificChatham"] = "Pacific/Chatham";
|
|
535
|
+
Timezone["PacificFakaofo"] = "Pacific/Fakaofo";
|
|
536
|
+
Timezone["PacificFiji"] = "Pacific/Fiji";
|
|
537
|
+
Timezone["PacificGuadalcanal"] = "Pacific/Guadalcanal";
|
|
538
|
+
Timezone["PacificGuam"] = "Pacific/Guam";
|
|
539
|
+
Timezone["PacificHonolulu"] = "Pacific/Honolulu";
|
|
540
|
+
Timezone["PacificMajuro"] = "Pacific/Majuro";
|
|
541
|
+
Timezone["PacificMidway"] = "Pacific/Midway";
|
|
542
|
+
Timezone["PacificNoumea"] = "Pacific/Noumea";
|
|
543
|
+
Timezone["PacificPagoPago"] = "Pacific/Pago_Pago";
|
|
544
|
+
Timezone["PacificPortMoresby"] = "Pacific/Port_Moresby";
|
|
545
|
+
Timezone["PacificTongatapu"] = "Pacific/Tongatapu";
|
|
546
|
+
})(Timezone = exports.Timezone || (exports.Timezone = {}));
|
|
14
547
|
var ContentType;
|
|
15
548
|
(function (ContentType) {
|
|
16
549
|
ContentType["Json"] = "application/json";
|
|
@@ -152,7 +685,8 @@ class HttpClient {
|
|
|
152
685
|
exports.HttpClient = HttpClient;
|
|
153
686
|
/**
|
|
154
687
|
* @title Lago API documentation
|
|
155
|
-
* @version 0.
|
|
688
|
+
* @version 0.39.0-beta
|
|
689
|
+
* @license AGPLv3
|
|
156
690
|
* @baseUrl https://api.getlago.com/api/v1
|
|
157
691
|
* @externalDocs https://github.com/getlago
|
|
158
692
|
* @contact <tech@getlago.com>
|
|
@@ -160,18 +694,18 @@ exports.HttpClient = HttpClient;
|
|
|
160
694
|
* Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
|
|
161
695
|
*/
|
|
162
696
|
class Api extends HttpClient {
|
|
163
|
-
|
|
697
|
+
addOns = {
|
|
164
698
|
/**
|
|
165
|
-
* @description
|
|
699
|
+
* @description This endpoint is used to create an add-on that can be then attached to a one-off invoice.
|
|
166
700
|
*
|
|
167
|
-
* @tags
|
|
168
|
-
* @name
|
|
169
|
-
* @summary Create
|
|
170
|
-
* @request POST:/
|
|
701
|
+
* @tags add_ons
|
|
702
|
+
* @name CreateAddOn
|
|
703
|
+
* @summary Create an add-on
|
|
704
|
+
* @request POST:/add_ons
|
|
171
705
|
* @secure
|
|
172
706
|
*/
|
|
173
|
-
|
|
174
|
-
path: `/
|
|
707
|
+
createAddOn: (data, params = {}) => this.request({
|
|
708
|
+
path: `/add_ons`,
|
|
175
709
|
method: "POST",
|
|
176
710
|
body: data,
|
|
177
711
|
secure: true,
|
|
@@ -180,16 +714,16 @@ class Api extends HttpClient {
|
|
|
180
714
|
...params,
|
|
181
715
|
}),
|
|
182
716
|
/**
|
|
183
|
-
* @description
|
|
717
|
+
* @description This endpoint is used to list all existing add-ons.
|
|
184
718
|
*
|
|
185
|
-
* @tags
|
|
186
|
-
* @name
|
|
187
|
-
* @summary
|
|
188
|
-
* @request GET:/
|
|
719
|
+
* @tags add_ons
|
|
720
|
+
* @name FindAllAddOns
|
|
721
|
+
* @summary List all add-ons
|
|
722
|
+
* @request GET:/add_ons
|
|
189
723
|
* @secure
|
|
190
724
|
*/
|
|
191
|
-
|
|
192
|
-
path: `/
|
|
725
|
+
findAllAddOns: (query, params = {}) => this.request({
|
|
726
|
+
path: `/add_ons`,
|
|
193
727
|
method: "GET",
|
|
194
728
|
query: query,
|
|
195
729
|
secure: true,
|
|
@@ -197,16 +731,16 @@ class Api extends HttpClient {
|
|
|
197
731
|
...params,
|
|
198
732
|
}),
|
|
199
733
|
/**
|
|
200
|
-
* @description
|
|
734
|
+
* @description This endpoint is used to update an existing add-on.
|
|
201
735
|
*
|
|
202
|
-
* @tags
|
|
203
|
-
* @name
|
|
204
|
-
* @summary Update an
|
|
205
|
-
* @request PUT:/
|
|
736
|
+
* @tags add_ons
|
|
737
|
+
* @name UpdateAddOn
|
|
738
|
+
* @summary Update an add-on
|
|
739
|
+
* @request PUT:/add_ons/{code}
|
|
206
740
|
* @secure
|
|
207
741
|
*/
|
|
208
|
-
|
|
209
|
-
path: `/
|
|
742
|
+
updateAddOn: (code, data, params = {}) => this.request({
|
|
743
|
+
path: `/add_ons/${code}`,
|
|
210
744
|
method: "PUT",
|
|
211
745
|
body: data,
|
|
212
746
|
secure: true,
|
|
@@ -215,48 +749,89 @@ class Api extends HttpClient {
|
|
|
215
749
|
...params,
|
|
216
750
|
}),
|
|
217
751
|
/**
|
|
218
|
-
* @description
|
|
752
|
+
* @description This endpoint is used to retrieve a specific add-on.
|
|
219
753
|
*
|
|
220
|
-
* @tags
|
|
221
|
-
* @name
|
|
222
|
-
* @summary
|
|
223
|
-
* @request GET:/
|
|
754
|
+
* @tags add_ons
|
|
755
|
+
* @name FindAddOn
|
|
756
|
+
* @summary Retrieve an add-on
|
|
757
|
+
* @request GET:/add_ons/{code}
|
|
224
758
|
* @secure
|
|
225
759
|
*/
|
|
226
|
-
|
|
227
|
-
path: `/
|
|
760
|
+
findAddOn: (code, params = {}) => this.request({
|
|
761
|
+
path: `/add_ons/${code}`,
|
|
228
762
|
method: "GET",
|
|
229
763
|
secure: true,
|
|
230
764
|
format: "json",
|
|
231
765
|
...params,
|
|
232
766
|
}),
|
|
233
767
|
/**
|
|
234
|
-
* @description
|
|
768
|
+
* @description This endpoint is used to delete an existing add-on.
|
|
235
769
|
*
|
|
236
|
-
* @tags
|
|
237
|
-
* @name
|
|
238
|
-
* @summary Delete
|
|
239
|
-
* @request DELETE:/
|
|
770
|
+
* @tags add_ons
|
|
771
|
+
* @name DestroyAddOn
|
|
772
|
+
* @summary Delete an add-on
|
|
773
|
+
* @request DELETE:/add_ons/{code}
|
|
240
774
|
* @secure
|
|
241
775
|
*/
|
|
242
|
-
|
|
243
|
-
path: `/
|
|
776
|
+
destroyAddOn: (code, params = {}) => this.request({
|
|
777
|
+
path: `/add_ons/${code}`,
|
|
244
778
|
method: "DELETE",
|
|
245
779
|
secure: true,
|
|
246
780
|
format: "json",
|
|
247
781
|
...params,
|
|
248
782
|
}),
|
|
783
|
+
};
|
|
784
|
+
appliedAddOns = {
|
|
249
785
|
/**
|
|
250
|
-
* @description
|
|
786
|
+
* @description Apply an add-on to a customer
|
|
251
787
|
*
|
|
252
|
-
* @tags
|
|
253
|
-
* @name
|
|
254
|
-
* @summary
|
|
255
|
-
* @request
|
|
788
|
+
* @tags add_ons
|
|
789
|
+
* @name ApplyAddOn
|
|
790
|
+
* @summary Apply an add-on to a customer
|
|
791
|
+
* @request POST:/applied_add_ons
|
|
792
|
+
* @deprecated
|
|
256
793
|
* @secure
|
|
257
794
|
*/
|
|
258
|
-
|
|
259
|
-
path: `/
|
|
795
|
+
applyAddOn: (data, params = {}) => this.request({
|
|
796
|
+
path: `/applied_add_ons`,
|
|
797
|
+
method: "POST",
|
|
798
|
+
body: data,
|
|
799
|
+
secure: true,
|
|
800
|
+
type: ContentType.Json,
|
|
801
|
+
format: "json",
|
|
802
|
+
...params,
|
|
803
|
+
}),
|
|
804
|
+
};
|
|
805
|
+
appliedCoupons = {
|
|
806
|
+
/**
|
|
807
|
+
* @description This endpoint is used to apply a specific coupon to a customer, before or during a subscription.
|
|
808
|
+
*
|
|
809
|
+
* @tags coupons
|
|
810
|
+
* @name ApplyCoupon
|
|
811
|
+
* @summary Apply a coupon to a customer
|
|
812
|
+
* @request POST:/applied_coupons
|
|
813
|
+
* @secure
|
|
814
|
+
*/
|
|
815
|
+
applyCoupon: (data, params = {}) => this.request({
|
|
816
|
+
path: `/applied_coupons`,
|
|
817
|
+
method: "POST",
|
|
818
|
+
body: data,
|
|
819
|
+
secure: true,
|
|
820
|
+
type: ContentType.Json,
|
|
821
|
+
format: "json",
|
|
822
|
+
...params,
|
|
823
|
+
}),
|
|
824
|
+
/**
|
|
825
|
+
* @description This endpoint is used to list all applied coupons. You can filter by coupon status and by customer.
|
|
826
|
+
*
|
|
827
|
+
* @tags coupons
|
|
828
|
+
* @name FindAllAppliedCoupons
|
|
829
|
+
* @summary List all applied coupons
|
|
830
|
+
* @request GET:/applied_coupons
|
|
831
|
+
* @secure
|
|
832
|
+
*/
|
|
833
|
+
findAllAppliedCoupons: (query, params = {}) => this.request({
|
|
834
|
+
path: `/applied_coupons`,
|
|
260
835
|
method: "GET",
|
|
261
836
|
query: query,
|
|
262
837
|
secure: true,
|
|
@@ -264,18 +839,18 @@ class Api extends HttpClient {
|
|
|
264
839
|
...params,
|
|
265
840
|
}),
|
|
266
841
|
};
|
|
267
|
-
|
|
842
|
+
billableMetrics = {
|
|
268
843
|
/**
|
|
269
|
-
* @description
|
|
844
|
+
* @description This endpoint creates a new billable metric representing a pricing component of your application.
|
|
270
845
|
*
|
|
271
|
-
* @tags
|
|
272
|
-
* @name
|
|
273
|
-
* @summary Create a
|
|
274
|
-
* @request POST:/
|
|
846
|
+
* @tags billable_metrics
|
|
847
|
+
* @name CreateBillableMetric
|
|
848
|
+
* @summary Create a billable metric
|
|
849
|
+
* @request POST:/billable_metrics
|
|
275
850
|
* @secure
|
|
276
851
|
*/
|
|
277
|
-
|
|
278
|
-
path: `/
|
|
852
|
+
createBillableMetric: (data, params = {}) => this.request({
|
|
853
|
+
path: `/billable_metrics`,
|
|
279
854
|
method: "POST",
|
|
280
855
|
body: data,
|
|
281
856
|
secure: true,
|
|
@@ -284,16 +859,16 @@ class Api extends HttpClient {
|
|
|
284
859
|
...params,
|
|
285
860
|
}),
|
|
286
861
|
/**
|
|
287
|
-
* @description
|
|
862
|
+
* @description This endpoint retrieves all existing billable metrics that represent pricing components of your application.
|
|
288
863
|
*
|
|
289
|
-
* @tags
|
|
290
|
-
* @name
|
|
291
|
-
* @summary
|
|
292
|
-
* @request GET:/
|
|
864
|
+
* @tags billable_metrics
|
|
865
|
+
* @name FindAllBillableMetrics
|
|
866
|
+
* @summary List all billable metrics
|
|
867
|
+
* @request GET:/billable_metrics
|
|
293
868
|
* @secure
|
|
294
869
|
*/
|
|
295
|
-
|
|
296
|
-
path: `/
|
|
870
|
+
findAllBillableMetrics: (query, params = {}) => this.request({
|
|
871
|
+
path: `/billable_metrics`,
|
|
297
872
|
method: "GET",
|
|
298
873
|
query: query,
|
|
299
874
|
secure: true,
|
|
@@ -301,16 +876,16 @@ class Api extends HttpClient {
|
|
|
301
876
|
...params,
|
|
302
877
|
}),
|
|
303
878
|
/**
|
|
304
|
-
* @description
|
|
879
|
+
* @description This endpoint updates an existing billable metric representing a pricing component of your application.
|
|
305
880
|
*
|
|
306
|
-
* @tags
|
|
307
|
-
* @name
|
|
308
|
-
* @summary Update
|
|
309
|
-
* @request PUT:/
|
|
881
|
+
* @tags billable_metrics
|
|
882
|
+
* @name UpdateBillableMetric
|
|
883
|
+
* @summary Update a billable metric
|
|
884
|
+
* @request PUT:/billable_metrics/{code}
|
|
310
885
|
* @secure
|
|
311
886
|
*/
|
|
312
|
-
|
|
313
|
-
path: `/
|
|
887
|
+
updateBillableMetric: (code, data, params = {}) => this.request({
|
|
888
|
+
path: `/billable_metrics/${code}`,
|
|
314
889
|
method: "PUT",
|
|
315
890
|
body: data,
|
|
316
891
|
secure: true,
|
|
@@ -319,65 +894,62 @@ class Api extends HttpClient {
|
|
|
319
894
|
...params,
|
|
320
895
|
}),
|
|
321
896
|
/**
|
|
322
|
-
* @description
|
|
897
|
+
* @description This endpoint deletes an existing billable metric representing a pricing component of your application.
|
|
323
898
|
*
|
|
324
|
-
* @tags
|
|
325
|
-
* @name
|
|
326
|
-
* @summary
|
|
327
|
-
* @request
|
|
899
|
+
* @tags billable_metrics
|
|
900
|
+
* @name DestroyBillableMetric
|
|
901
|
+
* @summary Delete a billable metric
|
|
902
|
+
* @request DELETE:/billable_metrics/{code}
|
|
328
903
|
* @secure
|
|
329
904
|
*/
|
|
330
|
-
|
|
331
|
-
path: `/
|
|
332
|
-
method: "
|
|
905
|
+
destroyBillableMetric: (code, params = {}) => this.request({
|
|
906
|
+
path: `/billable_metrics/${code}`,
|
|
907
|
+
method: "DELETE",
|
|
333
908
|
secure: true,
|
|
334
909
|
format: "json",
|
|
335
910
|
...params,
|
|
336
911
|
}),
|
|
337
912
|
/**
|
|
338
|
-
* @description
|
|
913
|
+
* @description This endpoint retrieves an existing billable metric that represents a pricing component of your application. The billable metric is identified by its unique code.
|
|
339
914
|
*
|
|
340
|
-
* @tags
|
|
341
|
-
* @name
|
|
342
|
-
* @summary
|
|
343
|
-
* @request
|
|
915
|
+
* @tags billable_metrics
|
|
916
|
+
* @name FindBillableMetric
|
|
917
|
+
* @summary Retrieve a billable metric
|
|
918
|
+
* @request GET:/billable_metrics/{code}
|
|
344
919
|
* @secure
|
|
345
920
|
*/
|
|
346
|
-
|
|
347
|
-
path: `/
|
|
348
|
-
method: "
|
|
921
|
+
findBillableMetric: (code, params = {}) => this.request({
|
|
922
|
+
path: `/billable_metrics/${code}`,
|
|
923
|
+
method: "GET",
|
|
349
924
|
secure: true,
|
|
350
925
|
format: "json",
|
|
351
926
|
...params,
|
|
352
927
|
}),
|
|
353
|
-
};
|
|
354
|
-
appliedAddOns = {
|
|
355
928
|
/**
|
|
356
|
-
* @description
|
|
929
|
+
* @description This endpoint retrieves all groups for a billable metric.
|
|
357
930
|
*
|
|
358
|
-
* @tags
|
|
359
|
-
* @name
|
|
360
|
-
* @summary
|
|
361
|
-
* @request
|
|
931
|
+
* @tags billable_metrics
|
|
932
|
+
* @name FindAllBillableMetricGroups
|
|
933
|
+
* @summary Find a billable metric's groups
|
|
934
|
+
* @request GET:/billable_metrics/{code}/groups
|
|
362
935
|
* @secure
|
|
363
936
|
*/
|
|
364
|
-
|
|
365
|
-
path: `/
|
|
366
|
-
method: "
|
|
367
|
-
|
|
937
|
+
findAllBillableMetricGroups: (code, query, params = {}) => this.request({
|
|
938
|
+
path: `/billable_metrics/${code}/groups`,
|
|
939
|
+
method: "GET",
|
|
940
|
+
query: query,
|
|
368
941
|
secure: true,
|
|
369
|
-
type: ContentType.Json,
|
|
370
942
|
format: "json",
|
|
371
943
|
...params,
|
|
372
944
|
}),
|
|
373
945
|
};
|
|
374
946
|
coupons = {
|
|
375
947
|
/**
|
|
376
|
-
* @description
|
|
948
|
+
* @description This endpoint is used to create a coupon that can be then attached to a customer to create a discount.
|
|
377
949
|
*
|
|
378
950
|
* @tags coupons
|
|
379
951
|
* @name CreateCoupon
|
|
380
|
-
* @summary Create a
|
|
952
|
+
* @summary Create a coupon
|
|
381
953
|
* @request POST:/coupons
|
|
382
954
|
* @secure
|
|
383
955
|
*/
|
|
@@ -391,11 +963,11 @@ class Api extends HttpClient {
|
|
|
391
963
|
...params,
|
|
392
964
|
}),
|
|
393
965
|
/**
|
|
394
|
-
* @description
|
|
966
|
+
* @description This endpoint is used to list all existing coupons.
|
|
395
967
|
*
|
|
396
968
|
* @tags coupons
|
|
397
969
|
* @name FindAllCoupons
|
|
398
|
-
* @summary
|
|
970
|
+
* @summary List all coupons
|
|
399
971
|
* @request GET:/coupons
|
|
400
972
|
* @secure
|
|
401
973
|
*/
|
|
@@ -408,11 +980,11 @@ class Api extends HttpClient {
|
|
|
408
980
|
...params,
|
|
409
981
|
}),
|
|
410
982
|
/**
|
|
411
|
-
* @description
|
|
983
|
+
* @description This endpoint is used to update a coupon that can be then attached to a customer to create a discount.
|
|
412
984
|
*
|
|
413
985
|
* @tags coupons
|
|
414
986
|
* @name UpdateCoupon
|
|
415
|
-
* @summary Update
|
|
987
|
+
* @summary Update a coupon
|
|
416
988
|
* @request PUT:/coupons/{code}
|
|
417
989
|
* @secure
|
|
418
990
|
*/
|
|
@@ -426,11 +998,11 @@ class Api extends HttpClient {
|
|
|
426
998
|
...params,
|
|
427
999
|
}),
|
|
428
1000
|
/**
|
|
429
|
-
* @description
|
|
1001
|
+
* @description This endpoint is used to retrieve a specific coupon.
|
|
430
1002
|
*
|
|
431
1003
|
* @tags coupons
|
|
432
1004
|
* @name FindCoupon
|
|
433
|
-
* @summary
|
|
1005
|
+
* @summary Retrieve a coupon
|
|
434
1006
|
* @request GET:/coupons/{code}
|
|
435
1007
|
* @secure
|
|
436
1008
|
*/
|
|
@@ -442,7 +1014,7 @@ class Api extends HttpClient {
|
|
|
442
1014
|
...params,
|
|
443
1015
|
}),
|
|
444
1016
|
/**
|
|
445
|
-
* @description
|
|
1017
|
+
* @description This endpoint is used to delete a coupon.
|
|
446
1018
|
*
|
|
447
1019
|
* @tags coupons
|
|
448
1020
|
* @name DestroyCoupon
|
|
@@ -458,18 +1030,18 @@ class Api extends HttpClient {
|
|
|
458
1030
|
...params,
|
|
459
1031
|
}),
|
|
460
1032
|
};
|
|
461
|
-
|
|
1033
|
+
creditNotes = {
|
|
462
1034
|
/**
|
|
463
|
-
* @description
|
|
1035
|
+
* @description This endpoint creates a new credit note.
|
|
464
1036
|
*
|
|
465
|
-
* @tags
|
|
466
|
-
* @name
|
|
467
|
-
* @summary
|
|
468
|
-
* @request POST:/
|
|
1037
|
+
* @tags credit_notes
|
|
1038
|
+
* @name CreateCreditNote
|
|
1039
|
+
* @summary Create a credit note
|
|
1040
|
+
* @request POST:/credit_notes
|
|
469
1041
|
* @secure
|
|
470
1042
|
*/
|
|
471
|
-
|
|
472
|
-
path: `/
|
|
1043
|
+
createCreditNote: (data, params = {}) => this.request({
|
|
1044
|
+
path: `/credit_notes`,
|
|
473
1045
|
method: "POST",
|
|
474
1046
|
body: data,
|
|
475
1047
|
secure: true,
|
|
@@ -478,35 +1050,33 @@ class Api extends HttpClient {
|
|
|
478
1050
|
...params,
|
|
479
1051
|
}),
|
|
480
1052
|
/**
|
|
481
|
-
* @description
|
|
1053
|
+
* @description This endpoint list all existing credit notes.
|
|
482
1054
|
*
|
|
483
|
-
* @tags
|
|
484
|
-
* @name
|
|
485
|
-
* @summary
|
|
486
|
-
* @request GET:/
|
|
1055
|
+
* @tags credit_notes
|
|
1056
|
+
* @name FindAllCreditNotes
|
|
1057
|
+
* @summary List all credit notes
|
|
1058
|
+
* @request GET:/credit_notes
|
|
487
1059
|
* @secure
|
|
488
1060
|
*/
|
|
489
|
-
|
|
490
|
-
path: `/
|
|
1061
|
+
findAllCreditNotes: (query, params = {}) => this.request({
|
|
1062
|
+
path: `/credit_notes`,
|
|
491
1063
|
method: "GET",
|
|
492
1064
|
query: query,
|
|
493
1065
|
secure: true,
|
|
494
1066
|
format: "json",
|
|
495
1067
|
...params,
|
|
496
1068
|
}),
|
|
497
|
-
};
|
|
498
|
-
organizations = {
|
|
499
1069
|
/**
|
|
500
|
-
* @description
|
|
1070
|
+
* @description This endpoint updates an existing credit note.
|
|
501
1071
|
*
|
|
502
|
-
* @tags
|
|
503
|
-
* @name
|
|
504
|
-
* @summary Update
|
|
505
|
-
* @request PUT:/
|
|
1072
|
+
* @tags credit_notes
|
|
1073
|
+
* @name UpdateCreditNote
|
|
1074
|
+
* @summary Update a credit note
|
|
1075
|
+
* @request PUT:/credit_notes/{lago_id}
|
|
506
1076
|
* @secure
|
|
507
1077
|
*/
|
|
508
|
-
|
|
509
|
-
path: `/
|
|
1078
|
+
updateCreditNote: (lagoId, data, params = {}) => this.request({
|
|
1079
|
+
path: `/credit_notes/${lagoId}`,
|
|
510
1080
|
method: "PUT",
|
|
511
1081
|
body: data,
|
|
512
1082
|
secure: true,
|
|
@@ -514,10 +1084,58 @@ class Api extends HttpClient {
|
|
|
514
1084
|
format: "json",
|
|
515
1085
|
...params,
|
|
516
1086
|
}),
|
|
1087
|
+
/**
|
|
1088
|
+
* @description This endpoint retrieves an existing credit note.
|
|
1089
|
+
*
|
|
1090
|
+
* @tags credit_notes
|
|
1091
|
+
* @name FindCreditNote
|
|
1092
|
+
* @summary Retrieve a credit note
|
|
1093
|
+
* @request GET:/credit_notes/{lago_id}
|
|
1094
|
+
* @secure
|
|
1095
|
+
*/
|
|
1096
|
+
findCreditNote: (lagoId, params = {}) => this.request({
|
|
1097
|
+
path: `/credit_notes/${lagoId}`,
|
|
1098
|
+
method: "GET",
|
|
1099
|
+
secure: true,
|
|
1100
|
+
format: "json",
|
|
1101
|
+
...params,
|
|
1102
|
+
}),
|
|
1103
|
+
/**
|
|
1104
|
+
* @description This endpoint downloads the PDF of an existing credit note.
|
|
1105
|
+
*
|
|
1106
|
+
* @tags credit_notes
|
|
1107
|
+
* @name DownloadCreditNote
|
|
1108
|
+
* @summary Download a credit note PDF
|
|
1109
|
+
* @request POST:/credit_notes/{lago_id}/download
|
|
1110
|
+
* @secure
|
|
1111
|
+
*/
|
|
1112
|
+
downloadCreditNote: (lagoId, params = {}) => this.request({
|
|
1113
|
+
path: `/credit_notes/${lagoId}/download`,
|
|
1114
|
+
method: "POST",
|
|
1115
|
+
secure: true,
|
|
1116
|
+
format: "json",
|
|
1117
|
+
...params,
|
|
1118
|
+
}),
|
|
1119
|
+
/**
|
|
1120
|
+
* @description This endpoint voids an existing credit note.
|
|
1121
|
+
*
|
|
1122
|
+
* @tags credit_notes
|
|
1123
|
+
* @name VoidCreditNote
|
|
1124
|
+
* @summary Void a credit note
|
|
1125
|
+
* @request PUT:/credit_notes/{lago_id}/void
|
|
1126
|
+
* @secure
|
|
1127
|
+
*/
|
|
1128
|
+
voidCreditNote: (lagoId, params = {}) => this.request({
|
|
1129
|
+
path: `/credit_notes/${lagoId}/void`,
|
|
1130
|
+
method: "PUT",
|
|
1131
|
+
secure: true,
|
|
1132
|
+
format: "json",
|
|
1133
|
+
...params,
|
|
1134
|
+
}),
|
|
517
1135
|
};
|
|
518
1136
|
customers = {
|
|
519
1137
|
/**
|
|
520
|
-
* @description
|
|
1138
|
+
* @description This endpoint creates a new customer.
|
|
521
1139
|
*
|
|
522
1140
|
* @tags customers
|
|
523
1141
|
* @name CreateCustomer
|
|
@@ -535,11 +1153,11 @@ class Api extends HttpClient {
|
|
|
535
1153
|
...params,
|
|
536
1154
|
}),
|
|
537
1155
|
/**
|
|
538
|
-
* @description
|
|
1156
|
+
* @description This endpoint retrieves all existing customers.
|
|
539
1157
|
*
|
|
540
1158
|
* @tags customers
|
|
541
1159
|
* @name FindAllCustomers
|
|
542
|
-
* @summary
|
|
1160
|
+
* @summary List all customers
|
|
543
1161
|
* @request GET:/customers
|
|
544
1162
|
* @secure
|
|
545
1163
|
*/
|
|
@@ -552,11 +1170,11 @@ class Api extends HttpClient {
|
|
|
552
1170
|
...params,
|
|
553
1171
|
}),
|
|
554
1172
|
/**
|
|
555
|
-
* @description
|
|
1173
|
+
* @description This endpoint retrieves an existing customer.
|
|
556
1174
|
*
|
|
557
1175
|
* @tags customers
|
|
558
1176
|
* @name FindCustomer
|
|
559
|
-
* @summary
|
|
1177
|
+
* @summary Retrieve a customer
|
|
560
1178
|
* @request GET:/customers/{external_id}
|
|
561
1179
|
* @secure
|
|
562
1180
|
*/
|
|
@@ -568,7 +1186,7 @@ class Api extends HttpClient {
|
|
|
568
1186
|
...params,
|
|
569
1187
|
}),
|
|
570
1188
|
/**
|
|
571
|
-
* @description
|
|
1189
|
+
* @description This endpoint deletes an existing customer.
|
|
572
1190
|
*
|
|
573
1191
|
* @tags customers
|
|
574
1192
|
* @name DestroyCustomer
|
|
@@ -584,118 +1202,359 @@ class Api extends HttpClient {
|
|
|
584
1202
|
...params,
|
|
585
1203
|
}),
|
|
586
1204
|
/**
|
|
587
|
-
* @description
|
|
1205
|
+
* @description This endpoint is used to delete a specific coupon that has been applied to a customer.
|
|
1206
|
+
*
|
|
1207
|
+
* @tags coupons, customers
|
|
1208
|
+
* @name DeleteAppliedCoupon
|
|
1209
|
+
* @summary Delete an applied coupon
|
|
1210
|
+
* @request DELETE:/customers/{external_customer_id}/applied_coupons/{applied_coupon_id}
|
|
1211
|
+
* @secure
|
|
1212
|
+
*/
|
|
1213
|
+
deleteAppliedCoupon: (externalCustomerId, appliedCouponId, params = {}) => this.request({
|
|
1214
|
+
path: `/customers/${externalCustomerId}/applied_coupons/${appliedCouponId}`,
|
|
1215
|
+
method: "DELETE",
|
|
1216
|
+
secure: true,
|
|
1217
|
+
format: "json",
|
|
1218
|
+
...params,
|
|
1219
|
+
}),
|
|
1220
|
+
/**
|
|
1221
|
+
* @description Apply an existing tax to a customer
|
|
1222
|
+
*
|
|
1223
|
+
* @tags customers
|
|
1224
|
+
* @name ApplyTax
|
|
1225
|
+
* @summary Apply a tax
|
|
1226
|
+
* @request POST:/customers/{external_customer_id}/applied_taxes
|
|
1227
|
+
* @secure
|
|
1228
|
+
*/
|
|
1229
|
+
applyTax: (externalCustomerId, data, params = {}) => this.request({
|
|
1230
|
+
path: `/customers/${externalCustomerId}/applied_taxes`,
|
|
1231
|
+
method: "POST",
|
|
1232
|
+
body: data,
|
|
1233
|
+
secure: true,
|
|
1234
|
+
type: ContentType.Json,
|
|
1235
|
+
format: "json",
|
|
1236
|
+
...params,
|
|
1237
|
+
}),
|
|
1238
|
+
/**
|
|
1239
|
+
* @description Delete customer's appplied tax
|
|
1240
|
+
*
|
|
1241
|
+
* @tags customers
|
|
1242
|
+
* @name DeleteAppliedTax
|
|
1243
|
+
* @summary Delete customer's appplied tax
|
|
1244
|
+
* @request DELETE:/customers/{external_customer_id}/applied_taxes/{tax_code}
|
|
1245
|
+
* @secure
|
|
1246
|
+
*/
|
|
1247
|
+
deleteAppliedTax: (externalCustomerId, taxCode, params = {}) => this.request({
|
|
1248
|
+
path: `/customers/${externalCustomerId}/applied_taxes/${taxCode}`,
|
|
1249
|
+
method: "DELETE",
|
|
1250
|
+
secure: true,
|
|
1251
|
+
format: "json",
|
|
1252
|
+
...params,
|
|
1253
|
+
}),
|
|
1254
|
+
/**
|
|
1255
|
+
* @description Retrieves an embeddable link for displaying a customer portal. This endpoint allows you to fetch the URL that can be embedded to provide customers access to a dedicated portal
|
|
1256
|
+
*
|
|
1257
|
+
* @tags customers
|
|
1258
|
+
* @name GetCustomerPortalUrl
|
|
1259
|
+
* @summary Get a customer portal URL
|
|
1260
|
+
* @request GET:/customers/{external_customer_id}/portal_url
|
|
1261
|
+
* @secure
|
|
1262
|
+
*/
|
|
1263
|
+
getCustomerPortalUrl: (externalCustomerId, params = {}) => this.request({
|
|
1264
|
+
path: `/customers/${externalCustomerId}/portal_url`,
|
|
1265
|
+
method: "GET",
|
|
1266
|
+
secure: true,
|
|
1267
|
+
format: "json",
|
|
1268
|
+
...params,
|
|
1269
|
+
}),
|
|
1270
|
+
/**
|
|
1271
|
+
* @description This endpoint enables the retrieval of the usage-based billing data for a customer within the current period.
|
|
1272
|
+
*
|
|
1273
|
+
* @tags customers
|
|
1274
|
+
* @name FindCustomerCurrentUsage
|
|
1275
|
+
* @summary Retrieve customer current usage
|
|
1276
|
+
* @request GET:/customers/{external_customer_id}/current_usage
|
|
1277
|
+
* @secure
|
|
1278
|
+
*/
|
|
1279
|
+
findCustomerCurrentUsage: (externalCustomerId, query, params = {}) => this.request({
|
|
1280
|
+
path: `/customers/${externalCustomerId}/current_usage`,
|
|
1281
|
+
method: "GET",
|
|
1282
|
+
query: query,
|
|
1283
|
+
secure: true,
|
|
1284
|
+
format: "json",
|
|
1285
|
+
...params,
|
|
1286
|
+
}),
|
|
1287
|
+
};
|
|
1288
|
+
events = {
|
|
1289
|
+
/**
|
|
1290
|
+
* @description This endpoint is used for transmitting usage measurement events to either a designated customer or a specific subscription.
|
|
1291
|
+
*
|
|
1292
|
+
* @tags events
|
|
1293
|
+
* @name CreateEvent
|
|
1294
|
+
* @summary Send usage events
|
|
1295
|
+
* @request POST:/events
|
|
1296
|
+
* @secure
|
|
1297
|
+
*/
|
|
1298
|
+
createEvent: (data, params = {}) => this.request({
|
|
1299
|
+
path: `/events`,
|
|
1300
|
+
method: "POST",
|
|
1301
|
+
body: data,
|
|
1302
|
+
secure: true,
|
|
1303
|
+
type: ContentType.Json,
|
|
1304
|
+
...params,
|
|
1305
|
+
}),
|
|
1306
|
+
/**
|
|
1307
|
+
* @description This endpoint is used for transmitting a batch of usage measurement events to multiple subscriptions for a single customer.
|
|
1308
|
+
*
|
|
1309
|
+
* @tags events
|
|
1310
|
+
* @name CreateBatchEvents
|
|
1311
|
+
* @summary Batch multiple events
|
|
1312
|
+
* @request POST:/events/batch
|
|
1313
|
+
* @secure
|
|
1314
|
+
*/
|
|
1315
|
+
createBatchEvents: (data, params = {}) => this.request({
|
|
1316
|
+
path: `/events/batch`,
|
|
1317
|
+
method: "POST",
|
|
1318
|
+
body: data,
|
|
1319
|
+
secure: true,
|
|
1320
|
+
type: ContentType.Json,
|
|
1321
|
+
...params,
|
|
1322
|
+
}),
|
|
1323
|
+
/**
|
|
1324
|
+
* @description Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple pay in advance charges
|
|
1325
|
+
*
|
|
1326
|
+
* @tags events
|
|
1327
|
+
* @name EventEstimateFees
|
|
1328
|
+
* @summary Estimate fees for a pay in advance charge
|
|
1329
|
+
* @request POST:/events/estimate_fees
|
|
1330
|
+
* @secure
|
|
1331
|
+
*/
|
|
1332
|
+
eventEstimateFees: (data, params = {}) => this.request({
|
|
1333
|
+
path: `/events/estimate_fees`,
|
|
1334
|
+
method: "POST",
|
|
1335
|
+
body: data,
|
|
1336
|
+
secure: true,
|
|
1337
|
+
type: ContentType.Json,
|
|
1338
|
+
format: "json",
|
|
1339
|
+
...params,
|
|
1340
|
+
}),
|
|
1341
|
+
/**
|
|
1342
|
+
* @description This endpoint is used for retrieving a specific usage measurement event that has been sent to a customer or a subscription.
|
|
1343
|
+
*
|
|
1344
|
+
* @tags events
|
|
1345
|
+
* @name FindEvent
|
|
1346
|
+
* @summary Retrieve a specific event
|
|
1347
|
+
* @request GET:/events/{transaction_id}
|
|
1348
|
+
* @secure
|
|
1349
|
+
*/
|
|
1350
|
+
findEvent: (transactionId, params = {}) => this.request({
|
|
1351
|
+
path: `/events/${transactionId}`,
|
|
1352
|
+
method: "GET",
|
|
1353
|
+
secure: true,
|
|
1354
|
+
format: "json",
|
|
1355
|
+
...params,
|
|
1356
|
+
}),
|
|
1357
|
+
};
|
|
1358
|
+
fees = {
|
|
1359
|
+
/**
|
|
1360
|
+
* @description This endpoint is used for retrieving all fees that has been issued.
|
|
1361
|
+
*
|
|
1362
|
+
* @tags fees
|
|
1363
|
+
* @name FindAllFees
|
|
1364
|
+
* @summary List all fees
|
|
1365
|
+
* @request GET:/fees
|
|
1366
|
+
* @secure
|
|
1367
|
+
*/
|
|
1368
|
+
findAllFees: (query, params = {}) => this.request({
|
|
1369
|
+
path: `/fees`,
|
|
1370
|
+
method: "GET",
|
|
1371
|
+
query: query,
|
|
1372
|
+
secure: true,
|
|
1373
|
+
format: "json",
|
|
1374
|
+
...params,
|
|
1375
|
+
}),
|
|
1376
|
+
/**
|
|
1377
|
+
* @description This endpoint is used for retrieving a specific fee that has been issued.
|
|
1378
|
+
*
|
|
1379
|
+
* @tags fees
|
|
1380
|
+
* @name FindFee
|
|
1381
|
+
* @summary Retrieve a specific fee
|
|
1382
|
+
* @request GET:/fees/{lago_id}
|
|
1383
|
+
* @secure
|
|
1384
|
+
*/
|
|
1385
|
+
findFee: (lagoId, params = {}) => this.request({
|
|
1386
|
+
path: `/fees/${lagoId}`,
|
|
1387
|
+
method: "GET",
|
|
1388
|
+
secure: true,
|
|
1389
|
+
format: "json",
|
|
1390
|
+
...params,
|
|
1391
|
+
}),
|
|
1392
|
+
/**
|
|
1393
|
+
* @description This endpoint is used for updating a specific fee that has been issued.
|
|
1394
|
+
*
|
|
1395
|
+
* @tags fees
|
|
1396
|
+
* @name UpdateFee
|
|
1397
|
+
* @summary Update a fee
|
|
1398
|
+
* @request PUT:/fees/{lago_id}
|
|
1399
|
+
* @secure
|
|
1400
|
+
*/
|
|
1401
|
+
updateFee: (lagoId, data, params = {}) => this.request({
|
|
1402
|
+
path: `/fees/${lagoId}`,
|
|
1403
|
+
method: "PUT",
|
|
1404
|
+
body: data,
|
|
1405
|
+
secure: true,
|
|
1406
|
+
type: ContentType.Json,
|
|
1407
|
+
format: "json",
|
|
1408
|
+
...params,
|
|
1409
|
+
}),
|
|
1410
|
+
};
|
|
1411
|
+
invoices = {
|
|
1412
|
+
/**
|
|
1413
|
+
* @description This endpoint is used for issuing a one-off invoice.
|
|
1414
|
+
*
|
|
1415
|
+
* @tags invoices
|
|
1416
|
+
* @name CreateInvoice
|
|
1417
|
+
* @summary Create a one-off invoice
|
|
1418
|
+
* @request POST:/invoices
|
|
1419
|
+
* @secure
|
|
1420
|
+
*/
|
|
1421
|
+
createInvoice: (data, params = {}) => this.request({
|
|
1422
|
+
path: `/invoices`,
|
|
1423
|
+
method: "POST",
|
|
1424
|
+
body: data,
|
|
1425
|
+
secure: true,
|
|
1426
|
+
type: ContentType.Json,
|
|
1427
|
+
format: "json",
|
|
1428
|
+
...params,
|
|
1429
|
+
}),
|
|
1430
|
+
/**
|
|
1431
|
+
* @description This endpoint is used for retrievign all invoices.
|
|
1432
|
+
*
|
|
1433
|
+
* @tags invoices
|
|
1434
|
+
* @name FindAllInvoices
|
|
1435
|
+
* @summary List all invoices
|
|
1436
|
+
* @request GET:/invoices
|
|
1437
|
+
* @secure
|
|
1438
|
+
*/
|
|
1439
|
+
findAllInvoices: (query, params = {}) => this.request({
|
|
1440
|
+
path: `/invoices`,
|
|
1441
|
+
method: "GET",
|
|
1442
|
+
query: query,
|
|
1443
|
+
secure: true,
|
|
1444
|
+
format: "json",
|
|
1445
|
+
...params,
|
|
1446
|
+
}),
|
|
1447
|
+
/**
|
|
1448
|
+
* @description This endpoint is used for updating an existing invoice.
|
|
588
1449
|
*
|
|
589
|
-
* @tags
|
|
590
|
-
* @name
|
|
591
|
-
* @summary
|
|
592
|
-
* @request
|
|
1450
|
+
* @tags invoices
|
|
1451
|
+
* @name UpdateInvoice
|
|
1452
|
+
* @summary Update an invoice
|
|
1453
|
+
* @request PUT:/invoices/{lago_id}
|
|
593
1454
|
* @secure
|
|
594
1455
|
*/
|
|
595
|
-
|
|
596
|
-
path: `/
|
|
597
|
-
method: "
|
|
598
|
-
|
|
1456
|
+
updateInvoice: (lagoId, data, params = {}) => this.request({
|
|
1457
|
+
path: `/invoices/${lagoId}`,
|
|
1458
|
+
method: "PUT",
|
|
1459
|
+
body: data,
|
|
599
1460
|
secure: true,
|
|
1461
|
+
type: ContentType.Json,
|
|
600
1462
|
format: "json",
|
|
601
1463
|
...params,
|
|
602
1464
|
}),
|
|
603
1465
|
/**
|
|
604
|
-
* @description
|
|
1466
|
+
* @description This endpoint is used for retrieving a specific invoice that has been issued.
|
|
605
1467
|
*
|
|
606
|
-
* @tags
|
|
607
|
-
* @name
|
|
608
|
-
* @summary
|
|
609
|
-
* @request GET:/
|
|
1468
|
+
* @tags invoices
|
|
1469
|
+
* @name FindInvoice
|
|
1470
|
+
* @summary Retrieve an invoice
|
|
1471
|
+
* @request GET:/invoices/{lago_id}
|
|
610
1472
|
* @secure
|
|
611
1473
|
*/
|
|
612
|
-
|
|
613
|
-
path: `/
|
|
1474
|
+
findInvoice: (lagoId, params = {}) => this.request({
|
|
1475
|
+
path: `/invoices/${lagoId}`,
|
|
614
1476
|
method: "GET",
|
|
615
1477
|
secure: true,
|
|
616
1478
|
format: "json",
|
|
617
1479
|
...params,
|
|
618
1480
|
}),
|
|
619
1481
|
/**
|
|
620
|
-
* @description
|
|
1482
|
+
* @description This endpoint is used for downloading a specific invoice PDF document.
|
|
621
1483
|
*
|
|
622
|
-
* @tags
|
|
623
|
-
* @name
|
|
624
|
-
* @summary
|
|
625
|
-
* @request
|
|
1484
|
+
* @tags invoices
|
|
1485
|
+
* @name DownloadInvoice
|
|
1486
|
+
* @summary Download an invoice PDF
|
|
1487
|
+
* @request POST:/invoices/{lago_id}/download
|
|
626
1488
|
* @secure
|
|
627
1489
|
*/
|
|
628
|
-
|
|
629
|
-
path: `/
|
|
630
|
-
method: "
|
|
1490
|
+
downloadInvoice: (lagoId, params = {}) => this.request({
|
|
1491
|
+
path: `/invoices/${lagoId}/download`,
|
|
1492
|
+
method: "POST",
|
|
631
1493
|
secure: true,
|
|
632
1494
|
format: "json",
|
|
633
1495
|
...params,
|
|
634
1496
|
}),
|
|
635
|
-
};
|
|
636
|
-
events = {
|
|
637
1497
|
/**
|
|
638
|
-
* @description
|
|
1498
|
+
* @description This endpoint is used for finalizing a draft invoice.
|
|
639
1499
|
*
|
|
640
|
-
* @tags
|
|
641
|
-
* @name
|
|
642
|
-
* @summary
|
|
643
|
-
* @request
|
|
1500
|
+
* @tags invoices
|
|
1501
|
+
* @name FinalizeInvoice
|
|
1502
|
+
* @summary Finalize a draft invoice
|
|
1503
|
+
* @request PUT:/invoices/{lago_id}/finalize
|
|
644
1504
|
* @secure
|
|
645
1505
|
*/
|
|
646
|
-
|
|
647
|
-
path: `/
|
|
648
|
-
method: "
|
|
649
|
-
body: data,
|
|
1506
|
+
finalizeInvoice: (lagoId, params = {}) => this.request({
|
|
1507
|
+
path: `/invoices/${lagoId}/finalize`,
|
|
1508
|
+
method: "PUT",
|
|
650
1509
|
secure: true,
|
|
651
|
-
|
|
1510
|
+
format: "json",
|
|
652
1511
|
...params,
|
|
653
1512
|
}),
|
|
654
1513
|
/**
|
|
655
|
-
* @description
|
|
1514
|
+
* @description This endpoint is used for refreshing a draft invoice.
|
|
656
1515
|
*
|
|
657
|
-
* @tags
|
|
658
|
-
* @name
|
|
659
|
-
* @summary
|
|
660
|
-
* @request
|
|
1516
|
+
* @tags invoices
|
|
1517
|
+
* @name RefreshInvoice
|
|
1518
|
+
* @summary Refresh a draft invoice
|
|
1519
|
+
* @request PUT:/invoices/{lago_id}/refresh
|
|
661
1520
|
* @secure
|
|
662
1521
|
*/
|
|
663
|
-
|
|
664
|
-
path: `/
|
|
665
|
-
method: "
|
|
666
|
-
body: data,
|
|
1522
|
+
refreshInvoice: (lagoId, params = {}) => this.request({
|
|
1523
|
+
path: `/invoices/${lagoId}/refresh`,
|
|
1524
|
+
method: "PUT",
|
|
667
1525
|
secure: true,
|
|
668
|
-
|
|
1526
|
+
format: "json",
|
|
669
1527
|
...params,
|
|
670
1528
|
}),
|
|
671
1529
|
/**
|
|
672
|
-
* @description
|
|
1530
|
+
* @description This endpoint resends an invoice for collection and retry a payment.
|
|
673
1531
|
*
|
|
674
|
-
* @tags
|
|
675
|
-
* @name
|
|
676
|
-
* @summary
|
|
677
|
-
* @request
|
|
1532
|
+
* @tags invoices
|
|
1533
|
+
* @name RetryPayment
|
|
1534
|
+
* @summary Retry an invoice payment
|
|
1535
|
+
* @request POST:/invoices/{lago_id}/retry_payment
|
|
678
1536
|
* @secure
|
|
679
1537
|
*/
|
|
680
|
-
|
|
681
|
-
path: `/
|
|
682
|
-
method: "
|
|
1538
|
+
retryPayment: (lagoId, params = {}) => this.request({
|
|
1539
|
+
path: `/invoices/${lagoId}/retry_payment`,
|
|
1540
|
+
method: "POST",
|
|
683
1541
|
secure: true,
|
|
684
|
-
format: "json",
|
|
685
1542
|
...params,
|
|
686
1543
|
}),
|
|
1544
|
+
};
|
|
1545
|
+
organizations = {
|
|
687
1546
|
/**
|
|
688
|
-
* @description
|
|
1547
|
+
* @description This endpoint is used to update your own organization's settings.
|
|
689
1548
|
*
|
|
690
|
-
* @tags
|
|
691
|
-
* @name
|
|
692
|
-
* @summary
|
|
693
|
-
* @request
|
|
1549
|
+
* @tags organizations
|
|
1550
|
+
* @name UpdateOrganization
|
|
1551
|
+
* @summary Update your organization
|
|
1552
|
+
* @request PUT:/organizations
|
|
694
1553
|
* @secure
|
|
695
1554
|
*/
|
|
696
|
-
|
|
697
|
-
path: `/
|
|
698
|
-
method: "
|
|
1555
|
+
updateOrganization: (data, params = {}) => this.request({
|
|
1556
|
+
path: `/organizations`,
|
|
1557
|
+
method: "PUT",
|
|
699
1558
|
body: data,
|
|
700
1559
|
secure: true,
|
|
701
1560
|
type: ContentType.Json,
|
|
@@ -705,11 +1564,11 @@ class Api extends HttpClient {
|
|
|
705
1564
|
};
|
|
706
1565
|
plans = {
|
|
707
1566
|
/**
|
|
708
|
-
* @description
|
|
1567
|
+
* @description This endpoint creates a plan with subscription and usage-based charges. It supports flexible billing cadence (in-advance or in-arrears) and allows for both recurring and metered charges.
|
|
709
1568
|
*
|
|
710
1569
|
* @tags plans
|
|
711
1570
|
* @name CreatePlan
|
|
712
|
-
* @summary Create a
|
|
1571
|
+
* @summary Create a plan
|
|
713
1572
|
* @request POST:/plans
|
|
714
1573
|
* @secure
|
|
715
1574
|
*/
|
|
@@ -723,11 +1582,11 @@ class Api extends HttpClient {
|
|
|
723
1582
|
...params,
|
|
724
1583
|
}),
|
|
725
1584
|
/**
|
|
726
|
-
* @description
|
|
1585
|
+
* @description This endpoint retrieves all existing plans.
|
|
727
1586
|
*
|
|
728
1587
|
* @tags plans
|
|
729
1588
|
* @name FindAllPlans
|
|
730
|
-
* @summary
|
|
1589
|
+
* @summary List all plans
|
|
731
1590
|
* @request GET:/plans
|
|
732
1591
|
* @secure
|
|
733
1592
|
*/
|
|
@@ -740,11 +1599,11 @@ class Api extends HttpClient {
|
|
|
740
1599
|
...params,
|
|
741
1600
|
}),
|
|
742
1601
|
/**
|
|
743
|
-
* @description
|
|
1602
|
+
* @description This endpoint updates a specific plan with subscription and usage-based charges. It supports flexible billing cadence (in-advance or in-arrears) and allows for both recurring and metered charges.
|
|
744
1603
|
*
|
|
745
1604
|
* @tags plans
|
|
746
1605
|
* @name UpdatePlan
|
|
747
|
-
* @summary Update
|
|
1606
|
+
* @summary Update a plan
|
|
748
1607
|
* @request PUT:/plans/{code}
|
|
749
1608
|
* @secure
|
|
750
1609
|
*/
|
|
@@ -758,11 +1617,11 @@ class Api extends HttpClient {
|
|
|
758
1617
|
...params,
|
|
759
1618
|
}),
|
|
760
1619
|
/**
|
|
761
|
-
* @description
|
|
1620
|
+
* @description This endpoint retrieves a specific plan.
|
|
762
1621
|
*
|
|
763
1622
|
* @tags plans
|
|
764
1623
|
* @name FindPlan
|
|
765
|
-
* @summary
|
|
1624
|
+
* @summary Retrieve a plan
|
|
766
1625
|
* @request GET:/plans/{code}
|
|
767
1626
|
* @secure
|
|
768
1627
|
*/
|
|
@@ -774,7 +1633,7 @@ class Api extends HttpClient {
|
|
|
774
1633
|
...params,
|
|
775
1634
|
}),
|
|
776
1635
|
/**
|
|
777
|
-
* @description
|
|
1636
|
+
* @description This endpoint deletes a specific plan. Note that this plan could be associated with active subscriptions.
|
|
778
1637
|
*
|
|
779
1638
|
* @tags plans
|
|
780
1639
|
* @name DestroyPlan
|
|
@@ -792,7 +1651,7 @@ class Api extends HttpClient {
|
|
|
792
1651
|
};
|
|
793
1652
|
subscriptions = {
|
|
794
1653
|
/**
|
|
795
|
-
* @description
|
|
1654
|
+
* @description This endpoint assigns a plan to a customer, creating or modifying a subscription. Ideal for initial subscriptions or plan changes (upgrades/downgrades).
|
|
796
1655
|
*
|
|
797
1656
|
* @tags subscriptions
|
|
798
1657
|
* @name CreateSubscription
|
|
@@ -810,11 +1669,11 @@ class Api extends HttpClient {
|
|
|
810
1669
|
...params,
|
|
811
1670
|
}),
|
|
812
1671
|
/**
|
|
813
|
-
* @description
|
|
1672
|
+
* @description This endpoint retrieves all active subscriptions.
|
|
814
1673
|
*
|
|
815
1674
|
* @tags subscriptions
|
|
816
1675
|
* @name FindAllSubscriptions
|
|
817
|
-
* @summary
|
|
1676
|
+
* @summary List all subscriptions
|
|
818
1677
|
* @request GET:/subscriptions
|
|
819
1678
|
* @secure
|
|
820
1679
|
*/
|
|
@@ -827,11 +1686,11 @@ class Api extends HttpClient {
|
|
|
827
1686
|
...params,
|
|
828
1687
|
}),
|
|
829
1688
|
/**
|
|
830
|
-
* @description
|
|
1689
|
+
* @description This endpoint allows you to update a subscription.
|
|
831
1690
|
*
|
|
832
1691
|
* @tags subscriptions
|
|
833
1692
|
* @name UpdateSubscription
|
|
834
|
-
* @summary Update
|
|
1693
|
+
* @summary Update a subscription
|
|
835
1694
|
* @request PUT:/subscriptions/{external_id}
|
|
836
1695
|
* @secure
|
|
837
1696
|
*/
|
|
@@ -845,7 +1704,7 @@ class Api extends HttpClient {
|
|
|
845
1704
|
...params,
|
|
846
1705
|
}),
|
|
847
1706
|
/**
|
|
848
|
-
* @description
|
|
1707
|
+
* @description This endpoint allows you to terminate a subscription.
|
|
849
1708
|
*
|
|
850
1709
|
* @tags subscriptions
|
|
851
1710
|
* @name DestroySubscription
|
|
@@ -861,35 +1720,18 @@ class Api extends HttpClient {
|
|
|
861
1720
|
...params,
|
|
862
1721
|
}),
|
|
863
1722
|
};
|
|
864
|
-
|
|
865
|
-
/**
|
|
866
|
-
* @description Webhook public key
|
|
867
|
-
*
|
|
868
|
-
* @tags webhooks
|
|
869
|
-
* @name FetchPublicKey
|
|
870
|
-
* @summary Fetch webhook public key
|
|
871
|
-
* @request GET:/webhooks/public_key
|
|
872
|
-
* @secure
|
|
873
|
-
*/
|
|
874
|
-
fetchPublicKey: (params = {}) => this.request({
|
|
875
|
-
path: `/webhooks/public_key`,
|
|
876
|
-
method: "GET",
|
|
877
|
-
secure: true,
|
|
878
|
-
...params,
|
|
879
|
-
}),
|
|
880
|
-
};
|
|
881
|
-
invoices = {
|
|
1723
|
+
taxes = {
|
|
882
1724
|
/**
|
|
883
|
-
* @description Create a
|
|
1725
|
+
* @description Create a tax
|
|
884
1726
|
*
|
|
885
|
-
* @tags
|
|
886
|
-
* @name
|
|
887
|
-
* @summary Create a
|
|
888
|
-
* @request POST:/
|
|
1727
|
+
* @tags taxes
|
|
1728
|
+
* @name CreateTax
|
|
1729
|
+
* @summary Create a tax
|
|
1730
|
+
* @request POST:/taxes
|
|
889
1731
|
* @secure
|
|
890
1732
|
*/
|
|
891
|
-
|
|
892
|
-
path: `/
|
|
1733
|
+
createTax: (data, params = {}) => this.request({
|
|
1734
|
+
path: `/taxes`,
|
|
893
1735
|
method: "POST",
|
|
894
1736
|
body: data,
|
|
895
1737
|
secure: true,
|
|
@@ -898,16 +1740,16 @@ class Api extends HttpClient {
|
|
|
898
1740
|
...params,
|
|
899
1741
|
}),
|
|
900
1742
|
/**
|
|
901
|
-
* @description Find all
|
|
1743
|
+
* @description Find all taxes in certain organization
|
|
902
1744
|
*
|
|
903
|
-
* @tags
|
|
904
|
-
* @name
|
|
905
|
-
* @summary Find
|
|
906
|
-
* @request GET:/
|
|
1745
|
+
* @tags taxes
|
|
1746
|
+
* @name FindAllTaxes
|
|
1747
|
+
* @summary Find taxes
|
|
1748
|
+
* @request GET:/taxes
|
|
907
1749
|
* @secure
|
|
908
1750
|
*/
|
|
909
|
-
|
|
910
|
-
path: `/
|
|
1751
|
+
findAllTaxes: (query, params = {}) => this.request({
|
|
1752
|
+
path: `/taxes`,
|
|
911
1753
|
method: "GET",
|
|
912
1754
|
query: query,
|
|
913
1755
|
secure: true,
|
|
@@ -915,16 +1757,16 @@ class Api extends HttpClient {
|
|
|
915
1757
|
...params,
|
|
916
1758
|
}),
|
|
917
1759
|
/**
|
|
918
|
-
* @description Update an existing
|
|
1760
|
+
* @description Update an existing tax by code
|
|
919
1761
|
*
|
|
920
|
-
* @tags
|
|
921
|
-
* @name
|
|
922
|
-
* @summary Update an existing
|
|
923
|
-
* @request PUT:/
|
|
1762
|
+
* @tags taxes
|
|
1763
|
+
* @name UpdateTax
|
|
1764
|
+
* @summary Update an existing tax
|
|
1765
|
+
* @request PUT:/taxes/{code}
|
|
924
1766
|
* @secure
|
|
925
1767
|
*/
|
|
926
|
-
|
|
927
|
-
path: `/
|
|
1768
|
+
updateTax: (code, data, params = {}) => this.request({
|
|
1769
|
+
path: `/taxes/${code}`,
|
|
928
1770
|
method: "PUT",
|
|
929
1771
|
body: data,
|
|
930
1772
|
secure: true,
|
|
@@ -933,133 +1775,33 @@ class Api extends HttpClient {
|
|
|
933
1775
|
...params,
|
|
934
1776
|
}),
|
|
935
1777
|
/**
|
|
936
|
-
* @description Return a single
|
|
937
|
-
*
|
|
938
|
-
* @tags invoices
|
|
939
|
-
* @name FindInvoice
|
|
940
|
-
* @summary Find invoice by ID
|
|
941
|
-
* @request GET:/invoices/{id}
|
|
942
|
-
* @secure
|
|
943
|
-
*/
|
|
944
|
-
findInvoice: (id, params = {}) => this.request({
|
|
945
|
-
path: `/invoices/${id}`,
|
|
946
|
-
method: "GET",
|
|
947
|
-
secure: true,
|
|
948
|
-
format: "json",
|
|
949
|
-
...params,
|
|
950
|
-
}),
|
|
951
|
-
/**
|
|
952
|
-
* @description Download an existing invoice
|
|
953
|
-
*
|
|
954
|
-
* @tags invoices
|
|
955
|
-
* @name DownloadInvoice
|
|
956
|
-
* @summary Download an existing invoice
|
|
957
|
-
* @request POST:/invoices/{id}/download
|
|
958
|
-
* @secure
|
|
959
|
-
*/
|
|
960
|
-
downloadInvoice: (id, params = {}) => this.request({
|
|
961
|
-
path: `/invoices/${id}/download`,
|
|
962
|
-
method: "POST",
|
|
963
|
-
secure: true,
|
|
964
|
-
format: "json",
|
|
965
|
-
...params,
|
|
966
|
-
}),
|
|
967
|
-
/**
|
|
968
|
-
* @description Retry invoice payment
|
|
969
|
-
*
|
|
970
|
-
* @tags invoices
|
|
971
|
-
* @name RetryPayment
|
|
972
|
-
* @summary Retry invoice payment
|
|
973
|
-
* @request POST:/invoices/{id}/retry_payment
|
|
974
|
-
* @secure
|
|
975
|
-
*/
|
|
976
|
-
retryPayment: (id, params = {}) => this.request({
|
|
977
|
-
path: `/invoices/${id}/retry_payment`,
|
|
978
|
-
method: "POST",
|
|
979
|
-
secure: true,
|
|
980
|
-
...params,
|
|
981
|
-
}),
|
|
982
|
-
/**
|
|
983
|
-
* @description Refresh a draft invoice
|
|
984
|
-
*
|
|
985
|
-
* @tags invoices
|
|
986
|
-
* @name RefreshInvoice
|
|
987
|
-
* @summary Refresh a draft invoice
|
|
988
|
-
* @request PUT:/invoices/{id}/refresh
|
|
989
|
-
* @secure
|
|
990
|
-
*/
|
|
991
|
-
refreshInvoice: (id, params = {}) => this.request({
|
|
992
|
-
path: `/invoices/${id}/refresh`,
|
|
993
|
-
method: "PUT",
|
|
994
|
-
secure: true,
|
|
995
|
-
format: "json",
|
|
996
|
-
...params,
|
|
997
|
-
}),
|
|
998
|
-
/**
|
|
999
|
-
* @description Finalize a draft invoice
|
|
1000
|
-
*
|
|
1001
|
-
* @tags invoices
|
|
1002
|
-
* @name FinalizeInvoice
|
|
1003
|
-
* @summary Finalize a draft invoice
|
|
1004
|
-
* @request PUT:/invoices/{id}/finalize
|
|
1005
|
-
* @secure
|
|
1006
|
-
*/
|
|
1007
|
-
finalizeInvoice: (id, params = {}) => this.request({
|
|
1008
|
-
path: `/invoices/${id}/finalize`,
|
|
1009
|
-
method: "PUT",
|
|
1010
|
-
secure: true,
|
|
1011
|
-
format: "json",
|
|
1012
|
-
...params,
|
|
1013
|
-
}),
|
|
1014
|
-
};
|
|
1015
|
-
fees = {
|
|
1016
|
-
/**
|
|
1017
|
-
* @description Return a single fee
|
|
1778
|
+
* @description Return a single tax
|
|
1018
1779
|
*
|
|
1019
|
-
* @tags
|
|
1020
|
-
* @name
|
|
1021
|
-
* @summary Find
|
|
1022
|
-
* @request GET:/
|
|
1780
|
+
* @tags taxes
|
|
1781
|
+
* @name FindTax
|
|
1782
|
+
* @summary Find tax by code
|
|
1783
|
+
* @request GET:/taxes/{code}
|
|
1023
1784
|
* @secure
|
|
1024
1785
|
*/
|
|
1025
|
-
|
|
1026
|
-
path: `/
|
|
1786
|
+
findTax: (code, params = {}) => this.request({
|
|
1787
|
+
path: `/taxes/${code}`,
|
|
1027
1788
|
method: "GET",
|
|
1028
1789
|
secure: true,
|
|
1029
1790
|
format: "json",
|
|
1030
1791
|
...params,
|
|
1031
1792
|
}),
|
|
1032
1793
|
/**
|
|
1033
|
-
* @description
|
|
1034
|
-
*
|
|
1035
|
-
* @tags fees
|
|
1036
|
-
* @name UpdateFee
|
|
1037
|
-
* @summary Update an existing fee
|
|
1038
|
-
* @request PUT:/fees/{id}
|
|
1039
|
-
* @secure
|
|
1040
|
-
*/
|
|
1041
|
-
updateFee: (id, data, params = {}) => this.request({
|
|
1042
|
-
path: `/fees/${id}`,
|
|
1043
|
-
method: "PUT",
|
|
1044
|
-
body: data,
|
|
1045
|
-
secure: true,
|
|
1046
|
-
type: ContentType.Json,
|
|
1047
|
-
format: "json",
|
|
1048
|
-
...params,
|
|
1049
|
-
}),
|
|
1050
|
-
/**
|
|
1051
|
-
* @description Find all fees of an organization and filter them
|
|
1794
|
+
* @description Delete a tax
|
|
1052
1795
|
*
|
|
1053
|
-
* @tags
|
|
1054
|
-
* @name
|
|
1055
|
-
* @summary
|
|
1056
|
-
* @request
|
|
1796
|
+
* @tags taxes
|
|
1797
|
+
* @name DestroyTax
|
|
1798
|
+
* @summary Delete a tax
|
|
1799
|
+
* @request DELETE:/taxes/{code}
|
|
1057
1800
|
* @secure
|
|
1058
1801
|
*/
|
|
1059
|
-
|
|
1060
|
-
path: `/
|
|
1061
|
-
method: "
|
|
1062
|
-
query: query,
|
|
1802
|
+
destroyTax: (code, params = {}) => this.request({
|
|
1803
|
+
path: `/taxes/${code}`,
|
|
1804
|
+
method: "DELETE",
|
|
1063
1805
|
secure: true,
|
|
1064
1806
|
format: "json",
|
|
1065
1807
|
...params,
|
|
@@ -1067,11 +1809,11 @@ class Api extends HttpClient {
|
|
|
1067
1809
|
};
|
|
1068
1810
|
wallets = {
|
|
1069
1811
|
/**
|
|
1070
|
-
* @description
|
|
1812
|
+
* @description This endpoint is used to create a wallet with prepaid credits.
|
|
1071
1813
|
*
|
|
1072
1814
|
* @tags wallets
|
|
1073
1815
|
* @name CreateWallet
|
|
1074
|
-
* @summary Create a
|
|
1816
|
+
* @summary Create a wallet
|
|
1075
1817
|
* @request POST:/wallets
|
|
1076
1818
|
* @secure
|
|
1077
1819
|
*/
|
|
@@ -1085,11 +1827,11 @@ class Api extends HttpClient {
|
|
|
1085
1827
|
...params,
|
|
1086
1828
|
}),
|
|
1087
1829
|
/**
|
|
1088
|
-
* @description
|
|
1830
|
+
* @description This endpoint is used to list all wallets with prepaid credits.
|
|
1089
1831
|
*
|
|
1090
1832
|
* @tags wallets
|
|
1091
1833
|
* @name FindAllWallets
|
|
1092
|
-
* @summary
|
|
1834
|
+
* @summary List all wallets
|
|
1093
1835
|
* @request GET:/wallets
|
|
1094
1836
|
* @secure
|
|
1095
1837
|
*/
|
|
@@ -1102,16 +1844,16 @@ class Api extends HttpClient {
|
|
|
1102
1844
|
...params,
|
|
1103
1845
|
}),
|
|
1104
1846
|
/**
|
|
1105
|
-
* @description
|
|
1847
|
+
* @description This endpoint is used to update an existing wallet with prepaid credits.
|
|
1106
1848
|
*
|
|
1107
1849
|
* @tags wallets
|
|
1108
1850
|
* @name UpdateWallet
|
|
1109
|
-
* @summary Update
|
|
1110
|
-
* @request PUT:/wallets/{
|
|
1851
|
+
* @summary Update a wallet
|
|
1852
|
+
* @request PUT:/wallets/{lago_id}
|
|
1111
1853
|
* @secure
|
|
1112
1854
|
*/
|
|
1113
|
-
updateWallet: (
|
|
1114
|
-
path: `/wallets/${
|
|
1855
|
+
updateWallet: (lagoId, data, params = {}) => this.request({
|
|
1856
|
+
path: `/wallets/${lagoId}`,
|
|
1115
1857
|
method: "PUT",
|
|
1116
1858
|
body: data,
|
|
1117
1859
|
secure: true,
|
|
@@ -1120,48 +1862,48 @@ class Api extends HttpClient {
|
|
|
1120
1862
|
...params,
|
|
1121
1863
|
}),
|
|
1122
1864
|
/**
|
|
1123
|
-
* @description
|
|
1865
|
+
* @description This endpoint is used to retrieve an existing wallet with prepaid credits.
|
|
1124
1866
|
*
|
|
1125
1867
|
* @tags wallets
|
|
1126
1868
|
* @name FindWallet
|
|
1127
|
-
* @summary
|
|
1128
|
-
* @request GET:/wallets/{
|
|
1869
|
+
* @summary Retrieve a wallet
|
|
1870
|
+
* @request GET:/wallets/{lago_id}
|
|
1129
1871
|
* @secure
|
|
1130
1872
|
*/
|
|
1131
|
-
findWallet: (
|
|
1132
|
-
path: `/wallets/${
|
|
1873
|
+
findWallet: (lagoId, params = {}) => this.request({
|
|
1874
|
+
path: `/wallets/${lagoId}`,
|
|
1133
1875
|
method: "GET",
|
|
1134
1876
|
secure: true,
|
|
1135
1877
|
format: "json",
|
|
1136
1878
|
...params,
|
|
1137
1879
|
}),
|
|
1138
1880
|
/**
|
|
1139
|
-
* @description
|
|
1881
|
+
* @description This endpoint is used to terminate an existing wallet with prepaid credits.
|
|
1140
1882
|
*
|
|
1141
1883
|
* @tags wallets
|
|
1142
1884
|
* @name DestroyWallet
|
|
1143
|
-
* @summary
|
|
1144
|
-
* @request DELETE:/wallets/{
|
|
1885
|
+
* @summary Terminate a wallet
|
|
1886
|
+
* @request DELETE:/wallets/{lago_id}
|
|
1145
1887
|
* @secure
|
|
1146
1888
|
*/
|
|
1147
|
-
destroyWallet: (
|
|
1148
|
-
path: `/wallets/${
|
|
1889
|
+
destroyWallet: (lagoId, params = {}) => this.request({
|
|
1890
|
+
path: `/wallets/${lagoId}`,
|
|
1149
1891
|
method: "DELETE",
|
|
1150
1892
|
secure: true,
|
|
1151
1893
|
format: "json",
|
|
1152
1894
|
...params,
|
|
1153
1895
|
}),
|
|
1154
1896
|
/**
|
|
1155
|
-
* @description
|
|
1897
|
+
* @description This endpoint is used to list all wallet transactions.
|
|
1156
1898
|
*
|
|
1157
1899
|
* @tags wallets
|
|
1158
1900
|
* @name FindAllWalletTransactions
|
|
1159
|
-
* @summary
|
|
1160
|
-
* @request GET:/wallets/{
|
|
1901
|
+
* @summary List all wallet transactions
|
|
1902
|
+
* @request GET:/wallets/{lago_id}/wallet_transactions
|
|
1161
1903
|
* @secure
|
|
1162
1904
|
*/
|
|
1163
|
-
findAllWalletTransactions: (
|
|
1164
|
-
path: `/wallets/${
|
|
1905
|
+
findAllWalletTransactions: (lagoId, query, params = {}) => this.request({
|
|
1906
|
+
path: `/wallets/${lagoId}/wallet_transactions`,
|
|
1165
1907
|
method: "GET",
|
|
1166
1908
|
query: query,
|
|
1167
1909
|
secure: true,
|
|
@@ -1171,11 +1913,11 @@ class Api extends HttpClient {
|
|
|
1171
1913
|
};
|
|
1172
1914
|
walletTransactions = {
|
|
1173
1915
|
/**
|
|
1174
|
-
* @description
|
|
1916
|
+
* @description This endpoint is used to top-up an active wallet.
|
|
1175
1917
|
*
|
|
1176
1918
|
* @tags wallets
|
|
1177
1919
|
* @name CreateWalletTransaction
|
|
1178
|
-
* @summary
|
|
1920
|
+
* @summary Top up a wallet
|
|
1179
1921
|
* @request POST:/wallet_transactions
|
|
1180
1922
|
* @secure
|
|
1181
1923
|
*/
|
|
@@ -1189,106 +1931,20 @@ class Api extends HttpClient {
|
|
|
1189
1931
|
...params,
|
|
1190
1932
|
}),
|
|
1191
1933
|
};
|
|
1192
|
-
|
|
1193
|
-
/**
|
|
1194
|
-
* @description Create a new credit note
|
|
1195
|
-
*
|
|
1196
|
-
* @tags credit_notes
|
|
1197
|
-
* @name CreateCreditNote
|
|
1198
|
-
* @summary Create a new Credit note
|
|
1199
|
-
* @request POST:/credit_notes
|
|
1200
|
-
* @secure
|
|
1201
|
-
*/
|
|
1202
|
-
createCreditNote: (data, params = {}) => this.request({
|
|
1203
|
-
path: `/credit_notes`,
|
|
1204
|
-
method: "POST",
|
|
1205
|
-
body: data,
|
|
1206
|
-
secure: true,
|
|
1207
|
-
type: ContentType.Json,
|
|
1208
|
-
format: "json",
|
|
1209
|
-
...params,
|
|
1210
|
-
}),
|
|
1211
|
-
/**
|
|
1212
|
-
* @description Find all credit notes in certain organisation
|
|
1213
|
-
*
|
|
1214
|
-
* @tags credit_notes
|
|
1215
|
-
* @name FindAllCreditNotes
|
|
1216
|
-
* @summary Find Credit notes
|
|
1217
|
-
* @request GET:/credit_notes
|
|
1218
|
-
* @secure
|
|
1219
|
-
*/
|
|
1220
|
-
findAllCreditNotes: (query, params = {}) => this.request({
|
|
1221
|
-
path: `/credit_notes`,
|
|
1222
|
-
method: "GET",
|
|
1223
|
-
query: query,
|
|
1224
|
-
secure: true,
|
|
1225
|
-
format: "json",
|
|
1226
|
-
...params,
|
|
1227
|
-
}),
|
|
1228
|
-
/**
|
|
1229
|
-
* @description Update an existing credit note
|
|
1230
|
-
*
|
|
1231
|
-
* @tags credit_notes
|
|
1232
|
-
* @name UpdateCreditNote
|
|
1233
|
-
* @summary Update an existing credit note
|
|
1234
|
-
* @request PUT:/credit_notes/{id}
|
|
1235
|
-
* @secure
|
|
1236
|
-
*/
|
|
1237
|
-
updateCreditNote: (id, data, params = {}) => this.request({
|
|
1238
|
-
path: `/credit_notes/${id}`,
|
|
1239
|
-
method: "PUT",
|
|
1240
|
-
body: data,
|
|
1241
|
-
secure: true,
|
|
1242
|
-
type: ContentType.Json,
|
|
1243
|
-
format: "json",
|
|
1244
|
-
...params,
|
|
1245
|
-
}),
|
|
1934
|
+
webhooks = {
|
|
1246
1935
|
/**
|
|
1247
|
-
* @description
|
|
1936
|
+
* @description This endpoint is used to retrieve the public key used to verify the webhooks signature
|
|
1248
1937
|
*
|
|
1249
|
-
* @tags
|
|
1250
|
-
* @name
|
|
1251
|
-
* @summary
|
|
1252
|
-
* @request GET:/
|
|
1938
|
+
* @tags webhooks
|
|
1939
|
+
* @name FetchPublicKey
|
|
1940
|
+
* @summary Retrieve webhook public key
|
|
1941
|
+
* @request GET:/webhooks/public_key
|
|
1253
1942
|
* @secure
|
|
1254
1943
|
*/
|
|
1255
|
-
|
|
1256
|
-
path: `/
|
|
1944
|
+
fetchPublicKey: (params = {}) => this.request({
|
|
1945
|
+
path: `/webhooks/public_key`,
|
|
1257
1946
|
method: "GET",
|
|
1258
1947
|
secure: true,
|
|
1259
|
-
format: "json",
|
|
1260
|
-
...params,
|
|
1261
|
-
}),
|
|
1262
|
-
/**
|
|
1263
|
-
* @description Download an existing credit note
|
|
1264
|
-
*
|
|
1265
|
-
* @tags credit_notes
|
|
1266
|
-
* @name DownloadCreditNote
|
|
1267
|
-
* @summary Download an existing credit note
|
|
1268
|
-
* @request POST:/credit_notes/{id}/download
|
|
1269
|
-
* @secure
|
|
1270
|
-
*/
|
|
1271
|
-
downloadCreditNote: (id, params = {}) => this.request({
|
|
1272
|
-
path: `/credit_notes/${id}/download`,
|
|
1273
|
-
method: "POST",
|
|
1274
|
-
secure: true,
|
|
1275
|
-
format: "json",
|
|
1276
|
-
...params,
|
|
1277
|
-
}),
|
|
1278
|
-
/**
|
|
1279
|
-
* @description Void an existing credit note
|
|
1280
|
-
*
|
|
1281
|
-
* @tags credit_notes
|
|
1282
|
-
* @name VoidCreditNote
|
|
1283
|
-
* @summary Void existing credit note
|
|
1284
|
-
* @request PUT:/credit_notes/{id}/void
|
|
1285
|
-
* @secure
|
|
1286
|
-
*/
|
|
1287
|
-
voidCreditNote: (id, params = {}) => this.request({
|
|
1288
|
-
path: `/credit_notes/${id}/void`,
|
|
1289
|
-
method: "PUT",
|
|
1290
|
-
secure: true,
|
|
1291
|
-
format: "json",
|
|
1292
1948
|
...params,
|
|
1293
1949
|
}),
|
|
1294
1950
|
};
|