@fleetless/contracts 7.1.0 → 8.0.0
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 +19 -0
- package/artifacts/openapi.json +1013 -27
- package/artifacts/routes.json +37 -3
- package/artifacts/schema/billing-change-response.schema.json +469 -7
- package/artifacts/schema/billing-charge-invoice.schema.json +54 -0
- package/artifacts/schema/billing-charge.schema.json +216 -0
- package/artifacts/schema/billing-issuer.schema.json +8 -0
- package/artifacts/schema/billing-view.schema.json +232 -3
- package/artifacts/schema/checkout-response.schema.json +5 -1
- package/artifacts/schema/purchase-conflict-details.schema.json +5 -1
- package/artifacts/schema/purchase-hold-reason.schema.json +5 -1
- package/artifacts/schema/purchase-intent-response.schema.json +237 -4
- package/dist/billing.d.ts +229 -0
- package/dist/billing.js +88 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -1
- package/dist/routes.js +23 -4
- package/package.json +1 -1
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"id": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"format": "uuid",
|
|
8
|
+
"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)$",
|
|
9
|
+
"description": "The due charge's id — never a Cloud invoice number. Pay it with `POST /api/billing/charges/:id/pay`."
|
|
10
|
+
},
|
|
11
|
+
"kind": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": [
|
|
14
|
+
"first",
|
|
15
|
+
"renewal",
|
|
16
|
+
"change"
|
|
17
|
+
],
|
|
18
|
+
"description": "What caused the charge: the first charge after checkout, a scheduled renewal, or a mid-period plan change."
|
|
19
|
+
},
|
|
20
|
+
"status": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": [
|
|
23
|
+
"due",
|
|
24
|
+
"paid",
|
|
25
|
+
"uncollectible",
|
|
26
|
+
"cancelled"
|
|
27
|
+
],
|
|
28
|
+
"description": "The charge's own status. A charged back or manually refunded charge stays `paid` — refunds and chargebacks are handled in Mollie or Lexware by hand; this status and the invoice it names are unchanged, and the resulting Lexware credit note appears under `GET /api/billing/documents` instead."
|
|
29
|
+
},
|
|
30
|
+
"currency": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"const": "eur",
|
|
33
|
+
"description": "Every charge billed through Lexware is EUR."
|
|
34
|
+
},
|
|
35
|
+
"net_cents": {
|
|
36
|
+
"type": "integer",
|
|
37
|
+
"minimum": 0,
|
|
38
|
+
"maximum": 9007199254740991,
|
|
39
|
+
"description": "The charge, excluding VAT, in integer cents."
|
|
40
|
+
},
|
|
41
|
+
"vat_rate_percent": {
|
|
42
|
+
"type": "integer",
|
|
43
|
+
"minimum": 0,
|
|
44
|
+
"maximum": 100,
|
|
45
|
+
"description": "The VAT rate applied, in whole percent."
|
|
46
|
+
},
|
|
47
|
+
"vat_cents": {
|
|
48
|
+
"type": "integer",
|
|
49
|
+
"minimum": 0,
|
|
50
|
+
"maximum": 9007199254740991,
|
|
51
|
+
"description": "VAT, in integer cents (`vatCents`)."
|
|
52
|
+
},
|
|
53
|
+
"gross_cents": {
|
|
54
|
+
"type": "integer",
|
|
55
|
+
"minimum": 0,
|
|
56
|
+
"maximum": 9007199254740991,
|
|
57
|
+
"description": "Net plus VAT, in integer cents."
|
|
58
|
+
},
|
|
59
|
+
"period_start": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"format": "date-time",
|
|
62
|
+
"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))$",
|
|
63
|
+
"description": "The covered period's start."
|
|
64
|
+
},
|
|
65
|
+
"period_end": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"format": "date-time",
|
|
68
|
+
"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))$",
|
|
69
|
+
"description": "The covered period's end."
|
|
70
|
+
},
|
|
71
|
+
"due_at": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"format": "date-time",
|
|
74
|
+
"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))$",
|
|
75
|
+
"description": "When this charge is due."
|
|
76
|
+
},
|
|
77
|
+
"paid_at": {
|
|
78
|
+
"anyOf": [
|
|
79
|
+
{
|
|
80
|
+
"type": "string",
|
|
81
|
+
"format": "date-time",
|
|
82
|
+
"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))$"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"type": "null"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"description": "When this charge was paid, or `null` while unpaid."
|
|
89
|
+
},
|
|
90
|
+
"invoice": {
|
|
91
|
+
"oneOf": [
|
|
92
|
+
{
|
|
93
|
+
"type": "object",
|
|
94
|
+
"properties": {
|
|
95
|
+
"state": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"const": "not_issued",
|
|
98
|
+
"description": "Not collected (due, a failed retry, or uncollectible): no invoice exists."
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"required": [
|
|
102
|
+
"state"
|
|
103
|
+
],
|
|
104
|
+
"additionalProperties": false
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "object",
|
|
108
|
+
"properties": {
|
|
109
|
+
"state": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"const": "pending",
|
|
112
|
+
"description": "Collected; the Lexware invoice is not yet confirmed."
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"required": [
|
|
116
|
+
"state"
|
|
117
|
+
],
|
|
118
|
+
"additionalProperties": false
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"type": "object",
|
|
122
|
+
"properties": {
|
|
123
|
+
"state": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"const": "issued",
|
|
126
|
+
"description": "Lexware has confirmed the invoice."
|
|
127
|
+
},
|
|
128
|
+
"document_id": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"format": "uuid",
|
|
131
|
+
"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)$",
|
|
132
|
+
"description": "The Lexware document's id — read it with `GET /api/billing/documents/:id`."
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"required": [
|
|
136
|
+
"state",
|
|
137
|
+
"document_id"
|
|
138
|
+
],
|
|
139
|
+
"additionalProperties": false
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"description": "Whether a Lexware invoice exists for this charge yet, and which document it names once it does."
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"required": [
|
|
146
|
+
"id",
|
|
147
|
+
"kind",
|
|
148
|
+
"status",
|
|
149
|
+
"currency",
|
|
150
|
+
"net_cents",
|
|
151
|
+
"vat_rate_percent",
|
|
152
|
+
"vat_cents",
|
|
153
|
+
"gross_cents",
|
|
154
|
+
"period_start",
|
|
155
|
+
"period_end",
|
|
156
|
+
"due_at",
|
|
157
|
+
"paid_at",
|
|
158
|
+
"invoice"
|
|
159
|
+
],
|
|
160
|
+
"additionalProperties": false,
|
|
161
|
+
"allOf": [
|
|
162
|
+
{
|
|
163
|
+
"if": {
|
|
164
|
+
"properties": {
|
|
165
|
+
"status": {
|
|
166
|
+
"const": "paid"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"required": [
|
|
170
|
+
"status"
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
"then": {
|
|
174
|
+
"properties": {
|
|
175
|
+
"invoice": {
|
|
176
|
+
"properties": {
|
|
177
|
+
"state": {
|
|
178
|
+
"enum": [
|
|
179
|
+
"pending",
|
|
180
|
+
"issued"
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"if": {
|
|
190
|
+
"properties": {
|
|
191
|
+
"status": {
|
|
192
|
+
"enum": [
|
|
193
|
+
"due",
|
|
194
|
+
"uncollectible",
|
|
195
|
+
"cancelled"
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"required": [
|
|
200
|
+
"status"
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
"then": {
|
|
204
|
+
"properties": {
|
|
205
|
+
"invoice": {
|
|
206
|
+
"properties": {
|
|
207
|
+
"state": {
|
|
208
|
+
"const": "not_issued"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
]
|
|
216
|
+
}
|
|
@@ -443,7 +443,7 @@
|
|
|
443
443
|
"type": "string",
|
|
444
444
|
"format": "uuid",
|
|
445
445
|
"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)$",
|
|
446
|
-
"description": "
|
|
446
|
+
"description": "What dunning is chasing: a historical open `FL-…` invoice, or a due charge. Before the issuer cutover a due charge appears here only while the payer's VAT ID is unsettled; it has no number yet, is not in `invoices`, and `POST /api/billing/invoices/:id/pay` takes either. After the cutover this is always a due charge (in `charges`): pay it with `POST /api/billing/charges/:id/pay`."
|
|
447
447
|
},
|
|
448
448
|
"gross_cents": {
|
|
449
449
|
"type": "integer",
|
|
@@ -646,6 +646,14 @@
|
|
|
646
646
|
},
|
|
647
647
|
"description": "What a payment-method change may offer right now, so a client offers exactly what the cloud accepts. `applepay` is absent when it needs an open invoice and none is open; `[]` when the org has no billing account."
|
|
648
648
|
},
|
|
649
|
+
"issuer": {
|
|
650
|
+
"type": "string",
|
|
651
|
+
"enum": [
|
|
652
|
+
"cloud",
|
|
653
|
+
"lexware"
|
|
654
|
+
],
|
|
655
|
+
"description": "Which system issues this org's charges: `cloud` before the issuer cutover, or `lexware` after it."
|
|
656
|
+
},
|
|
649
657
|
"invoices": {
|
|
650
658
|
"type": "array",
|
|
651
659
|
"items": {
|
|
@@ -723,7 +731,226 @@
|
|
|
723
731
|
],
|
|
724
732
|
"additionalProperties": false
|
|
725
733
|
},
|
|
726
|
-
"description": "Newest first, at most 24."
|
|
734
|
+
"description": "Cloud-issued invoices from before the issuer cutover; read-only, never grows after it. Newest first, at most 24."
|
|
735
|
+
},
|
|
736
|
+
"charges": {
|
|
737
|
+
"type": "array",
|
|
738
|
+
"items": {
|
|
739
|
+
"type": "object",
|
|
740
|
+
"properties": {
|
|
741
|
+
"id": {
|
|
742
|
+
"type": "string",
|
|
743
|
+
"format": "uuid",
|
|
744
|
+
"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)$",
|
|
745
|
+
"description": "The due charge's id — never a Cloud invoice number. Pay it with `POST /api/billing/charges/:id/pay`."
|
|
746
|
+
},
|
|
747
|
+
"kind": {
|
|
748
|
+
"type": "string",
|
|
749
|
+
"enum": [
|
|
750
|
+
"first",
|
|
751
|
+
"renewal",
|
|
752
|
+
"change"
|
|
753
|
+
],
|
|
754
|
+
"description": "What caused the charge: the first charge after checkout, a scheduled renewal, or a mid-period plan change."
|
|
755
|
+
},
|
|
756
|
+
"status": {
|
|
757
|
+
"type": "string",
|
|
758
|
+
"enum": [
|
|
759
|
+
"due",
|
|
760
|
+
"paid",
|
|
761
|
+
"uncollectible",
|
|
762
|
+
"cancelled"
|
|
763
|
+
],
|
|
764
|
+
"description": "The charge's own status. A charged back or manually refunded charge stays `paid` — refunds and chargebacks are handled in Mollie or Lexware by hand; this status and the invoice it names are unchanged, and the resulting Lexware credit note appears under `GET /api/billing/documents` instead."
|
|
765
|
+
},
|
|
766
|
+
"currency": {
|
|
767
|
+
"type": "string",
|
|
768
|
+
"const": "eur",
|
|
769
|
+
"description": "Every charge billed through Lexware is EUR."
|
|
770
|
+
},
|
|
771
|
+
"net_cents": {
|
|
772
|
+
"type": "integer",
|
|
773
|
+
"minimum": 0,
|
|
774
|
+
"maximum": 9007199254740991,
|
|
775
|
+
"description": "The charge, excluding VAT, in integer cents."
|
|
776
|
+
},
|
|
777
|
+
"vat_rate_percent": {
|
|
778
|
+
"type": "integer",
|
|
779
|
+
"minimum": 0,
|
|
780
|
+
"maximum": 100,
|
|
781
|
+
"description": "The VAT rate applied, in whole percent."
|
|
782
|
+
},
|
|
783
|
+
"vat_cents": {
|
|
784
|
+
"type": "integer",
|
|
785
|
+
"minimum": 0,
|
|
786
|
+
"maximum": 9007199254740991,
|
|
787
|
+
"description": "VAT, in integer cents (`vatCents`)."
|
|
788
|
+
},
|
|
789
|
+
"gross_cents": {
|
|
790
|
+
"type": "integer",
|
|
791
|
+
"minimum": 0,
|
|
792
|
+
"maximum": 9007199254740991,
|
|
793
|
+
"description": "Net plus VAT, in integer cents."
|
|
794
|
+
},
|
|
795
|
+
"period_start": {
|
|
796
|
+
"type": "string",
|
|
797
|
+
"format": "date-time",
|
|
798
|
+
"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))$",
|
|
799
|
+
"description": "The covered period's start."
|
|
800
|
+
},
|
|
801
|
+
"period_end": {
|
|
802
|
+
"type": "string",
|
|
803
|
+
"format": "date-time",
|
|
804
|
+
"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))$",
|
|
805
|
+
"description": "The covered period's end."
|
|
806
|
+
},
|
|
807
|
+
"due_at": {
|
|
808
|
+
"type": "string",
|
|
809
|
+
"format": "date-time",
|
|
810
|
+
"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))$",
|
|
811
|
+
"description": "When this charge is due."
|
|
812
|
+
},
|
|
813
|
+
"paid_at": {
|
|
814
|
+
"anyOf": [
|
|
815
|
+
{
|
|
816
|
+
"type": "string",
|
|
817
|
+
"format": "date-time",
|
|
818
|
+
"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))$"
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
"type": "null"
|
|
822
|
+
}
|
|
823
|
+
],
|
|
824
|
+
"description": "When this charge was paid, or `null` while unpaid."
|
|
825
|
+
},
|
|
826
|
+
"invoice": {
|
|
827
|
+
"oneOf": [
|
|
828
|
+
{
|
|
829
|
+
"type": "object",
|
|
830
|
+
"properties": {
|
|
831
|
+
"state": {
|
|
832
|
+
"type": "string",
|
|
833
|
+
"const": "not_issued",
|
|
834
|
+
"description": "Not collected (due, a failed retry, or uncollectible): no invoice exists."
|
|
835
|
+
}
|
|
836
|
+
},
|
|
837
|
+
"required": [
|
|
838
|
+
"state"
|
|
839
|
+
],
|
|
840
|
+
"additionalProperties": false
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
"type": "object",
|
|
844
|
+
"properties": {
|
|
845
|
+
"state": {
|
|
846
|
+
"type": "string",
|
|
847
|
+
"const": "pending",
|
|
848
|
+
"description": "Collected; the Lexware invoice is not yet confirmed."
|
|
849
|
+
}
|
|
850
|
+
},
|
|
851
|
+
"required": [
|
|
852
|
+
"state"
|
|
853
|
+
],
|
|
854
|
+
"additionalProperties": false
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
"type": "object",
|
|
858
|
+
"properties": {
|
|
859
|
+
"state": {
|
|
860
|
+
"type": "string",
|
|
861
|
+
"const": "issued",
|
|
862
|
+
"description": "Lexware has confirmed the invoice."
|
|
863
|
+
},
|
|
864
|
+
"document_id": {
|
|
865
|
+
"type": "string",
|
|
866
|
+
"format": "uuid",
|
|
867
|
+
"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)$",
|
|
868
|
+
"description": "The Lexware document's id — read it with `GET /api/billing/documents/:id`."
|
|
869
|
+
}
|
|
870
|
+
},
|
|
871
|
+
"required": [
|
|
872
|
+
"state",
|
|
873
|
+
"document_id"
|
|
874
|
+
],
|
|
875
|
+
"additionalProperties": false
|
|
876
|
+
}
|
|
877
|
+
],
|
|
878
|
+
"description": "Whether a Lexware invoice exists for this charge yet, and which document it names once it does."
|
|
879
|
+
}
|
|
880
|
+
},
|
|
881
|
+
"required": [
|
|
882
|
+
"id",
|
|
883
|
+
"kind",
|
|
884
|
+
"status",
|
|
885
|
+
"currency",
|
|
886
|
+
"net_cents",
|
|
887
|
+
"vat_rate_percent",
|
|
888
|
+
"vat_cents",
|
|
889
|
+
"gross_cents",
|
|
890
|
+
"period_start",
|
|
891
|
+
"period_end",
|
|
892
|
+
"due_at",
|
|
893
|
+
"paid_at",
|
|
894
|
+
"invoice"
|
|
895
|
+
],
|
|
896
|
+
"additionalProperties": false,
|
|
897
|
+
"allOf": [
|
|
898
|
+
{
|
|
899
|
+
"if": {
|
|
900
|
+
"properties": {
|
|
901
|
+
"status": {
|
|
902
|
+
"const": "paid"
|
|
903
|
+
}
|
|
904
|
+
},
|
|
905
|
+
"required": [
|
|
906
|
+
"status"
|
|
907
|
+
]
|
|
908
|
+
},
|
|
909
|
+
"then": {
|
|
910
|
+
"properties": {
|
|
911
|
+
"invoice": {
|
|
912
|
+
"properties": {
|
|
913
|
+
"state": {
|
|
914
|
+
"enum": [
|
|
915
|
+
"pending",
|
|
916
|
+
"issued"
|
|
917
|
+
]
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
"if": {
|
|
926
|
+
"properties": {
|
|
927
|
+
"status": {
|
|
928
|
+
"enum": [
|
|
929
|
+
"due",
|
|
930
|
+
"uncollectible",
|
|
931
|
+
"cancelled"
|
|
932
|
+
]
|
|
933
|
+
}
|
|
934
|
+
},
|
|
935
|
+
"required": [
|
|
936
|
+
"status"
|
|
937
|
+
]
|
|
938
|
+
},
|
|
939
|
+
"then": {
|
|
940
|
+
"properties": {
|
|
941
|
+
"invoice": {
|
|
942
|
+
"properties": {
|
|
943
|
+
"state": {
|
|
944
|
+
"const": "not_issued"
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
]
|
|
952
|
+
},
|
|
953
|
+
"description": "Newest first, at most 24. Lists only due charges with issuer `lexware` — never a pre-cutover charge, a legacy payment (legacy_issued/legacy_held/legacy_person/legacy_usd) or a late USD collection: none of those carry a Lexware intent, and they stay in `invoices` or nowhere. `[]` while `issuer` is `cloud`."
|
|
727
954
|
}
|
|
728
955
|
},
|
|
729
956
|
"required": [
|
|
@@ -731,7 +958,9 @@
|
|
|
731
958
|
"account",
|
|
732
959
|
"payment_method",
|
|
733
960
|
"payment_method_options",
|
|
734
|
-
"
|
|
961
|
+
"issuer",
|
|
962
|
+
"invoices",
|
|
963
|
+
"charges"
|
|
735
964
|
],
|
|
736
965
|
"additionalProperties": false
|
|
737
966
|
}
|
|
@@ -199,7 +199,11 @@
|
|
|
199
199
|
"enum": [
|
|
200
200
|
"legacy_usd_invoice",
|
|
201
201
|
"legacy_payer_unresolved",
|
|
202
|
-
"mandate_policy_unresolved"
|
|
202
|
+
"mandate_policy_unresolved",
|
|
203
|
+
"lexware_contact_pending",
|
|
204
|
+
"lexware_contact_changed",
|
|
205
|
+
"issuer_cutover_in_progress",
|
|
206
|
+
"lexware_issuance_paused"
|
|
203
207
|
]
|
|
204
208
|
},
|
|
205
209
|
"original_amount": {
|
|
@@ -235,7 +235,11 @@
|
|
|
235
235
|
"enum": [
|
|
236
236
|
"legacy_usd_invoice",
|
|
237
237
|
"legacy_payer_unresolved",
|
|
238
|
-
"mandate_policy_unresolved"
|
|
238
|
+
"mandate_policy_unresolved",
|
|
239
|
+
"lexware_contact_pending",
|
|
240
|
+
"lexware_contact_changed",
|
|
241
|
+
"issuer_cutover_in_progress",
|
|
242
|
+
"lexware_issuance_paused"
|
|
239
243
|
]
|
|
240
244
|
},
|
|
241
245
|
"original_amount": {
|