fiscalrail 0.4.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.
@@ -0,0 +1,3586 @@
1
+ # frozen_string_literal: true
2
+ # Generated from FiscalRail's OpenAPI contract. Do not edit by hand.
3
+
4
+ require "json"
5
+
6
+ module FiscalRail
7
+ module Generated
8
+ CONTRACT = JSON.parse(<<~'JSON')
9
+ {
10
+ "version": "1.0.0",
11
+ "schemas": {
12
+ "Account": {
13
+ "model": "Account",
14
+ "properties": {
15
+ "address": {
16
+ "$ref": "#/components/schemas/Address"
17
+ },
18
+ "created_at": {
19
+ "format": "date-time",
20
+ "type": "string"
21
+ },
22
+ "default_payment_instructions": {
23
+ "items": {
24
+ "$ref": "#/components/schemas/PaymentInstructionId"
25
+ },
26
+ "type": "array"
27
+ },
28
+ "default_series": {
29
+ "$ref": "#/components/schemas/AccountDefaultSeries"
30
+ },
31
+ "email": {
32
+ "type": [
33
+ "string",
34
+ "null"
35
+ ]
36
+ },
37
+ "id": {
38
+ "$ref": "#/components/schemas/AccountId"
39
+ },
40
+ "invoice_locale": {
41
+ "type": "string"
42
+ },
43
+ "invoice_numbering_scope": {
44
+ "$ref": "#/components/schemas/AccountInvoiceNumberingScope"
45
+ },
46
+ "live": {
47
+ "$ref": "#/components/schemas/Live"
48
+ },
49
+ "name": {
50
+ "type": "string"
51
+ },
52
+ "object": {
53
+ "const": "account",
54
+ "type": "string"
55
+ },
56
+ "phone": {
57
+ "type": [
58
+ "string",
59
+ "null"
60
+ ]
61
+ },
62
+ "tax_id": {
63
+ "$ref": "#/components/schemas/TaxId"
64
+ },
65
+ "tax_regime": {
66
+ "type": "string"
67
+ },
68
+ "timezone": {
69
+ "type": "string"
70
+ },
71
+ "updated_at": {
72
+ "format": "date-time",
73
+ "type": "string"
74
+ }
75
+ },
76
+ "required": [
77
+ "id",
78
+ "object",
79
+ "live",
80
+ "name",
81
+ "tax_id",
82
+ "email",
83
+ "phone",
84
+ "address",
85
+ "tax_regime",
86
+ "timezone",
87
+ "invoice_locale",
88
+ "invoice_numbering_scope",
89
+ "default_series",
90
+ "default_payment_instructions",
91
+ "created_at",
92
+ "updated_at"
93
+ ],
94
+ "type": "object"
95
+ },
96
+ "AccountDefaultSeries": {
97
+ "model": "AccountDefaultSeries",
98
+ "properties": {
99
+ "amendment": {
100
+ "oneOf": [
101
+ {
102
+ "$ref": "#/components/schemas/InvoiceSeriesId"
103
+ },
104
+ {
105
+ "type": "null"
106
+ }
107
+ ]
108
+ },
109
+ "credit_note": {
110
+ "oneOf": [
111
+ {
112
+ "$ref": "#/components/schemas/InvoiceSeriesId"
113
+ },
114
+ {
115
+ "type": "null"
116
+ }
117
+ ]
118
+ },
119
+ "invoice": {
120
+ "$ref": "#/components/schemas/InvoiceSeriesId"
121
+ }
122
+ },
123
+ "required": [
124
+ "invoice",
125
+ "credit_note",
126
+ "amendment"
127
+ ],
128
+ "type": "object"
129
+ },
130
+ "AccountId": {
131
+ "type": "string"
132
+ },
133
+ "AccountInvoiceNumberingScope": {
134
+ "type": "string"
135
+ },
136
+ "AccountList": {
137
+ "model": "AccountList",
138
+ "properties": {
139
+ "data": {
140
+ "items": {
141
+ "$ref": "#/components/schemas/Account"
142
+ },
143
+ "type": "array"
144
+ },
145
+ "has_more": {
146
+ "type": "boolean"
147
+ },
148
+ "object": {
149
+ "const": "list",
150
+ "type": "string"
151
+ }
152
+ },
153
+ "required": [
154
+ "object",
155
+ "has_more",
156
+ "data"
157
+ ],
158
+ "type": "object"
159
+ },
160
+ "AccountNotConfiguredErrorResponse": {
161
+ "model": "AccountNotConfiguredErrorResponse",
162
+ "properties": {
163
+ "error": {
164
+ "model": "AccountNotConfiguredError",
165
+ "properties": {
166
+ "code": {
167
+ "const": "account_not_configured",
168
+ "type": "string"
169
+ },
170
+ "message": {
171
+ "type": "string"
172
+ }
173
+ },
174
+ "required": [
175
+ "code",
176
+ "message"
177
+ ],
178
+ "type": "object"
179
+ }
180
+ },
181
+ "required": [
182
+ "error"
183
+ ],
184
+ "type": "object"
185
+ },
186
+ "AccountTaxRegime": {
187
+ "discriminator": {
188
+ "propertyName": "key",
189
+ "mapping": {
190
+ "global": "#/components/schemas/GlobalAccountTaxRegime",
191
+ "es": "#/components/schemas/SpanishAccountTaxRegime"
192
+ }
193
+ },
194
+ "oneOf": [
195
+ {
196
+ "$ref": "#/components/schemas/GlobalAccountTaxRegime"
197
+ },
198
+ {
199
+ "$ref": "#/components/schemas/SpanishAccountTaxRegime"
200
+ }
201
+ ]
202
+ },
203
+ "AccountUpdate": {
204
+ "model": "AccountUpdate",
205
+ "properties": {
206
+ "address": {
207
+ "$ref": "#/components/schemas/AddressUpdate"
208
+ },
209
+ "default_payment_instructions": {
210
+ "items": {
211
+ "$ref": "#/components/schemas/PaymentInstructionId"
212
+ },
213
+ "type": "array"
214
+ },
215
+ "default_series": {
216
+ "$ref": "#/components/schemas/AccountDefaultSeries"
217
+ },
218
+ "invoice_numbering_scope": {
219
+ "$ref": "#/components/schemas/AccountInvoiceNumberingScope"
220
+ }
221
+ },
222
+ "type": "object"
223
+ },
224
+ "Address": {
225
+ "model": "Address",
226
+ "properties": {
227
+ "city": {
228
+ "type": "string"
229
+ },
230
+ "country": {
231
+ "type": "string"
232
+ },
233
+ "line_1": {
234
+ "type": "string"
235
+ },
236
+ "line_2": {
237
+ "type": [
238
+ "string",
239
+ "null"
240
+ ]
241
+ },
242
+ "postal_code": {
243
+ "type": "string"
244
+ },
245
+ "state": {
246
+ "type": [
247
+ "string",
248
+ "null"
249
+ ]
250
+ }
251
+ },
252
+ "required": [
253
+ "line_1",
254
+ "line_2",
255
+ "city",
256
+ "postal_code",
257
+ "state",
258
+ "country"
259
+ ],
260
+ "type": "object"
261
+ },
262
+ "AddressCreate": {
263
+ "model": "AddressCreate",
264
+ "properties": {
265
+ "city": {
266
+ "type": "string"
267
+ },
268
+ "country": {
269
+ "type": "string"
270
+ },
271
+ "line_1": {
272
+ "type": "string"
273
+ },
274
+ "line_2": {
275
+ "type": [
276
+ "string",
277
+ "null"
278
+ ]
279
+ },
280
+ "postal_code": {
281
+ "type": "string"
282
+ },
283
+ "state": {
284
+ "type": [
285
+ "string",
286
+ "null"
287
+ ]
288
+ }
289
+ },
290
+ "required": [
291
+ "line_1",
292
+ "city",
293
+ "postal_code",
294
+ "country"
295
+ ],
296
+ "type": "object"
297
+ },
298
+ "AddressUpdate": {
299
+ "model": "AddressUpdate",
300
+ "properties": {
301
+ "city": {
302
+ "type": [
303
+ "string",
304
+ "null"
305
+ ]
306
+ },
307
+ "country": {
308
+ "type": [
309
+ "string",
310
+ "null"
311
+ ]
312
+ },
313
+ "line_1": {
314
+ "type": [
315
+ "string",
316
+ "null"
317
+ ]
318
+ },
319
+ "line_2": {
320
+ "type": [
321
+ "string",
322
+ "null"
323
+ ]
324
+ },
325
+ "postal_code": {
326
+ "type": [
327
+ "string",
328
+ "null"
329
+ ]
330
+ },
331
+ "state": {
332
+ "type": [
333
+ "string",
334
+ "null"
335
+ ]
336
+ }
337
+ },
338
+ "type": "object"
339
+ },
340
+ "ApiKey": {
341
+ "model": "ApiKey",
342
+ "properties": {
343
+ "account": {
344
+ "$ref": "#/components/schemas/AccountId"
345
+ },
346
+ "created_at": {
347
+ "format": "date-time",
348
+ "type": "string"
349
+ },
350
+ "id": {
351
+ "$ref": "#/components/schemas/ApiKeyId"
352
+ },
353
+ "live": {
354
+ "$ref": "#/components/schemas/Live"
355
+ },
356
+ "name": {
357
+ "type": "string"
358
+ },
359
+ "object": {
360
+ "const": "api_key",
361
+ "type": "string"
362
+ },
363
+ "secret": {
364
+ "type": [
365
+ "string",
366
+ "null"
367
+ ]
368
+ },
369
+ "suffix": {
370
+ "type": "string"
371
+ }
372
+ },
373
+ "required": [
374
+ "id",
375
+ "object",
376
+ "live",
377
+ "account",
378
+ "name",
379
+ "suffix",
380
+ "secret",
381
+ "created_at"
382
+ ],
383
+ "type": "object"
384
+ },
385
+ "ApiKeyCreate": {
386
+ "model": "ApiKeyCreate",
387
+ "properties": {
388
+ "name": {
389
+ "type": "string"
390
+ }
391
+ },
392
+ "required": [
393
+ "name"
394
+ ],
395
+ "type": "object"
396
+ },
397
+ "ApiKeyId": {
398
+ "type": "string"
399
+ },
400
+ "ApiKeyList": {
401
+ "model": "ApiKeyList",
402
+ "properties": {
403
+ "data": {
404
+ "items": {
405
+ "$ref": "#/components/schemas/ApiKey"
406
+ },
407
+ "type": "array"
408
+ },
409
+ "has_more": {
410
+ "type": "boolean"
411
+ },
412
+ "object": {
413
+ "const": "list",
414
+ "type": "string"
415
+ }
416
+ },
417
+ "required": [
418
+ "object",
419
+ "has_more",
420
+ "data"
421
+ ],
422
+ "type": "object"
423
+ },
424
+ "AuthenticationErrorResponse": {
425
+ "model": "AuthenticationErrorResponse",
426
+ "properties": {
427
+ "error": {
428
+ "model": "AuthenticationError",
429
+ "properties": {
430
+ "code": {
431
+ "const": "authentication_required",
432
+ "type": "string"
433
+ },
434
+ "message": {
435
+ "type": "string"
436
+ }
437
+ },
438
+ "required": [
439
+ "code",
440
+ "message"
441
+ ],
442
+ "type": "object"
443
+ }
444
+ },
445
+ "required": [
446
+ "error"
447
+ ],
448
+ "type": "object"
449
+ },
450
+ "Balance": {
451
+ "model": "Balance",
452
+ "properties": {
453
+ "account": {
454
+ "$ref": "#/components/schemas/AccountId"
455
+ },
456
+ "amount": {
457
+ "$ref": "#/components/schemas/Money"
458
+ },
459
+ "currency": {
460
+ "type": "string"
461
+ },
462
+ "id": {
463
+ "$ref": "#/components/schemas/BalanceId"
464
+ },
465
+ "live": {
466
+ "$ref": "#/components/schemas/Live"
467
+ },
468
+ "object": {
469
+ "const": "balance",
470
+ "type": "string"
471
+ },
472
+ "updated_at": {
473
+ "format": "date-time",
474
+ "type": "string"
475
+ }
476
+ },
477
+ "required": [
478
+ "id",
479
+ "object",
480
+ "live",
481
+ "account",
482
+ "amount",
483
+ "currency",
484
+ "updated_at"
485
+ ],
486
+ "type": "object"
487
+ },
488
+ "BalanceExhaustedErrorResponse": {
489
+ "model": "BalanceExhaustedErrorResponse",
490
+ "properties": {
491
+ "error": {
492
+ "model": "BalanceExhaustedError",
493
+ "properties": {
494
+ "code": {
495
+ "const": "balance_exhausted",
496
+ "type": "string"
497
+ },
498
+ "message": {
499
+ "type": "string"
500
+ }
501
+ },
502
+ "required": [
503
+ "code",
504
+ "message"
505
+ ],
506
+ "type": "object"
507
+ }
508
+ },
509
+ "required": [
510
+ "error"
511
+ ],
512
+ "type": "object"
513
+ },
514
+ "BalanceId": {
515
+ "type": "string"
516
+ },
517
+ "BalanceTransaction": {
518
+ "model": "BalanceTransaction",
519
+ "properties": {
520
+ "account": {
521
+ "$ref": "#/components/schemas/AccountId"
522
+ },
523
+ "amount_cents": {
524
+ "type": "integer"
525
+ },
526
+ "created_at": {
527
+ "format": "date-time",
528
+ "type": "string"
529
+ },
530
+ "currency": {
531
+ "type": "string"
532
+ },
533
+ "id": {
534
+ "type": "string"
535
+ },
536
+ "kind": {
537
+ "type": "string"
538
+ },
539
+ "live": {
540
+ "$ref": "#/components/schemas/Live"
541
+ },
542
+ "object": {
543
+ "const": "balance_transaction",
544
+ "type": "string"
545
+ },
546
+ "source_event": {
547
+ "type": [
548
+ "string",
549
+ "null"
550
+ ]
551
+ }
552
+ },
553
+ "required": [
554
+ "id",
555
+ "object",
556
+ "live",
557
+ "account",
558
+ "kind",
559
+ "amount_cents",
560
+ "currency",
561
+ "source_event",
562
+ "created_at"
563
+ ],
564
+ "type": "object"
565
+ },
566
+ "Customer": {
567
+ "model": "Customer",
568
+ "properties": {
569
+ "address": {
570
+ "oneOf": [
571
+ {
572
+ "$ref": "#/components/schemas/Address"
573
+ },
574
+ {
575
+ "type": "null"
576
+ }
577
+ ]
578
+ },
579
+ "created_at": {
580
+ "format": "date-time",
581
+ "type": "string"
582
+ },
583
+ "email": {
584
+ "type": [
585
+ "string",
586
+ "null"
587
+ ]
588
+ },
589
+ "id": {
590
+ "$ref": "#/components/schemas/CustomerId"
591
+ },
592
+ "invoice_prefix": {
593
+ "type": "string"
594
+ },
595
+ "live": {
596
+ "$ref": "#/components/schemas/Live"
597
+ },
598
+ "name": {
599
+ "type": "string"
600
+ },
601
+ "object": {
602
+ "const": "customer",
603
+ "type": "string"
604
+ },
605
+ "phone": {
606
+ "type": [
607
+ "string",
608
+ "null"
609
+ ]
610
+ },
611
+ "tax_id": {
612
+ "$ref": "#/components/schemas/TaxId"
613
+ },
614
+ "updated_at": {
615
+ "format": "date-time",
616
+ "type": "string"
617
+ }
618
+ },
619
+ "required": [
620
+ "id",
621
+ "object",
622
+ "live",
623
+ "name",
624
+ "invoice_prefix",
625
+ "tax_id",
626
+ "email",
627
+ "phone",
628
+ "address",
629
+ "created_at",
630
+ "updated_at"
631
+ ],
632
+ "type": "object"
633
+ },
634
+ "CustomerCreate": {
635
+ "model": "CustomerCreate",
636
+ "properties": {
637
+ "address": {
638
+ "oneOf": [
639
+ {
640
+ "$ref": "#/components/schemas/AddressCreate"
641
+ },
642
+ {
643
+ "type": "null"
644
+ }
645
+ ]
646
+ },
647
+ "email": {
648
+ "type": [
649
+ "string",
650
+ "null"
651
+ ]
652
+ },
653
+ "invoice_prefix": {
654
+ "type": "string"
655
+ },
656
+ "name": {
657
+ "type": "string"
658
+ },
659
+ "phone": {
660
+ "type": [
661
+ "string",
662
+ "null"
663
+ ]
664
+ },
665
+ "tax_id": {
666
+ "$ref": "#/components/schemas/TaxIdInput"
667
+ }
668
+ },
669
+ "required": [
670
+ "name",
671
+ "tax_id"
672
+ ],
673
+ "type": "object"
674
+ },
675
+ "CustomerId": {
676
+ "type": "string"
677
+ },
678
+ "CustomerList": {
679
+ "model": "CustomerList",
680
+ "properties": {
681
+ "data": {
682
+ "items": {
683
+ "$ref": "#/components/schemas/Customer"
684
+ },
685
+ "type": "array"
686
+ },
687
+ "has_more": {
688
+ "type": "boolean"
689
+ },
690
+ "object": {
691
+ "const": "list",
692
+ "type": "string"
693
+ }
694
+ },
695
+ "required": [
696
+ "object",
697
+ "has_more",
698
+ "data"
699
+ ],
700
+ "type": "object"
701
+ },
702
+ "CustomerNotFoundErrorResponse": {
703
+ "model": "CustomerNotFoundErrorResponse",
704
+ "properties": {
705
+ "error": {
706
+ "model": "CustomerNotFoundError",
707
+ "properties": {
708
+ "code": {
709
+ "const": "customer_not_found",
710
+ "type": "string"
711
+ },
712
+ "message": {
713
+ "type": "string"
714
+ }
715
+ },
716
+ "required": [
717
+ "code",
718
+ "message"
719
+ ],
720
+ "type": "object"
721
+ }
722
+ },
723
+ "required": [
724
+ "error"
725
+ ],
726
+ "type": "object"
727
+ },
728
+ "CustomerUpdate": {
729
+ "model": "CustomerUpdate",
730
+ "properties": {
731
+ "address": {
732
+ "oneOf": [
733
+ {
734
+ "$ref": "#/components/schemas/AddressUpdate"
735
+ },
736
+ {
737
+ "type": "null"
738
+ }
739
+ ]
740
+ },
741
+ "email": {
742
+ "type": [
743
+ "string",
744
+ "null"
745
+ ]
746
+ },
747
+ "invoice_prefix": {
748
+ "type": "string"
749
+ },
750
+ "name": {
751
+ "type": "string"
752
+ },
753
+ "phone": {
754
+ "type": [
755
+ "string",
756
+ "null"
757
+ ]
758
+ },
759
+ "tax_id": {
760
+ "$ref": "#/components/schemas/TaxIdInput"
761
+ }
762
+ },
763
+ "type": "object"
764
+ },
765
+ "Decimal": {
766
+ "format": "decimal",
767
+ "type": "string"
768
+ },
769
+ "DecimalInput": {
770
+ "oneOf": [
771
+ {
772
+ "type": "number"
773
+ },
774
+ {
775
+ "type": "string"
776
+ }
777
+ ]
778
+ },
779
+ "Event": {
780
+ "model": "Event",
781
+ "properties": {
782
+ "account": {
783
+ "$ref": "#/components/schemas/AccountId"
784
+ },
785
+ "actor": {
786
+ "$ref": "#/components/schemas/EventActor"
787
+ },
788
+ "data": {
789
+ "model": "EventData",
790
+ "properties": {
791
+ "object": {
792
+ "additionalProperties": true,
793
+ "type": "object"
794
+ },
795
+ "previous_attributes": {
796
+ "additionalProperties": true,
797
+ "type": "object"
798
+ }
799
+ },
800
+ "required": [
801
+ "object"
802
+ ],
803
+ "type": "object"
804
+ },
805
+ "id": {
806
+ "type": "string"
807
+ },
808
+ "live": {
809
+ "$ref": "#/components/schemas/Live"
810
+ },
811
+ "object": {
812
+ "const": "event",
813
+ "type": "string"
814
+ },
815
+ "occurred_at": {
816
+ "format": "date-time",
817
+ "type": "string"
818
+ },
819
+ "related_object": {
820
+ "$ref": "#/components/schemas/RelatedObject"
821
+ },
822
+ "type": {
823
+ "type": "string"
824
+ }
825
+ },
826
+ "required": [
827
+ "id",
828
+ "object",
829
+ "live",
830
+ "account",
831
+ "type",
832
+ "occurred_at",
833
+ "actor",
834
+ "related_object",
835
+ "data"
836
+ ],
837
+ "type": "object"
838
+ },
839
+ "EventActor": {
840
+ "model": "EventActor",
841
+ "properties": {
842
+ "id": {
843
+ "type": [
844
+ "string",
845
+ "null"
846
+ ]
847
+ },
848
+ "request_id": {
849
+ "type": [
850
+ "string",
851
+ "null"
852
+ ]
853
+ },
854
+ "type": {
855
+ "type": "string"
856
+ }
857
+ },
858
+ "required": [
859
+ "type",
860
+ "id",
861
+ "request_id"
862
+ ],
863
+ "type": "object"
864
+ },
865
+ "EventDestination": {
866
+ "model": "EventDestination",
867
+ "properties": {
868
+ "account": {
869
+ "$ref": "#/components/schemas/AccountId"
870
+ },
871
+ "created_at": {
872
+ "format": "date-time",
873
+ "type": "string"
874
+ },
875
+ "disabled_reason": {
876
+ "type": [
877
+ "string",
878
+ "null"
879
+ ]
880
+ },
881
+ "enabled_events": {
882
+ "items": {
883
+ "type": "string"
884
+ },
885
+ "type": "array"
886
+ },
887
+ "id": {
888
+ "type": "string"
889
+ },
890
+ "live": {
891
+ "$ref": "#/components/schemas/Live"
892
+ },
893
+ "name": {
894
+ "type": "string"
895
+ },
896
+ "object": {
897
+ "const": "event_destination",
898
+ "type": "string"
899
+ },
900
+ "status": {
901
+ "type": "string"
902
+ },
903
+ "type": {
904
+ "const": "webhook",
905
+ "type": "string"
906
+ },
907
+ "updated_at": {
908
+ "format": "date-time",
909
+ "type": "string"
910
+ },
911
+ "webhook": {
912
+ "model": "EventDestinationWebhook",
913
+ "properties": {
914
+ "signing_secret": {
915
+ "type": [
916
+ "string",
917
+ "null"
918
+ ]
919
+ },
920
+ "url": {
921
+ "format": "uri",
922
+ "type": "string"
923
+ }
924
+ },
925
+ "required": [
926
+ "url",
927
+ "signing_secret"
928
+ ],
929
+ "type": "object"
930
+ }
931
+ },
932
+ "required": [
933
+ "id",
934
+ "object",
935
+ "live",
936
+ "account",
937
+ "name",
938
+ "type",
939
+ "status",
940
+ "enabled_events",
941
+ "webhook",
942
+ "disabled_reason",
943
+ "created_at",
944
+ "updated_at"
945
+ ],
946
+ "type": "object"
947
+ },
948
+ "EventDestinationCreate": {
949
+ "model": "EventDestinationCreate",
950
+ "properties": {
951
+ "enabled_events": {
952
+ "items": {
953
+ "type": "string"
954
+ },
955
+ "type": "array"
956
+ },
957
+ "name": {
958
+ "type": "string"
959
+ },
960
+ "url": {
961
+ "format": "uri",
962
+ "type": "string"
963
+ }
964
+ },
965
+ "required": [
966
+ "name",
967
+ "url",
968
+ "enabled_events"
969
+ ],
970
+ "type": "object"
971
+ },
972
+ "EventDestinationList": {
973
+ "model": "EventDestinationList",
974
+ "properties": {
975
+ "data": {
976
+ "items": {
977
+ "$ref": "#/components/schemas/EventDestination"
978
+ },
979
+ "type": "array"
980
+ },
981
+ "has_more": {
982
+ "type": "boolean"
983
+ },
984
+ "object": {
985
+ "const": "list",
986
+ "type": "string"
987
+ }
988
+ },
989
+ "required": [
990
+ "object",
991
+ "has_more",
992
+ "data"
993
+ ],
994
+ "type": "object"
995
+ },
996
+ "EventDestinationUpdate": {
997
+ "model": "EventDestinationUpdate",
998
+ "properties": {
999
+ "enabled_events": {
1000
+ "items": {
1001
+ "type": "string"
1002
+ },
1003
+ "type": "array"
1004
+ },
1005
+ "name": {
1006
+ "type": "string"
1007
+ },
1008
+ "url": {
1009
+ "format": "uri",
1010
+ "type": "string"
1011
+ }
1012
+ },
1013
+ "type": "object"
1014
+ },
1015
+ "EventList": {
1016
+ "model": "EventList",
1017
+ "properties": {
1018
+ "data": {
1019
+ "items": {
1020
+ "$ref": "#/components/schemas/Event"
1021
+ },
1022
+ "type": "array"
1023
+ },
1024
+ "has_more": {
1025
+ "type": "boolean"
1026
+ },
1027
+ "object": {
1028
+ "const": "list",
1029
+ "type": "string"
1030
+ }
1031
+ },
1032
+ "required": [
1033
+ "object",
1034
+ "has_more",
1035
+ "data"
1036
+ ],
1037
+ "type": "object"
1038
+ },
1039
+ "GlobalAccountTaxRegime": {
1040
+ "model": "GlobalAccountTaxRegime",
1041
+ "properties": {
1042
+ "account": {
1043
+ "$ref": "#/components/schemas/AccountId"
1044
+ },
1045
+ "key": {
1046
+ "const": "global",
1047
+ "type": "string"
1048
+ },
1049
+ "object": {
1050
+ "const": "account_tax_regime",
1051
+ "type": "string"
1052
+ }
1053
+ },
1054
+ "required": [
1055
+ "object",
1056
+ "account",
1057
+ "key"
1058
+ ],
1059
+ "type": "object"
1060
+ },
1061
+ "GlobalInvoiceTaxRegime": {
1062
+ "model": "GlobalInvoiceTaxRegime",
1063
+ "properties": {
1064
+ "key": {
1065
+ "const": "global",
1066
+ "type": "string"
1067
+ }
1068
+ },
1069
+ "required": [
1070
+ "key"
1071
+ ],
1072
+ "type": "object"
1073
+ },
1074
+ "IdempotencyConflictErrorResponse": {
1075
+ "model": "IdempotencyConflictErrorResponse",
1076
+ "properties": {
1077
+ "error": {
1078
+ "model": "IdempotencyConflictError",
1079
+ "properties": {
1080
+ "code": {
1081
+ "type": "string"
1082
+ },
1083
+ "message": {
1084
+ "type": "string"
1085
+ }
1086
+ },
1087
+ "required": [
1088
+ "code",
1089
+ "message"
1090
+ ],
1091
+ "type": "object"
1092
+ }
1093
+ },
1094
+ "required": [
1095
+ "error"
1096
+ ],
1097
+ "type": "object"
1098
+ },
1099
+ "InvalidCustomerErrorResponse": {
1100
+ "model": "InvalidCustomerErrorResponse",
1101
+ "properties": {
1102
+ "error": {
1103
+ "model": "InvalidCustomerError",
1104
+ "properties": {
1105
+ "code": {
1106
+ "const": "invalid_customer",
1107
+ "type": "string"
1108
+ },
1109
+ "details": {
1110
+ "items": {
1111
+ "$ref": "#/components/schemas/ValidationDetail"
1112
+ },
1113
+ "type": "array"
1114
+ },
1115
+ "message": {
1116
+ "type": "string"
1117
+ }
1118
+ },
1119
+ "required": [
1120
+ "code",
1121
+ "message",
1122
+ "details"
1123
+ ],
1124
+ "type": "object"
1125
+ }
1126
+ },
1127
+ "required": [
1128
+ "error"
1129
+ ],
1130
+ "type": "object"
1131
+ },
1132
+ "InvalidInvoiceErrorResponse": {
1133
+ "model": "InvalidInvoiceErrorResponse",
1134
+ "properties": {
1135
+ "error": {
1136
+ "model": "InvalidInvoiceError",
1137
+ "properties": {
1138
+ "code": {
1139
+ "const": "invalid_invoice",
1140
+ "type": "string"
1141
+ },
1142
+ "details": {
1143
+ "items": {
1144
+ "$ref": "#/components/schemas/ValidationDetail"
1145
+ },
1146
+ "type": "array"
1147
+ },
1148
+ "message": {
1149
+ "type": "string"
1150
+ }
1151
+ },
1152
+ "required": [
1153
+ "code",
1154
+ "message",
1155
+ "details"
1156
+ ],
1157
+ "type": "object"
1158
+ }
1159
+ },
1160
+ "required": [
1161
+ "error"
1162
+ ],
1163
+ "type": "object"
1164
+ },
1165
+ "InvalidRequestErrorResponse": {
1166
+ "model": "InvalidRequestErrorResponse",
1167
+ "properties": {
1168
+ "error": {
1169
+ "model": "InvalidRequestError",
1170
+ "properties": {
1171
+ "code": {
1172
+ "type": "string"
1173
+ },
1174
+ "message": {
1175
+ "type": "string"
1176
+ }
1177
+ },
1178
+ "required": [
1179
+ "code",
1180
+ "message"
1181
+ ],
1182
+ "type": "object"
1183
+ }
1184
+ },
1185
+ "required": [
1186
+ "error"
1187
+ ],
1188
+ "type": "object"
1189
+ },
1190
+ "InvalidResourceErrorResponse": {
1191
+ "model": "InvalidResourceErrorResponse",
1192
+ "properties": {
1193
+ "error": {
1194
+ "model": "InvalidResourceError",
1195
+ "properties": {
1196
+ "code": {
1197
+ "type": "string"
1198
+ },
1199
+ "details": {
1200
+ "items": {
1201
+ "model": "BasicValidationDetail",
1202
+ "properties": {
1203
+ "field": {
1204
+ "type": "string"
1205
+ },
1206
+ "message": {
1207
+ "type": "string"
1208
+ }
1209
+ },
1210
+ "required": [
1211
+ "field",
1212
+ "message"
1213
+ ],
1214
+ "type": "object"
1215
+ },
1216
+ "type": "array"
1217
+ },
1218
+ "message": {
1219
+ "type": "string"
1220
+ }
1221
+ },
1222
+ "required": [
1223
+ "code",
1224
+ "message",
1225
+ "details"
1226
+ ],
1227
+ "type": "object"
1228
+ }
1229
+ },
1230
+ "required": [
1231
+ "error"
1232
+ ],
1233
+ "type": "object"
1234
+ },
1235
+ "Invoice": {
1236
+ "model": "Invoice",
1237
+ "properties": {
1238
+ "account": {
1239
+ "type": "string"
1240
+ },
1241
+ "amendments": {
1242
+ "items": {
1243
+ "$ref": "#/components/schemas/InvoiceAmendment"
1244
+ },
1245
+ "type": "array"
1246
+ },
1247
+ "code": {
1248
+ "type": "string"
1249
+ },
1250
+ "created_at": {
1251
+ "format": "date-time",
1252
+ "type": "string"
1253
+ },
1254
+ "currency": {
1255
+ "const": "EUR",
1256
+ "type": "string"
1257
+ },
1258
+ "customer": {
1259
+ "oneOf": [
1260
+ {
1261
+ "$ref": "#/components/schemas/InvoiceParty"
1262
+ },
1263
+ {
1264
+ "type": "null"
1265
+ }
1266
+ ]
1267
+ },
1268
+ "id": {
1269
+ "type": "string"
1270
+ },
1271
+ "issue_date": {
1272
+ "format": "date",
1273
+ "type": "string"
1274
+ },
1275
+ "kind": {
1276
+ "type": "string"
1277
+ },
1278
+ "lines": {
1279
+ "items": {
1280
+ "$ref": "#/components/schemas/InvoiceLine"
1281
+ },
1282
+ "type": "array"
1283
+ },
1284
+ "live": {
1285
+ "$ref": "#/components/schemas/Live"
1286
+ },
1287
+ "object": {
1288
+ "const": "invoice",
1289
+ "type": "string"
1290
+ },
1291
+ "payment_terms": {
1292
+ "$ref": "#/components/schemas/InvoicePaymentTerms"
1293
+ },
1294
+ "preceding_invoice": {
1295
+ "oneOf": [
1296
+ {
1297
+ "$ref": "#/components/schemas/InvoiceReference"
1298
+ },
1299
+ {
1300
+ "type": "null"
1301
+ }
1302
+ ]
1303
+ },
1304
+ "series": {
1305
+ "type": "string"
1306
+ },
1307
+ "supplier": {
1308
+ "$ref": "#/components/schemas/InvoiceParty"
1309
+ },
1310
+ "supply_period": {
1311
+ "oneOf": [
1312
+ {
1313
+ "$ref": "#/components/schemas/InvoiceSupplyPeriod"
1314
+ },
1315
+ {
1316
+ "type": "null"
1317
+ }
1318
+ ]
1319
+ },
1320
+ "tax_regime": {
1321
+ "$ref": "#/components/schemas/InvoiceTaxRegime"
1322
+ },
1323
+ "tax_totals": {
1324
+ "items": {
1325
+ "$ref": "#/components/schemas/InvoiceTaxTotal"
1326
+ },
1327
+ "type": "array"
1328
+ },
1329
+ "totals": {
1330
+ "$ref": "#/components/schemas/InvoiceTotals"
1331
+ }
1332
+ },
1333
+ "required": [
1334
+ "id",
1335
+ "object",
1336
+ "live",
1337
+ "account",
1338
+ "kind",
1339
+ "code",
1340
+ "series",
1341
+ "issue_date",
1342
+ "supply_period",
1343
+ "preceding_invoice",
1344
+ "currency",
1345
+ "supplier",
1346
+ "customer",
1347
+ "payment_terms",
1348
+ "lines",
1349
+ "tax_totals",
1350
+ "totals",
1351
+ "created_at",
1352
+ "tax_regime",
1353
+ "amendments"
1354
+ ],
1355
+ "type": "object"
1356
+ },
1357
+ "InvoiceAmendment": {
1358
+ "model": "InvoiceAmendment",
1359
+ "properties": {
1360
+ "created_at": {
1361
+ "format": "date-time",
1362
+ "type": "string"
1363
+ },
1364
+ "credit_note": {
1365
+ "oneOf": [
1366
+ {
1367
+ "$ref": "#/components/schemas/InvoiceReference"
1368
+ },
1369
+ {
1370
+ "type": "null"
1371
+ }
1372
+ ]
1373
+ },
1374
+ "id": {
1375
+ "type": "string"
1376
+ },
1377
+ "live": {
1378
+ "$ref": "#/components/schemas/Live"
1379
+ },
1380
+ "object": {
1381
+ "const": "invoice_amendment",
1382
+ "type": "string"
1383
+ },
1384
+ "original": {
1385
+ "$ref": "#/components/schemas/InvoiceReference"
1386
+ },
1387
+ "reason": {
1388
+ "$ref": "#/components/schemas/InvoiceAmendmentReason"
1389
+ },
1390
+ "replacement": {
1391
+ "oneOf": [
1392
+ {
1393
+ "$ref": "#/components/schemas/InvoiceReference"
1394
+ },
1395
+ {
1396
+ "type": "null"
1397
+ }
1398
+ ]
1399
+ }
1400
+ },
1401
+ "required": [
1402
+ "id",
1403
+ "object",
1404
+ "live",
1405
+ "reason",
1406
+ "original",
1407
+ "credit_note",
1408
+ "replacement",
1409
+ "created_at"
1410
+ ],
1411
+ "type": "object"
1412
+ },
1413
+ "InvoiceAmendmentCreate": {
1414
+ "model": "InvoiceAmendmentCreate",
1415
+ "properties": {
1416
+ "reason": {
1417
+ "$ref": "#/components/schemas/InvoiceAmendmentReason"
1418
+ },
1419
+ "replacement": {
1420
+ "$ref": "#/components/schemas/InvoiceCreate"
1421
+ }
1422
+ },
1423
+ "required": [
1424
+ "reason"
1425
+ ],
1426
+ "type": "object"
1427
+ },
1428
+ "InvoiceAmendmentReason": {
1429
+ "type": "string"
1430
+ },
1431
+ "InvoiceCreate": {
1432
+ "model": "InvoiceCreate",
1433
+ "properties": {
1434
+ "customer": {
1435
+ "oneOf": [
1436
+ {
1437
+ "$ref": "#/components/schemas/CustomerId"
1438
+ },
1439
+ {
1440
+ "type": "null"
1441
+ }
1442
+ ]
1443
+ },
1444
+ "issue_date": {
1445
+ "format": "date",
1446
+ "type": "string"
1447
+ },
1448
+ "lines": {
1449
+ "items": {
1450
+ "$ref": "#/components/schemas/InvoiceLineCreate"
1451
+ },
1452
+ "type": "array"
1453
+ },
1454
+ "payment_terms": {
1455
+ "$ref": "#/components/schemas/InvoicePaymentTermsCreate"
1456
+ },
1457
+ "series": {
1458
+ "type": "string"
1459
+ },
1460
+ "supply_period": {
1461
+ "$ref": "#/components/schemas/InvoiceSupplyPeriodCreate"
1462
+ }
1463
+ },
1464
+ "required": [
1465
+ "lines"
1466
+ ],
1467
+ "type": "object"
1468
+ },
1469
+ "InvoiceLine": {
1470
+ "model": "InvoiceLine",
1471
+ "properties": {
1472
+ "description": {
1473
+ "type": "string"
1474
+ },
1475
+ "index": {
1476
+ "type": "integer"
1477
+ },
1478
+ "quantity": {
1479
+ "$ref": "#/components/schemas/Decimal"
1480
+ },
1481
+ "subtotal": {
1482
+ "$ref": "#/components/schemas/Money"
1483
+ },
1484
+ "taxes": {
1485
+ "items": {
1486
+ "$ref": "#/components/schemas/InvoiceTax"
1487
+ },
1488
+ "type": "array"
1489
+ },
1490
+ "unit_price": {
1491
+ "$ref": "#/components/schemas/Money"
1492
+ }
1493
+ },
1494
+ "required": [
1495
+ "index",
1496
+ "description",
1497
+ "quantity",
1498
+ "unit_price",
1499
+ "subtotal",
1500
+ "taxes"
1501
+ ],
1502
+ "type": "object"
1503
+ },
1504
+ "InvoiceLineCreate": {
1505
+ "model": "InvoiceLineCreate",
1506
+ "properties": {
1507
+ "description": {
1508
+ "type": "string"
1509
+ },
1510
+ "quantity": {
1511
+ "$ref": "#/components/schemas/DecimalInput"
1512
+ },
1513
+ "taxes": {
1514
+ "items": {
1515
+ "$ref": "#/components/schemas/TaxReference"
1516
+ },
1517
+ "type": "array"
1518
+ },
1519
+ "unit_price": {
1520
+ "$ref": "#/components/schemas/DecimalInput"
1521
+ }
1522
+ },
1523
+ "required": [
1524
+ "description",
1525
+ "unit_price",
1526
+ "taxes"
1527
+ ],
1528
+ "type": "object"
1529
+ },
1530
+ "InvoiceList": {
1531
+ "model": "InvoiceList",
1532
+ "properties": {
1533
+ "data": {
1534
+ "items": {
1535
+ "$ref": "#/components/schemas/Invoice"
1536
+ },
1537
+ "type": "array"
1538
+ },
1539
+ "has_more": {
1540
+ "type": "boolean"
1541
+ },
1542
+ "object": {
1543
+ "const": "list",
1544
+ "type": "string"
1545
+ }
1546
+ },
1547
+ "required": [
1548
+ "object",
1549
+ "has_more",
1550
+ "data"
1551
+ ],
1552
+ "type": "object"
1553
+ },
1554
+ "InvoiceParty": {
1555
+ "model": "InvoiceParty",
1556
+ "properties": {
1557
+ "address": {
1558
+ "oneOf": [
1559
+ {
1560
+ "$ref": "#/components/schemas/Address"
1561
+ },
1562
+ {
1563
+ "type": "null"
1564
+ }
1565
+ ]
1566
+ },
1567
+ "email": {
1568
+ "type": [
1569
+ "string",
1570
+ "null"
1571
+ ]
1572
+ },
1573
+ "name": {
1574
+ "type": "string"
1575
+ },
1576
+ "phone": {
1577
+ "type": [
1578
+ "string",
1579
+ "null"
1580
+ ]
1581
+ },
1582
+ "source": {
1583
+ "$ref": "#/components/schemas/InvoicePartySource"
1584
+ },
1585
+ "tax_id": {
1586
+ "$ref": "#/components/schemas/TaxIdSnapshot"
1587
+ }
1588
+ },
1589
+ "required": [
1590
+ "source",
1591
+ "name",
1592
+ "tax_id",
1593
+ "email",
1594
+ "phone",
1595
+ "address"
1596
+ ],
1597
+ "type": "object"
1598
+ },
1599
+ "InvoicePartySource": {
1600
+ "model": "InvoicePartySource",
1601
+ "properties": {
1602
+ "id": {
1603
+ "type": "string"
1604
+ },
1605
+ "type": {
1606
+ "type": "string"
1607
+ }
1608
+ },
1609
+ "required": [
1610
+ "type",
1611
+ "id"
1612
+ ],
1613
+ "type": "object"
1614
+ },
1615
+ "InvoicePaymentOption": {
1616
+ "model": "InvoicePaymentOption",
1617
+ "properties": {
1618
+ "bank_transfer": {
1619
+ "$ref": "#/components/schemas/PaymentInstructionBankTransfer"
1620
+ },
1621
+ "payment_instruction": {
1622
+ "$ref": "#/components/schemas/PaymentInstructionId"
1623
+ },
1624
+ "reference": {
1625
+ "type": "string"
1626
+ },
1627
+ "type": {
1628
+ "const": "bank_transfer",
1629
+ "type": "string"
1630
+ }
1631
+ },
1632
+ "required": [
1633
+ "payment_instruction",
1634
+ "type",
1635
+ "reference",
1636
+ "bank_transfer"
1637
+ ],
1638
+ "type": "object"
1639
+ },
1640
+ "InvoicePaymentTerms": {
1641
+ "model": "InvoicePaymentTerms",
1642
+ "properties": {
1643
+ "due_date": {
1644
+ "format": "date",
1645
+ "type": [
1646
+ "string",
1647
+ "null"
1648
+ ]
1649
+ },
1650
+ "options": {
1651
+ "items": {
1652
+ "$ref": "#/components/schemas/InvoicePaymentOption"
1653
+ },
1654
+ "type": "array"
1655
+ }
1656
+ },
1657
+ "required": [
1658
+ "due_date",
1659
+ "options"
1660
+ ],
1661
+ "type": "object"
1662
+ },
1663
+ "InvoicePaymentTermsCreate": {
1664
+ "model": "InvoicePaymentTermsCreate",
1665
+ "properties": {
1666
+ "due_date": {
1667
+ "format": "date",
1668
+ "type": [
1669
+ "string",
1670
+ "null"
1671
+ ]
1672
+ },
1673
+ "options": {
1674
+ "items": {
1675
+ "$ref": "#/components/schemas/PaymentInstructionId"
1676
+ },
1677
+ "type": "array"
1678
+ }
1679
+ },
1680
+ "type": "object"
1681
+ },
1682
+ "InvoicePdf": {
1683
+ "model": "InvoicePdf",
1684
+ "properties": {
1685
+ "id": {
1686
+ "type": "string"
1687
+ },
1688
+ "invoice": {
1689
+ "type": "string"
1690
+ },
1691
+ "live": {
1692
+ "$ref": "#/components/schemas/Live"
1693
+ },
1694
+ "locale": {
1695
+ "type": "string"
1696
+ },
1697
+ "object": {
1698
+ "const": "invoice_pdf",
1699
+ "type": "string"
1700
+ },
1701
+ "rendered_at": {
1702
+ "format": "date-time",
1703
+ "type": [
1704
+ "string",
1705
+ "null"
1706
+ ]
1707
+ },
1708
+ "status": {
1709
+ "type": "string"
1710
+ },
1711
+ "url": {
1712
+ "type": [
1713
+ "string",
1714
+ "null"
1715
+ ]
1716
+ },
1717
+ "url_expires_at": {
1718
+ "format": "date-time",
1719
+ "type": [
1720
+ "string",
1721
+ "null"
1722
+ ]
1723
+ }
1724
+ },
1725
+ "required": [
1726
+ "id",
1727
+ "object",
1728
+ "live",
1729
+ "invoice",
1730
+ "status",
1731
+ "locale",
1732
+ "rendered_at",
1733
+ "url",
1734
+ "url_expires_at"
1735
+ ],
1736
+ "type": "object"
1737
+ },
1738
+ "InvoiceReference": {
1739
+ "model": "InvoiceReference",
1740
+ "properties": {
1741
+ "code": {
1742
+ "type": "string"
1743
+ },
1744
+ "id": {
1745
+ "type": [
1746
+ "string",
1747
+ "null"
1748
+ ]
1749
+ },
1750
+ "issue_date": {
1751
+ "format": "date",
1752
+ "type": "string"
1753
+ }
1754
+ },
1755
+ "required": [
1756
+ "id",
1757
+ "code",
1758
+ "issue_date"
1759
+ ],
1760
+ "type": "object"
1761
+ },
1762
+ "InvoiceSeries": {
1763
+ "model": "InvoiceSeries",
1764
+ "properties": {
1765
+ "account": {
1766
+ "$ref": "#/components/schemas/AccountId"
1767
+ },
1768
+ "created_at": {
1769
+ "format": "date-time",
1770
+ "type": "string"
1771
+ },
1772
+ "default_for": {
1773
+ "items": {
1774
+ "type": "string"
1775
+ },
1776
+ "type": "array"
1777
+ },
1778
+ "id": {
1779
+ "$ref": "#/components/schemas/InvoiceSeriesId"
1780
+ },
1781
+ "live": {
1782
+ "$ref": "#/components/schemas/Live"
1783
+ },
1784
+ "object": {
1785
+ "const": "invoice_series",
1786
+ "type": "string"
1787
+ },
1788
+ "prefix": {
1789
+ "type": "string"
1790
+ }
1791
+ },
1792
+ "required": [
1793
+ "id",
1794
+ "object",
1795
+ "live",
1796
+ "account",
1797
+ "prefix",
1798
+ "default_for",
1799
+ "created_at"
1800
+ ],
1801
+ "type": "object"
1802
+ },
1803
+ "InvoiceSeriesCreate": {
1804
+ "model": "InvoiceSeriesCreate",
1805
+ "properties": {
1806
+ "default_for": {
1807
+ "items": {
1808
+ "type": "string"
1809
+ },
1810
+ "type": "array"
1811
+ },
1812
+ "prefix": {
1813
+ "type": "string"
1814
+ }
1815
+ },
1816
+ "required": [
1817
+ "prefix"
1818
+ ],
1819
+ "type": "object"
1820
+ },
1821
+ "InvoiceSeriesId": {
1822
+ "type": "string"
1823
+ },
1824
+ "InvoiceSeriesList": {
1825
+ "model": "InvoiceSeriesList",
1826
+ "properties": {
1827
+ "data": {
1828
+ "items": {
1829
+ "$ref": "#/components/schemas/InvoiceSeries"
1830
+ },
1831
+ "type": "array"
1832
+ },
1833
+ "has_more": {
1834
+ "type": "boolean"
1835
+ },
1836
+ "object": {
1837
+ "const": "list",
1838
+ "type": "string"
1839
+ }
1840
+ },
1841
+ "required": [
1842
+ "object",
1843
+ "has_more",
1844
+ "data"
1845
+ ],
1846
+ "type": "object"
1847
+ },
1848
+ "InvoiceSeriesUpdate": {
1849
+ "model": "InvoiceSeriesUpdate",
1850
+ "properties": {
1851
+ "default_for": {
1852
+ "items": {
1853
+ "type": "string"
1854
+ },
1855
+ "type": "array"
1856
+ },
1857
+ "prefix": {
1858
+ "type": "string"
1859
+ }
1860
+ },
1861
+ "type": "object"
1862
+ },
1863
+ "InvoiceSupplyPeriod": {
1864
+ "model": "InvoiceSupplyPeriod",
1865
+ "properties": {
1866
+ "end_date": {
1867
+ "format": "date",
1868
+ "type": "string"
1869
+ },
1870
+ "start_date": {
1871
+ "format": "date",
1872
+ "type": "string"
1873
+ }
1874
+ },
1875
+ "required": [
1876
+ "start_date",
1877
+ "end_date"
1878
+ ],
1879
+ "type": "object"
1880
+ },
1881
+ "InvoiceSupplyPeriodCreate": {
1882
+ "model": "InvoiceSupplyPeriodCreate",
1883
+ "properties": {
1884
+ "end_date": {
1885
+ "format": "date",
1886
+ "type": "string"
1887
+ },
1888
+ "start_date": {
1889
+ "format": "date",
1890
+ "type": "string"
1891
+ }
1892
+ },
1893
+ "required": [
1894
+ "start_date",
1895
+ "end_date"
1896
+ ],
1897
+ "type": "object"
1898
+ },
1899
+ "InvoiceTax": {
1900
+ "model": "InvoiceTax",
1901
+ "properties": {
1902
+ "description": {
1903
+ "type": "string"
1904
+ },
1905
+ "effect": {
1906
+ "type": "string"
1907
+ },
1908
+ "rate": {
1909
+ "type": [
1910
+ "string",
1911
+ "null"
1912
+ ]
1913
+ },
1914
+ "rule": {
1915
+ "type": "string"
1916
+ },
1917
+ "tax": {
1918
+ "type": "string"
1919
+ },
1920
+ "taxable_base": {
1921
+ "$ref": "#/components/schemas/Money"
1922
+ },
1923
+ "treatment": {
1924
+ "type": "string"
1925
+ }
1926
+ },
1927
+ "required": [
1928
+ "tax",
1929
+ "rule",
1930
+ "effect",
1931
+ "treatment",
1932
+ "description",
1933
+ "rate",
1934
+ "taxable_base"
1935
+ ],
1936
+ "type": "object"
1937
+ },
1938
+ "InvoiceTaxRegime": {
1939
+ "discriminator": {
1940
+ "propertyName": "key",
1941
+ "mapping": {
1942
+ "global": "#/components/schemas/GlobalInvoiceTaxRegime",
1943
+ "es": "#/components/schemas/SpanishInvoiceTaxRegime"
1944
+ }
1945
+ },
1946
+ "oneOf": [
1947
+ {
1948
+ "$ref": "#/components/schemas/GlobalInvoiceTaxRegime"
1949
+ },
1950
+ {
1951
+ "$ref": "#/components/schemas/SpanishInvoiceTaxRegime"
1952
+ }
1953
+ ]
1954
+ },
1955
+ "InvoiceTaxTotal": {
1956
+ "model": "InvoiceTaxTotal",
1957
+ "properties": {
1958
+ "amount": {
1959
+ "$ref": "#/components/schemas/Money"
1960
+ },
1961
+ "description": {
1962
+ "type": "string"
1963
+ },
1964
+ "effect": {
1965
+ "type": "string"
1966
+ },
1967
+ "rate": {
1968
+ "type": [
1969
+ "string",
1970
+ "null"
1971
+ ]
1972
+ },
1973
+ "rule": {
1974
+ "type": "string"
1975
+ },
1976
+ "tax": {
1977
+ "type": "string"
1978
+ },
1979
+ "taxable_base": {
1980
+ "$ref": "#/components/schemas/Money"
1981
+ },
1982
+ "treatment": {
1983
+ "type": "string"
1984
+ }
1985
+ },
1986
+ "required": [
1987
+ "tax",
1988
+ "rule",
1989
+ "effect",
1990
+ "treatment",
1991
+ "description",
1992
+ "rate",
1993
+ "taxable_base",
1994
+ "amount"
1995
+ ],
1996
+ "type": "object"
1997
+ },
1998
+ "InvoiceTotals": {
1999
+ "model": "InvoiceTotals",
2000
+ "properties": {
2001
+ "payable": {
2002
+ "$ref": "#/components/schemas/Money"
2003
+ },
2004
+ "subtotal": {
2005
+ "$ref": "#/components/schemas/Money"
2006
+ },
2007
+ "tax": {
2008
+ "$ref": "#/components/schemas/Money"
2009
+ },
2010
+ "total_with_tax": {
2011
+ "$ref": "#/components/schemas/Money"
2012
+ },
2013
+ "withheld_tax": {
2014
+ "$ref": "#/components/schemas/Money"
2015
+ }
2016
+ },
2017
+ "required": [
2018
+ "subtotal",
2019
+ "tax",
2020
+ "total_with_tax",
2021
+ "withheld_tax",
2022
+ "payable"
2023
+ ],
2024
+ "type": "object"
2025
+ },
2026
+ "Live": {
2027
+ "type": "boolean"
2028
+ },
2029
+ "Money": {
2030
+ "format": "decimal",
2031
+ "type": "string"
2032
+ },
2033
+ "PaymentInstruction": {
2034
+ "model": "PaymentInstruction",
2035
+ "properties": {
2036
+ "account": {
2037
+ "$ref": "#/components/schemas/AccountId"
2038
+ },
2039
+ "bank_transfer": {
2040
+ "$ref": "#/components/schemas/PaymentInstructionBankTransfer"
2041
+ },
2042
+ "created_at": {
2043
+ "format": "date-time",
2044
+ "type": "string"
2045
+ },
2046
+ "id": {
2047
+ "$ref": "#/components/schemas/PaymentInstructionId"
2048
+ },
2049
+ "label": {
2050
+ "type": "string"
2051
+ },
2052
+ "live": {
2053
+ "$ref": "#/components/schemas/Live"
2054
+ },
2055
+ "object": {
2056
+ "const": "payment_instruction",
2057
+ "type": "string"
2058
+ },
2059
+ "type": {
2060
+ "const": "bank_transfer",
2061
+ "type": "string"
2062
+ },
2063
+ "updated_at": {
2064
+ "format": "date-time",
2065
+ "type": "string"
2066
+ }
2067
+ },
2068
+ "required": [
2069
+ "id",
2070
+ "object",
2071
+ "live",
2072
+ "account",
2073
+ "label",
2074
+ "type",
2075
+ "bank_transfer",
2076
+ "created_at",
2077
+ "updated_at"
2078
+ ],
2079
+ "type": "object"
2080
+ },
2081
+ "PaymentInstructionBankTransfer": {
2082
+ "model": "PaymentInstructionBankTransfer",
2083
+ "properties": {
2084
+ "beneficiary": {
2085
+ "type": "string"
2086
+ },
2087
+ "bic": {
2088
+ "type": [
2089
+ "string",
2090
+ "null"
2091
+ ]
2092
+ },
2093
+ "iban": {
2094
+ "type": "string"
2095
+ }
2096
+ },
2097
+ "required": [
2098
+ "beneficiary",
2099
+ "iban",
2100
+ "bic"
2101
+ ],
2102
+ "type": "object"
2103
+ },
2104
+ "PaymentInstructionBankTransferInput": {
2105
+ "model": "PaymentInstructionBankTransferInput",
2106
+ "properties": {
2107
+ "beneficiary": {
2108
+ "type": "string"
2109
+ },
2110
+ "bic": {
2111
+ "type": [
2112
+ "string",
2113
+ "null"
2114
+ ]
2115
+ },
2116
+ "iban": {
2117
+ "type": "string"
2118
+ }
2119
+ },
2120
+ "required": [
2121
+ "beneficiary",
2122
+ "iban"
2123
+ ],
2124
+ "type": "object"
2125
+ },
2126
+ "PaymentInstructionBankTransferUpdate": {
2127
+ "model": "PaymentInstructionBankTransferUpdate",
2128
+ "properties": {
2129
+ "beneficiary": {
2130
+ "type": "string"
2131
+ },
2132
+ "bic": {
2133
+ "type": [
2134
+ "string",
2135
+ "null"
2136
+ ]
2137
+ },
2138
+ "iban": {
2139
+ "type": "string"
2140
+ }
2141
+ },
2142
+ "type": "object"
2143
+ },
2144
+ "PaymentInstructionCreate": {
2145
+ "model": "PaymentInstructionCreate",
2146
+ "properties": {
2147
+ "bank_transfer": {
2148
+ "$ref": "#/components/schemas/PaymentInstructionBankTransferInput"
2149
+ },
2150
+ "label": {
2151
+ "type": "string"
2152
+ },
2153
+ "type": {
2154
+ "const": "bank_transfer",
2155
+ "type": "string"
2156
+ }
2157
+ },
2158
+ "required": [
2159
+ "label",
2160
+ "type",
2161
+ "bank_transfer"
2162
+ ],
2163
+ "type": "object"
2164
+ },
2165
+ "PaymentInstructionId": {
2166
+ "type": "string"
2167
+ },
2168
+ "PaymentInstructionList": {
2169
+ "model": "PaymentInstructionList",
2170
+ "properties": {
2171
+ "data": {
2172
+ "items": {
2173
+ "$ref": "#/components/schemas/PaymentInstruction"
2174
+ },
2175
+ "type": "array"
2176
+ },
2177
+ "has_more": {
2178
+ "type": "boolean"
2179
+ },
2180
+ "object": {
2181
+ "const": "list",
2182
+ "type": "string"
2183
+ }
2184
+ },
2185
+ "required": [
2186
+ "object",
2187
+ "has_more",
2188
+ "data"
2189
+ ],
2190
+ "type": "object"
2191
+ },
2192
+ "PaymentInstructionUpdate": {
2193
+ "model": "PaymentInstructionUpdate",
2194
+ "properties": {
2195
+ "bank_transfer": {
2196
+ "$ref": "#/components/schemas/PaymentInstructionBankTransferUpdate"
2197
+ },
2198
+ "label": {
2199
+ "type": "string"
2200
+ }
2201
+ },
2202
+ "type": "object"
2203
+ },
2204
+ "PdfRenderInProgressErrorResponse": {
2205
+ "model": "PdfRenderInProgressErrorResponse",
2206
+ "properties": {
2207
+ "error": {
2208
+ "model": "PdfRenderInProgressError",
2209
+ "properties": {
2210
+ "code": {
2211
+ "const": "pdf_render_in_progress",
2212
+ "type": "string"
2213
+ },
2214
+ "message": {
2215
+ "type": "string"
2216
+ }
2217
+ },
2218
+ "required": [
2219
+ "code",
2220
+ "message"
2221
+ ],
2222
+ "type": "object"
2223
+ }
2224
+ },
2225
+ "required": [
2226
+ "error"
2227
+ ],
2228
+ "type": "object"
2229
+ },
2230
+ "PdfRenderingUnavailableErrorResponse": {
2231
+ "model": "PdfRenderingUnavailableErrorResponse",
2232
+ "properties": {
2233
+ "error": {
2234
+ "model": "PdfRenderingUnavailableError",
2235
+ "properties": {
2236
+ "code": {
2237
+ "const": "pdf_rendering_unavailable",
2238
+ "type": "string"
2239
+ },
2240
+ "message": {
2241
+ "type": "string"
2242
+ }
2243
+ },
2244
+ "required": [
2245
+ "code",
2246
+ "message"
2247
+ ],
2248
+ "type": "object"
2249
+ }
2250
+ },
2251
+ "required": [
2252
+ "error"
2253
+ ],
2254
+ "type": "object"
2255
+ },
2256
+ "RelatedObject": {
2257
+ "model": "RelatedObject",
2258
+ "properties": {
2259
+ "id": {
2260
+ "type": "string"
2261
+ },
2262
+ "object": {
2263
+ "type": "string"
2264
+ }
2265
+ },
2266
+ "required": [
2267
+ "id",
2268
+ "object"
2269
+ ],
2270
+ "type": [
2271
+ "object",
2272
+ "null"
2273
+ ]
2274
+ },
2275
+ "RequestId": {
2276
+ "type": "string"
2277
+ },
2278
+ "ResourceNotFoundErrorResponse": {
2279
+ "model": "ResourceNotFoundErrorResponse",
2280
+ "properties": {
2281
+ "error": {
2282
+ "model": "ResourceNotFoundError",
2283
+ "properties": {
2284
+ "code": {
2285
+ "const": "resource_not_found",
2286
+ "type": "string"
2287
+ },
2288
+ "message": {
2289
+ "type": "string"
2290
+ }
2291
+ },
2292
+ "required": [
2293
+ "code",
2294
+ "message"
2295
+ ],
2296
+ "type": "object"
2297
+ }
2298
+ },
2299
+ "required": [
2300
+ "error"
2301
+ ],
2302
+ "type": "object"
2303
+ },
2304
+ "SpanishAccountRepresentation": {
2305
+ "model": "SpanishAccountRepresentation",
2306
+ "properties": {
2307
+ "kind": {
2308
+ "const": "aeat_registered_power",
2309
+ "type": "string"
2310
+ },
2311
+ "last_checked_at": {
2312
+ "format": "date-time",
2313
+ "type": [
2314
+ "string",
2315
+ "null"
2316
+ ]
2317
+ },
2318
+ "power_code": {
2319
+ "const": "IZ860",
2320
+ "type": "string"
2321
+ },
2322
+ "status": {
2323
+ "type": "string"
2324
+ },
2325
+ "verified_at": {
2326
+ "format": "date-time",
2327
+ "type": [
2328
+ "string",
2329
+ "null"
2330
+ ]
2331
+ }
2332
+ },
2333
+ "required": [
2334
+ "kind",
2335
+ "power_code",
2336
+ "status",
2337
+ "verified_at",
2338
+ "last_checked_at"
2339
+ ],
2340
+ "type": "object"
2341
+ },
2342
+ "SpanishAccountTaxRegime": {
2343
+ "model": "SpanishAccountTaxRegime",
2344
+ "properties": {
2345
+ "account": {
2346
+ "$ref": "#/components/schemas/AccountId"
2347
+ },
2348
+ "es": {
2349
+ "$ref": "#/components/schemas/SpanishAccountTaxRegimeDetails"
2350
+ },
2351
+ "key": {
2352
+ "const": "es",
2353
+ "type": "string"
2354
+ },
2355
+ "object": {
2356
+ "const": "account_tax_regime",
2357
+ "type": "string"
2358
+ }
2359
+ },
2360
+ "required": [
2361
+ "object",
2362
+ "account",
2363
+ "key",
2364
+ "es"
2365
+ ],
2366
+ "type": "object"
2367
+ },
2368
+ "SpanishAccountTaxRegimeDetails": {
2369
+ "model": "SpanishAccountTaxRegimeDetails",
2370
+ "properties": {
2371
+ "representation": {
2372
+ "oneOf": [
2373
+ {
2374
+ "$ref": "#/components/schemas/SpanishAccountRepresentation"
2375
+ },
2376
+ {
2377
+ "type": "null"
2378
+ }
2379
+ ]
2380
+ }
2381
+ },
2382
+ "required": [
2383
+ "representation"
2384
+ ],
2385
+ "type": "object"
2386
+ },
2387
+ "SpanishInvoiceQr": {
2388
+ "model": "SpanishInvoiceQr",
2389
+ "properties": {
2390
+ "content": {
2391
+ "type": "string"
2392
+ },
2393
+ "image_url": {
2394
+ "format": "uri",
2395
+ "type": "string"
2396
+ }
2397
+ },
2398
+ "required": [
2399
+ "content",
2400
+ "image_url"
2401
+ ],
2402
+ "type": "object"
2403
+ },
2404
+ "SpanishInvoiceTaxRegime": {
2405
+ "model": "SpanishInvoiceTaxRegime",
2406
+ "properties": {
2407
+ "es": {
2408
+ "$ref": "#/components/schemas/SpanishInvoiceTaxRegimeDetails"
2409
+ },
2410
+ "key": {
2411
+ "const": "es",
2412
+ "type": "string"
2413
+ }
2414
+ },
2415
+ "required": [
2416
+ "key",
2417
+ "es"
2418
+ ],
2419
+ "type": "object"
2420
+ },
2421
+ "SpanishInvoiceTaxRegimeDetails": {
2422
+ "model": "SpanishInvoiceTaxRegimeDetails",
2423
+ "properties": {
2424
+ "qr": {
2425
+ "$ref": "#/components/schemas/SpanishInvoiceQr"
2426
+ },
2427
+ "verifactu": {
2428
+ "$ref": "#/components/schemas/Verifactu"
2429
+ }
2430
+ },
2431
+ "required": [
2432
+ "qr",
2433
+ "verifactu"
2434
+ ],
2435
+ "type": "object"
2436
+ },
2437
+ "TaxId": {
2438
+ "model": "TaxId",
2439
+ "properties": {
2440
+ "country": {
2441
+ "type": "string"
2442
+ },
2443
+ "id": {
2444
+ "$ref": "#/components/schemas/TaxIdId"
2445
+ },
2446
+ "live": {
2447
+ "$ref": "#/components/schemas/Live"
2448
+ },
2449
+ "object": {
2450
+ "const": "tax_id",
2451
+ "type": "string"
2452
+ },
2453
+ "owner": {
2454
+ "$ref": "#/components/schemas/TaxIdOwner"
2455
+ },
2456
+ "type": {
2457
+ "type": "string"
2458
+ },
2459
+ "value": {
2460
+ "type": "string"
2461
+ },
2462
+ "verification": {
2463
+ "oneOf": [
2464
+ {
2465
+ "$ref": "#/components/schemas/TaxIdVerification"
2466
+ },
2467
+ {
2468
+ "type": "null"
2469
+ }
2470
+ ]
2471
+ }
2472
+ },
2473
+ "required": [
2474
+ "id",
2475
+ "object",
2476
+ "live",
2477
+ "country",
2478
+ "type",
2479
+ "value",
2480
+ "owner",
2481
+ "verification"
2482
+ ],
2483
+ "type": "object"
2484
+ },
2485
+ "TaxIdId": {
2486
+ "type": "string"
2487
+ },
2488
+ "TaxIdInput": {
2489
+ "model": "TaxIdInput",
2490
+ "properties": {
2491
+ "country": {
2492
+ "type": "string"
2493
+ },
2494
+ "type": {
2495
+ "type": "string"
2496
+ },
2497
+ "value": {
2498
+ "type": "string"
2499
+ }
2500
+ },
2501
+ "required": [
2502
+ "country",
2503
+ "type",
2504
+ "value"
2505
+ ],
2506
+ "type": "object"
2507
+ },
2508
+ "TaxIdOwner": {
2509
+ "model": "TaxIdOwner",
2510
+ "properties": {
2511
+ "id": {
2512
+ "type": "string"
2513
+ },
2514
+ "type": {
2515
+ "type": "string"
2516
+ }
2517
+ },
2518
+ "required": [
2519
+ "type",
2520
+ "id"
2521
+ ],
2522
+ "type": "object"
2523
+ },
2524
+ "TaxIdSnapshot": {
2525
+ "model": "TaxIdSnapshot",
2526
+ "properties": {
2527
+ "country": {
2528
+ "type": "string"
2529
+ },
2530
+ "type": {
2531
+ "type": "string"
2532
+ },
2533
+ "value": {
2534
+ "type": "string"
2535
+ }
2536
+ },
2537
+ "required": [
2538
+ "country",
2539
+ "type",
2540
+ "value"
2541
+ ],
2542
+ "type": "object"
2543
+ },
2544
+ "TaxIdVerification": {
2545
+ "model": "TaxIdVerification",
2546
+ "properties": {
2547
+ "completed_at": {
2548
+ "format": "date-time",
2549
+ "type": [
2550
+ "string",
2551
+ "null"
2552
+ ]
2553
+ },
2554
+ "status": {
2555
+ "type": "string"
2556
+ },
2557
+ "valid": {
2558
+ "type": [
2559
+ "boolean",
2560
+ "null"
2561
+ ]
2562
+ }
2563
+ },
2564
+ "required": [
2565
+ "status",
2566
+ "valid",
2567
+ "completed_at"
2568
+ ],
2569
+ "type": "object"
2570
+ },
2571
+ "TaxReference": {
2572
+ "model": "TaxReference",
2573
+ "properties": {
2574
+ "description": {
2575
+ "type": "string"
2576
+ },
2577
+ "effect": {
2578
+ "type": "string"
2579
+ },
2580
+ "rate": {
2581
+ "$ref": "#/components/schemas/DecimalInput"
2582
+ },
2583
+ "rule": {
2584
+ "type": "string"
2585
+ },
2586
+ "tax": {
2587
+ "type": "string"
2588
+ },
2589
+ "taxable_base": {
2590
+ "$ref": "#/components/schemas/DecimalInput"
2591
+ },
2592
+ "treatment": {
2593
+ "type": "string"
2594
+ }
2595
+ },
2596
+ "required": [
2597
+ "tax",
2598
+ "rule"
2599
+ ],
2600
+ "type": "object"
2601
+ },
2602
+ "TaxRegime": {
2603
+ "model": "TaxRegime",
2604
+ "properties": {
2605
+ "id": {
2606
+ "type": "string"
2607
+ },
2608
+ "object": {
2609
+ "const": "tax_regime",
2610
+ "type": "string"
2611
+ },
2612
+ "taxes": {
2613
+ "items": {
2614
+ "$ref": "#/components/schemas/TaxRegimeTax"
2615
+ },
2616
+ "type": "array"
2617
+ }
2618
+ },
2619
+ "required": [
2620
+ "id",
2621
+ "object",
2622
+ "taxes"
2623
+ ],
2624
+ "type": "object"
2625
+ },
2626
+ "TaxRegimeList": {
2627
+ "model": "TaxRegimeList",
2628
+ "properties": {
2629
+ "data": {
2630
+ "items": {
2631
+ "$ref": "#/components/schemas/TaxRegime"
2632
+ },
2633
+ "type": "array"
2634
+ },
2635
+ "has_more": {
2636
+ "type": "boolean"
2637
+ },
2638
+ "object": {
2639
+ "const": "list",
2640
+ "type": "string"
2641
+ }
2642
+ },
2643
+ "required": [
2644
+ "object",
2645
+ "has_more",
2646
+ "data"
2647
+ ],
2648
+ "type": "object"
2649
+ },
2650
+ "TaxRegimeTax": {
2651
+ "model": "TaxRegimeTax",
2652
+ "properties": {
2653
+ "effect": {
2654
+ "type": "string"
2655
+ },
2656
+ "name": {
2657
+ "type": "string"
2658
+ },
2659
+ "rules": {
2660
+ "items": {
2661
+ "$ref": "#/components/schemas/TaxRegimeTaxRule"
2662
+ },
2663
+ "type": "array"
2664
+ },
2665
+ "tax": {
2666
+ "type": "string"
2667
+ }
2668
+ },
2669
+ "required": [
2670
+ "tax",
2671
+ "name",
2672
+ "effect",
2673
+ "rules"
2674
+ ],
2675
+ "type": "object"
2676
+ },
2677
+ "TaxRegimeTaxRule": {
2678
+ "model": "TaxRegimeTaxRule",
2679
+ "properties": {
2680
+ "authority_code": {
2681
+ "type": [
2682
+ "string",
2683
+ "null"
2684
+ ]
2685
+ },
2686
+ "description": {
2687
+ "type": "string"
2688
+ },
2689
+ "effective_from": {
2690
+ "format": "date",
2691
+ "type": "string"
2692
+ },
2693
+ "effective_until": {
2694
+ "format": "date",
2695
+ "type": [
2696
+ "string",
2697
+ "null"
2698
+ ]
2699
+ },
2700
+ "legal_reference": {
2701
+ "type": [
2702
+ "string",
2703
+ "null"
2704
+ ]
2705
+ },
2706
+ "rate": {
2707
+ "type": [
2708
+ "string",
2709
+ "null"
2710
+ ]
2711
+ },
2712
+ "rule": {
2713
+ "type": "string"
2714
+ },
2715
+ "treatment": {
2716
+ "type": "string"
2717
+ }
2718
+ },
2719
+ "required": [
2720
+ "rule",
2721
+ "description",
2722
+ "treatment",
2723
+ "rate",
2724
+ "authority_code",
2725
+ "legal_reference",
2726
+ "effective_from",
2727
+ "effective_until"
2728
+ ],
2729
+ "type": "object"
2730
+ },
2731
+ "ValidationDetail": {
2732
+ "model": "ValidationDetail",
2733
+ "properties": {
2734
+ "code": {
2735
+ "type": "string"
2736
+ },
2737
+ "field": {
2738
+ "type": "string"
2739
+ },
2740
+ "message": {
2741
+ "type": "string"
2742
+ },
2743
+ "metadata": {
2744
+ "type": "object"
2745
+ }
2746
+ },
2747
+ "required": [
2748
+ "code",
2749
+ "field",
2750
+ "message",
2751
+ "metadata"
2752
+ ],
2753
+ "type": "object"
2754
+ },
2755
+ "Verifactu": {
2756
+ "model": "Verifactu",
2757
+ "properties": {
2758
+ "registrations": {
2759
+ "items": {
2760
+ "$ref": "#/components/schemas/VerifactuRegistration"
2761
+ },
2762
+ "type": "array"
2763
+ }
2764
+ },
2765
+ "required": [
2766
+ "registrations"
2767
+ ],
2768
+ "type": "object"
2769
+ },
2770
+ "VerifactuRegistration": {
2771
+ "model": "VerifactuRegistration",
2772
+ "properties": {
2773
+ "csv": {
2774
+ "type": [
2775
+ "string",
2776
+ "null"
2777
+ ]
2778
+ },
2779
+ "error": {
2780
+ "oneOf": [
2781
+ {
2782
+ "$ref": "#/components/schemas/VerifactuRegistrationError"
2783
+ },
2784
+ {
2785
+ "type": "null"
2786
+ }
2787
+ ]
2788
+ },
2789
+ "id": {
2790
+ "type": "string"
2791
+ },
2792
+ "invoice": {
2793
+ "type": "string"
2794
+ },
2795
+ "kind": {
2796
+ "type": "string"
2797
+ },
2798
+ "live": {
2799
+ "$ref": "#/components/schemas/Live"
2800
+ },
2801
+ "object": {
2802
+ "const": "verifactu_registration",
2803
+ "type": "string"
2804
+ },
2805
+ "status": {
2806
+ "type": "string"
2807
+ },
2808
+ "submitted_at": {
2809
+ "format": "date-time",
2810
+ "type": [
2811
+ "string",
2812
+ "null"
2813
+ ]
2814
+ }
2815
+ },
2816
+ "required": [
2817
+ "id",
2818
+ "object",
2819
+ "live",
2820
+ "invoice",
2821
+ "kind",
2822
+ "status",
2823
+ "submitted_at",
2824
+ "csv",
2825
+ "error"
2826
+ ],
2827
+ "type": "object"
2828
+ },
2829
+ "VerifactuRegistrationError": {
2830
+ "model": "VerifactuRegistrationError",
2831
+ "properties": {
2832
+ "code": {
2833
+ "type": "string"
2834
+ },
2835
+ "message": {
2836
+ "type": "string"
2837
+ },
2838
+ "raw": {
2839
+ "model": "VerifactuRegistrationRawError",
2840
+ "properties": {
2841
+ "code": {
2842
+ "type": [
2843
+ "string",
2844
+ "null"
2845
+ ]
2846
+ },
2847
+ "message": {
2848
+ "type": [
2849
+ "string",
2850
+ "null"
2851
+ ]
2852
+ }
2853
+ },
2854
+ "required": [
2855
+ "code",
2856
+ "message"
2857
+ ],
2858
+ "type": "object"
2859
+ }
2860
+ },
2861
+ "required": [
2862
+ "code",
2863
+ "message",
2864
+ "raw"
2865
+ ],
2866
+ "type": "object"
2867
+ }
2868
+ },
2869
+ "operations": {
2870
+ "amendInvoice": {
2871
+ "method": "POST",
2872
+ "path": "/invoices/{invoice_id}/amendments",
2873
+ "parameters": [
2874
+ {
2875
+ "name": "invoice_id",
2876
+ "in": "path",
2877
+ "required": true
2878
+ },
2879
+ {
2880
+ "name": "Idempotency-Key",
2881
+ "in": "header",
2882
+ "required": false
2883
+ }
2884
+ ],
2885
+ "responses": {
2886
+ "201": {
2887
+ "$ref": "#/components/schemas/InvoiceAmendment"
2888
+ }
2889
+ }
2890
+ },
2891
+ "createApiKey": {
2892
+ "method": "POST",
2893
+ "path": "/api-keys",
2894
+ "parameters": [],
2895
+ "responses": {
2896
+ "201": {
2897
+ "$ref": "#/components/schemas/ApiKey"
2898
+ }
2899
+ }
2900
+ },
2901
+ "createCustomer": {
2902
+ "method": "POST",
2903
+ "path": "/customers",
2904
+ "parameters": [],
2905
+ "responses": {
2906
+ "201": {
2907
+ "$ref": "#/components/schemas/Customer"
2908
+ }
2909
+ }
2910
+ },
2911
+ "createEventDestination": {
2912
+ "method": "POST",
2913
+ "path": "/event-destinations",
2914
+ "parameters": [],
2915
+ "responses": {
2916
+ "201": {
2917
+ "$ref": "#/components/schemas/EventDestination"
2918
+ }
2919
+ }
2920
+ },
2921
+ "createInvoiceSeries": {
2922
+ "method": "POST",
2923
+ "path": "/invoice-series",
2924
+ "parameters": [],
2925
+ "responses": {
2926
+ "201": {
2927
+ "$ref": "#/components/schemas/InvoiceSeries"
2928
+ }
2929
+ }
2930
+ },
2931
+ "createPaymentInstruction": {
2932
+ "method": "POST",
2933
+ "path": "/payment-instructions",
2934
+ "parameters": [],
2935
+ "responses": {
2936
+ "201": {
2937
+ "$ref": "#/components/schemas/PaymentInstruction"
2938
+ }
2939
+ }
2940
+ },
2941
+ "deleteApiKey": {
2942
+ "method": "DELETE",
2943
+ "path": "/api-keys/{id}",
2944
+ "parameters": [
2945
+ {
2946
+ "name": "id",
2947
+ "in": "path",
2948
+ "required": true
2949
+ }
2950
+ ],
2951
+ "responses": {
2952
+ "204": null
2953
+ }
2954
+ },
2955
+ "deleteCustomer": {
2956
+ "method": "DELETE",
2957
+ "path": "/customers/{id}",
2958
+ "parameters": [
2959
+ {
2960
+ "name": "id",
2961
+ "in": "path",
2962
+ "required": true
2963
+ }
2964
+ ],
2965
+ "responses": {
2966
+ "204": null
2967
+ }
2968
+ },
2969
+ "deleteEventDestination": {
2970
+ "method": "DELETE",
2971
+ "path": "/event-destinations/{id}",
2972
+ "parameters": [
2973
+ {
2974
+ "name": "id",
2975
+ "in": "path",
2976
+ "required": true
2977
+ }
2978
+ ],
2979
+ "responses": {
2980
+ "204": null
2981
+ }
2982
+ },
2983
+ "deleteInvoiceSeries": {
2984
+ "method": "DELETE",
2985
+ "path": "/invoice-series/{id}",
2986
+ "parameters": [
2987
+ {
2988
+ "name": "id",
2989
+ "in": "path",
2990
+ "required": true
2991
+ }
2992
+ ],
2993
+ "responses": {
2994
+ "204": null
2995
+ }
2996
+ },
2997
+ "deletePaymentInstruction": {
2998
+ "method": "DELETE",
2999
+ "path": "/payment-instructions/{id}",
3000
+ "parameters": [
3001
+ {
3002
+ "name": "id",
3003
+ "in": "path",
3004
+ "required": true
3005
+ }
3006
+ ],
3007
+ "responses": {
3008
+ "204": null
3009
+ }
3010
+ },
3011
+ "disableEventDestination": {
3012
+ "method": "POST",
3013
+ "path": "/event-destinations/{id}/disable",
3014
+ "parameters": [
3015
+ {
3016
+ "name": "id",
3017
+ "in": "path",
3018
+ "required": true
3019
+ }
3020
+ ],
3021
+ "responses": {
3022
+ "200": {
3023
+ "$ref": "#/components/schemas/EventDestination"
3024
+ }
3025
+ }
3026
+ },
3027
+ "enableEventDestination": {
3028
+ "method": "POST",
3029
+ "path": "/event-destinations/{id}/enable",
3030
+ "parameters": [
3031
+ {
3032
+ "name": "id",
3033
+ "in": "path",
3034
+ "required": true
3035
+ }
3036
+ ],
3037
+ "responses": {
3038
+ "200": {
3039
+ "$ref": "#/components/schemas/EventDestination"
3040
+ }
3041
+ }
3042
+ },
3043
+ "issueInvoice": {
3044
+ "method": "POST",
3045
+ "path": "/invoices",
3046
+ "parameters": [
3047
+ {
3048
+ "name": "Idempotency-Key",
3049
+ "in": "header",
3050
+ "required": false
3051
+ }
3052
+ ],
3053
+ "responses": {
3054
+ "201": {
3055
+ "$ref": "#/components/schemas/Invoice"
3056
+ }
3057
+ }
3058
+ },
3059
+ "listAccounts": {
3060
+ "method": "GET",
3061
+ "path": "/accounts",
3062
+ "parameters": [],
3063
+ "responses": {
3064
+ "200": {
3065
+ "$ref": "#/components/schemas/AccountList"
3066
+ }
3067
+ }
3068
+ },
3069
+ "listApiKeys": {
3070
+ "method": "GET",
3071
+ "path": "/api-keys",
3072
+ "parameters": [
3073
+ {
3074
+ "name": "limit",
3075
+ "in": "query"
3076
+ },
3077
+ {
3078
+ "name": "starting_after",
3079
+ "in": "query"
3080
+ },
3081
+ {
3082
+ "name": "ending_before",
3083
+ "in": "query"
3084
+ }
3085
+ ],
3086
+ "responses": {
3087
+ "200": {
3088
+ "$ref": "#/components/schemas/ApiKeyList"
3089
+ }
3090
+ }
3091
+ },
3092
+ "listCustomers": {
3093
+ "method": "GET",
3094
+ "path": "/customers",
3095
+ "parameters": [
3096
+ {
3097
+ "name": "q",
3098
+ "in": "query"
3099
+ },
3100
+ {
3101
+ "name": "country",
3102
+ "in": "query"
3103
+ },
3104
+ {
3105
+ "name": "limit",
3106
+ "in": "query"
3107
+ },
3108
+ {
3109
+ "name": "starting_after",
3110
+ "in": "query"
3111
+ },
3112
+ {
3113
+ "name": "ending_before",
3114
+ "in": "query"
3115
+ }
3116
+ ],
3117
+ "responses": {
3118
+ "200": {
3119
+ "$ref": "#/components/schemas/CustomerList"
3120
+ }
3121
+ }
3122
+ },
3123
+ "listEventDestinations": {
3124
+ "method": "GET",
3125
+ "path": "/event-destinations",
3126
+ "parameters": [
3127
+ {
3128
+ "name": "limit",
3129
+ "in": "query"
3130
+ },
3131
+ {
3132
+ "name": "starting_after",
3133
+ "in": "query"
3134
+ },
3135
+ {
3136
+ "name": "ending_before",
3137
+ "in": "query"
3138
+ }
3139
+ ],
3140
+ "responses": {
3141
+ "200": {
3142
+ "$ref": "#/components/schemas/EventDestinationList"
3143
+ }
3144
+ }
3145
+ },
3146
+ "listEvents": {
3147
+ "method": "GET",
3148
+ "path": "/events",
3149
+ "parameters": [
3150
+ {
3151
+ "name": "limit",
3152
+ "in": "query"
3153
+ },
3154
+ {
3155
+ "name": "starting_after",
3156
+ "in": "query"
3157
+ },
3158
+ {
3159
+ "name": "ending_before",
3160
+ "in": "query"
3161
+ },
3162
+ {
3163
+ "name": "types",
3164
+ "in": "query"
3165
+ }
3166
+ ],
3167
+ "responses": {
3168
+ "200": {
3169
+ "$ref": "#/components/schemas/EventList"
3170
+ }
3171
+ }
3172
+ },
3173
+ "listInvoiceSeries": {
3174
+ "method": "GET",
3175
+ "path": "/invoice-series",
3176
+ "parameters": [
3177
+ {
3178
+ "name": "limit",
3179
+ "in": "query"
3180
+ },
3181
+ {
3182
+ "name": "starting_after",
3183
+ "in": "query"
3184
+ },
3185
+ {
3186
+ "name": "ending_before",
3187
+ "in": "query"
3188
+ }
3189
+ ],
3190
+ "responses": {
3191
+ "200": {
3192
+ "$ref": "#/components/schemas/InvoiceSeriesList"
3193
+ }
3194
+ }
3195
+ },
3196
+ "listInvoices": {
3197
+ "method": "GET",
3198
+ "path": "/invoices",
3199
+ "parameters": [
3200
+ {
3201
+ "name": "q",
3202
+ "in": "query"
3203
+ },
3204
+ {
3205
+ "name": "customer",
3206
+ "in": "query"
3207
+ },
3208
+ {
3209
+ "name": "issue_date_from",
3210
+ "in": "query"
3211
+ },
3212
+ {
3213
+ "name": "issue_date_to",
3214
+ "in": "query"
3215
+ },
3216
+ {
3217
+ "name": "limit",
3218
+ "in": "query"
3219
+ },
3220
+ {
3221
+ "name": "starting_after",
3222
+ "in": "query"
3223
+ },
3224
+ {
3225
+ "name": "ending_before",
3226
+ "in": "query"
3227
+ }
3228
+ ],
3229
+ "responses": {
3230
+ "200": {
3231
+ "$ref": "#/components/schemas/InvoiceList"
3232
+ }
3233
+ }
3234
+ },
3235
+ "listPaymentInstructions": {
3236
+ "method": "GET",
3237
+ "path": "/payment-instructions",
3238
+ "parameters": [
3239
+ {
3240
+ "name": "limit",
3241
+ "in": "query"
3242
+ },
3243
+ {
3244
+ "name": "starting_after",
3245
+ "in": "query"
3246
+ },
3247
+ {
3248
+ "name": "ending_before",
3249
+ "in": "query"
3250
+ }
3251
+ ],
3252
+ "responses": {
3253
+ "200": {
3254
+ "$ref": "#/components/schemas/PaymentInstructionList"
3255
+ }
3256
+ }
3257
+ },
3258
+ "listTaxRegimes": {
3259
+ "method": "GET",
3260
+ "path": "/tax-regimes",
3261
+ "parameters": [],
3262
+ "responses": {
3263
+ "200": {
3264
+ "$ref": "#/components/schemas/TaxRegimeList"
3265
+ }
3266
+ }
3267
+ },
3268
+ "renderInvoicePdf": {
3269
+ "method": "POST",
3270
+ "path": "/invoices/{invoice_id}/pdf",
3271
+ "parameters": [
3272
+ {
3273
+ "name": "invoice_id",
3274
+ "in": "path",
3275
+ "required": true
3276
+ },
3277
+ {
3278
+ "name": "Accept-Language",
3279
+ "in": "header"
3280
+ }
3281
+ ],
3282
+ "responses": {
3283
+ "200": {
3284
+ "$ref": "#/components/schemas/InvoicePdf"
3285
+ },
3286
+ "201": {
3287
+ "$ref": "#/components/schemas/InvoicePdf"
3288
+ }
3289
+ }
3290
+ },
3291
+ "retrieveAccount": {
3292
+ "method": "GET",
3293
+ "path": "/accounts/{id}",
3294
+ "parameters": [
3295
+ {
3296
+ "name": "id",
3297
+ "in": "path",
3298
+ "required": true
3299
+ }
3300
+ ],
3301
+ "responses": {
3302
+ "200": {
3303
+ "$ref": "#/components/schemas/Account"
3304
+ }
3305
+ }
3306
+ },
3307
+ "retrieveAccountTaxRegime": {
3308
+ "method": "GET",
3309
+ "path": "/accounts/{account_id}/tax-regime",
3310
+ "parameters": [
3311
+ {
3312
+ "name": "account_id",
3313
+ "in": "path",
3314
+ "required": true
3315
+ }
3316
+ ],
3317
+ "responses": {
3318
+ "200": {
3319
+ "$ref": "#/components/schemas/AccountTaxRegime"
3320
+ }
3321
+ }
3322
+ },
3323
+ "retrieveApiKey": {
3324
+ "method": "GET",
3325
+ "path": "/api-keys/{id}",
3326
+ "parameters": [
3327
+ {
3328
+ "name": "id",
3329
+ "in": "path",
3330
+ "required": true
3331
+ }
3332
+ ],
3333
+ "responses": {
3334
+ "200": {
3335
+ "$ref": "#/components/schemas/ApiKey"
3336
+ }
3337
+ }
3338
+ },
3339
+ "retrieveBalance": {
3340
+ "method": "GET",
3341
+ "path": "/accounts/{account_id}/balance",
3342
+ "parameters": [
3343
+ {
3344
+ "name": "account_id",
3345
+ "in": "path",
3346
+ "required": true
3347
+ }
3348
+ ],
3349
+ "responses": {
3350
+ "200": {
3351
+ "$ref": "#/components/schemas/Balance"
3352
+ }
3353
+ }
3354
+ },
3355
+ "retrieveCustomer": {
3356
+ "method": "GET",
3357
+ "path": "/customers/{id}",
3358
+ "parameters": [
3359
+ {
3360
+ "name": "id",
3361
+ "in": "path",
3362
+ "required": true
3363
+ }
3364
+ ],
3365
+ "responses": {
3366
+ "200": {
3367
+ "$ref": "#/components/schemas/Customer"
3368
+ }
3369
+ }
3370
+ },
3371
+ "retrieveEvent": {
3372
+ "method": "GET",
3373
+ "path": "/events/{id}",
3374
+ "parameters": [
3375
+ {
3376
+ "name": "id",
3377
+ "in": "path",
3378
+ "required": true
3379
+ }
3380
+ ],
3381
+ "responses": {
3382
+ "200": {
3383
+ "$ref": "#/components/schemas/Event"
3384
+ }
3385
+ }
3386
+ },
3387
+ "retrieveEventDestination": {
3388
+ "method": "GET",
3389
+ "path": "/event-destinations/{id}",
3390
+ "parameters": [
3391
+ {
3392
+ "name": "id",
3393
+ "in": "path",
3394
+ "required": true
3395
+ }
3396
+ ],
3397
+ "responses": {
3398
+ "200": {
3399
+ "$ref": "#/components/schemas/EventDestination"
3400
+ }
3401
+ }
3402
+ },
3403
+ "retrieveInvoice": {
3404
+ "method": "GET",
3405
+ "path": "/invoices/{id}",
3406
+ "parameters": [
3407
+ {
3408
+ "name": "id",
3409
+ "in": "path",
3410
+ "required": true
3411
+ }
3412
+ ],
3413
+ "responses": {
3414
+ "200": {
3415
+ "$ref": "#/components/schemas/Invoice"
3416
+ }
3417
+ }
3418
+ },
3419
+ "retrieveInvoicePdf": {
3420
+ "method": "GET",
3421
+ "path": "/invoices/{invoice_id}/pdf",
3422
+ "parameters": [
3423
+ {
3424
+ "name": "invoice_id",
3425
+ "in": "path",
3426
+ "required": true
3427
+ }
3428
+ ],
3429
+ "responses": {
3430
+ "200": {
3431
+ "$ref": "#/components/schemas/InvoicePdf"
3432
+ }
3433
+ }
3434
+ },
3435
+ "retrieveInvoiceSeries": {
3436
+ "method": "GET",
3437
+ "path": "/invoice-series/{id}",
3438
+ "parameters": [
3439
+ {
3440
+ "name": "id",
3441
+ "in": "path",
3442
+ "required": true
3443
+ }
3444
+ ],
3445
+ "responses": {
3446
+ "200": {
3447
+ "$ref": "#/components/schemas/InvoiceSeries"
3448
+ }
3449
+ }
3450
+ },
3451
+ "retrievePaymentInstruction": {
3452
+ "method": "GET",
3453
+ "path": "/payment-instructions/{id}",
3454
+ "parameters": [
3455
+ {
3456
+ "name": "id",
3457
+ "in": "path",
3458
+ "required": true
3459
+ }
3460
+ ],
3461
+ "responses": {
3462
+ "200": {
3463
+ "$ref": "#/components/schemas/PaymentInstruction"
3464
+ }
3465
+ }
3466
+ },
3467
+ "retrieveTaxId": {
3468
+ "method": "GET",
3469
+ "path": "/tax_ids/{id}",
3470
+ "parameters": [
3471
+ {
3472
+ "name": "id",
3473
+ "in": "path",
3474
+ "required": true
3475
+ }
3476
+ ],
3477
+ "responses": {
3478
+ "200": {
3479
+ "$ref": "#/components/schemas/TaxId"
3480
+ }
3481
+ }
3482
+ },
3483
+ "retrieveTaxRegime": {
3484
+ "method": "GET",
3485
+ "path": "/tax-regimes/{id}",
3486
+ "parameters": [
3487
+ {
3488
+ "name": "id",
3489
+ "in": "path",
3490
+ "required": true
3491
+ }
3492
+ ],
3493
+ "responses": {
3494
+ "200": {
3495
+ "$ref": "#/components/schemas/TaxRegime"
3496
+ }
3497
+ }
3498
+ },
3499
+ "updateAccount": {
3500
+ "method": "PATCH",
3501
+ "path": "/accounts/{id}",
3502
+ "parameters": [
3503
+ {
3504
+ "name": "id",
3505
+ "in": "path",
3506
+ "required": true
3507
+ }
3508
+ ],
3509
+ "responses": {
3510
+ "200": {
3511
+ "$ref": "#/components/schemas/Account"
3512
+ }
3513
+ }
3514
+ },
3515
+ "updateCustomer": {
3516
+ "method": "PATCH",
3517
+ "path": "/customers/{id}",
3518
+ "parameters": [
3519
+ {
3520
+ "name": "id",
3521
+ "in": "path",
3522
+ "required": true
3523
+ }
3524
+ ],
3525
+ "responses": {
3526
+ "200": {
3527
+ "$ref": "#/components/schemas/Customer"
3528
+ }
3529
+ }
3530
+ },
3531
+ "updateEventDestination": {
3532
+ "method": "PATCH",
3533
+ "path": "/event-destinations/{id}",
3534
+ "parameters": [
3535
+ {
3536
+ "name": "id",
3537
+ "in": "path",
3538
+ "required": true
3539
+ }
3540
+ ],
3541
+ "responses": {
3542
+ "200": {
3543
+ "$ref": "#/components/schemas/EventDestination"
3544
+ }
3545
+ }
3546
+ },
3547
+ "updateInvoiceSeries": {
3548
+ "method": "PATCH",
3549
+ "path": "/invoice-series/{id}",
3550
+ "parameters": [
3551
+ {
3552
+ "name": "id",
3553
+ "in": "path",
3554
+ "required": true
3555
+ }
3556
+ ],
3557
+ "responses": {
3558
+ "200": {
3559
+ "$ref": "#/components/schemas/InvoiceSeries"
3560
+ }
3561
+ }
3562
+ },
3563
+ "updatePaymentInstruction": {
3564
+ "method": "PATCH",
3565
+ "path": "/payment-instructions/{id}",
3566
+ "parameters": [
3567
+ {
3568
+ "name": "id",
3569
+ "in": "path",
3570
+ "required": true
3571
+ }
3572
+ ],
3573
+ "responses": {
3574
+ "200": {
3575
+ "$ref": "#/components/schemas/PaymentInstruction"
3576
+ }
3577
+ }
3578
+ }
3579
+ }
3580
+ }
3581
+ JSON
3582
+ Model.deep_freeze(CONTRACT)
3583
+ SCHEMAS = CONTRACT.fetch("schemas")
3584
+ OPERATIONS = CONTRACT.fetch("operations")
3585
+ end
3586
+ end