@firmenakte/api-client 2.41.0 → 2.42.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.
@@ -1040,6 +1040,62 @@ class FirmenakteApi extends HeyApiClient {
1040
1040
  ...options
1041
1041
  });
1042
1042
  }
1043
+ /**
1044
+ * List billing partners
1045
+ *
1046
+ * Kunden und Lieferanten mit offenen Beträgen und Umsatz im laufenden Jahr sehen. The Geschäftspartner of the Buchhaltung with Rolle, Kunden- and Lieferantennummer, what each still owes or is owed, the year's revenue and expenses, and whether one is archived.
1047
+ */
1048
+ listBillingPartners(options) {
1049
+ return (options?.client ?? this.client).get({
1050
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1051
+ url: '/api/v2/me/billing/partners',
1052
+ ...options
1053
+ });
1054
+ }
1055
+ /**
1056
+ * Add billing partner
1057
+ *
1058
+ * Eine Firma aus dem Register oder einen Partner ohne Firmenbuch als Kunden oder Lieferanten anlegen. Make a company (companyId) or a new own entry (name) a customer or supplier: Rolle and the next Kunden- or Lieferantennummer. A supplier who becomes a customer is Kunde und Lieferant; an archived partner comes back.
1059
+ */
1060
+ addBillingPartner(options) {
1061
+ return (options.client ?? this.client).post({
1062
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1063
+ url: '/api/v2/me/billing/partners',
1064
+ ...options,
1065
+ headers: {
1066
+ 'Content-Type': 'application/json',
1067
+ ...options.headers
1068
+ }
1069
+ });
1070
+ }
1071
+ /**
1072
+ * Delete billing partner
1073
+ *
1074
+ * Einen Kunden oder Lieferanten ohne Rechnungen und Belege entfernen. Take a Geschäftspartner without invoices or receipts out of the Buchhaltung with his Rolle and numbers. One with invoices or receipts is refused: archive him instead.
1075
+ */
1076
+ deleteBillingPartner(options) {
1077
+ return (options.client ?? this.client).delete({
1078
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1079
+ url: '/api/v2/me/billing/partners/{id}',
1080
+ ...options
1081
+ });
1082
+ }
1083
+ /**
1084
+ * Archive billing partner
1085
+ *
1086
+ * Einen Kunden oder Lieferanten archivieren oder zurückholen. Archive a Geschäftspartner (he leaves Kunden, Lieferanten and the invoice editor's search; his invoices and receipts stay) or take him back.
1087
+ */
1088
+ updateBillingPartner(options) {
1089
+ return (options.client ?? this.client).patch({
1090
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1091
+ url: '/api/v2/me/billing/partners/{id}',
1092
+ ...options,
1093
+ headers: {
1094
+ 'Content-Type': 'application/json',
1095
+ ...options.headers
1096
+ }
1097
+ });
1098
+ }
1043
1099
  /**
1044
1100
  * Get billing summary
1045
1101
  *
@@ -1077,26 +1133,26 @@ class FirmenakteApi extends HeyApiClient {
1077
1133
  });
1078
1134
  }
1079
1135
  /**
1080
- * Get billing setup
1136
+ * List articles
1081
1137
  *
1082
- * Vor dem Rechnungschreiben nachsehen, als wer Rechnungen ausgestellt werden können, mit welchen Artikeln und welcher nächsten Nummer. The Absender this workspace may issue invoices as (released companies and the caller's Rechnungsdaten ohne Firma) with their Rechnungsdaten and next number, the Artikel, the fields of the Geschäftspartner used for Rolle and Kunden- and Lieferantennummer, and the system lists Geschäftspartner, Artikel and Ausgang. Read it before *Create invoice*.
1138
+ * Beim Schreiben einer Position einen passenden Artikel mit Preis und Steuersatz finden. The workspace's Artikel whose name or Artikelnummer contains q, those starting with it first, with unit, net price and VAT rate. A position copies the one chosen (lines[].articleId).
1083
1139
  */
