@fleetless/contracts 6.2.0 → 6.3.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/artifacts/openapi.json +4322 -1887
- package/artifacts/routes.json +326 -2
- package/artifacts/schema/billing-address.schema.json +49 -0
- package/artifacts/schema/billing-cancel-request.schema.json +12 -0
- package/artifacts/schema/billing-change-request.schema.json +60 -0
- package/artifacts/schema/billing-change-response.schema.json +765 -0
- package/artifacts/schema/billing-details-update.schema.json +25 -0
- package/artifacts/schema/billing-details.schema.json +176 -0
- package/artifacts/schema/billing-invoice.schema.json +76 -0
- package/artifacts/schema/billing-view.schema.json +671 -0
- package/artifacts/schema/checkout-request.schema.json +252 -0
- package/artifacts/schema/checkout-response.schema.json +22 -0
- package/artifacts/schema/checkout-status.schema.json +49 -0
- package/artifacts/schema/payment-method-change-request.schema.json +19 -0
- package/artifacts/schema/payment-method.schema.json +80 -0
- package/artifacts/schema/payment-provider-unavailable-details.schema.json +29 -0
- package/artifacts/schema/vat-id-check-request.schema.json +22 -0
- package/artifacts/schema/vat-id-check-response.schema.json +36 -0
- package/dist/billing.d.ts +778 -0
- package/dist/billing.js +441 -0
- package/dist/errors.d.ts +17 -5
- package/dist/errors.js +31 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +5 -1
- package/dist/plans.d.ts +9 -9
- package/dist/realtime.d.ts +2 -2
- package/dist/rest.d.ts +3 -3
- package/dist/routes.d.ts +1 -1
- package/dist/routes.js +181 -4
- package/package.json +1 -1
|
@@ -0,0 +1,765 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"billing": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"available": {
|
|
9
|
+
"type": "boolean",
|
|
10
|
+
"description": "Whether this cloud takes payments at all — `false` when no Mollie key is configured."
|
|
11
|
+
},
|
|
12
|
+
"account": {
|
|
13
|
+
"anyOf": [
|
|
14
|
+
{
|
|
15
|
+
"type": "object",
|
|
16
|
+
"properties": {
|
|
17
|
+
"payer": {
|
|
18
|
+
"oneOf": [
|
|
19
|
+
{
|
|
20
|
+
"type": "object",
|
|
21
|
+
"properties": {
|
|
22
|
+
"kind": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"const": "company",
|
|
25
|
+
"description": "Billed as a company."
|
|
26
|
+
},
|
|
27
|
+
"company_name": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"minLength": 1,
|
|
30
|
+
"maxLength": 200,
|
|
31
|
+
"description": "The company's legal name, printed on the invoice."
|
|
32
|
+
},
|
|
33
|
+
"vat_id": {
|
|
34
|
+
"anyOf": [
|
|
35
|
+
{
|
|
36
|
+
"type": "string",
|
|
37
|
+
"maxLength": 20
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"type": "null"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"description": "The company's VAT ID, or `null` for none. Required, and must check out through VIES, for a company outside Germany."
|
|
44
|
+
},
|
|
45
|
+
"address": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"properties": {
|
|
48
|
+
"line1": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"minLength": 1,
|
|
51
|
+
"maxLength": 200,
|
|
52
|
+
"description": "Street and number, or the first address line."
|
|
53
|
+
},
|
|
54
|
+
"line2": {
|
|
55
|
+
"anyOf": [
|
|
56
|
+
{
|
|
57
|
+
"type": "string",
|
|
58
|
+
"maxLength": 200
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"type": "null"
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"description": "A second address line, or `null` when there is none."
|
|
65
|
+
},
|
|
66
|
+
"postal_code": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"minLength": 1,
|
|
69
|
+
"maxLength": 20,
|
|
70
|
+
"description": "Postal or ZIP code."
|
|
71
|
+
},
|
|
72
|
+
"city": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"minLength": 1,
|
|
75
|
+
"maxLength": 100,
|
|
76
|
+
"description": "City or town."
|
|
77
|
+
},
|
|
78
|
+
"country": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"pattern": "^[A-Z]{2}$",
|
|
81
|
+
"description": "The billing country. Decides VAT (`vatFor`) and currency (`currencyForCountry`)."
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"required": [
|
|
85
|
+
"line1",
|
|
86
|
+
"line2",
|
|
87
|
+
"postal_code",
|
|
88
|
+
"city",
|
|
89
|
+
"country"
|
|
90
|
+
],
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"description": "The billing address."
|
|
93
|
+
},
|
|
94
|
+
"invoice_email": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"format": "email",
|
|
97
|
+
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
|
|
98
|
+
"description": "Where invoices and billing mail are sent."
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"required": [
|
|
102
|
+
"kind",
|
|
103
|
+
"company_name",
|
|
104
|
+
"vat_id",
|
|
105
|
+
"address",
|
|
106
|
+
"invoice_email"
|
|
107
|
+
],
|
|
108
|
+
"additionalProperties": false,
|
|
109
|
+
"description": "A company: name and an optional VAT ID, never 'full name'."
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"type": "object",
|
|
113
|
+
"properties": {
|
|
114
|
+
"kind": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"const": "person",
|
|
117
|
+
"description": "Billed as a person."
|
|
118
|
+
},
|
|
119
|
+
"full_name": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"minLength": 1,
|
|
122
|
+
"maxLength": 200,
|
|
123
|
+
"description": "The person's full name, printed on the invoice."
|
|
124
|
+
},
|
|
125
|
+
"address": {
|
|
126
|
+
"type": "object",
|
|
127
|
+
"properties": {
|
|
128
|
+
"line1": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"minLength": 1,
|
|
131
|
+
"maxLength": 200,
|
|
132
|
+
"description": "Street and number, or the first address line."
|
|
133
|
+
},
|
|
134
|
+
"line2": {
|
|
135
|
+
"anyOf": [
|
|
136
|
+
{
|
|
137
|
+
"type": "string",
|
|
138
|
+
"maxLength": 200
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"type": "null"
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"description": "A second address line, or `null` when there is none."
|
|
145
|
+
},
|
|
146
|
+
"postal_code": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"minLength": 1,
|
|
149
|
+
"maxLength": 20,
|
|
150
|
+
"description": "Postal or ZIP code."
|
|
151
|
+
},
|
|
152
|
+
"city": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"minLength": 1,
|
|
155
|
+
"maxLength": 100,
|
|
156
|
+
"description": "City or town."
|
|
157
|
+
},
|
|
158
|
+
"country": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"pattern": "^[A-Z]{2}$",
|
|
161
|
+
"description": "The billing country. Decides VAT (`vatFor`) and currency (`currencyForCountry`)."
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"required": [
|
|
165
|
+
"line1",
|
|
166
|
+
"line2",
|
|
167
|
+
"postal_code",
|
|
168
|
+
"city",
|
|
169
|
+
"country"
|
|
170
|
+
],
|
|
171
|
+
"additionalProperties": false,
|
|
172
|
+
"description": "The billing address."
|
|
173
|
+
},
|
|
174
|
+
"invoice_email": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"format": "email",
|
|
177
|
+
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
|
|
178
|
+
"description": "Where invoices and billing mail are sent."
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"required": [
|
|
182
|
+
"kind",
|
|
183
|
+
"full_name",
|
|
184
|
+
"address",
|
|
185
|
+
"invoice_email"
|
|
186
|
+
],
|
|
187
|
+
"additionalProperties": false,
|
|
188
|
+
"description": "A person: a full name, never a VAT ID — only a company can be VAT-registered."
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"description": "Who is paying, and the invoice address and email."
|
|
192
|
+
},
|
|
193
|
+
"vat_id_status": {
|
|
194
|
+
"anyOf": [
|
|
195
|
+
{
|
|
196
|
+
"type": "string",
|
|
197
|
+
"enum": [
|
|
198
|
+
"valid",
|
|
199
|
+
"unverified",
|
|
200
|
+
"invalid"
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"type": "null"
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
"description": "The payer's VAT ID check, or `null` when no VAT ID was given."
|
|
208
|
+
},
|
|
209
|
+
"vat": {
|
|
210
|
+
"type": "object",
|
|
211
|
+
"properties": {
|
|
212
|
+
"treatment": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"enum": [
|
|
215
|
+
"de_standard",
|
|
216
|
+
"reverse_charge",
|
|
217
|
+
"outside_eu"
|
|
218
|
+
],
|
|
219
|
+
"description": "How the account is taxed."
|
|
220
|
+
},
|
|
221
|
+
"rate_percent": {
|
|
222
|
+
"type": "integer",
|
|
223
|
+
"minimum": -9007199254740991,
|
|
224
|
+
"maximum": 9007199254740991,
|
|
225
|
+
"description": "The VAT rate, in whole percent."
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"required": [
|
|
229
|
+
"treatment",
|
|
230
|
+
"rate_percent"
|
|
231
|
+
],
|
|
232
|
+
"additionalProperties": false,
|
|
233
|
+
"description": "The VAT treatment and rate this account charges at (`vatFor`)."
|
|
234
|
+
},
|
|
235
|
+
"currency": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"enum": [
|
|
238
|
+
"eur",
|
|
239
|
+
"usd"
|
|
240
|
+
],
|
|
241
|
+
"description": "The org's billing currency, fixed at the first payment."
|
|
242
|
+
},
|
|
243
|
+
"cycle": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"enum": [
|
|
246
|
+
"monthly",
|
|
247
|
+
"yearly"
|
|
248
|
+
],
|
|
249
|
+
"description": "The current billing cycle."
|
|
250
|
+
},
|
|
251
|
+
"status": {
|
|
252
|
+
"type": "string",
|
|
253
|
+
"enum": [
|
|
254
|
+
"pending",
|
|
255
|
+
"active",
|
|
256
|
+
"past_due",
|
|
257
|
+
"canceled"
|
|
258
|
+
],
|
|
259
|
+
"description": "The account's own status."
|
|
260
|
+
},
|
|
261
|
+
"period_starts_at": {
|
|
262
|
+
"anyOf": [
|
|
263
|
+
{
|
|
264
|
+
"type": "string",
|
|
265
|
+
"format": "date-time",
|
|
266
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"type": "null"
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
"description": "The current period's start. `null` before the first payment."
|
|
273
|
+
},
|
|
274
|
+
"period_ends_at": {
|
|
275
|
+
"anyOf": [
|
|
276
|
+
{
|
|
277
|
+
"type": "string",
|
|
278
|
+
"format": "date-time",
|
|
279
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"type": "null"
|
|
283
|
+
}
|
|
284
|
+
],
|
|
285
|
+
"description": "The current period's end. `null` before the first payment."
|
|
286
|
+
},
|
|
287
|
+
"next_charge": {
|
|
288
|
+
"anyOf": [
|
|
289
|
+
{
|
|
290
|
+
"type": "object",
|
|
291
|
+
"properties": {
|
|
292
|
+
"at": {
|
|
293
|
+
"type": "string",
|
|
294
|
+
"format": "date-time",
|
|
295
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
296
|
+
"description": "When the next charge is due."
|
|
297
|
+
},
|
|
298
|
+
"net_cents": {
|
|
299
|
+
"type": "integer",
|
|
300
|
+
"minimum": -9007199254740991,
|
|
301
|
+
"maximum": 9007199254740991,
|
|
302
|
+
"description": "The next charge, excluding VAT, in integer cents."
|
|
303
|
+
},
|
|
304
|
+
"vat_cents": {
|
|
305
|
+
"type": "integer",
|
|
306
|
+
"minimum": -9007199254740991,
|
|
307
|
+
"maximum": 9007199254740991,
|
|
308
|
+
"description": "VAT on the next charge, in integer cents."
|
|
309
|
+
},
|
|
310
|
+
"gross_cents": {
|
|
311
|
+
"type": "integer",
|
|
312
|
+
"minimum": -9007199254740991,
|
|
313
|
+
"maximum": 9007199254740991,
|
|
314
|
+
"description": "The next charge including VAT, in integer cents."
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"required": [
|
|
318
|
+
"at",
|
|
319
|
+
"net_cents",
|
|
320
|
+
"vat_cents",
|
|
321
|
+
"gross_cents"
|
|
322
|
+
],
|
|
323
|
+
"additionalProperties": false
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"type": "null"
|
|
327
|
+
}
|
|
328
|
+
],
|
|
329
|
+
"description": "`null` while a cancel is pending or nothing else renews."
|
|
330
|
+
},
|
|
331
|
+
"scheduled": {
|
|
332
|
+
"type": "object",
|
|
333
|
+
"properties": {
|
|
334
|
+
"cycle": {
|
|
335
|
+
"anyOf": [
|
|
336
|
+
{
|
|
337
|
+
"type": "string",
|
|
338
|
+
"enum": [
|
|
339
|
+
"monthly",
|
|
340
|
+
"yearly"
|
|
341
|
+
]
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"type": "null"
|
|
345
|
+
}
|
|
346
|
+
],
|
|
347
|
+
"description": "A cycle change queued for the period's end, or `null`."
|
|
348
|
+
},
|
|
349
|
+
"addons": {
|
|
350
|
+
"anyOf": [
|
|
351
|
+
{
|
|
352
|
+
"type": "object",
|
|
353
|
+
"properties": {
|
|
354
|
+
"seats": {
|
|
355
|
+
"type": "integer",
|
|
356
|
+
"minimum": 0,
|
|
357
|
+
"maximum": 9007199254740991,
|
|
358
|
+
"description": "Extra developer seats, one each."
|
|
359
|
+
},
|
|
360
|
+
"robots": {
|
|
361
|
+
"type": "integer",
|
|
362
|
+
"minimum": 0,
|
|
363
|
+
"maximum": 9007199254740991,
|
|
364
|
+
"description": "Extra robots, one each."
|
|
365
|
+
},
|
|
366
|
+
"apps": {
|
|
367
|
+
"type": "integer",
|
|
368
|
+
"minimum": 0,
|
|
369
|
+
"maximum": 9007199254740991,
|
|
370
|
+
"description": "Extra apps, one each."
|
|
371
|
+
},
|
|
372
|
+
"app_user_packs": {
|
|
373
|
+
"type": "integer",
|
|
374
|
+
"minimum": 0,
|
|
375
|
+
"maximum": 9007199254740991,
|
|
376
|
+
"description": "Packs of five extra app users."
|
|
377
|
+
},
|
|
378
|
+
"live_video_packs": {
|
|
379
|
+
"type": "integer",
|
|
380
|
+
"minimum": 0,
|
|
381
|
+
"maximum": 9007199254740991,
|
|
382
|
+
"description": "Packs of 250 extra hours of app-user live video per month."
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
"required": [
|
|
386
|
+
"seats",
|
|
387
|
+
"robots",
|
|
388
|
+
"apps",
|
|
389
|
+
"app_user_packs",
|
|
390
|
+
"live_video_packs"
|
|
391
|
+
],
|
|
392
|
+
"additionalProperties": false
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"type": "null"
|
|
396
|
+
}
|
|
397
|
+
],
|
|
398
|
+
"description": "Add-on counts queued for the period's end, or `null`."
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
"required": [
|
|
402
|
+
"cycle",
|
|
403
|
+
"addons"
|
|
404
|
+
],
|
|
405
|
+
"additionalProperties": false,
|
|
406
|
+
"description": "What takes effect at the period's end."
|
|
407
|
+
},
|
|
408
|
+
"dunning": {
|
|
409
|
+
"anyOf": [
|
|
410
|
+
{
|
|
411
|
+
"type": "object",
|
|
412
|
+
"properties": {
|
|
413
|
+
"invoice_id": {
|
|
414
|
+
"type": "string",
|
|
415
|
+
"format": "uuid",
|
|
416
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
417
|
+
"description": "The open invoice dunning is chasing."
|
|
418
|
+
},
|
|
419
|
+
"gross_cents": {
|
|
420
|
+
"type": "integer",
|
|
421
|
+
"minimum": -9007199254740991,
|
|
422
|
+
"maximum": 9007199254740991,
|
|
423
|
+
"description": "The amount owed, in integer cents."
|
|
424
|
+
},
|
|
425
|
+
"due_at": {
|
|
426
|
+
"type": "string",
|
|
427
|
+
"format": "date-time",
|
|
428
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
429
|
+
"description": "The charge's due date; retries and the lock count from here."
|
|
430
|
+
},
|
|
431
|
+
"next_retry_at": {
|
|
432
|
+
"anyOf": [
|
|
433
|
+
{
|
|
434
|
+
"type": "string",
|
|
435
|
+
"format": "date-time",
|
|
436
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"type": "null"
|
|
440
|
+
}
|
|
441
|
+
],
|
|
442
|
+
"description": "The next retry, or `null` once retries are exhausted."
|
|
443
|
+
},
|
|
444
|
+
"lock_at": {
|
|
445
|
+
"type": "string",
|
|
446
|
+
"format": "date-time",
|
|
447
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
448
|
+
"description": "When the org is locked if still unpaid (`BILLING_LOCK_DAY`)."
|
|
449
|
+
},
|
|
450
|
+
"failure": {
|
|
451
|
+
"anyOf": [
|
|
452
|
+
{
|
|
453
|
+
"type": "string"
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"type": "null"
|
|
457
|
+
}
|
|
458
|
+
],
|
|
459
|
+
"description": "Mollie's own reason, e.g. 'card_expired'; 'vat_id_invalid' when VIES turned definitive."
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
"required": [
|
|
463
|
+
"invoice_id",
|
|
464
|
+
"gross_cents",
|
|
465
|
+
"due_at",
|
|
466
|
+
"next_retry_at",
|
|
467
|
+
"lock_at",
|
|
468
|
+
"failure"
|
|
469
|
+
],
|
|
470
|
+
"additionalProperties": false
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
"type": "null"
|
|
474
|
+
}
|
|
475
|
+
],
|
|
476
|
+
"description": "`null` while nothing is overdue."
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
"required": [
|
|
480
|
+
"payer",
|
|
481
|
+
"vat_id_status",
|
|
482
|
+
"vat",
|
|
483
|
+
"currency",
|
|
484
|
+
"cycle",
|
|
485
|
+
"status",
|
|
486
|
+
"period_starts_at",
|
|
487
|
+
"period_ends_at",
|
|
488
|
+
"next_charge",
|
|
489
|
+
"scheduled",
|
|
490
|
+
"dunning"
|
|
491
|
+
],
|
|
492
|
+
"additionalProperties": false
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"type": "null"
|
|
496
|
+
}
|
|
497
|
+
],
|
|
498
|
+
"description": "`null` before the org has ever checked out."
|
|
499
|
+
},
|
|
500
|
+
"payment_method": {
|
|
501
|
+
"anyOf": [
|
|
502
|
+
{
|
|
503
|
+
"oneOf": [
|
|
504
|
+
{
|
|
505
|
+
"type": "object",
|
|
506
|
+
"properties": {
|
|
507
|
+
"kind": {
|
|
508
|
+
"type": "string",
|
|
509
|
+
"const": "card",
|
|
510
|
+
"description": "A card mandate."
|
|
511
|
+
},
|
|
512
|
+
"brand": {
|
|
513
|
+
"type": "string",
|
|
514
|
+
"description": "The card network, as Mollie's mandate reports it, e.g. 'Visa'."
|
|
515
|
+
},
|
|
516
|
+
"last4": {
|
|
517
|
+
"type": "string",
|
|
518
|
+
"pattern": "^\\d{4}$",
|
|
519
|
+
"description": "The last four digits of the card."
|
|
520
|
+
},
|
|
521
|
+
"expires": {
|
|
522
|
+
"type": "string",
|
|
523
|
+
"pattern": "^\\d{2}\\/\\d{2}$",
|
|
524
|
+
"description": "Expiry as Mollie's mandate shows it, 'MM/YY'."
|
|
525
|
+
}
|
|
526
|
+
},
|
|
527
|
+
"required": [
|
|
528
|
+
"kind",
|
|
529
|
+
"brand",
|
|
530
|
+
"last4",
|
|
531
|
+
"expires"
|
|
532
|
+
],
|
|
533
|
+
"additionalProperties": false
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"type": "object",
|
|
537
|
+
"properties": {
|
|
538
|
+
"kind": {
|
|
539
|
+
"type": "string",
|
|
540
|
+
"const": "sepa",
|
|
541
|
+
"description": "A SEPA direct-debit mandate."
|
|
542
|
+
},
|
|
543
|
+
"holder": {
|
|
544
|
+
"type": "string",
|
|
545
|
+
"description": "The account holder's name on the mandate."
|
|
546
|
+
},
|
|
547
|
+
"iban_last4": {
|
|
548
|
+
"type": "string",
|
|
549
|
+
"pattern": "^[0-9A-Z]{4}$",
|
|
550
|
+
"description": "The last four characters of the IBAN."
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
"required": [
|
|
554
|
+
"kind",
|
|
555
|
+
"holder",
|
|
556
|
+
"iban_last4"
|
|
557
|
+
],
|
|
558
|
+
"additionalProperties": false
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
"type": "object",
|
|
562
|
+
"properties": {
|
|
563
|
+
"kind": {
|
|
564
|
+
"type": "string",
|
|
565
|
+
"const": "paypal",
|
|
566
|
+
"description": "A PayPal mandate."
|
|
567
|
+
},
|
|
568
|
+
"account": {
|
|
569
|
+
"type": "string",
|
|
570
|
+
"description": "The PayPal account Mollie's mandate names."
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
"required": [
|
|
574
|
+
"kind",
|
|
575
|
+
"account"
|
|
576
|
+
],
|
|
577
|
+
"additionalProperties": false
|
|
578
|
+
}
|
|
579
|
+
]
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"type": "null"
|
|
583
|
+
}
|
|
584
|
+
],
|
|
585
|
+
"description": "The payment method on file, or `null`."
|
|
586
|
+
},
|
|
587
|
+
"invoices": {
|
|
588
|
+
"type": "array",
|
|
589
|
+
"items": {
|
|
590
|
+
"type": "object",
|
|
591
|
+
"properties": {
|
|
592
|
+
"id": {
|
|
593
|
+
"type": "string",
|
|
594
|
+
"format": "uuid",
|
|
595
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
596
|
+
"description": "The invoice's id."
|
|
597
|
+
},
|
|
598
|
+
"number": {
|
|
599
|
+
"type": "string",
|
|
600
|
+
"pattern": "^FL-\\d{4}-\\d{4,}$",
|
|
601
|
+
"description": "The invoice number: `FL-<year>-<seq>`, `seq` zero-padded to four digits, gapless per calendar year in `Europe/Berlin`."
|
|
602
|
+
},
|
|
603
|
+
"issued_at": {
|
|
604
|
+
"type": "string",
|
|
605
|
+
"format": "date-time",
|
|
606
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
607
|
+
"description": "When the invoice was issued."
|
|
608
|
+
},
|
|
609
|
+
"status": {
|
|
610
|
+
"type": "string",
|
|
611
|
+
"enum": [
|
|
612
|
+
"open",
|
|
613
|
+
"paid",
|
|
614
|
+
"uncollectible"
|
|
615
|
+
],
|
|
616
|
+
"description": "This invoice's own status."
|
|
617
|
+
},
|
|
618
|
+
"currency": {
|
|
619
|
+
"type": "string",
|
|
620
|
+
"enum": [
|
|
621
|
+
"eur",
|
|
622
|
+
"usd"
|
|
623
|
+
],
|
|
624
|
+
"description": "The org's billing currency."
|
|
625
|
+
},
|
|
626
|
+
"net_cents": {
|
|
627
|
+
"type": "integer",
|
|
628
|
+
"minimum": 0,
|
|
629
|
+
"maximum": 9007199254740991,
|
|
630
|
+
"description": "The charge, excluding VAT, in integer cents."
|
|
631
|
+
},
|
|
632
|
+
"vat_rate_percent": {
|
|
633
|
+
"type": "integer",
|
|
634
|
+
"minimum": 0,
|
|
635
|
+
"maximum": 100,
|
|
636
|
+
"description": "The VAT rate applied, in whole percent."
|
|
637
|
+
},
|
|
638
|
+
"vat_cents": {
|
|
639
|
+
"type": "integer",
|
|
640
|
+
"minimum": 0,
|
|
641
|
+
"maximum": 9007199254740991,
|
|
642
|
+
"description": "VAT, in integer cents (`vatCents`)."
|
|
643
|
+
},
|
|
644
|
+
"gross_cents": {
|
|
645
|
+
"type": "integer",
|
|
646
|
+
"minimum": 0,
|
|
647
|
+
"maximum": 9007199254740991,
|
|
648
|
+
"description": "Net plus VAT, in integer cents."
|
|
649
|
+
}
|
|
650
|
+
},
|
|
651
|
+
"required": [
|
|
652
|
+
"id",
|
|
653
|
+
"number",
|
|
654
|
+
"issued_at",
|
|
655
|
+
"status",
|
|
656
|
+
"currency",
|
|
657
|
+
"net_cents",
|
|
658
|
+
"vat_rate_percent",
|
|
659
|
+
"vat_cents",
|
|
660
|
+
"gross_cents"
|
|
661
|
+
],
|
|
662
|
+
"additionalProperties": false
|
|
663
|
+
},
|
|
664
|
+
"description": "Newest first, at most 24."
|
|
665
|
+
}
|
|
666
|
+
},
|
|
667
|
+
"required": [
|
|
668
|
+
"available",
|
|
669
|
+
"account",
|
|
670
|
+
"payment_method",
|
|
671
|
+
"invoices"
|
|
672
|
+
],
|
|
673
|
+
"additionalProperties": false,
|
|
674
|
+
"description": "The billing view after the change."
|
|
675
|
+
},
|
|
676
|
+
"charged": {
|
|
677
|
+
"anyOf": [
|
|
678
|
+
{
|
|
679
|
+
"type": "object",
|
|
680
|
+
"properties": {
|
|
681
|
+
"id": {
|
|
682
|
+
"type": "string",
|
|
683
|
+
"format": "uuid",
|
|
684
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
685
|
+
"description": "The invoice's id."
|
|
686
|
+
},
|
|
687
|
+
"number": {
|
|
688
|
+
"type": "string",
|
|
689
|
+
"pattern": "^FL-\\d{4}-\\d{4,}$",
|
|
690
|
+
"description": "The invoice number: `FL-<year>-<seq>`, `seq` zero-padded to four digits, gapless per calendar year in `Europe/Berlin`."
|
|
691
|
+
},
|
|
692
|
+
"issued_at": {
|
|
693
|
+
"type": "string",
|
|
694
|
+
"format": "date-time",
|
|
695
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
696
|
+
"description": "When the invoice was issued."
|
|
697
|
+
},
|
|
698
|
+
"status": {
|
|
699
|
+
"type": "string",
|
|
700
|
+
"enum": [
|
|
701
|
+
"open",
|
|
702
|
+
"paid",
|
|
703
|
+
"uncollectible"
|
|
704
|
+
],
|
|
705
|
+
"description": "This invoice's own status."
|
|
706
|
+
},
|
|
707
|
+
"currency": {
|
|
708
|
+
"type": "string",
|
|
709
|
+
"enum": [
|
|
710
|
+
"eur",
|
|
711
|
+
"usd"
|
|
712
|
+
],
|
|
713
|
+
"description": "The org's billing currency."
|
|
714
|
+
},
|
|
715
|
+
"net_cents": {
|
|
716
|
+
"type": "integer",
|
|
717
|
+
"minimum": 0,
|
|
718
|
+
"maximum": 9007199254740991,
|
|
719
|
+
"description": "The charge, excluding VAT, in integer cents."
|
|
720
|
+
},
|
|
721
|
+
"vat_rate_percent": {
|
|
722
|
+
"type": "integer",
|
|
723
|
+
"minimum": 0,
|
|
724
|
+
"maximum": 100,
|
|
725
|
+
"description": "The VAT rate applied, in whole percent."
|
|
726
|
+
},
|
|
727
|
+
"vat_cents": {
|
|
728
|
+
"type": "integer",
|
|
729
|
+
"minimum": 0,
|
|
730
|
+
"maximum": 9007199254740991,
|
|
731
|
+
"description": "VAT, in integer cents (`vatCents`)."
|
|
732
|
+
},
|
|
733
|
+
"gross_cents": {
|
|
734
|
+
"type": "integer",
|
|
735
|
+
"minimum": 0,
|
|
736
|
+
"maximum": 9007199254740991,
|
|
737
|
+
"description": "Net plus VAT, in integer cents."
|
|
738
|
+
}
|
|
739
|
+
},
|
|
740
|
+
"required": [
|
|
741
|
+
"id",
|
|
742
|
+
"number",
|
|
743
|
+
"issued_at",
|
|
744
|
+
"status",
|
|
745
|
+
"currency",
|
|
746
|
+
"net_cents",
|
|
747
|
+
"vat_rate_percent",
|
|
748
|
+
"vat_cents",
|
|
749
|
+
"gross_cents"
|
|
750
|
+
],
|
|
751
|
+
"additionalProperties": false
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
"type": "null"
|
|
755
|
+
}
|
|
756
|
+
],
|
|
757
|
+
"description": "The invoice charged now, or `null` when the change was only scheduled for the period's end."
|
|
758
|
+
}
|
|
759
|
+
},
|
|
760
|
+
"required": [
|
|
761
|
+
"billing",
|
|
762
|
+
"charged"
|
|
763
|
+
],
|
|
764
|
+
"additionalProperties": false
|
|
765
|
+
}
|