fatoority 0.4.4 → 0.5.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/fatoora_ffi.wasm +0 -0
- package/generated/Address.d.mts +4 -0
- package/generated/Address.mjs +45 -0
- package/generated/Adjustment.d.mts +32 -0
- package/generated/Adjustment.mjs +246 -0
- package/generated/AllowanceCharge.d.mts +51 -0
- package/generated/AllowanceCharge.mjs +340 -0
- package/generated/InvoiceBuilder.d.mts +50 -0
- package/generated/InvoiceBuilder.mjs +466 -0
- package/generated/InvoiceData.d.mts +36 -0
- package/generated/InvoiceData.mjs +320 -0
- package/generated/InvoiceLineItem.d.mts +52 -0
- package/generated/InvoiceLineItem.mjs +437 -0
- package/generated/InvoiceNote.d.mts +3 -0
- package/generated/InvoiceNote.mjs +21 -0
- package/generated/InvoiceTotals.d.mts +5 -0
- package/generated/InvoiceTotals.mjs +34 -0
- package/generated/LineItemBuilder.d.mts +70 -0
- package/generated/LineItemBuilder.mjs +616 -0
- package/generated/OriginalInvoiceRef.d.mts +6 -0
- package/generated/OriginalInvoiceRef.mjs +65 -0
- package/generated/Party.d.mts +5 -1
- package/generated/Party.mjs +34 -1
- package/generated/PaymentMeans.d.mts +34 -0
- package/generated/PaymentMeans.mjs +246 -0
- package/generated/TaxExemption.d.mts +20 -0
- package/generated/TaxExemption.mjs +107 -0
- package/generated/VatBreakdown.d.mts +30 -0
- package/generated/VatBreakdown.mjs +205 -0
- package/generated/index.d.mts +12 -0
- package/generated/index.mjs +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
// generated by diplomat-tool
|
|
2
|
+
import { BindingError } from "./BindingError.mjs"
|
|
3
|
+
import { TaxExemption } from "./TaxExemption.mjs"
|
|
4
|
+
import { Text } from "./Text.mjs"
|
|
5
|
+
import wasm from "./diplomat-wasm.mjs";
|
|
6
|
+
import * as diplomatRuntime from "./diplomat-runtime.mjs";
|
|
7
|
+
|
|
8
|
+
const AllowanceCharge_box_destroy_registry = new FinalizationRegistry((ptr) => {
|
|
9
|
+
wasm.fatoora_AllowanceCharge_destroy(ptr);
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export class AllowanceCharge {
|
|
13
|
+
// Internal ptr reference:
|
|
14
|
+
#ptr = null;
|
|
15
|
+
|
|
16
|
+
// Lifetimes are only to keep dependencies alive.
|
|
17
|
+
// Since JS won't garbage collect until there are no incoming edges.
|
|
18
|
+
#selfEdge = [];
|
|
19
|
+
|
|
20
|
+
#internalConstructor(symbol, ptr, selfEdge) {
|
|
21
|
+
if (symbol !== diplomatRuntime.internalConstructor) {
|
|
22
|
+
console.error("AllowanceCharge is an Opaque type. You cannot call its constructor.");
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
this.#ptr = ptr;
|
|
26
|
+
this.#selfEdge = selfEdge;
|
|
27
|
+
|
|
28
|
+
// Are we being borrowed? If not, we can register.
|
|
29
|
+
if (this.#selfEdge.length === 0) {
|
|
30
|
+
AllowanceCharge_box_destroy_registry.register(this, this.#ptr);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
/** @internal */
|
|
36
|
+
get ffiValue() {
|
|
37
|
+
return this.#ptr;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
hasVatRate() {
|
|
42
|
+
|
|
43
|
+
const result = wasm.fatoora_AllowanceCharge_has_vat_rate(this.ffiValue);
|
|
44
|
+
|
|
45
|
+
try {
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
finally {
|
|
50
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
withoutVatRate() {
|
|
55
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
const result = wasm.fatoora_AllowanceCharge_without_vat_rate(diplomatReceive.buffer, this.ffiValue);
|
|
59
|
+
|
|
60
|
+
try {
|
|
61
|
+
if (!diplomatReceive.resultFlag) {
|
|
62
|
+
const cause = new BindingError(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
|
|
63
|
+
throw new globalThis.Error('BindingError: ' + cause.toString(), { cause });
|
|
64
|
+
}
|
|
65
|
+
return new AllowanceCharge(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
finally {
|
|
69
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
70
|
+
diplomatReceive.free();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Retain this adjustment's metadata and check its percentage calculation.
|
|
76
|
+
*/
|
|
77
|
+
withPercentage(base, percent) {
|
|
78
|
+
let functionCleanupArena = new diplomatRuntime.CleanupArena();
|
|
79
|
+
|
|
80
|
+
const baseSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.sliceWrapper(wasm, diplomatRuntime.DiplomatBuf.str8(wasm, base)));
|
|
81
|
+
const percentSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.sliceWrapper(wasm, diplomatRuntime.DiplomatBuf.str8(wasm, percent)));
|
|
82
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
const result = wasm.fatoora_AllowanceCharge_with_percentage(diplomatReceive.buffer, this.ffiValue, baseSlice.ptr, percentSlice.ptr);
|
|
86
|
+
|
|
87
|
+
try {
|
|
88
|
+
if (!diplomatReceive.resultFlag) {
|
|
89
|
+
const cause = new BindingError(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
|
|
90
|
+
throw new globalThis.Error('BindingError: ' + cause.toString(), { cause });
|
|
91
|
+
}
|
|
92
|
+
return new AllowanceCharge(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
finally {
|
|
96
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
97
|
+
functionCleanupArena.free();
|
|
98
|
+
|
|
99
|
+
diplomatReceive.free();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
baseAmount() {
|
|
104
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
const result = wasm.fatoora_AllowanceCharge_base_amount(diplomatReceive.buffer, this.ffiValue);
|
|
108
|
+
|
|
109
|
+
try {
|
|
110
|
+
if (!diplomatReceive.resultFlag) {
|
|
111
|
+
const cause = new BindingError(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
|
|
112
|
+
throw new globalThis.Error('BindingError: ' + cause.toString(), { cause });
|
|
113
|
+
}
|
|
114
|
+
return diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer) === 0 ? null : new Text(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
finally {
|
|
118
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
119
|
+
diplomatReceive.free();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
percentage() {
|
|
124
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
const result = wasm.fatoora_AllowanceCharge_percentage(diplomatReceive.buffer, this.ffiValue);
|
|
128
|
+
|
|
129
|
+
try {
|
|
130
|
+
if (!diplomatReceive.resultFlag) {
|
|
131
|
+
const cause = new BindingError(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
|
|
132
|
+
throw new globalThis.Error('BindingError: ' + cause.toString(), { cause });
|
|
133
|
+
}
|
|
134
|
+
return diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer) === 0 ? null : new Text(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
finally {
|
|
138
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
139
|
+
diplomatReceive.free();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
static new_(charge, amount, reason, reasonCode, category, rate, exemption) {
|
|
144
|
+
let functionCleanupArena = new diplomatRuntime.CleanupArena();
|
|
145
|
+
|
|
146
|
+
const amountSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.sliceWrapper(wasm, diplomatRuntime.DiplomatBuf.str8(wasm, amount)));
|
|
147
|
+
const rateSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.sliceWrapper(wasm, diplomatRuntime.DiplomatBuf.str8(wasm, rate)));
|
|
148
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
const result = wasm.fatoora_AllowanceCharge_new(diplomatReceive.buffer, charge, amountSlice.ptr, diplomatRuntime.optionToBufferForCalling(wasm, reason, 8, 4, functionCleanupArena, (arrayBuffer, offset, jsValue) => [functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.str8(wasm, jsValue)).writePtrLenToArrayBuffer(arrayBuffer, offset + 0)]), diplomatRuntime.optionToBufferForCalling(wasm, reasonCode, 8, 4, functionCleanupArena, (arrayBuffer, offset, jsValue) => [functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.str8(wasm, jsValue)).writePtrLenToArrayBuffer(arrayBuffer, offset + 0)]), category, rateSlice.ptr, exemption instanceof TaxExemption ? exemption.ffiValue : typeError('exemption', 'TaxExemption'));
|
|
152
|
+
|
|
153
|
+
try {
|
|
154
|
+
if (!diplomatReceive.resultFlag) {
|
|
155
|
+
const cause = new BindingError(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
|
|
156
|
+
throw new globalThis.Error('BindingError: ' + cause.toString(), { cause });
|
|
157
|
+
}
|
|
158
|
+
return new AllowanceCharge(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
finally {
|
|
162
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
163
|
+
functionCleanupArena.free();
|
|
164
|
+
|
|
165
|
+
diplomatReceive.free();
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
isCharge() {
|
|
170
|
+
|
|
171
|
+
const result = wasm.fatoora_AllowanceCharge_is_charge(this.ffiValue);
|
|
172
|
+
|
|
173
|
+
try {
|
|
174
|
+
return result;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
finally {
|
|
178
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
amount() {
|
|
183
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
184
|
+
|
|
185
|
+
const write = new diplomatRuntime.DiplomatWriteBuf(wasm);
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
const result = wasm.fatoora_AllowanceCharge_amount(diplomatReceive.buffer, this.ffiValue, write.buffer);
|
|
189
|
+
|
|
190
|
+
try {
|
|
191
|
+
if (!diplomatReceive.resultFlag) {
|
|
192
|
+
const cause = new BindingError(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
|
|
193
|
+
throw new globalThis.Error('BindingError: ' + cause.toString(), { cause });
|
|
194
|
+
}
|
|
195
|
+
return write.readString8();
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
finally {
|
|
199
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
200
|
+
diplomatReceive.free();
|
|
201
|
+
write.free();
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
rate() {
|
|
206
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
207
|
+
|
|
208
|
+
const write = new diplomatRuntime.DiplomatWriteBuf(wasm);
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
const result = wasm.fatoora_AllowanceCharge_rate(diplomatReceive.buffer, this.ffiValue, write.buffer);
|
|
212
|
+
|
|
213
|
+
try {
|
|
214
|
+
if (!diplomatReceive.resultFlag) {
|
|
215
|
+
const cause = new BindingError(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
|
|
216
|
+
throw new globalThis.Error('BindingError: ' + cause.toString(), { cause });
|
|
217
|
+
}
|
|
218
|
+
return write.readString8();
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
finally {
|
|
222
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
223
|
+
diplomatReceive.free();
|
|
224
|
+
write.free();
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
category() {
|
|
229
|
+
|
|
230
|
+
const result = wasm.fatoora_AllowanceCharge_category(this.ffiValue);
|
|
231
|
+
|
|
232
|
+
try {
|
|
233
|
+
return result;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
finally {
|
|
237
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Return an independent adjustment with the given number of identical tax classifications.
|
|
243
|
+
*/
|
|
244
|
+
withTaxCategoryCount(count) {
|
|
245
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
const result = wasm.fatoora_AllowanceCharge_with_tax_category_count(diplomatReceive.buffer, this.ffiValue, count);
|
|
249
|
+
|
|
250
|
+
try {
|
|
251
|
+
if (!diplomatReceive.resultFlag) {
|
|
252
|
+
const cause = new BindingError(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
|
|
253
|
+
throw new globalThis.Error('BindingError: ' + cause.toString(), { cause });
|
|
254
|
+
}
|
|
255
|
+
return new AllowanceCharge(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
finally {
|
|
259
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
260
|
+
diplomatReceive.free();
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
taxCategoryCount() {
|
|
265
|
+
|
|
266
|
+
const result = wasm.fatoora_AllowanceCharge_tax_category_count(this.ffiValue);
|
|
267
|
+
|
|
268
|
+
try {
|
|
269
|
+
return result;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
finally {
|
|
273
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
reason() {
|
|
278
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
const result = wasm.fatoora_AllowanceCharge_reason(diplomatReceive.buffer, this.ffiValue);
|
|
282
|
+
|
|
283
|
+
try {
|
|
284
|
+
if (!diplomatReceive.resultFlag) {
|
|
285
|
+
const cause = new BindingError(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
|
|
286
|
+
throw new globalThis.Error('BindingError: ' + cause.toString(), { cause });
|
|
287
|
+
}
|
|
288
|
+
return diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer) === 0 ? null : new Text(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
finally {
|
|
292
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
293
|
+
diplomatReceive.free();
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
reasonCode() {
|
|
298
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
const result = wasm.fatoora_AllowanceCharge_reason_code(diplomatReceive.buffer, this.ffiValue);
|
|
302
|
+
|
|
303
|
+
try {
|
|
304
|
+
if (!diplomatReceive.resultFlag) {
|
|
305
|
+
const cause = new BindingError(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
|
|
306
|
+
throw new globalThis.Error('BindingError: ' + cause.toString(), { cause });
|
|
307
|
+
}
|
|
308
|
+
return diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer) === 0 ? null : new Text(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
finally {
|
|
312
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
313
|
+
diplomatReceive.free();
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
exemption() {
|
|
318
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
const result = wasm.fatoora_AllowanceCharge_exemption(diplomatReceive.buffer, this.ffiValue);
|
|
322
|
+
|
|
323
|
+
try {
|
|
324
|
+
if (!diplomatReceive.resultFlag) {
|
|
325
|
+
const cause = new BindingError(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
|
|
326
|
+
throw new globalThis.Error('BindingError: ' + cause.toString(), { cause });
|
|
327
|
+
}
|
|
328
|
+
return new TaxExemption(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
finally {
|
|
332
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
333
|
+
diplomatReceive.free();
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
constructor(symbol, ptr, selfEdge) {
|
|
338
|
+
return this.#internalConstructor(...arguments)
|
|
339
|
+
}
|
|
340
|
+
}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
// generated by diplomat-tool
|
|
2
2
|
import type { Address } from "./Address.mjs"
|
|
3
|
+
import type { Adjustment } from "./Adjustment.mjs"
|
|
4
|
+
import type { AllowanceCharge } from "./AllowanceCharge.mjs"
|
|
3
5
|
import type { BindingError } from "./BindingError.mjs"
|
|
4
6
|
import type { FinalizedInvoice } from "./FinalizedInvoice.mjs"
|
|
7
|
+
import type { InvoiceLineItem } from "./InvoiceLineItem.mjs"
|
|
8
|
+
import type { OriginalInvoiceRef } from "./OriginalInvoiceRef.mjs"
|
|
9
|
+
import type { PaymentMeans } from "./PaymentMeans.mjs"
|
|
10
|
+
import type { TaxExemption } from "./TaxExemption.mjs"
|
|
11
|
+
import type { VatBreakdown } from "./VatBreakdown.mjs"
|
|
5
12
|
import type { pointer, codepoint } from "./diplomat-runtime.mjs";
|
|
6
13
|
|
|
7
14
|
|
|
@@ -13,8 +20,51 @@ export class InvoiceBuilder {
|
|
|
13
20
|
constructor();
|
|
14
21
|
|
|
15
22
|
|
|
23
|
+
addSellerIdentifier(value: string, scheme: string | null): void;
|
|
24
|
+
|
|
25
|
+
addBuyerIdentifier(value: string, scheme: string | null): void;
|
|
26
|
+
|
|
27
|
+
addVatBreakdown(value: VatBreakdown): void;
|
|
28
|
+
|
|
29
|
+
addPaymentMeans(value: PaymentMeans): void;
|
|
30
|
+
|
|
31
|
+
addNote(language: string | null, value: string): void;
|
|
32
|
+
|
|
33
|
+
addDocumentAdjustment(charge: boolean, value: Adjustment, category: number, rate: string, exemption: TaxExemption): void;
|
|
34
|
+
|
|
35
|
+
setBuyerWithoutAddress(name: string, vatId: string | null, otherId: string | null, scheme: string | null): void;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Construct a credit or debit note with a complete billing reference.
|
|
39
|
+
*/
|
|
40
|
+
static newWithReference(kind: number, subtype: number, reference: OriginalInvoiceRef, reason: string): InvoiceBuilder;
|
|
41
|
+
|
|
42
|
+
setNoteWithoutLanguage(value: string): void;
|
|
43
|
+
|
|
44
|
+
setPaymentInstruction(instruction: string): void;
|
|
45
|
+
|
|
46
|
+
setPrepaidAmount(amount: string): void;
|
|
47
|
+
|
|
48
|
+
setPayableRoundingAmount(amount: string): void;
|
|
49
|
+
|
|
50
|
+
setDelivery(actual: string | null, latest: string | null): void;
|
|
51
|
+
|
|
52
|
+
setTaxCurrency(currency: string, amount: string): void;
|
|
53
|
+
|
|
54
|
+
setTaxExemption(category: number, rate: string, exemption: TaxExemption): void;
|
|
55
|
+
|
|
56
|
+
addAdjustment(adjustment: AllowanceCharge): void;
|
|
57
|
+
|
|
58
|
+
addItem(item: InvoiceLineItem): void;
|
|
59
|
+
|
|
16
60
|
static new_(kind: number, subtype: number, originalId: string | null, originalUuid: string | null, originalDate: string | null, reason: string | null): InvoiceBuilder;
|
|
17
61
|
|
|
62
|
+
addBillingReference(value: OriginalInvoiceRef): void;
|
|
63
|
+
|
|
64
|
+
setPurchaseOrderId(value: string): void;
|
|
65
|
+
|
|
66
|
+
setContractId(value: string): void;
|
|
67
|
+
|
|
18
68
|
setId(value: string): void;
|
|
19
69
|
|
|
20
70
|
setUuid(value: string): void;
|