1084
- getBillingSetup(options) {
1140
+ listArticles(options) {
1085
1141
  return (options?.client ?? this.client).get({
1086
1142
  security: [{ name: 'x-api-key', type: 'apiKey' }],
1087
- url: '/api/v2/me/billing/settings/invoices',
1143
+ url: '/api/v2/me/billing/articles',
1088
1144
  ...options
1089
1145
  });
1090
1146
  }
1091
1147
  /**
1092
- * Update billing settings
1148
+ * Set article
1093
1149
  *
1094
- * IBAN, Zahlungsziel, Nummernkreis, Fußzeile oder Kleinunternehmer-Regel für die eigenen Rechnungen festlegen. Change one Absender's Rechnungsdaten (IBAN, BIC, UID, payment days, number prefix, next number which only rises, footer, Kleinunternehmer) or which partner fields are Kunden- and Lieferantennummer and give payment days or IBAN. Issued invoices keep what they printed.
1150
+ * Eine Leistung oder ein Produkt mit Preis und Steuersatz anlegen oder ändern, um es auf Rechnungen zu verwenden. Create an Artikel (name, net price in cents, VAT rate, unit) or change one by id. Invoices copy an Artikel into their positions, so a change never alters an invoice.
1095
1151
  */
1096
- updateBillingSettings(options) {
1097
- return (options.client ?? this.client).patch({
1152
+ setArticle(options) {
1153
+ return (options.client ?? this.client).post({
1098
1154
  security: [{ name: 'x-api-key', type: 'apiKey' }],
1099
- url: '/api/v2/me/billing/settings/invoices',
1155
+ url: '/api/v2/me/billing/articles',
1100
1156
  ...options,
1101
1157
  headers: {
1102
1158
  'Content-Type': 'application/json',
@@ -1105,14 +1161,42 @@ class FirmenakteApi extends HeyApiClient {
1105
1161
  });
1106
1162
  }
1107
1163
  /**
1108
- * Set article
1164
+ * Check invoice UID
1109
1165
  *
1110
- * Eine Leistung oder ein Produkt mit Preis und Steuersatz anlegen oder ändern, um es auf Rechnungen zu verwenden. Create an Artikel (name, net price in cents, VAT rate, unit) or change one by id. Invoices copy an Artikel into their positions, so a change never alters an invoice.
1166
+ * Die UID eines Kunden vor dem Ausstellen bei VIES prüfen lassen. Checks the UID of a draft's customer (invoiceId, uid as saved) at VIES now: valid, invalid (*Issue invoice* is refused), otherCompany (valid, but another company's; it stays on this invoice), unavailable or rateLimited (blocks nothing). Free up to 50 a day per workspace, then rateLimited; other UIDs go through *Check VAT number*. The answer is stored publicly with the UID.
1111
1167
  */
1112
- setArticle(options) {
1168
+ checkInvoiceUid(options) {
1113
1169
  return (options.client ?? this.client).post({
1114
1170
  security: [{ name: 'x-api-key', type: 'apiKey' }],
1115
- url: '/api/v2/me/billing/articles',
1171
+ url: '/api/v2/me/billing/invoices/uid-checks',
1172
+ ...options,
1173
+ headers: {
1174
+ 'Content-Type': 'application/json',
1175
+ ...options.headers
1176
+ }
1177
+ });
1178
+ }
1179
+ /**
1180
+ * Get billing setup
1181
+ *
1182
+ * Vor dem Rechnungschreiben nachsehen, als wer Rechnungen ausgestellt werden können, mit welchen Artikeln und welcher nächsten Nummer. The Absender this workspace may issue invoices as (released companies and the caller's Rechnungsdaten ohne Firma) with their Rechnungsdaten and next number, the Artikel, the fields of the Geschäftspartner used for Rolle and Kunden- and Lieferantennummer, and the system lists Geschäftspartner, Artikel and Ausgang. Read it before *Create invoice*.
1183
+ */
1184
+ getBillingSetup(options) {
1185
+ return (options?.client ?? this.client).get({
1186
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1187
+ url: '/api/v2/me/billing/settings/invoices',
1188
+ ...options
1189
+ });
1190
+ }
1191
+ /**
1192
+ * Update billing settings
1193
+ *
1194
+ * IBAN, Zahlungsziel, Nummernkreis, Fußzeile oder Kleinunternehmer-Regel für die eigenen Rechnungen festlegen. Change one Absender's Rechnungsdaten (IBAN, BIC, UID, payment days, number prefix, next number which only rises, footer, Kleinunternehmer) or which partner fields are Kunden- and Lieferantennummer and give payment days or IBAN. Issued invoices keep what they printed.
1195
+ */
1196
+ updateBillingSettings(options) {
1197
+ return (options.client ?? this.client).patch({
1198
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1199
+ url: '/api/v2/me/billing/settings/invoices',
1116
1200
  ...options,
1117
1201
  headers: {
1118
1202
  'Content-Type': 'application/json',
@@ -1123,7 +1207,7 @@ class FirmenakteApi extends HeyApiClient {
1123
1207
  /**
1124
1208
  * Delete article
1125
1209
  *
1126
- * Einen Artikel entfernen, der nicht mehr verrechnet wird. Delete an Artikel. Invoices keep the positions copied from it.
1210
+ * Einen Artikel entfernen, der nicht mehr verrechnet wird. Delete an Artikel no invoice uses; one on an invoice is refused, archive it with *Set article* instead.
1127
1211
  */
1128
1212
  deleteArticle(options) {
1129
1213
  return (options.client ?? this.client).delete({