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