lago-javascript-client 0.36.0-beta → 0.39.0-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 +888 -485
- package/package.json +1 -1
- package/script/openapi/client.js +889 -486
- package/types/openapi/client.d.ts +3546 -1727
package/esm/openapi/client.js
CHANGED
|
@@ -8,6 +8,286 @@
|
|
|
8
8
|
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
9
9
|
* ---------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
|
+
/** @example "USD" */
|
|
12
|
+
export var Currency;
|
|
13
|
+
(function (Currency) {
|
|
14
|
+
Currency["AED"] = "AED";
|
|
15
|
+
Currency["AFN"] = "AFN";
|
|
16
|
+
Currency["ALL"] = "ALL";
|
|
17
|
+
Currency["AMD"] = "AMD";
|
|
18
|
+
Currency["ANG"] = "ANG";
|
|
19
|
+
Currency["AOA"] = "AOA";
|
|
20
|
+
Currency["ARS"] = "ARS";
|
|
21
|
+
Currency["AUD"] = "AUD";
|
|
22
|
+
Currency["AWG"] = "AWG";
|
|
23
|
+
Currency["AZN"] = "AZN";
|
|
24
|
+
Currency["BAM"] = "BAM";
|
|
25
|
+
Currency["BBD"] = "BBD";
|
|
26
|
+
Currency["BDT"] = "BDT";
|
|
27
|
+
Currency["BGN"] = "BGN";
|
|
28
|
+
Currency["BIF"] = "BIF";
|
|
29
|
+
Currency["BMD"] = "BMD";
|
|
30
|
+
Currency["BND"] = "BND";
|
|
31
|
+
Currency["BOB"] = "BOB";
|
|
32
|
+
Currency["BRL"] = "BRL";
|
|
33
|
+
Currency["BSD"] = "BSD";
|
|
34
|
+
Currency["BWP"] = "BWP";
|
|
35
|
+
Currency["BYN"] = "BYN";
|
|
36
|
+
Currency["BZD"] = "BZD";
|
|
37
|
+
Currency["CAD"] = "CAD";
|
|
38
|
+
Currency["CDF"] = "CDF";
|
|
39
|
+
Currency["CHF"] = "CHF";
|
|
40
|
+
Currency["CLF"] = "CLF";
|
|
41
|
+
Currency["CLP"] = "CLP";
|
|
42
|
+
Currency["CNY"] = "CNY";
|
|
43
|
+
Currency["COP"] = "COP";
|
|
44
|
+
Currency["CRC"] = "CRC";
|
|
45
|
+
Currency["CVE"] = "CVE";
|
|
46
|
+
Currency["CZK"] = "CZK";
|
|
47
|
+
Currency["DJF"] = "DJF";
|
|
48
|
+
Currency["DKK"] = "DKK";
|
|
49
|
+
Currency["DOP"] = "DOP";
|
|
50
|
+
Currency["DZD"] = "DZD";
|
|
51
|
+
Currency["EGP"] = "EGP";
|
|
52
|
+
Currency["ETB"] = "ETB";
|
|
53
|
+
Currency["EUR"] = "EUR";
|
|
54
|
+
Currency["FJD"] = "FJD";
|
|
55
|
+
Currency["FKP"] = "FKP";
|
|
56
|
+
Currency["GBP"] = "GBP";
|
|
57
|
+
Currency["GEL"] = "GEL";
|
|
58
|
+
Currency["GIP"] = "GIP";
|
|
59
|
+
Currency["GMD"] = "GMD";
|
|
60
|
+
Currency["GNF"] = "GNF";
|
|
61
|
+
Currency["GTQ"] = "GTQ";
|
|
62
|
+
Currency["GYD"] = "GYD";
|
|
63
|
+
Currency["HKD"] = "HKD";
|
|
64
|
+
Currency["HNL"] = "HNL";
|
|
65
|
+
Currency["HRK"] = "HRK";
|
|
66
|
+
Currency["HTG"] = "HTG";
|
|
67
|
+
Currency["HUF"] = "HUF";
|
|
68
|
+
Currency["IDR"] = "IDR";
|
|
69
|
+
Currency["ILS"] = "ILS";
|
|
70
|
+
Currency["INR"] = "INR";
|
|
71
|
+
Currency["ISK"] = "ISK";
|
|
72
|
+
Currency["JMD"] = "JMD";
|
|
73
|
+
Currency["JPY"] = "JPY";
|
|
74
|
+
Currency["KES"] = "KES";
|
|
75
|
+
Currency["KGS"] = "KGS";
|
|
76
|
+
Currency["KHR"] = "KHR";
|
|
77
|
+
Currency["KMF"] = "KMF";
|
|
78
|
+
Currency["KRW"] = "KRW";
|
|
79
|
+
Currency["KYD"] = "KYD";
|
|
80
|
+
Currency["KZT"] = "KZT";
|
|
81
|
+
Currency["LAK"] = "LAK";
|
|
82
|
+
Currency["LBP"] = "LBP";
|
|
83
|
+
Currency["LKR"] = "LKR";
|
|
84
|
+
Currency["LRD"] = "LRD";
|
|
85
|
+
Currency["LSL"] = "LSL";
|
|
86
|
+
Currency["MAD"] = "MAD";
|
|
87
|
+
Currency["MDL"] = "MDL";
|
|
88
|
+
Currency["MGA"] = "MGA";
|
|
89
|
+
Currency["MKD"] = "MKD";
|
|
90
|
+
Currency["MMK"] = "MMK";
|
|
91
|
+
Currency["MNT"] = "MNT";
|
|
92
|
+
Currency["MOP"] = "MOP";
|
|
93
|
+
Currency["MRO"] = "MRO";
|
|
94
|
+
Currency["MUR"] = "MUR";
|
|
95
|
+
Currency["MVR"] = "MVR";
|
|
96
|
+
Currency["MWK"] = "MWK";
|
|
97
|
+
Currency["MXN"] = "MXN";
|
|
98
|
+
Currency["MYR"] = "MYR";
|
|
99
|
+
Currency["MZN"] = "MZN";
|
|
100
|
+
Currency["NAD"] = "NAD";
|
|
101
|
+
Currency["NGN"] = "NGN";
|
|
102
|
+
Currency["NIO"] = "NIO";
|
|
103
|
+
Currency["NOK"] = "NOK";
|
|
104
|
+
Currency["NPR"] = "NPR";
|
|
105
|
+
Currency["NZD"] = "NZD";
|
|
106
|
+
Currency["PAB"] = "PAB";
|
|
107
|
+
Currency["PEN"] = "PEN";
|
|
108
|
+
Currency["PGK"] = "PGK";
|
|
109
|
+
Currency["PHP"] = "PHP";
|
|
110
|
+
Currency["PKR"] = "PKR";
|
|
111
|
+
Currency["PLN"] = "PLN";
|
|
112
|
+
Currency["PYG"] = "PYG";
|
|
113
|
+
Currency["QAR"] = "QAR";
|
|
114
|
+
Currency["RON"] = "RON";
|
|
115
|
+
Currency["RSD"] = "RSD";
|
|
116
|
+
Currency["RUB"] = "RUB";
|
|
117
|
+
Currency["RWF"] = "RWF";
|
|
118
|
+
Currency["SAR"] = "SAR";
|
|
119
|
+
Currency["SBD"] = "SBD";
|
|
120
|
+
Currency["SCR"] = "SCR";
|
|
121
|
+
Currency["SEK"] = "SEK";
|
|
122
|
+
Currency["SGD"] = "SGD";
|
|
123
|
+
Currency["SHP"] = "SHP";
|
|
124
|
+
Currency["SLL"] = "SLL";
|
|
125
|
+
Currency["SOS"] = "SOS";
|
|
126
|
+
Currency["SRD"] = "SRD";
|
|
127
|
+
Currency["STD"] = "STD";
|
|
128
|
+
Currency["SZL"] = "SZL";
|
|
129
|
+
Currency["THB"] = "THB";
|
|
130
|
+
Currency["TJS"] = "TJS";
|
|
131
|
+
Currency["TOP"] = "TOP";
|
|
132
|
+
Currency["TRY"] = "TRY";
|
|
133
|
+
Currency["TTD"] = "TTD";
|
|
134
|
+
Currency["TWD"] = "TWD";
|
|
135
|
+
Currency["TZS"] = "TZS";
|
|
136
|
+
Currency["UAH"] = "UAH";
|
|
137
|
+
Currency["UGX"] = "UGX";
|
|
138
|
+
Currency["USD"] = "USD";
|
|
139
|
+
Currency["UYU"] = "UYU";
|
|
140
|
+
Currency["UZS"] = "UZS";
|
|
141
|
+
Currency["VND"] = "VND";
|
|
142
|
+
Currency["VUV"] = "VUV";
|
|
143
|
+
Currency["WST"] = "WST";
|
|
144
|
+
Currency["XAF"] = "XAF";
|
|
145
|
+
Currency["XCD"] = "XCD";
|
|
146
|
+
Currency["XOF"] = "XOF";
|
|
147
|
+
Currency["XPF"] = "XPF";
|
|
148
|
+
Currency["YER"] = "YER";
|
|
149
|
+
Currency["ZAR"] = "ZAR";
|
|
150
|
+
Currency["ZMW"] = "ZMW";
|
|
151
|
+
})(Currency || (Currency = {}));
|
|
152
|
+
/** @example "America/Los_Angeles" */
|
|
153
|
+
export var Timezone;
|
|
154
|
+
(function (Timezone) {
|
|
155
|
+
Timezone["UTC"] = "UTC";
|
|
156
|
+
Timezone["AfricaAlgiers"] = "Africa/Algiers";
|
|
157
|
+
Timezone["AfricaCairo"] = "Africa/Cairo";
|
|
158
|
+
Timezone["AfricaCasablanca"] = "Africa/Casablanca";
|
|
159
|
+
Timezone["AfricaHarare"] = "Africa/Harare";
|
|
160
|
+
Timezone["AfricaJohannesburg"] = "Africa/Johannesburg";
|
|
161
|
+
Timezone["AfricaMonrovia"] = "Africa/Monrovia";
|
|
162
|
+
Timezone["AfricaNairobi"] = "Africa/Nairobi";
|
|
163
|
+
Timezone["AmericaArgentinaBuenosAires"] = "America/Argentina/Buenos_Aires";
|
|
164
|
+
Timezone["AmericaBogota"] = "America/Bogota";
|
|
165
|
+
Timezone["AmericaCaracas"] = "America/Caracas";
|
|
166
|
+
Timezone["AmericaChicago"] = "America/Chicago";
|
|
167
|
+
Timezone["AmericaChihuahua"] = "America/Chihuahua";
|
|
168
|
+
Timezone["AmericaDenver"] = "America/Denver";
|
|
169
|
+
Timezone["AmericaGodthab"] = "America/Godthab";
|
|
170
|
+
Timezone["AmericaGuatemala"] = "America/Guatemala";
|
|
171
|
+
Timezone["AmericaGuyana"] = "America/Guyana";
|
|
172
|
+
Timezone["AmericaHalifax"] = "America/Halifax";
|
|
173
|
+
Timezone["AmericaIndianaIndianapolis"] = "America/Indiana/Indianapolis";
|
|
174
|
+
Timezone["AmericaJuneau"] = "America/Juneau";
|
|
175
|
+
Timezone["AmericaLaPaz"] = "America/La_Paz";
|
|
176
|
+
Timezone["AmericaLima"] = "America/Lima";
|
|
177
|
+
Timezone["AmericaLosAngeles"] = "America/Los_Angeles";
|
|
178
|
+
Timezone["AmericaMazatlan"] = "America/Mazatlan";
|
|
179
|
+
Timezone["AmericaMexicoCity"] = "America/Mexico_City";
|
|
180
|
+
Timezone["AmericaMonterrey"] = "America/Monterrey";
|
|
181
|
+
Timezone["AmericaMontevideo"] = "America/Montevideo";
|
|
182
|
+
Timezone["AmericaNewYork"] = "America/New_York";
|
|
183
|
+
Timezone["AmericaPhoenix"] = "America/Phoenix";
|
|
184
|
+
Timezone["AmericaPuertoRico"] = "America/Puerto_Rico";
|
|
185
|
+
Timezone["AmericaRegina"] = "America/Regina";
|
|
186
|
+
Timezone["AmericaSantiago"] = "America/Santiago";
|
|
187
|
+
Timezone["AmericaSaoPaulo"] = "America/Sao_Paulo";
|
|
188
|
+
Timezone["AmericaStJohns"] = "America/St_Johns";
|
|
189
|
+
Timezone["AmericaTijuana"] = "America/Tijuana";
|
|
190
|
+
Timezone["AsiaAlmaty"] = "Asia/Almaty";
|
|
191
|
+
Timezone["AsiaBaghdad"] = "Asia/Baghdad";
|
|
192
|
+
Timezone["AsiaBaku"] = "Asia/Baku";
|
|
193
|
+
Timezone["AsiaBangkok"] = "Asia/Bangkok";
|
|
194
|
+
Timezone["AsiaChongqing"] = "Asia/Chongqing";
|
|
195
|
+
Timezone["AsiaColombo"] = "Asia/Colombo";
|
|
196
|
+
Timezone["AsiaDhaka"] = "Asia/Dhaka";
|
|
197
|
+
Timezone["AsiaHongKong"] = "Asia/Hong_Kong";
|
|
198
|
+
Timezone["AsiaIrkutsk"] = "Asia/Irkutsk";
|
|
199
|
+
Timezone["AsiaJakarta"] = "Asia/Jakarta";
|
|
200
|
+
Timezone["AsiaJerusalem"] = "Asia/Jerusalem";
|
|
201
|
+
Timezone["AsiaKabul"] = "Asia/Kabul";
|
|
202
|
+
Timezone["AsiaKamchatka"] = "Asia/Kamchatka";
|
|
203
|
+
Timezone["AsiaKarachi"] = "Asia/Karachi";
|
|
204
|
+
Timezone["AsiaKathmandu"] = "Asia/Kathmandu";
|
|
205
|
+
Timezone["AsiaKolkata"] = "Asia/Kolkata";
|
|
206
|
+
Timezone["AsiaKrasnoyarsk"] = "Asia/Krasnoyarsk";
|
|
207
|
+
Timezone["AsiaKualaLumpur"] = "Asia/Kuala_Lumpur";
|
|
208
|
+
Timezone["AsiaKuwait"] = "Asia/Kuwait";
|
|
209
|
+
Timezone["AsiaMagadan"] = "Asia/Magadan";
|
|
210
|
+
Timezone["AsiaMuscat"] = "Asia/Muscat";
|
|
211
|
+
Timezone["AsiaNovosibirsk"] = "Asia/Novosibirsk";
|
|
212
|
+
Timezone["AsiaRangoon"] = "Asia/Rangoon";
|
|
213
|
+
Timezone["AsiaRiyadh"] = "Asia/Riyadh";
|
|
214
|
+
Timezone["AsiaSeoul"] = "Asia/Seoul";
|
|
215
|
+
Timezone["AsiaShanghai"] = "Asia/Shanghai";
|
|
216
|
+
Timezone["AsiaSingapore"] = "Asia/Singapore";
|
|
217
|
+
Timezone["AsiaSrednekolymsk"] = "Asia/Srednekolymsk";
|
|
218
|
+
Timezone["AsiaTaipei"] = "Asia/Taipei";
|
|
219
|
+
Timezone["AsiaTashkent"] = "Asia/Tashkent";
|
|
220
|
+
Timezone["AsiaTbilisi"] = "Asia/Tbilisi";
|
|
221
|
+
Timezone["AsiaTehran"] = "Asia/Tehran";
|
|
222
|
+
Timezone["AsiaTokyo"] = "Asia/Tokyo";
|
|
223
|
+
Timezone["AsiaUlaanbaatar"] = "Asia/Ulaanbaatar";
|
|
224
|
+
Timezone["AsiaUrumqi"] = "Asia/Urumqi";
|
|
225
|
+
Timezone["AsiaVladivostok"] = "Asia/Vladivostok";
|
|
226
|
+
Timezone["AsiaYakutsk"] = "Asia/Yakutsk";
|
|
227
|
+
Timezone["AsiaYekaterinburg"] = "Asia/Yekaterinburg";
|
|
228
|
+
Timezone["AsiaYerevan"] = "Asia/Yerevan";
|
|
229
|
+
Timezone["AtlanticAzores"] = "Atlantic/Azores";
|
|
230
|
+
Timezone["AtlanticCapeVerde"] = "Atlantic/Cape_Verde";
|
|
231
|
+
Timezone["AtlanticSouthGeorgia"] = "Atlantic/South_Georgia";
|
|
232
|
+
Timezone["AustraliaAdelaide"] = "Australia/Adelaide";
|
|
233
|
+
Timezone["AustraliaBrisbane"] = "Australia/Brisbane";
|
|
234
|
+
Timezone["AustraliaDarwin"] = "Australia/Darwin";
|
|
235
|
+
Timezone["AustraliaHobart"] = "Australia/Hobart";
|
|
236
|
+
Timezone["AustraliaMelbourne"] = "Australia/Melbourne";
|
|
237
|
+
Timezone["AustraliaPerth"] = "Australia/Perth";
|
|
238
|
+
Timezone["AustraliaSydney"] = "Australia/Sydney";
|
|
239
|
+
Timezone["EuropeAmsterdam"] = "Europe/Amsterdam";
|
|
240
|
+
Timezone["EuropeAthens"] = "Europe/Athens";
|
|
241
|
+
Timezone["EuropeBelgrade"] = "Europe/Belgrade";
|
|
242
|
+
Timezone["EuropeBerlin"] = "Europe/Berlin";
|
|
243
|
+
Timezone["EuropeBratislava"] = "Europe/Bratislava";
|
|
244
|
+
Timezone["EuropeBrussels"] = "Europe/Brussels";
|
|
245
|
+
Timezone["EuropeBucharest"] = "Europe/Bucharest";
|
|
246
|
+
Timezone["EuropeBudapest"] = "Europe/Budapest";
|
|
247
|
+
Timezone["EuropeCopenhagen"] = "Europe/Copenhagen";
|
|
248
|
+
Timezone["EuropeDublin"] = "Europe/Dublin";
|
|
249
|
+
Timezone["EuropeHelsinki"] = "Europe/Helsinki";
|
|
250
|
+
Timezone["EuropeIstanbul"] = "Europe/Istanbul";
|
|
251
|
+
Timezone["EuropeKaliningrad"] = "Europe/Kaliningrad";
|
|
252
|
+
Timezone["EuropeKiev"] = "Europe/Kiev";
|
|
253
|
+
Timezone["EuropeLisbon"] = "Europe/Lisbon";
|
|
254
|
+
Timezone["EuropeLjubljana"] = "Europe/Ljubljana";
|
|
255
|
+
Timezone["EuropeLondon"] = "Europe/London";
|
|
256
|
+
Timezone["EuropeMadrid"] = "Europe/Madrid";
|
|
257
|
+
Timezone["EuropeMinsk"] = "Europe/Minsk";
|
|
258
|
+
Timezone["EuropeMoscow"] = "Europe/Moscow";
|
|
259
|
+
Timezone["EuropeParis"] = "Europe/Paris";
|
|
260
|
+
Timezone["EuropePrague"] = "Europe/Prague";
|
|
261
|
+
Timezone["EuropeRiga"] = "Europe/Riga";
|
|
262
|
+
Timezone["EuropeRome"] = "Europe/Rome";
|
|
263
|
+
Timezone["EuropeSamara"] = "Europe/Samara";
|
|
264
|
+
Timezone["EuropeSarajevo"] = "Europe/Sarajevo";
|
|
265
|
+
Timezone["EuropeSkopje"] = "Europe/Skopje";
|
|
266
|
+
Timezone["EuropeSofia"] = "Europe/Sofia";
|
|
267
|
+
Timezone["EuropeStockholm"] = "Europe/Stockholm";
|
|
268
|
+
Timezone["EuropeTallinn"] = "Europe/Tallinn";
|
|
269
|
+
Timezone["EuropeVienna"] = "Europe/Vienna";
|
|
270
|
+
Timezone["EuropeVilnius"] = "Europe/Vilnius";
|
|
271
|
+
Timezone["EuropeVolgograd"] = "Europe/Volgograd";
|
|
272
|
+
Timezone["EuropeWarsaw"] = "Europe/Warsaw";
|
|
273
|
+
Timezone["EuropeZagreb"] = "Europe/Zagreb";
|
|
274
|
+
Timezone["EuropeZurich"] = "Europe/Zurich";
|
|
275
|
+
Timezone["GMT12"] = "GMT+12";
|
|
276
|
+
Timezone["PacificApia"] = "Pacific/Apia";
|
|
277
|
+
Timezone["PacificAuckland"] = "Pacific/Auckland";
|
|
278
|
+
Timezone["PacificChatham"] = "Pacific/Chatham";
|
|
279
|
+
Timezone["PacificFakaofo"] = "Pacific/Fakaofo";
|
|
280
|
+
Timezone["PacificFiji"] = "Pacific/Fiji";
|
|
281
|
+
Timezone["PacificGuadalcanal"] = "Pacific/Guadalcanal";
|
|
282
|
+
Timezone["PacificGuam"] = "Pacific/Guam";
|
|
283
|
+
Timezone["PacificHonolulu"] = "Pacific/Honolulu";
|
|
284
|
+
Timezone["PacificMajuro"] = "Pacific/Majuro";
|
|
285
|
+
Timezone["PacificMidway"] = "Pacific/Midway";
|
|
286
|
+
Timezone["PacificNoumea"] = "Pacific/Noumea";
|
|
287
|
+
Timezone["PacificPagoPago"] = "Pacific/Pago_Pago";
|
|
288
|
+
Timezone["PacificPortMoresby"] = "Pacific/Port_Moresby";
|
|
289
|
+
Timezone["PacificTongatapu"] = "Pacific/Tongatapu";
|
|
290
|
+
})(Timezone || (Timezone = {}));
|
|
11
291
|
export var ContentType;
|
|
12
292
|
(function (ContentType) {
|
|
13
293
|
ContentType["Json"] = "application/json";
|
|
@@ -148,7 +428,8 @@ export class HttpClient {
|
|
|
148
428
|
}
|
|
149
429
|
/**
|
|
150
430
|
* @title Lago API documentation
|
|
151
|
-
* @version 0.
|
|
431
|
+
* @version 0.39.0-beta
|
|
432
|
+
* @license AGPLv3
|
|
152
433
|
* @baseUrl https://api.getlago.com/api/v1
|
|
153
434
|
* @externalDocs https://github.com/getlago
|
|
154
435
|
* @contact <tech@getlago.com>
|
|
@@ -156,18 +437,18 @@ export class HttpClient {
|
|
|
156
437
|
* Lago API allows your application to push customer information and metrics (events) from your application to the billing application.
|
|
157
438
|
*/
|
|
158
439
|
export class Api extends HttpClient {
|
|
159
|
-
|
|
440
|
+
addOns = {
|
|
160
441
|
/**
|
|
161
|
-
* @description
|
|
442
|
+
* @description This endpoint is used to create an add-on that can be then attached to a one-off invoice.
|
|
162
443
|
*
|
|
163
|
-
* @tags
|
|
164
|
-
* @name
|
|
165
|
-
* @summary Create
|
|
166
|
-
* @request POST:/
|
|
444
|
+
* @tags add_ons
|
|
445
|
+
* @name CreateAddOn
|
|
446
|
+
* @summary Create an add-on
|
|
447
|
+
* @request POST:/add_ons
|
|
167
448
|
* @secure
|
|
168
449
|
*/
|
|
169
|
-
|
|
170
|
-
path: `/
|
|
450
|
+
createAddOn: (data, params = {}) => this.request({
|
|
451
|
+
path: `/add_ons`,
|
|
171
452
|
method: "POST",
|
|
172
453
|
body: data,
|
|
173
454
|
secure: true,
|
|
@@ -176,16 +457,16 @@ export class Api extends HttpClient {
|
|
|
176
457
|
...params,
|
|
177
458
|
}),
|
|
178
459
|
/**
|
|
179
|
-
* @description
|
|
460
|
+
* @description This endpoint is used to list all existing add-ons.
|
|
180
461
|
*
|
|
181
|
-
* @tags
|
|
182
|
-
* @name
|
|
183
|
-
* @summary
|
|
184
|
-
* @request GET:/
|
|
462
|
+
* @tags add_ons
|
|
463
|
+
* @name FindAllAddOns
|
|
464
|
+
* @summary List all add-ons
|
|
465
|
+
* @request GET:/add_ons
|
|
185
466
|
* @secure
|
|
186
467
|
*/
|
|
187
|
-
|
|
188
|
-
path: `/
|
|
468
|
+
findAllAddOns: (query, params = {}) => this.request({
|
|
469
|
+
path: `/add_ons`,
|
|
189
470
|
method: "GET",
|
|
190
471
|
query: query,
|
|
191
472
|
secure: true,
|
|
@@ -193,16 +474,16 @@ export class Api extends HttpClient {
|
|
|
193
474
|
...params,
|
|
194
475
|
}),
|
|
195
476
|
/**
|
|
196
|
-
* @description
|
|
477
|
+
* @description This endpoint is used to update an existing add-on.
|
|
197
478
|
*
|
|
198
|
-
* @tags
|
|
199
|
-
* @name
|
|
200
|
-
* @summary Update an
|
|
201
|
-
* @request PUT:/
|
|
479
|
+
* @tags add_ons
|
|
480
|
+
* @name UpdateAddOn
|
|
481
|
+
* @summary Update an add-on
|
|
482
|
+
* @request PUT:/add_ons/{code}
|
|
202
483
|
* @secure
|
|
203
484
|
*/
|
|
204
|
-
|
|
205
|
-
path: `/
|
|
485
|
+
updateAddOn: (code, data, params = {}) => this.request({
|
|
486
|
+
path: `/add_ons/${code}`,
|
|
206
487
|
method: "PUT",
|
|
207
488
|
body: data,
|
|
208
489
|
secure: true,
|
|
@@ -211,48 +492,89 @@ export class Api extends HttpClient {
|
|
|
211
492
|
...params,
|
|
212
493
|
}),
|
|
213
494
|
/**
|
|
214
|
-
* @description
|
|
495
|
+
* @description This endpoint is used to retrieve a specific add-on.
|
|
215
496
|
*
|
|
216
|
-
* @tags
|
|
217
|
-
* @name
|
|
218
|
-
* @summary
|
|
219
|
-
* @request GET:/
|
|
497
|
+
* @tags add_ons
|
|
498
|
+
* @name FindAddOn
|
|
499
|
+
* @summary Retrieve an add-on
|
|
500
|
+
* @request GET:/add_ons/{code}
|
|
220
501
|
* @secure
|
|
221
502
|
*/
|
|
222
|
-
|
|
223
|
-
path: `/
|
|
503
|
+
findAddOn: (code, params = {}) => this.request({
|
|
504
|
+
path: `/add_ons/${code}`,
|
|
224
505
|
method: "GET",
|
|
225
506
|
secure: true,
|
|
226
507
|
format: "json",
|
|
227
508
|
...params,
|
|
228
509
|
}),
|
|
229
510
|
/**
|
|
230
|
-
* @description
|
|
511
|
+
* @description This endpoint is used to delete an existing add-on.
|
|
231
512
|
*
|
|
232
|
-
* @tags
|
|
233
|
-
* @name
|
|
234
|
-
* @summary Delete
|
|
235
|
-
* @request DELETE:/
|
|
513
|
+
* @tags add_ons
|
|
514
|
+
* @name DestroyAddOn
|
|
515
|
+
* @summary Delete an add-on
|
|
516
|
+
* @request DELETE:/add_ons/{code}
|
|
236
517
|
* @secure
|
|
237
518
|
*/
|
|
238
|
-
|
|
239
|
-
path: `/
|
|
519
|
+
destroyAddOn: (code, params = {}) => this.request({
|
|
520
|
+
path: `/add_ons/${code}`,
|
|
240
521
|
method: "DELETE",
|
|
241
522
|
secure: true,
|
|
242
523
|
format: "json",
|
|
243
524
|
...params,
|
|
244
525
|
}),
|
|
526
|
+
};
|
|
527
|
+
appliedAddOns = {
|
|
245
528
|
/**
|
|
246
|
-
* @description
|
|
529
|
+
* @description Apply an add-on to a customer
|
|
247
530
|
*
|
|
248
|
-
* @tags
|
|
249
|
-
* @name
|
|
250
|
-
* @summary
|
|
251
|
-
* @request
|
|
531
|
+
* @tags add_ons
|
|
532
|
+
* @name ApplyAddOn
|
|
533
|
+
* @summary Apply an add-on to a customer
|
|
534
|
+
* @request POST:/applied_add_ons
|
|
535
|
+
* @deprecated
|
|
252
536
|
* @secure
|
|
253
537
|
*/
|
|
254
|
-
|
|
255
|
-
path: `/
|
|
538
|
+
applyAddOn: (data, params = {}) => this.request({
|
|
539
|
+
path: `/applied_add_ons`,
|
|
540
|
+
method: "POST",
|
|
541
|
+
body: data,
|
|
542
|
+
secure: true,
|
|
543
|
+
type: ContentType.Json,
|
|
544
|
+
format: "json",
|
|
545
|
+
...params,
|
|
546
|
+
}),
|
|
547
|
+
};
|
|
548
|
+
appliedCoupons = {
|
|
549
|
+
/**
|
|
550
|
+
* @description This endpoint is used to apply a specific coupon to a customer, before or during a subscription.
|
|
551
|
+
*
|
|
552
|
+
* @tags coupons
|
|
553
|
+
* @name ApplyCoupon
|
|
554
|
+
* @summary Apply a coupon to a customer
|
|
555
|
+
* @request POST:/applied_coupons
|
|
556
|
+
* @secure
|
|
557
|
+
*/
|
|
558
|
+
applyCoupon: (data, params = {}) => this.request({
|
|
559
|
+
path: `/applied_coupons`,
|
|
560
|
+
method: "POST",
|
|
561
|
+
body: data,
|
|
562
|
+
secure: true,
|
|
563
|
+
type: ContentType.Json,
|
|
564
|
+
format: "json",
|
|
565
|
+
...params,
|
|
566
|
+
}),
|
|
567
|
+
/**
|
|
568
|
+
* @description This endpoint is used to list all applied coupons. You can filter by coupon status and by customer.
|
|
569
|
+
*
|
|
570
|
+
* @tags coupons
|
|
571
|
+
* @name FindAllAppliedCoupons
|
|
572
|
+
* @summary List all applied coupons
|
|
573
|
+
* @request GET:/applied_coupons
|
|
574
|
+
* @secure
|
|
575
|
+
*/
|
|
576
|
+
findAllAppliedCoupons: (query, params = {}) => this.request({
|
|
577
|
+
path: `/applied_coupons`,
|
|
256
578
|
method: "GET",
|
|
257
579
|
query: query,
|
|
258
580
|
secure: true,
|
|
@@ -260,18 +582,18 @@ export class Api extends HttpClient {
|
|
|
260
582
|
...params,
|
|
261
583
|
}),
|
|
262
584
|
};
|
|
263
|
-
|
|
585
|
+
billableMetrics = {
|
|
264
586
|
/**
|
|
265
|
-
* @description
|
|
587
|
+
* @description This endpoint creates a new billable metric representing a pricing component of your application.
|
|
266
588
|
*
|
|
267
|
-
* @tags
|
|
268
|
-
* @name
|
|
269
|
-
* @summary Create a
|
|
270
|
-
* @request POST:/
|
|
589
|
+
* @tags billable_metrics
|
|
590
|
+
* @name CreateBillableMetric
|
|
591
|
+
* @summary Create a billable metric
|
|
592
|
+
* @request POST:/billable_metrics
|
|
271
593
|
* @secure
|
|
272
594
|
*/
|
|
273
|
-
|
|
274
|
-
path: `/
|
|
595
|
+
createBillableMetric: (data, params = {}) => this.request({
|
|
596
|
+
path: `/billable_metrics`,
|
|
275
597
|
method: "POST",
|
|
276
598
|
body: data,
|
|
277
599
|
secure: true,
|
|
@@ -280,16 +602,16 @@ export class Api extends HttpClient {
|
|
|
280
602
|
...params,
|
|
281
603
|
}),
|
|
282
604
|
/**
|
|
283
|
-
* @description
|
|
605
|
+
* @description This endpoint retrieves all existing billable metrics that represent pricing components of your application.
|
|
284
606
|
*
|
|
285
|
-
* @tags
|
|
286
|
-
* @name
|
|
287
|
-
* @summary
|
|
288
|
-
* @request GET:/
|
|
607
|
+
* @tags billable_metrics
|
|
608
|
+
* @name FindAllBillableMetrics
|
|
609
|
+
* @summary List all billable metrics
|
|
610
|
+
* @request GET:/billable_metrics
|
|
289
611
|
* @secure
|
|
290
612
|
*/
|
|
291
|
-
|
|
292
|
-
path: `/
|
|
613
|
+
findAllBillableMetrics: (query, params = {}) => this.request({
|
|
614
|
+
path: `/billable_metrics`,
|
|
293
615
|
method: "GET",
|
|
294
616
|
query: query,
|
|
295
617
|
secure: true,
|
|
@@ -297,16 +619,16 @@ export class Api extends HttpClient {
|
|
|
297
619
|
...params,
|
|
298
620
|
}),
|
|
299
621
|
/**
|
|
300
|
-
* @description
|
|
622
|
+
* @description This endpoint updates an existing billable metric representing a pricing component of your application.
|
|
301
623
|
*
|
|
302
|
-
* @tags
|
|
303
|
-
* @name
|
|
304
|
-
* @summary Update
|
|
305
|
-
* @request PUT:/
|
|
624
|
+
* @tags billable_metrics
|
|
625
|
+
* @name UpdateBillableMetric
|
|
626
|
+
* @summary Update a billable metric
|
|
627
|
+
* @request PUT:/billable_metrics/{code}
|
|
306
628
|
* @secure
|
|
307
629
|
*/
|
|
308
|
-
|
|
309
|
-
path: `/
|
|
630
|
+
updateBillableMetric: (code, data, params = {}) => this.request({
|
|
631
|
+
path: `/billable_metrics/${code}`,
|
|
310
632
|
method: "PUT",
|
|
311
633
|
body: data,
|
|
312
634
|
secure: true,
|
|
@@ -315,65 +637,62 @@ export class Api extends HttpClient {
|
|
|
315
637
|
...params,
|
|
316
638
|
}),
|
|
317
639
|
/**
|
|
318
|
-
* @description
|
|
640
|
+
* @description This endpoint deletes an existing billable metric representing a pricing component of your application.
|
|
319
641
|
*
|
|
320
|
-
* @tags
|
|
321
|
-
* @name
|
|
322
|
-
* @summary
|
|
323
|
-
* @request
|
|
642
|
+
* @tags billable_metrics
|
|
643
|
+
* @name DestroyBillableMetric
|
|
644
|
+
* @summary Delete a billable metric
|
|
645
|
+
* @request DELETE:/billable_metrics/{code}
|
|
324
646
|
* @secure
|
|
325
647
|
*/
|
|
326
|
-
|
|
327
|
-
path: `/
|
|
328
|
-
method: "
|
|
648
|
+
destroyBillableMetric: (code, params = {}) => this.request({
|
|
649
|
+
path: `/billable_metrics/${code}`,
|
|
650
|
+
method: "DELETE",
|
|
329
651
|
secure: true,
|
|
330
652
|
format: "json",
|
|
331
653
|
...params,
|
|
332
654
|
}),
|
|
333
655
|
/**
|
|
334
|
-
* @description
|
|
656
|
+
* @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
657
|
*
|
|
336
|
-
* @tags
|
|
337
|
-
* @name
|
|
338
|
-
* @summary
|
|
339
|
-
* @request
|
|
658
|
+
* @tags billable_metrics
|
|
659
|
+
* @name FindBillableMetric
|
|
660
|
+
* @summary Retrieve a billable metric
|
|
661
|
+
* @request GET:/billable_metrics/{code}
|
|
340
662
|
* @secure
|
|
341
663
|
*/
|
|
342
|
-
|
|
343
|
-
path: `/
|
|
344
|
-
method: "
|
|
664
|
+
findBillableMetric: (code, params = {}) => this.request({
|
|
665
|
+
path: `/billable_metrics/${code}`,
|
|
666
|
+
method: "GET",
|
|
345
667
|
secure: true,
|
|
346
668
|
format: "json",
|
|
347
669
|
...params,
|
|
348
670
|
}),
|
|
349
|
-
};
|
|
350
|
-
appliedAddOns = {
|
|
351
671
|
/**
|
|
352
|
-
* @description
|
|
672
|
+
* @description This endpoint retrieves all groups for a billable metric.
|
|
353
673
|
*
|
|
354
|
-
* @tags
|
|
355
|
-
* @name
|
|
356
|
-
* @summary
|
|
357
|
-
* @request
|
|
674
|
+
* @tags billable_metrics
|
|
675
|
+
* @name FindAllBillableMetricGroups
|
|
676
|
+
* @summary Find a billable metric's groups
|
|
677
|
+
* @request GET:/billable_metrics/{code}/groups
|
|
358
678
|
* @secure
|
|
359
679
|
*/
|
|
360
|
-
|
|
361
|
-
path: `/
|
|
362
|
-
method: "
|
|
363
|
-
|
|
680
|
+
findAllBillableMetricGroups: (code, query, params = {}) => this.request({
|
|
681
|
+
path: `/billable_metrics/${code}/groups`,
|
|
682
|
+
method: "GET",
|
|
683
|
+
query: query,
|
|
364
684
|
secure: true,
|
|
365
|
-
type: ContentType.Json,
|
|
366
685
|
format: "json",
|
|
367
686
|
...params,
|
|
368
687
|
}),
|
|
369
688
|
};
|
|
370
689
|
coupons = {
|
|
371
690
|
/**
|
|
372
|
-
* @description
|
|
691
|
+
* @description This endpoint is used to create a coupon that can be then attached to a customer to create a discount.
|
|
373
692
|
*
|
|
374
693
|
* @tags coupons
|
|
375
694
|
* @name CreateCoupon
|
|
376
|
-
* @summary Create a
|
|
695
|
+
* @summary Create a coupon
|
|
377
696
|
* @request POST:/coupons
|
|
378
697
|
* @secure
|
|
379
698
|
*/
|
|
@@ -387,11 +706,11 @@ export class Api extends HttpClient {
|
|
|
387
706
|
...params,
|
|
388
707
|
}),
|
|
389
708
|
/**
|
|
390
|
-
* @description
|
|
709
|
+
* @description This endpoint is used to list all existing coupons.
|
|
391
710
|
*
|
|
392
711
|
* @tags coupons
|
|
393
712
|
* @name FindAllCoupons
|
|
394
|
-
* @summary
|
|
713
|
+
* @summary List all coupons
|
|
395
714
|
* @request GET:/coupons
|
|
396
715
|
* @secure
|
|
397
716
|
*/
|
|
@@ -404,11 +723,11 @@ export class Api extends HttpClient {
|
|
|
404
723
|
...params,
|
|
405
724
|
}),
|
|
406
725
|
/**
|
|
407
|
-
* @description
|
|
726
|
+
* @description This endpoint is used to update a coupon that can be then attached to a customer to create a discount.
|
|
408
727
|
*
|
|
409
728
|
* @tags coupons
|
|
410
729
|
* @name UpdateCoupon
|
|
411
|
-
* @summary Update
|
|
730
|
+
* @summary Update a coupon
|
|
412
731
|
* @request PUT:/coupons/{code}
|
|
413
732
|
* @secure
|
|
414
733
|
*/
|
|
@@ -422,11 +741,11 @@ export class Api extends HttpClient {
|
|
|
422
741
|
...params,
|
|
423
742
|
}),
|
|
424
743
|
/**
|
|
425
|
-
* @description
|
|
744
|
+
* @description This endpoint is used to retrieve a specific coupon.
|
|
426
745
|
*
|
|
427
746
|
* @tags coupons
|
|
428
747
|
* @name FindCoupon
|
|
429
|
-
* @summary
|
|
748
|
+
* @summary Retrieve a coupon
|
|
430
749
|
* @request GET:/coupons/{code}
|
|
431
750
|
* @secure
|
|
432
751
|
*/
|
|
@@ -438,7 +757,7 @@ export class Api extends HttpClient {
|
|
|
438
757
|
...params,
|
|
439
758
|
}),
|
|
440
759
|
/**
|
|
441
|
-
* @description
|
|
760
|
+
* @description This endpoint is used to delete a coupon.
|
|
442
761
|
*
|
|
443
762
|
* @tags coupons
|
|
444
763
|
* @name DestroyCoupon
|
|
@@ -454,18 +773,18 @@ export class Api extends HttpClient {
|
|
|
454
773
|
...params,
|
|
455
774
|
}),
|
|
456
775
|
};
|
|
457
|
-
|
|
776
|
+
creditNotes = {
|
|
458
777
|
/**
|
|
459
|
-
* @description
|
|
778
|
+
* @description This endpoint creates a new credit note.
|
|
460
779
|
*
|
|
461
|
-
* @tags
|
|
462
|
-
* @name
|
|
463
|
-
* @summary
|
|
464
|
-
* @request POST:/
|
|
780
|
+
* @tags credit_notes
|
|
781
|
+
* @name CreateCreditNote
|
|
782
|
+
* @summary Create a credit note
|
|
783
|
+
* @request POST:/credit_notes
|
|
465
784
|
* @secure
|
|
466
785
|
*/
|
|
467
|
-
|
|
468
|
-
path: `/
|
|
786
|
+
createCreditNote: (data, params = {}) => this.request({
|
|
787
|
+
path: `/credit_notes`,
|
|
469
788
|
method: "POST",
|
|
470
789
|
body: data,
|
|
471
790
|
secure: true,
|
|
@@ -474,35 +793,33 @@ export class Api extends HttpClient {
|
|
|
474
793
|
...params,
|
|
475
794
|
}),
|
|
476
795
|
/**
|
|
477
|
-
* @description
|
|
796
|
+
* @description This endpoint list all existing credit notes.
|
|
478
797
|
*
|
|
479
|
-
* @tags
|
|
480
|
-
* @name
|
|
481
|
-
* @summary
|
|
482
|
-
* @request GET:/
|
|
798
|
+
* @tags credit_notes
|
|
799
|
+
* @name FindAllCreditNotes
|
|
800
|
+
* @summary List all credit notes
|
|
801
|
+
* @request GET:/credit_notes
|
|
483
802
|
* @secure
|
|
484
803
|
*/
|
|
485
|
-
|
|
486
|
-
path: `/
|
|
804
|
+
findAllCreditNotes: (query, params = {}) => this.request({
|
|
805
|
+
path: `/credit_notes`,
|
|
487
806
|
method: "GET",
|
|
488
807
|
query: query,
|
|
489
808
|
secure: true,
|
|
490
809
|
format: "json",
|
|
491
810
|
...params,
|
|
492
811
|
}),
|
|
493
|
-
};
|
|
494
|
-
organizations = {
|
|
495
812
|
/**
|
|
496
|
-
* @description
|
|
813
|
+
* @description This endpoint updates an existing credit note.
|
|
497
814
|
*
|
|
498
|
-
* @tags
|
|
499
|
-
* @name
|
|
500
|
-
* @summary Update
|
|
501
|
-
* @request PUT:/
|
|
815
|
+
* @tags credit_notes
|
|
816
|
+
* @name UpdateCreditNote
|
|
817
|
+
* @summary Update a credit note
|
|
818
|
+
* @request PUT:/credit_notes/{lago_id}
|
|
502
819
|
* @secure
|
|
503
820
|
*/
|
|
504
|
-
|
|
505
|
-
path: `/
|
|
821
|
+
updateCreditNote: (lagoId, data, params = {}) => this.request({
|
|
822
|
+
path: `/credit_notes/${lagoId}`,
|
|
506
823
|
method: "PUT",
|
|
507
824
|
body: data,
|
|
508
825
|
secure: true,
|
|
@@ -510,10 +827,58 @@ export class Api extends HttpClient {
|
|
|
510
827
|
format: "json",
|
|
511
828
|
...params,
|
|
512
829
|
}),
|
|
830
|
+
/**
|
|
831
|
+
* @description This endpoint retrieves an existing credit note.
|
|
832
|
+
*
|
|
833
|
+
* @tags credit_notes
|
|
834
|
+
* @name FindCreditNote
|
|
835
|
+
* @summary Retrieve a credit note
|
|
836
|
+
* @request GET:/credit_notes/{lago_id}
|
|
837
|
+
* @secure
|
|
838
|
+
*/
|
|
839
|
+
findCreditNote: (lagoId, params = {}) => this.request({
|
|
840
|
+
path: `/credit_notes/${lagoId}`,
|
|
841
|
+
method: "GET",
|
|
842
|
+
secure: true,
|
|
843
|
+
format: "json",
|
|
844
|
+
...params,
|
|
845
|
+
}),
|
|
846
|
+
/**
|
|
847
|
+
* @description This endpoint downloads the PDF of an existing credit note.
|
|
848
|
+
*
|
|
849
|
+
* @tags credit_notes
|
|
850
|
+
* @name DownloadCreditNote
|
|
851
|
+
* @summary Download a credit note PDF
|
|
852
|
+
* @request POST:/credit_notes/{lago_id}/download
|
|
853
|
+
* @secure
|
|
854
|
+
*/
|
|
855
|
+
downloadCreditNote: (lagoId, params = {}) => this.request({
|
|
856
|
+
path: `/credit_notes/${lagoId}/download`,
|
|
857
|
+
method: "POST",
|
|
858
|
+
secure: true,
|
|
859
|
+
format: "json",
|
|
860
|
+
...params,
|
|
861
|
+
}),
|
|
862
|
+
/**
|
|
863
|
+
* @description This endpoint voids an existing credit note.
|
|
864
|
+
*
|
|
865
|
+
* @tags credit_notes
|
|
866
|
+
* @name VoidCreditNote
|
|
867
|
+
* @summary Void a credit note
|
|
868
|
+
* @request PUT:/credit_notes/{lago_id}/void
|
|
869
|
+
* @secure
|
|
870
|
+
*/
|
|
871
|
+
voidCreditNote: (lagoId, params = {}) => this.request({
|
|
872
|
+
path: `/credit_notes/${lagoId}/void`,
|
|
873
|
+
method: "PUT",
|
|
874
|
+
secure: true,
|
|
875
|
+
format: "json",
|
|
876
|
+
...params,
|
|
877
|
+
}),
|
|
513
878
|
};
|
|
514
879
|
customers = {
|
|
515
880
|
/**
|
|
516
|
-
* @description
|
|
881
|
+
* @description This endpoint creates a new customer.
|
|
517
882
|
*
|
|
518
883
|
* @tags customers
|
|
519
884
|
* @name CreateCustomer
|
|
@@ -531,11 +896,11 @@ export class Api extends HttpClient {
|
|
|
531
896
|
...params,
|
|
532
897
|
}),
|
|
533
898
|
/**
|
|
534
|
-
* @description
|
|
899
|
+
* @description This endpoint retrieves all existing customers.
|
|
535
900
|
*
|
|
536
901
|
* @tags customers
|
|
537
902
|
* @name FindAllCustomers
|
|
538
|
-
* @summary
|
|
903
|
+
* @summary List all customers
|
|
539
904
|
* @request GET:/customers
|
|
540
905
|
* @secure
|
|
541
906
|
*/
|
|
@@ -548,11 +913,11 @@ export class Api extends HttpClient {
|
|
|
548
913
|
...params,
|
|
549
914
|
}),
|
|
550
915
|
/**
|
|
551
|
-
* @description
|
|
916
|
+
* @description This endpoint retrieves an existing customer.
|
|
552
917
|
*
|
|
553
918
|
* @tags customers
|
|
554
919
|
* @name FindCustomer
|
|
555
|
-
* @summary
|
|
920
|
+
* @summary Retrieve a customer
|
|
556
921
|
* @request GET:/customers/{external_id}
|
|
557
922
|
* @secure
|
|
558
923
|
*/
|
|
@@ -564,7 +929,7 @@ export class Api extends HttpClient {
|
|
|
564
929
|
...params,
|
|
565
930
|
}),
|
|
566
931
|
/**
|
|
567
|
-
* @description
|
|
932
|
+
* @description This endpoint deletes an existing customer.
|
|
568
933
|
*
|
|
569
934
|
* @tags customers
|
|
570
935
|
* @name DestroyCustomer
|
|
@@ -580,118 +945,359 @@ export class Api extends HttpClient {
|
|
|
580
945
|
...params,
|
|
581
946
|
}),
|
|
582
947
|
/**
|
|
583
|
-
* @description
|
|
948
|
+
* @description This endpoint is used to delete a specific coupon that has been applied to a customer.
|
|
949
|
+
*
|
|
950
|
+
* @tags coupons, customers
|
|
951
|
+
* @name DeleteAppliedCoupon
|
|
952
|
+
* @summary Delete an applied coupon
|
|
953
|
+
* @request DELETE:/customers/{external_customer_id}/applied_coupons/{applied_coupon_id}
|
|
954
|
+
* @secure
|
|
955
|
+
*/
|
|
956
|
+
deleteAppliedCoupon: (externalCustomerId, appliedCouponId, params = {}) => this.request({
|
|
957
|
+
path: `/customers/${externalCustomerId}/applied_coupons/${appliedCouponId}`,
|
|
958
|
+
method: "DELETE",
|
|
959
|
+
secure: true,
|
|
960
|
+
format: "json",
|
|
961
|
+
...params,
|
|
962
|
+
}),
|
|
963
|
+
/**
|
|
964
|
+
* @description Apply an existing tax to a customer
|
|
965
|
+
*
|
|
966
|
+
* @tags customers
|
|
967
|
+
* @name ApplyTax
|
|
968
|
+
* @summary Apply a tax
|
|
969
|
+
* @request POST:/customers/{external_customer_id}/applied_taxes
|
|
970
|
+
* @secure
|
|
971
|
+
*/
|
|
972
|
+
applyTax: (externalCustomerId, data, params = {}) => this.request({
|
|
973
|
+
path: `/customers/${externalCustomerId}/applied_taxes`,
|
|
974
|
+
method: "POST",
|
|
975
|
+
body: data,
|
|
976
|
+
secure: true,
|
|
977
|
+
type: ContentType.Json,
|
|
978
|
+
format: "json",
|
|
979
|
+
...params,
|
|
980
|
+
}),
|
|
981
|
+
/**
|
|
982
|
+
* @description Delete customer's appplied tax
|
|
983
|
+
*
|
|
984
|
+
* @tags customers
|
|
985
|
+
* @name DeleteAppliedTax
|
|
986
|
+
* @summary Delete customer's appplied tax
|
|
987
|
+
* @request DELETE:/customers/{external_customer_id}/applied_taxes/{tax_code}
|
|
988
|
+
* @secure
|
|
989
|
+
*/
|
|
990
|
+
deleteAppliedTax: (externalCustomerId, taxCode, params = {}) => this.request({
|
|
991
|
+
path: `/customers/${externalCustomerId}/applied_taxes/${taxCode}`,
|
|
992
|
+
method: "DELETE",
|
|
993
|
+
secure: true,
|
|
994
|
+
format: "json",
|
|
995
|
+
...params,
|
|
996
|
+
}),
|
|
997
|
+
/**
|
|
998
|
+
* @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
|
|
999
|
+
*
|
|
1000
|
+
* @tags customers
|
|
1001
|
+
* @name GetCustomerPortalUrl
|
|
1002
|
+
* @summary Get a customer portal URL
|
|
1003
|
+
* @request GET:/customers/{external_customer_id}/portal_url
|
|
1004
|
+
* @secure
|
|
1005
|
+
*/
|
|
1006
|
+
getCustomerPortalUrl: (externalCustomerId, params = {}) => this.request({
|
|
1007
|
+
path: `/customers/${externalCustomerId}/portal_url`,
|
|
1008
|
+
method: "GET",
|
|
1009
|
+
secure: true,
|
|
1010
|
+
format: "json",
|
|
1011
|
+
...params,
|
|
1012
|
+
}),
|
|
1013
|
+
/**
|
|
1014
|
+
* @description This endpoint enables the retrieval of the usage-based billing data for a customer within the current period.
|
|
1015
|
+
*
|
|
1016
|
+
* @tags customers
|
|
1017
|
+
* @name FindCustomerCurrentUsage
|
|
1018
|
+
* @summary Retrieve customer current usage
|
|
1019
|
+
* @request GET:/customers/{external_customer_id}/current_usage
|
|
1020
|
+
* @secure
|
|
1021
|
+
*/
|
|
1022
|
+
findCustomerCurrentUsage: (externalCustomerId, query, params = {}) => this.request({
|
|
1023
|
+
path: `/customers/${externalCustomerId}/current_usage`,
|
|
1024
|
+
method: "GET",
|
|
1025
|
+
query: query,
|
|
1026
|
+
secure: true,
|
|
1027
|
+
format: "json",
|
|
1028
|
+
...params,
|
|
1029
|
+
}),
|
|
1030
|
+
};
|
|
1031
|
+
events = {
|
|
1032
|
+
/**
|
|
1033
|
+
* @description This endpoint is used for transmitting usage measurement events to either a designated customer or a specific subscription.
|
|
1034
|
+
*
|
|
1035
|
+
* @tags events
|
|
1036
|
+
* @name CreateEvent
|
|
1037
|
+
* @summary Send usage events
|
|
1038
|
+
* @request POST:/events
|
|
1039
|
+
* @secure
|
|
1040
|
+
*/
|
|
1041
|
+
createEvent: (data, params = {}) => this.request({
|
|
1042
|
+
path: `/events`,
|
|
1043
|
+
method: "POST",
|
|
1044
|
+
body: data,
|
|
1045
|
+
secure: true,
|
|
1046
|
+
type: ContentType.Json,
|
|
1047
|
+
...params,
|
|
1048
|
+
}),
|
|
1049
|
+
/**
|
|
1050
|
+
* @description This endpoint is used for transmitting a batch of usage measurement events to multiple subscriptions for a single customer.
|
|
1051
|
+
*
|
|
1052
|
+
* @tags events
|
|
1053
|
+
* @name CreateBatchEvents
|
|
1054
|
+
* @summary Batch multiple events
|
|
1055
|
+
* @request POST:/events/batch
|
|
1056
|
+
* @secure
|
|
1057
|
+
*/
|
|
1058
|
+
createBatchEvents: (data, params = {}) => this.request({
|
|
1059
|
+
path: `/events/batch`,
|
|
1060
|
+
method: "POST",
|
|
1061
|
+
body: data,
|
|
1062
|
+
secure: true,
|
|
1063
|
+
type: ContentType.Json,
|
|
1064
|
+
...params,
|
|
1065
|
+
}),
|
|
1066
|
+
/**
|
|
1067
|
+
* @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
|
|
1068
|
+
*
|
|
1069
|
+
* @tags events
|
|
1070
|
+
* @name EventEstimateFees
|
|
1071
|
+
* @summary Estimate fees for a pay in advance charge
|
|
1072
|
+
* @request POST:/events/estimate_fees
|
|
1073
|
+
* @secure
|
|
1074
|
+
*/
|
|
1075
|
+
eventEstimateFees: (data, params = {}) => this.request({
|
|
1076
|
+
path: `/events/estimate_fees`,
|
|
1077
|
+
method: "POST",
|
|
1078
|
+
body: data,
|
|
1079
|
+
secure: true,
|
|
1080
|
+
type: ContentType.Json,
|
|
1081
|
+
format: "json",
|
|
1082
|
+
...params,
|
|
1083
|
+
}),
|
|
1084
|
+
/**
|
|
1085
|
+
* @description This endpoint is used for retrieving a specific usage measurement event that has been sent to a customer or a subscription.
|
|
1086
|
+
*
|
|
1087
|
+
* @tags events
|
|
1088
|
+
* @name FindEvent
|
|
1089
|
+
* @summary Retrieve a specific event
|
|
1090
|
+
* @request GET:/events/{transaction_id}
|
|
1091
|
+
* @secure
|
|
1092
|
+
*/
|
|
1093
|
+
findEvent: (transactionId, params = {}) => this.request({
|
|
1094
|
+
path: `/events/${transactionId}`,
|
|
1095
|
+
method: "GET",
|
|
1096
|
+
secure: true,
|
|
1097
|
+
format: "json",
|
|
1098
|
+
...params,
|
|
1099
|
+
}),
|
|
1100
|
+
};
|
|
1101
|
+
fees = {
|
|
1102
|
+
/**
|
|
1103
|
+
* @description This endpoint is used for retrieving all fees that has been issued.
|
|
1104
|
+
*
|
|
1105
|
+
* @tags fees
|
|
1106
|
+
* @name FindAllFees
|
|
1107
|
+
* @summary List all fees
|
|
1108
|
+
* @request GET:/fees
|
|
1109
|
+
* @secure
|
|
1110
|
+
*/
|
|
1111
|
+
findAllFees: (query, params = {}) => this.request({
|
|
1112
|
+
path: `/fees`,
|
|
1113
|
+
method: "GET",
|
|
1114
|
+
query: query,
|
|
1115
|
+
secure: true,
|
|
1116
|
+
format: "json",
|
|
1117
|
+
...params,
|
|
1118
|
+
}),
|
|
1119
|
+
/**
|
|
1120
|
+
* @description This endpoint is used for retrieving a specific fee that has been issued.
|
|
1121
|
+
*
|
|
1122
|
+
* @tags fees
|
|
1123
|
+
* @name FindFee
|
|
1124
|
+
* @summary Retrieve a specific fee
|
|
1125
|
+
* @request GET:/fees/{lago_id}
|
|
1126
|
+
* @secure
|
|
1127
|
+
*/
|
|
1128
|
+
findFee: (lagoId, params = {}) => this.request({
|
|
1129
|
+
path: `/fees/${lagoId}`,
|
|
1130
|
+
method: "GET",
|
|
1131
|
+
secure: true,
|
|
1132
|
+
format: "json",
|
|
1133
|
+
...params,
|
|
1134
|
+
}),
|
|
1135
|
+
/**
|
|
1136
|
+
* @description This endpoint is used for updating a specific fee that has been issued.
|
|
1137
|
+
*
|
|
1138
|
+
* @tags fees
|
|
1139
|
+
* @name UpdateFee
|
|
1140
|
+
* @summary Update a fee
|
|
1141
|
+
* @request PUT:/fees/{lago_id}
|
|
1142
|
+
* @secure
|
|
1143
|
+
*/
|
|
1144
|
+
updateFee: (lagoId, data, params = {}) => this.request({
|
|
1145
|
+
path: `/fees/${lagoId}`,
|
|
1146
|
+
method: "PUT",
|
|
1147
|
+
body: data,
|
|
1148
|
+
secure: true,
|
|
1149
|
+
type: ContentType.Json,
|
|
1150
|
+
format: "json",
|
|
1151
|
+
...params,
|
|
1152
|
+
}),
|
|
1153
|
+
};
|
|
1154
|
+
invoices = {
|
|
1155
|
+
/**
|
|
1156
|
+
* @description This endpoint is used for issuing a one-off invoice.
|
|
1157
|
+
*
|
|
1158
|
+
* @tags invoices
|
|
1159
|
+
* @name CreateInvoice
|
|
1160
|
+
* @summary Create a one-off invoice
|
|
1161
|
+
* @request POST:/invoices
|
|
1162
|
+
* @secure
|
|
1163
|
+
*/
|
|
1164
|
+
createInvoice: (data, params = {}) => this.request({
|
|
1165
|
+
path: `/invoices`,
|
|
1166
|
+
method: "POST",
|
|
1167
|
+
body: data,
|
|
1168
|
+
secure: true,
|
|
1169
|
+
type: ContentType.Json,
|
|
1170
|
+
format: "json",
|
|
1171
|
+
...params,
|
|
1172
|
+
}),
|
|
1173
|
+
/**
|
|
1174
|
+
* @description This endpoint is used for retrievign all invoices.
|
|
1175
|
+
*
|
|
1176
|
+
* @tags invoices
|
|
1177
|
+
* @name FindAllInvoices
|
|
1178
|
+
* @summary List all invoices
|
|
1179
|
+
* @request GET:/invoices
|
|
1180
|
+
* @secure
|
|
1181
|
+
*/
|
|
1182
|
+
findAllInvoices: (query, params = {}) => this.request({
|
|
1183
|
+
path: `/invoices`,
|
|
1184
|
+
method: "GET",
|
|
1185
|
+
query: query,
|
|
1186
|
+
secure: true,
|
|
1187
|
+
format: "json",
|
|
1188
|
+
...params,
|
|
1189
|
+
}),
|
|
1190
|
+
/**
|
|
1191
|
+
* @description This endpoint is used for updating an existing invoice.
|
|
584
1192
|
*
|
|
585
|
-
* @tags
|
|
586
|
-
* @name
|
|
587
|
-
* @summary
|
|
588
|
-
* @request
|
|
1193
|
+
* @tags invoices
|
|
1194
|
+
* @name UpdateInvoice
|
|
1195
|
+
* @summary Update an invoice
|
|
1196
|
+
* @request PUT:/invoices/{lago_id}
|
|
589
1197
|
* @secure
|
|
590
1198
|
*/
|
|
591
|
-
|
|
592
|
-
path: `/
|
|
593
|
-
method: "
|
|
594
|
-
|
|
1199
|
+
updateInvoice: (lagoId, data, params = {}) => this.request({
|
|
1200
|
+
path: `/invoices/${lagoId}`,
|
|
1201
|
+
method: "PUT",
|
|
1202
|
+
body: data,
|
|
595
1203
|
secure: true,
|
|
1204
|
+
type: ContentType.Json,
|
|
596
1205
|
format: "json",
|
|
597
1206
|
...params,
|
|
598
1207
|
}),
|
|
599
1208
|
/**
|
|
600
|
-
* @description
|
|
1209
|
+
* @description This endpoint is used for retrieving a specific invoice that has been issued.
|
|
601
1210
|
*
|
|
602
|
-
* @tags
|
|
603
|
-
* @name
|
|
604
|
-
* @summary
|
|
605
|
-
* @request GET:/
|
|
1211
|
+
* @tags invoices
|
|
1212
|
+
* @name FindInvoice
|
|
1213
|
+
* @summary Retrieve an invoice
|
|
1214
|
+
* @request GET:/invoices/{lago_id}
|
|
606
1215
|
* @secure
|
|
607
1216
|
*/
|
|
608
|
-
|
|
609
|
-
path: `/
|
|
1217
|
+
findInvoice: (lagoId, params = {}) => this.request({
|
|
1218
|
+
path: `/invoices/${lagoId}`,
|
|
610
1219
|
method: "GET",
|
|
611
1220
|
secure: true,
|
|
612
1221
|
format: "json",
|
|
613
1222
|
...params,
|
|
614
1223
|
}),
|
|
615
1224
|
/**
|
|
616
|
-
* @description
|
|
1225
|
+
* @description This endpoint is used for downloading a specific invoice PDF document.
|
|
617
1226
|
*
|
|
618
|
-
* @tags
|
|
619
|
-
* @name
|
|
620
|
-
* @summary
|
|
621
|
-
* @request
|
|
1227
|
+
* @tags invoices
|
|
1228
|
+
* @name DownloadInvoice
|
|
1229
|
+
* @summary Download an invoice PDF
|
|
1230
|
+
* @request POST:/invoices/{lago_id}/download
|
|
622
1231
|
* @secure
|
|
623
1232
|
*/
|
|
624
|
-
|
|
625
|
-
path: `/
|
|
626
|
-
method: "
|
|
1233
|
+
downloadInvoice: (lagoId, params = {}) => this.request({
|
|
1234
|
+
path: `/invoices/${lagoId}/download`,
|
|
1235
|
+
method: "POST",
|
|
627
1236
|
secure: true,
|
|
628
1237
|
format: "json",
|
|
629
1238
|
...params,
|
|
630
1239
|
}),
|
|
631
|
-
};
|
|
632
|
-
events = {
|
|
633
1240
|
/**
|
|
634
|
-
* @description
|
|
1241
|
+
* @description This endpoint is used for finalizing a draft invoice.
|
|
635
1242
|
*
|
|
636
|
-
* @tags
|
|
637
|
-
* @name
|
|
638
|
-
* @summary
|
|
639
|
-
* @request
|
|
1243
|
+
* @tags invoices
|
|
1244
|
+
* @name FinalizeInvoice
|
|
1245
|
+
* @summary Finalize a draft invoice
|
|
1246
|
+
* @request PUT:/invoices/{lago_id}/finalize
|
|
640
1247
|
* @secure
|
|
641
1248
|
*/
|
|
642
|
-
|
|
643
|
-
path: `/
|
|
644
|
-
method: "
|
|
645
|
-
body: data,
|
|
1249
|
+
finalizeInvoice: (lagoId, params = {}) => this.request({
|
|
1250
|
+
path: `/invoices/${lagoId}/finalize`,
|
|
1251
|
+
method: "PUT",
|
|
646
1252
|
secure: true,
|
|
647
|
-
|
|
1253
|
+
format: "json",
|
|
648
1254
|
...params,
|
|
649
1255
|
}),
|
|
650
1256
|
/**
|
|
651
|
-
* @description
|
|
1257
|
+
* @description This endpoint is used for refreshing a draft invoice.
|
|
652
1258
|
*
|
|
653
|
-
* @tags
|
|
654
|
-
* @name
|
|
655
|
-
* @summary
|
|
656
|
-
* @request
|
|
1259
|
+
* @tags invoices
|
|
1260
|
+
* @name RefreshInvoice
|
|
1261
|
+
* @summary Refresh a draft invoice
|
|
1262
|
+
* @request PUT:/invoices/{lago_id}/refresh
|
|
657
1263
|
* @secure
|
|
658
1264
|
*/
|
|
659
|
-
|
|
660
|
-
path: `/
|
|
661
|
-
method: "
|
|
662
|
-
body: data,
|
|
1265
|
+
refreshInvoice: (lagoId, params = {}) => this.request({
|
|
1266
|
+
path: `/invoices/${lagoId}/refresh`,
|
|
1267
|
+
method: "PUT",
|
|
663
1268
|
secure: true,
|
|
664
|
-
|
|
1269
|
+
format: "json",
|
|
665
1270
|
...params,
|
|
666
1271
|
}),
|
|
667
1272
|
/**
|
|
668
|
-
* @description
|
|
1273
|
+
* @description This endpoint resends an invoice for collection and retry a payment.
|
|
669
1274
|
*
|
|
670
|
-
* @tags
|
|
671
|
-
* @name
|
|
672
|
-
* @summary
|
|
673
|
-
* @request
|
|
1275
|
+
* @tags invoices
|
|
1276
|
+
* @name RetryPayment
|
|
1277
|
+
* @summary Retry an invoice payment
|
|
1278
|
+
* @request POST:/invoices/{lago_id}/retry_payment
|
|
674
1279
|
* @secure
|
|
675
1280
|
*/
|
|
676
|
-
|
|
677
|
-
path: `/
|
|
678
|
-
method: "
|
|
1281
|
+
retryPayment: (lagoId, params = {}) => this.request({
|
|
1282
|
+
path: `/invoices/${lagoId}/retry_payment`,
|
|
1283
|
+
method: "POST",
|
|
679
1284
|
secure: true,
|
|
680
|
-
format: "json",
|
|
681
1285
|
...params,
|
|
682
1286
|
}),
|
|
1287
|
+
};
|
|
1288
|
+
organizations = {
|
|
683
1289
|
/**
|
|
684
|
-
* @description
|
|
1290
|
+
* @description This endpoint is used to update your own organization's settings.
|
|
685
1291
|
*
|
|
686
|
-
* @tags
|
|
687
|
-
* @name
|
|
688
|
-
* @summary
|
|
689
|
-
* @request
|
|
1292
|
+
* @tags organizations
|
|
1293
|
+
* @name UpdateOrganization
|
|
1294
|
+
* @summary Update your organization
|
|
1295
|
+
* @request PUT:/organizations
|
|
690
1296
|
* @secure
|
|
691
1297
|
*/
|
|
692
|
-
|
|
693
|
-
path: `/
|
|
694
|
-
method: "
|
|
1298
|
+
updateOrganization: (data, params = {}) => this.request({
|
|
1299
|
+
path: `/organizations`,
|
|
1300
|
+
method: "PUT",
|
|
695
1301
|
body: data,
|
|
696
1302
|
secure: true,
|
|
697
1303
|
type: ContentType.Json,
|
|
@@ -701,11 +1307,11 @@ export class Api extends HttpClient {
|
|
|
701
1307
|
};
|
|
702
1308
|
plans = {
|
|
703
1309
|
/**
|
|
704
|
-
* @description
|
|
1310
|
+
* @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
1311
|
*
|
|
706
1312
|
* @tags plans
|
|
707
1313
|
* @name CreatePlan
|
|
708
|
-
* @summary Create a
|
|
1314
|
+
* @summary Create a plan
|
|
709
1315
|
* @request POST:/plans
|
|
710
1316
|
* @secure
|
|
711
1317
|
*/
|
|
@@ -719,11 +1325,11 @@ export class Api extends HttpClient {
|
|
|
719
1325
|
...params,
|
|
720
1326
|
}),
|
|
721
1327
|
/**
|
|
722
|
-
* @description
|
|
1328
|
+
* @description This endpoint retrieves all existing plans.
|
|
723
1329
|
*
|
|
724
1330
|
* @tags plans
|
|
725
1331
|
* @name FindAllPlans
|
|
726
|
-
* @summary
|
|
1332
|
+
* @summary List all plans
|
|
727
1333
|
* @request GET:/plans
|
|
728
1334
|
* @secure
|
|
729
1335
|
*/
|
|
@@ -736,11 +1342,11 @@ export class Api extends HttpClient {
|
|
|
736
1342
|
...params,
|
|
737
1343
|
}),
|
|
738
1344
|
/**
|
|
739
|
-
* @description
|
|
1345
|
+
* @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
1346
|
*
|
|
741
1347
|
* @tags plans
|
|
742
1348
|
* @name UpdatePlan
|
|
743
|
-
* @summary Update
|
|
1349
|
+
* @summary Update a plan
|
|
744
1350
|
* @request PUT:/plans/{code}
|
|
745
1351
|
* @secure
|
|
746
1352
|
*/
|
|
@@ -754,11 +1360,11 @@ export class Api extends HttpClient {
|
|
|
754
1360
|
...params,
|
|
755
1361
|
}),
|
|
756
1362
|
/**
|
|
757
|
-
* @description
|
|
1363
|
+
* @description This endpoint retrieves a specific plan.
|
|
758
1364
|
*
|
|
759
1365
|
* @tags plans
|
|
760
1366
|
* @name FindPlan
|
|
761
|
-
* @summary
|
|
1367
|
+
* @summary Retrieve a plan
|
|
762
1368
|
* @request GET:/plans/{code}
|
|
763
1369
|
* @secure
|
|
764
1370
|
*/
|
|
@@ -770,7 +1376,7 @@ export class Api extends HttpClient {
|
|
|
770
1376
|
...params,
|
|
771
1377
|
}),
|
|
772
1378
|
/**
|
|
773
|
-
* @description
|
|
1379
|
+
* @description This endpoint deletes a specific plan. Note that this plan could be associated with active subscriptions.
|
|
774
1380
|
*
|
|
775
1381
|
* @tags plans
|
|
776
1382
|
* @name DestroyPlan
|
|
@@ -788,7 +1394,7 @@ export class Api extends HttpClient {
|
|
|
788
1394
|
};
|
|
789
1395
|
subscriptions = {
|
|
790
1396
|
/**
|
|
791
|
-
* @description
|
|
1397
|
+
* @description This endpoint assigns a plan to a customer, creating or modifying a subscription. Ideal for initial subscriptions or plan changes (upgrades/downgrades).
|
|
792
1398
|
*
|
|
793
1399
|
* @tags subscriptions
|
|
794
1400
|
* @name CreateSubscription
|
|
@@ -806,11 +1412,11 @@ export class Api extends HttpClient {
|
|
|
806
1412
|
...params,
|
|
807
1413
|
}),
|
|
808
1414
|
/**
|
|
809
|
-
* @description
|
|
1415
|
+
* @description This endpoint retrieves all active subscriptions.
|
|
810
1416
|
*
|
|
811
1417
|
* @tags subscriptions
|
|
812
1418
|
* @name FindAllSubscriptions
|
|
813
|
-
* @summary
|
|
1419
|
+
* @summary List all subscriptions
|
|
814
1420
|
* @request GET:/subscriptions
|
|
815
1421
|
* @secure
|
|
816
1422
|
*/
|
|
@@ -823,11 +1429,11 @@ export class Api extends HttpClient {
|
|
|
823
1429
|
...params,
|
|
824
1430
|
}),
|
|
825
1431
|
/**
|
|
826
|
-
* @description
|
|
1432
|
+
* @description This endpoint allows you to update a subscription.
|
|
827
1433
|
*
|
|
828
1434
|
* @tags subscriptions
|
|
829
1435
|
* @name UpdateSubscription
|
|
830
|
-
* @summary Update
|
|
1436
|
+
* @summary Update a subscription
|
|
831
1437
|
* @request PUT:/subscriptions/{external_id}
|
|
832
1438
|
* @secure
|
|
833
1439
|
*/
|
|
@@ -841,7 +1447,7 @@ export class Api extends HttpClient {
|
|
|
841
1447
|
...params,
|
|
842
1448
|
}),
|
|
843
1449
|
/**
|
|
844
|
-
* @description
|
|
1450
|
+
* @description This endpoint allows you to terminate a subscription.
|
|
845
1451
|
*
|
|
846
1452
|
* @tags subscriptions
|
|
847
1453
|
* @name DestroySubscription
|
|
@@ -857,35 +1463,18 @@ export class Api extends HttpClient {
|
|
|
857
1463
|
...params,
|
|
858
1464
|
}),
|
|
859
1465
|
};
|
|
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 = {
|
|
1466
|
+
taxes = {
|
|
878
1467
|
/**
|
|
879
|
-
* @description Create a
|
|
1468
|
+
* @description Create a tax
|
|
880
1469
|
*
|
|
881
|
-
* @tags
|
|
882
|
-
* @name
|
|
883
|
-
* @summary Create a
|
|
884
|
-
* @request POST:/
|
|
1470
|
+
* @tags taxes
|
|
1471
|
+
* @name CreateTax
|
|
1472
|
+
* @summary Create a tax
|
|
1473
|
+
* @request POST:/taxes
|
|
885
1474
|
* @secure
|
|
886
1475
|
*/
|
|
887
|
-
|
|
888
|
-
path: `/
|
|
1476
|
+
createTax: (data, params = {}) => this.request({
|
|
1477
|
+
path: `/taxes`,
|
|
889
1478
|
method: "POST",
|
|
890
1479
|
body: data,
|
|
891
1480
|
secure: true,
|
|
@@ -894,16 +1483,16 @@ export class Api extends HttpClient {
|
|
|
894
1483
|
...params,
|
|
895
1484
|
}),
|
|
896
1485
|
/**
|
|
897
|
-
* @description Find all
|
|
1486
|
+
* @description Find all taxes in certain organization
|
|
898
1487
|
*
|
|
899
|
-
* @tags
|
|
900
|
-
* @name
|
|
901
|
-
* @summary Find
|
|
902
|
-
* @request GET:/
|
|
1488
|
+
* @tags taxes
|
|
1489
|
+
* @name FindAllTaxes
|
|
1490
|
+
* @summary Find taxes
|
|
1491
|
+
* @request GET:/taxes
|
|
903
1492
|
* @secure
|
|
904
1493
|
*/
|
|
905
|
-
|
|
906
|
-
path: `/
|
|
1494
|
+
findAllTaxes: (query, params = {}) => this.request({
|
|
1495
|
+
path: `/taxes`,
|
|
907
1496
|
method: "GET",
|
|
908
1497
|
query: query,
|
|
909
1498
|
secure: true,
|
|
@@ -911,16 +1500,16 @@ export class Api extends HttpClient {
|
|
|
911
1500
|
...params,
|
|
912
1501
|
}),
|
|
913
1502
|
/**
|
|
914
|
-
* @description Update an existing
|
|
1503
|
+
* @description Update an existing tax by code
|
|
915
1504
|
*
|
|
916
|
-
* @tags
|
|
917
|
-
* @name
|
|
918
|
-
* @summary Update an existing
|
|
919
|
-
* @request PUT:/
|
|
1505
|
+
* @tags taxes
|
|
1506
|
+
* @name UpdateTax
|
|
1507
|
+
* @summary Update an existing tax
|
|
1508
|
+
* @request PUT:/taxes/{code}
|
|
920
1509
|
* @secure
|
|
921
1510
|
*/
|
|
922
|
-
|
|
923
|
-
path: `/
|
|
1511
|
+
updateTax: (code, data, params = {}) => this.request({
|
|
1512
|
+
path: `/taxes/${code}`,
|
|
924
1513
|
method: "PUT",
|
|
925
1514
|
body: data,
|
|
926
1515
|
secure: true,
|
|
@@ -929,133 +1518,33 @@ export class Api extends HttpClient {
|
|
|
929
1518
|
...params,
|
|
930
1519
|
}),
|
|
931
1520
|
/**
|
|
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
|
|
1521
|
+
* @description Return a single tax
|
|
1014
1522
|
*
|
|
1015
|
-
* @tags
|
|
1016
|
-
* @name
|
|
1017
|
-
* @summary Find
|
|
1018
|
-
* @request GET:/
|
|
1523
|
+
* @tags taxes
|
|
1524
|
+
* @name FindTax
|
|
1525
|
+
* @summary Find tax by code
|
|
1526
|
+
* @request GET:/taxes/{code}
|
|
1019
1527
|
* @secure
|
|
1020
1528
|
*/
|
|
1021
|
-
|
|
1022
|
-
path: `/
|
|
1529
|
+
findTax: (code, params = {}) => this.request({
|
|
1530
|
+
path: `/taxes/${code}`,
|
|
1023
1531
|
method: "GET",
|
|
1024
1532
|
secure: true,
|
|
1025
1533
|
format: "json",
|
|
1026
1534
|
...params,
|
|
1027
1535
|
}),
|
|
1028
1536
|
/**
|
|
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
|
|
1537
|
+
* @description Delete a tax
|
|
1048
1538
|
*
|
|
1049
|
-
* @tags
|
|
1050
|
-
* @name
|
|
1051
|
-
* @summary
|
|
1052
|
-
* @request
|
|
1539
|
+
* @tags taxes
|
|
1540
|
+
* @name DestroyTax
|
|
1541
|
+
* @summary Delete a tax
|
|
1542
|
+
* @request DELETE:/taxes/{code}
|
|
1053
1543
|
* @secure
|
|
1054
1544
|
*/
|
|
1055
|
-
|
|
1056
|
-
path: `/
|
|
1057
|
-
method: "
|
|
1058
|
-
query: query,
|
|
1545
|
+
destroyTax: (code, params = {}) => this.request({
|
|
1546
|
+
path: `/taxes/${code}`,
|
|
1547
|
+
method: "DELETE",
|
|
1059
1548
|
secure: true,
|
|
1060
1549
|
format: "json",
|
|
1061
1550
|
...params,
|
|
@@ -1063,11 +1552,11 @@ export class Api extends HttpClient {
|
|
|
1063
1552
|
};
|
|
1064
1553
|
wallets = {
|
|
1065
1554
|
/**
|
|
1066
|
-
* @description
|
|
1555
|
+
* @description This endpoint is used to create a wallet with prepaid credits.
|
|
1067
1556
|
*
|
|
1068
1557
|
* @tags wallets
|
|
1069
1558
|
* @name CreateWallet
|
|
1070
|
-
* @summary Create a
|
|
1559
|
+
* @summary Create a wallet
|
|
1071
1560
|
* @request POST:/wallets
|
|
1072
1561
|
* @secure
|
|
1073
1562
|
*/
|
|
@@ -1081,11 +1570,11 @@ export class Api extends HttpClient {
|
|
|
1081
1570
|
...params,
|
|
1082
1571
|
}),
|
|
1083
1572
|
/**
|
|
1084
|
-
* @description
|
|
1573
|
+
* @description This endpoint is used to list all wallets with prepaid credits.
|
|
1085
1574
|
*
|
|
1086
1575
|
* @tags wallets
|
|
1087
1576
|
* @name FindAllWallets
|
|
1088
|
-
* @summary
|
|
1577
|
+
* @summary List all wallets
|
|
1089
1578
|
* @request GET:/wallets
|
|
1090
1579
|
* @secure
|
|
1091
1580
|
*/
|
|
@@ -1098,16 +1587,16 @@ export class Api extends HttpClient {
|
|
|
1098
1587
|
...params,
|
|
1099
1588
|
}),
|
|
1100
1589
|
/**
|
|
1101
|
-
* @description
|
|
1590
|
+
* @description This endpoint is used to update an existing wallet with prepaid credits.
|
|
1102
1591
|
*
|
|
1103
1592
|
* @tags wallets
|
|
1104
1593
|
* @name UpdateWallet
|
|
1105
|
-
* @summary Update
|
|
1106
|
-
* @request PUT:/wallets/{
|
|
1594
|
+
* @summary Update a wallet
|
|
1595
|
+
* @request PUT:/wallets/{lago_id}
|
|
1107
1596
|
* @secure
|
|
1108
1597
|
*/
|
|
1109
|
-
updateWallet: (
|
|
1110
|
-
path: `/wallets/${
|
|
1598
|
+
updateWallet: (lagoId, data, params = {}) => this.request({
|
|
1599
|
+
path: `/wallets/${lagoId}`,
|
|
1111
1600
|
method: "PUT",
|
|
1112
1601
|
body: data,
|
|
1113
1602
|
secure: true,
|
|
@@ -1116,48 +1605,48 @@ export class Api extends HttpClient {
|
|
|
1116
1605
|
...params,
|
|
1117
1606
|
}),
|
|
1118
1607
|
/**
|
|
1119
|
-
* @description
|
|
1608
|
+
* @description This endpoint is used to retrieve an existing wallet with prepaid credits.
|
|
1120
1609
|
*
|
|
1121
1610
|
* @tags wallets
|
|
1122
1611
|
* @name FindWallet
|
|
1123
|
-
* @summary
|
|
1124
|
-
* @request GET:/wallets/{
|
|
1612
|
+
* @summary Retrieve a wallet
|
|
1613
|
+
* @request GET:/wallets/{lago_id}
|
|
1125
1614
|
* @secure
|
|
1126
1615
|
*/
|
|
1127
|
-
findWallet: (
|
|
1128
|
-
path: `/wallets/${
|
|
1616
|
+
findWallet: (lagoId, params = {}) => this.request({
|
|
1617
|
+
path: `/wallets/${lagoId}`,
|
|
1129
1618
|
method: "GET",
|
|
1130
1619
|
secure: true,
|
|
1131
1620
|
format: "json",
|
|
1132
1621
|
...params,
|
|
1133
1622
|
}),
|
|
1134
1623
|
/**
|
|
1135
|
-
* @description
|
|
1624
|
+
* @description This endpoint is used to terminate an existing wallet with prepaid credits.
|
|
1136
1625
|
*
|
|
1137
1626
|
* @tags wallets
|
|
1138
1627
|
* @name DestroyWallet
|
|
1139
|
-
* @summary
|
|
1140
|
-
* @request DELETE:/wallets/{
|
|
1628
|
+
* @summary Terminate a wallet
|
|
1629
|
+
* @request DELETE:/wallets/{lago_id}
|
|
1141
1630
|
* @secure
|
|
1142
1631
|
*/
|
|
1143
|
-
destroyWallet: (
|
|
1144
|
-
path: `/wallets/${
|
|
1632
|
+
destroyWallet: (lagoId, params = {}) => this.request({
|
|
1633
|
+
path: `/wallets/${lagoId}`,
|
|
1145
1634
|
method: "DELETE",
|
|
1146
1635
|
secure: true,
|
|
1147
1636
|
format: "json",
|
|
1148
1637
|
...params,
|
|
1149
1638
|
}),
|
|
1150
1639
|
/**
|
|
1151
|
-
* @description
|
|
1640
|
+
* @description This endpoint is used to list all wallet transactions.
|
|
1152
1641
|
*
|
|
1153
1642
|
* @tags wallets
|
|
1154
1643
|
* @name FindAllWalletTransactions
|
|
1155
|
-
* @summary
|
|
1156
|
-
* @request GET:/wallets/{
|
|
1644
|
+
* @summary List all wallet transactions
|
|
1645
|
+
* @request GET:/wallets/{lago_id}/wallet_transactions
|
|
1157
1646
|
* @secure
|
|
1158
1647
|
*/
|
|
1159
|
-
findAllWalletTransactions: (
|
|
1160
|
-
path: `/wallets/${
|
|
1648
|
+
findAllWalletTransactions: (lagoId, query, params = {}) => this.request({
|
|
1649
|
+
path: `/wallets/${lagoId}/wallet_transactions`,
|
|
1161
1650
|
method: "GET",
|
|
1162
1651
|
query: query,
|
|
1163
1652
|
secure: true,
|
|
@@ -1167,11 +1656,11 @@ export class Api extends HttpClient {
|
|
|
1167
1656
|
};
|
|
1168
1657
|
walletTransactions = {
|
|
1169
1658
|
/**
|
|
1170
|
-
* @description
|
|
1659
|
+
* @description This endpoint is used to top-up an active wallet.
|
|
1171
1660
|
*
|
|
1172
1661
|
* @tags wallets
|
|
1173
1662
|
* @name CreateWalletTransaction
|
|
1174
|
-
* @summary
|
|
1663
|
+
* @summary Top up a wallet
|
|
1175
1664
|
* @request POST:/wallet_transactions
|
|
1176
1665
|
* @secure
|
|
1177
1666
|
*/
|
|
@@ -1185,106 +1674,20 @@ export class Api extends HttpClient {
|
|
|
1185
1674
|
...params,
|
|
1186
1675
|
}),
|
|
1187
1676
|
};
|
|
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
|
-
}),
|
|
1677
|
+
webhooks = {
|
|
1242
1678
|
/**
|
|
1243
|
-
* @description
|
|
1679
|
+
* @description This endpoint is used to retrieve the public key used to verify the webhooks signature
|
|
1244
1680
|
*
|
|
1245
|
-
* @tags
|
|
1246
|
-
* @name
|
|
1247
|
-
* @summary
|
|
1248
|
-
* @request GET:/
|
|
1681
|
+
* @tags webhooks
|
|
1682
|
+
* @name FetchPublicKey
|
|
1683
|
+
* @summary Retrieve webhook public key
|
|
1684
|
+
* @request GET:/webhooks/public_key
|
|
1249
1685
|
* @secure
|
|
1250
1686
|
*/
|
|
1251
|
-
|
|
1252
|
-
path: `/
|
|
1687
|
+
fetchPublicKey: (params = {}) => this.request({
|
|
1688
|
+
path: `/webhooks/public_key`,
|
|
1253
1689
|
method: "GET",
|
|
1254
1690
|
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
1691
|
...params,
|
|
1289
1692
|
}),
|
|
1290
1693
|
};
|