From aa0d84d651a19ec8fbcf9eb1fc65e51fce62bbb0 Mon Sep 17 00:00:00 2001 From: Dimitri Dovgan Date: Mon, 26 Oct 2026 17:08:14 +0100 Subject: [PATCH 1/2] test: record sandbox fixtures for every resource, map the fields they revealed - Fictional sample records ("SDK-Beispiel ...") in the sandbox; the recorder takes sub-resources from them instead of the first list entry, so nothing is attached to real records. Client numbers are anonymized too. - 37 new fixtures (offers, credit notes, letters, reminders, recurrings, incomings, articles, contacts, tags, property values, units, reminder texts, country taxes, ...); the contract test now covers them. - Fixed: Article/Incoming::$propertyValues and CountryTax created/updated/ customfield were unmapped. The contract test used the wrong envelope key for tag lists and never compared them. - JSON examples on 14 more doc pages. --- CHANGELOG.md | 4 + docs/resources/articles.md | 3 + docs/resources/client-tags.md | 1 + docs/resources/contacts.md | 2 + docs/resources/credit-notes.md | 2 + docs/resources/inbox-documents.md | 2 + docs/resources/incomings.md | 3 + docs/resources/invoice-tags.md | 1 + docs/resources/letters.md | 2 + docs/resources/offers.md | 2 + docs/resources/recurrings.md | 2 + docs/resources/reminders.md | 2 + docs/resources/settings-reminder-levels.md | 11 ++ docs/resources/settings-tax-free-countries.md | 14 ++ docs/resources/settings-units.md | 11 ++ src/Model/Article.php | 24 ++- src/Model/CountryTax.php | 18 +++ src/Model/Incoming.php | 24 ++- tests/Contract/ContractFixturesTest.php | 24 +-- .../Fixtures/Contract/activity-feed/list.json | 30 ++-- .../Contract/article-properties/get.json | 2 +- .../Contract/article-properties/list.json | 4 +- .../Contract/article-property-values/get.json | 13 ++ .../article-property-values/list.json | 13 +- .../Fixtures/Contract/article-tags/list.json | 13 ++ tests/Fixtures/Contract/articles/get.json | 42 ++++++ tests/Fixtures/Contract/articles/list.json | 42 +++++- .../Contract/client-properties/get.json | 2 +- .../Contract/client-properties/list.json | 28 ++-- .../Contract/client-property-values/get.json | 13 ++ .../Contract/client-property-values/list.json | 13 +- tests/Fixtures/Contract/client-tags/list.json | 8 +- tests/Fixtures/Contract/clients/get.json | 8 +- tests/Fixtures/Contract/clients/list.json | 14 +- .../Contract/confirmation-comments/get.json | 8 +- .../Contract/confirmation-comments/list.json | 43 ++++-- .../Contract/confirmation-items/get.json | 20 +-- .../Contract/confirmation-items/list.json | 20 +-- .../Contract/confirmation-tags/list.json | 8 +- .../Fixtures/Contract/confirmations/get.json | 8 +- .../Fixtures/Contract/confirmations/list.json | 137 ++++++++++++------ tests/Fixtures/Contract/contacts/get.json | 26 ++++ tests/Fixtures/Contract/contacts/list.json | 26 +++- tests/Fixtures/Contract/countries/list.json | 6 +- .../Fixtures/Contract/country-taxes/get.json | 9 ++ .../Fixtures/Contract/country-taxes/list.json | 9 +- .../Contract/credit-note-comments/get.json | 15 ++ .../Contract/credit-note-comments/list.json | 48 ++++++ .../Contract/credit-note-items/get.json | 24 +++ .../Contract/credit-note-items/list.json | 29 ++++ .../Contract/credit-note-payments/get.json | 20 +++ .../Contract/credit-note-payments/list.json | 20 ++- .../Contract/credit-note-tags/list.json | 13 ++ tests/Fixtures/Contract/credit-notes/get.json | 49 +++++++ .../Fixtures/Contract/credit-notes/list.json | 49 ++++++- tests/Fixtures/Contract/currencies/list.json | 6 +- .../Contract/delivery-note-comments/get.json | 8 +- .../Contract/delivery-note-comments/list.json | 43 ++++-- .../Contract/delivery-note-items/get.json | 10 +- .../Contract/delivery-note-items/list.json | 10 +- .../Contract/delivery-note-tags/list.json | 8 +- .../Fixtures/Contract/delivery-notes/get.json | 6 +- .../Contract/delivery-notes/list.json | 73 +++++++--- .../Contract/email-templates/get.json | 8 +- .../Contract/email-templates/list.json | 24 +-- tests/Fixtures/Contract/free-texts/get.json | 6 +- tests/Fixtures/Contract/free-texts/list.json | 18 +-- .../Contract/inbox-documents/get.json | 17 +++ .../Contract/inbox-documents/list.json | 17 ++- .../Contract/incoming-categories/get.json | 4 +- .../Contract/incoming-categories/list.json | 12 +- .../Contract/incoming-comments/get.json | 11 ++ .../Contract/incoming-comments/list.json | 36 +++++ .../Contract/incoming-payments/get.json | 20 +++ .../Contract/incoming-payments/list.json | 20 ++- .../Contract/incoming-properties/get.json | 10 ++ .../Contract/incoming-properties/list.json | 10 +- .../incoming-property-values/get.json | 13 ++ .../incoming-property-values/list.json | 13 +- .../Fixtures/Contract/incoming-tags/list.json | 13 ++ tests/Fixtures/Contract/incomings/get.json | 40 +++++ tests/Fixtures/Contract/incomings/list.json | 40 ++++- .../Contract/invoice-comments/get.json | 8 +- .../Contract/invoice-comments/list.json | 30 ++-- .../Fixtures/Contract/invoice-items/get.json | 22 +-- .../Fixtures/Contract/invoice-items/list.json | 22 +-- .../Contract/invoice-payments/list.json | 2 +- .../Fixtures/Contract/invoice-tags/list.json | 8 +- tests/Fixtures/Contract/invoices/get.json | 10 +- tests/Fixtures/Contract/invoices/list.json | 34 ++--- .../Contract/letter-comments/get.json | 15 ++ .../Contract/letter-comments/list.json | 35 +++++ tests/Fixtures/Contract/letter-tags/list.json | 13 ++ tests/Fixtures/Contract/letters/get.json | 18 +++ tests/Fixtures/Contract/letters/list.json | 18 ++- .../Fixtures/Contract/offer-comments/get.json | 15 ++ .../Contract/offer-comments/list.json | 48 ++++++ tests/Fixtures/Contract/offer-items/get.json | 24 +++ tests/Fixtures/Contract/offer-items/list.json | 29 ++++ tests/Fixtures/Contract/offer-tags/list.json | 13 ++ tests/Fixtures/Contract/offers/get.json | 48 ++++++ tests/Fixtures/Contract/offers/list.json | 96 +++++++++++- .../recurring-email-receivers/get.json | 8 + .../recurring-email-receivers/list.json | 13 ++ .../Contract/recurring-items/get.json | 23 +++ .../Contract/recurring-items/list.json | 28 ++++ .../Contract/recurring-tags/list.json | 13 ++ tests/Fixtures/Contract/recurrings/get.json | 57 ++++++++ tests/Fixtures/Contract/recurrings/list.json | 57 +++++++- .../Fixtures/Contract/reminder-items/get.json | 16 ++ .../Contract/reminder-items/list.json | 21 +++ .../Fixtures/Contract/reminder-tags/list.json | 13 ++ .../Fixtures/Contract/reminder-texts/get.json | 14 ++ .../Contract/reminder-texts/list.json | 14 +- tests/Fixtures/Contract/reminders/get.json | 29 ++++ tests/Fixtures/Contract/reminders/list.json | 29 +++- tests/Fixtures/Contract/roles/get.json | 2 +- tests/Fixtures/Contract/roles/list.json | 6 +- tests/Fixtures/Contract/settings/get.json | 36 ++--- .../Contract/supplier-properties/get.json | 10 ++ .../Contract/supplier-properties/list.json | 10 +- .../supplier-property-values/get.json | 13 ++ .../supplier-property-values/list.json | 13 +- .../Fixtures/Contract/supplier-tags/list.json | 8 +- tests/Fixtures/Contract/suppliers/get.json | 6 +- tests/Fixtures/Contract/suppliers/list.json | 63 +++++++- tests/Fixtures/Contract/taxes/get.json | 2 +- tests/Fixtures/Contract/taxes/list.json | 6 +- tests/Fixtures/Contract/templates/get.json | 2 +- tests/Fixtures/Contract/templates/list.json | 6 +- tests/Fixtures/Contract/units/get.json | 9 ++ tests/Fixtures/Contract/units/list.json | 9 +- .../Contract/user-properties/get.json | 10 ++ .../Contract/user-properties/list.json | 10 +- tests/Fixtures/Contract/users/get.json | 6 +- tests/Fixtures/Contract/users/list.json | 6 +- tools/codegen/definitions/articles.php | 8 + tools/codegen/definitions/country-taxes.php | 3 + tools/codegen/definitions/incomings.php | 8 + tools/generate-json-examples.php | 25 ++-- tools/record-fixtures.php | 50 ++++++- 141 files changed, 2264 insertions(+), 386 deletions(-) create mode 100644 tests/Fixtures/Contract/article-property-values/get.json create mode 100644 tests/Fixtures/Contract/article-tags/list.json create mode 100644 tests/Fixtures/Contract/articles/get.json create mode 100644 tests/Fixtures/Contract/client-property-values/get.json create mode 100644 tests/Fixtures/Contract/contacts/get.json create mode 100644 tests/Fixtures/Contract/country-taxes/get.json create mode 100644 tests/Fixtures/Contract/credit-note-comments/get.json create mode 100644 tests/Fixtures/Contract/credit-note-comments/list.json create mode 100644 tests/Fixtures/Contract/credit-note-items/get.json create mode 100644 tests/Fixtures/Contract/credit-note-items/list.json create mode 100644 tests/Fixtures/Contract/credit-note-payments/get.json create mode 100644 tests/Fixtures/Contract/credit-note-tags/list.json create mode 100644 tests/Fixtures/Contract/credit-notes/get.json create mode 100644 tests/Fixtures/Contract/inbox-documents/get.json create mode 100644 tests/Fixtures/Contract/incoming-comments/get.json create mode 100644 tests/Fixtures/Contract/incoming-comments/list.json create mode 100644 tests/Fixtures/Contract/incoming-payments/get.json create mode 100644 tests/Fixtures/Contract/incoming-properties/get.json create mode 100644 tests/Fixtures/Contract/incoming-property-values/get.json create mode 100644 tests/Fixtures/Contract/incoming-tags/list.json create mode 100644 tests/Fixtures/Contract/incomings/get.json create mode 100644 tests/Fixtures/Contract/letter-comments/get.json create mode 100644 tests/Fixtures/Contract/letter-comments/list.json create mode 100644 tests/Fixtures/Contract/letter-tags/list.json create mode 100644 tests/Fixtures/Contract/letters/get.json create mode 100644 tests/Fixtures/Contract/offer-comments/get.json create mode 100644 tests/Fixtures/Contract/offer-comments/list.json create mode 100644 tests/Fixtures/Contract/offer-items/get.json create mode 100644 tests/Fixtures/Contract/offer-items/list.json create mode 100644 tests/Fixtures/Contract/offer-tags/list.json create mode 100644 tests/Fixtures/Contract/offers/get.json create mode 100644 tests/Fixtures/Contract/recurring-email-receivers/get.json create mode 100644 tests/Fixtures/Contract/recurring-email-receivers/list.json create mode 100644 tests/Fixtures/Contract/recurring-items/get.json create mode 100644 tests/Fixtures/Contract/recurring-items/list.json create mode 100644 tests/Fixtures/Contract/recurring-tags/list.json create mode 100644 tests/Fixtures/Contract/recurrings/get.json create mode 100644 tests/Fixtures/Contract/reminder-items/get.json create mode 100644 tests/Fixtures/Contract/reminder-items/list.json create mode 100644 tests/Fixtures/Contract/reminder-tags/list.json create mode 100644 tests/Fixtures/Contract/reminder-texts/get.json create mode 100644 tests/Fixtures/Contract/reminders/get.json create mode 100644 tests/Fixtures/Contract/supplier-properties/get.json create mode 100644 tests/Fixtures/Contract/supplier-property-values/get.json create mode 100644 tests/Fixtures/Contract/units/get.json create mode 100644 tests/Fixtures/Contract/user-properties/get.json diff --git a/CHANGELOG.md b/CHANGELOG.md index dbac64e..0547f82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve - **JSON examples in the docs:** the resource pages have a "JSON on the wire" section with the request body the SDK sends (captured from the SDK, kept up to date by `composer docs:json:check` in CI) and real, anonymized sandbox responses from the contract fixtures. Billomat's own API docs only show XML. - `Page` is covariant in its item type, so a `Page` can be passed where a `Page` is expected. +### Fixed + +- **Fields Billomat sends that the models didn't map** (found with new sandbox fixtures): `Article::$propertyValues` and `Incoming::$propertyValues` (embedded `article-property-values`/`incoming-property-values`, like `Client`/`Supplier`), `CountryTax::$created`, `$updated` and `$customfield`. Until now they ended up in `$extra`. + ### Changed - **`InvoiceMailOptions` is `MailOptions`**, since every document type takes the same Pixelletter options. The Rector set renames it. diff --git a/docs/resources/articles.md b/docs/resources/articles.md index 2f27967..f72fa04 100644 --- a/docs/resources/articles.md +++ b/docs/resources/articles.md @@ -182,6 +182,7 @@ Mirrors `ArticleCreateOptions`, but `title` is no longer required and every fiel | `costCenter` | `?string` | | `purchasePriceNetGross` | `?NetGross` (whether `purchasePrice` is net or gross) | | `customfield` | `?string` (free-form extra field, see [Custom meta attributes](../concepts/custom-meta-attributes.md)) | +| `propertyValues` | `list` (custom property values, embedded by Billomat in `get()` and `list()`) | | `extra` | `array` (unmapped fields, see [Models](../concepts/models.md)) | ## Article tags @@ -302,6 +303,8 @@ Billomat's API documentation only shows XML. These are the JSON bodies the SDK s ::: code-group <<< @/snippets/json/articles.create.json [POST /articles] +<<< @/../tests/Fixtures/Contract/articles/get.json [GET /articles/{id} (response)] +<<< @/../tests/Fixtures/Contract/articles/list.json [GET /articles (response)] ::: diff --git a/docs/resources/client-tags.md b/docs/resources/client-tags.md index 7978325..b487f12 100644 --- a/docs/resources/client-tags.md +++ b/docs/resources/client-tags.md @@ -130,6 +130,7 @@ Billomat's API documentation only shows XML. These are the JSON bodies the SDK s ::: code-group <<< @/snippets/json/client-tags.create.json [POST /client-tags] +<<< @/../tests/Fixtures/Contract/client-tags/list.json [GET /client-tags (response)] ::: diff --git a/docs/resources/contacts.md b/docs/resources/contacts.md index 2dc77b8..0d32ff0 100644 --- a/docs/resources/contacts.md +++ b/docs/resources/contacts.md @@ -171,6 +171,8 @@ Billomat's API documentation only shows XML. These are the JSON bodies the SDK s ::: code-group <<< @/snippets/json/contacts.create.json [POST /contacts] +<<< @/../tests/Fixtures/Contract/contacts/get.json [GET /contacts/{id} (response)] +<<< @/../tests/Fixtures/Contract/contacts/list.json [GET /contacts (response)] ::: diff --git a/docs/resources/credit-notes.md b/docs/resources/credit-notes.md index da690ae..456f49a 100644 --- a/docs/resources/credit-notes.md +++ b/docs/resources/credit-notes.md @@ -515,6 +515,8 @@ Billomat's API documentation only shows XML. These are the JSON bodies the SDK s ::: code-group <<< @/snippets/json/credit-notes.create.json [POST /credit-notes] +<<< @/../tests/Fixtures/Contract/credit-notes/get.json [GET /credit-notes/{id} (response)] +<<< @/../tests/Fixtures/Contract/credit-notes/list.json [GET /credit-notes (response)] ::: diff --git a/docs/resources/inbox-documents.md b/docs/resources/inbox-documents.md index c8da6b8..901f93c 100644 --- a/docs/resources/inbox-documents.md +++ b/docs/resources/inbox-documents.md @@ -126,6 +126,8 @@ Billomat's API documentation only shows XML. These are the JSON bodies the SDK s ::: code-group <<< @/snippets/json/inbox-documents.create.json [POST /inbox-documents] +<<< @/../tests/Fixtures/Contract/inbox-documents/get.json [GET /inbox-documents/{id} (response)] +<<< @/../tests/Fixtures/Contract/inbox-documents/list.json [GET /inbox-documents (response)] ::: diff --git a/docs/resources/incomings.md b/docs/resources/incomings.md index 58ec747..abc8ed1 100644 --- a/docs/resources/incomings.md +++ b/docs/resources/incomings.md @@ -332,6 +332,7 @@ Constructor: `new IncomingPropertyValueCreateOptions(int $incomingPropertyId, mi | `pageCount` | `?int` | | `hasAttachment` | `?bool` | | `customfield` | `?string` (free-form extra field, see [Custom meta attributes](../concepts/custom-meta-attributes.md)) | +| `propertyValues` | `list` (custom property values, embedded by Billomat in `get()` and `list()`) | | `extra` | `array` (unmapped fields, see [Models](../concepts/models.md)) | `paidAmount` and `openAmount` are calculated server-side from the payments. Amounts are [`Money`](../concepts/money.md) values. @@ -435,6 +436,8 @@ Billomat's API documentation only shows XML. These are the JSON bodies the SDK s ::: code-group <<< @/snippets/json/incomings.create.json [POST /incomings] +<<< @/../tests/Fixtures/Contract/incomings/get.json [GET /incomings/{id} (response)] +<<< @/../tests/Fixtures/Contract/incomings/list.json [GET /incomings (response)] ::: diff --git a/docs/resources/invoice-tags.md b/docs/resources/invoice-tags.md index a44146a..b6088cf 100644 --- a/docs/resources/invoice-tags.md +++ b/docs/resources/invoice-tags.md @@ -126,6 +126,7 @@ Billomat's API documentation only shows XML. These are the JSON bodies the SDK s ::: code-group <<< @/snippets/json/invoice-tags.create.json [POST /invoice-tags] +<<< @/../tests/Fixtures/Contract/invoice-tags/list.json [GET /invoice-tags (response)] ::: diff --git a/docs/resources/letters.md b/docs/resources/letters.md index 0d5c17e..0d444b7 100644 --- a/docs/resources/letters.md +++ b/docs/resources/letters.md @@ -349,6 +349,8 @@ Billomat's API documentation only shows XML. These are the JSON bodies the SDK s ::: code-group <<< @/snippets/json/letters.create.json [POST /letters] +<<< @/../tests/Fixtures/Contract/letters/get.json [GET /letters/{id} (response)] +<<< @/../tests/Fixtures/Contract/letters/list.json [GET /letters (response)] ::: diff --git a/docs/resources/offers.md b/docs/resources/offers.md index 924d3a9..7224f91 100644 --- a/docs/resources/offers.md +++ b/docs/resources/offers.md @@ -483,6 +483,8 @@ Billomat's API documentation only shows XML. These are the JSON bodies the SDK s ::: code-group <<< @/snippets/json/offers.create.json [POST /offers] +<<< @/../tests/Fixtures/Contract/offers/get.json [GET /offers/{id} (response)] +<<< @/../tests/Fixtures/Contract/offers/list.json [GET /offers (response)] ::: diff --git a/docs/resources/recurrings.md b/docs/resources/recurrings.md index 89966c6..b439bcb 100644 --- a/docs/resources/recurrings.md +++ b/docs/resources/recurrings.md @@ -381,6 +381,8 @@ Billomat's API documentation only shows XML. These are the JSON bodies the SDK s ::: code-group <<< @/snippets/json/recurrings.create.json [POST /recurrings] +<<< @/../tests/Fixtures/Contract/recurrings/get.json [GET /recurrings/{id} (response)] +<<< @/../tests/Fixtures/Contract/recurrings/list.json [GET /recurrings (response)] ::: diff --git a/docs/resources/reminders.md b/docs/resources/reminders.md index 9b5edfd..346ff91 100644 --- a/docs/resources/reminders.md +++ b/docs/resources/reminders.md @@ -345,6 +345,8 @@ Billomat's API documentation only shows XML. These are the JSON bodies the SDK s ::: code-group <<< @/snippets/json/reminders.create.json [POST /reminders] +<<< @/../tests/Fixtures/Contract/reminders/get.json [GET /reminders/{id} (response)] +<<< @/../tests/Fixtures/Contract/reminders/list.json [GET /reminders (response)] ::: diff --git a/docs/resources/settings-reminder-levels.md b/docs/resources/settings-reminder-levels.md index 3b436c5..b9facea 100644 --- a/docs/resources/settings-reminder-levels.md +++ b/docs/resources/settings-reminder-levels.md @@ -72,6 +72,17 @@ Like `get()`, but throws `NotFoundException` instead of returning `null`. | `customfield` | `customfield` | `?string` | Free extra field, see [Custom meta attributes](../concepts/custom-meta-attributes.md) | | `extra` | — | `array` | Fields the SDK doesn't map yet, raw (see [Read models](../concepts/models.md)) | + +## JSON on the wire + +Billomat's API documentation only shows XML. These are the JSON bodies the SDK sends and receives: requests as the SDK serializes them, responses recorded in the Billomat sandbox and anonymized ([contract fixtures](../../tests/Fixtures/Contract)). Billomat sends every value as a string; the read models cast them (see [Read models](../concepts/models.md)). + +::: code-group +<<< @/../tests/Fixtures/Contract/reminder-texts/get.json [GET /reminder-texts/{id} (response)] +<<< @/../tests/Fixtures/Contract/reminder-texts/list.json [GET /reminder-texts (response)] +::: + + ## Pitfalls - **`sort` instead of `sorting`.** Billomat returns the order as `sorting` (formerly `sort`); the SDK keeps exposing it as `ReminderText::$sort`, and `toArray()` writes it under the key `sort`. diff --git a/docs/resources/settings-tax-free-countries.md b/docs/resources/settings-tax-free-countries.md index 0e108f8..b74400e 100644 --- a/docs/resources/settings-tax-free-countries.md +++ b/docs/resources/settings-tax-free-countries.md @@ -58,9 +58,23 @@ Like `get()`, but throws `NotFoundException` instead of returning `null`. | Property | Billomat field | Type | |---|---|---| | `id` | `id` | `int` | +| `created` | `created` | `?DateTimeImmutable` | +| `updated` | `updated` | `?DateTimeImmutable` | | `countryCode` | `country_code` | `?string` | +| `customfield` | `customfield` | `?string` | | `extra` | — | `array`: fields the SDK doesn't map yet, raw (see [Read models](../concepts/models.md)) | + +## JSON on the wire + +Billomat's API documentation only shows XML. These are the JSON bodies the SDK sends and receives: requests as the SDK serializes them, responses recorded in the Billomat sandbox and anonymized ([contract fixtures](../../tests/Fixtures/Contract)). Billomat sends every value as a string; the read models cast them (see [Read models](../concepts/models.md)). + +::: code-group +<<< @/../tests/Fixtures/Contract/country-taxes/get.json [GET /country-taxes/{id} (response)] +<<< @/../tests/Fixtures/Contract/country-taxes/list.json [GET /country-taxes (response)] +::: + + ## Pitfalls - **No tax rate in the model.** Unlike `/taxes` (see [taxes.md](taxes.md)), this endpoint only holds the list of country codes; the tax rate for these countries is implicitly 0 %. diff --git a/docs/resources/settings-units.md b/docs/resources/settings-units.md index 3cafb7e..685393d 100644 --- a/docs/resources/settings-units.md +++ b/docs/resources/settings-units.md @@ -69,6 +69,17 @@ Like `get()`, but throws `NotFoundException` instead of returning `null`. | `customfield` | `customfield` | `?string` — free extra field, see [Custom meta attributes](../concepts/custom-meta-attributes.md) | | `extra` | — | `array`: fields the SDK doesn't map yet, raw (see [Read models](../concepts/models.md)) | + +## JSON on the wire + +Billomat's API documentation only shows XML. These are the JSON bodies the SDK sends and receives: requests as the SDK serializes them, responses recorded in the Billomat sandbox and anonymized ([contract fixtures](../../tests/Fixtures/Contract)). Billomat sends every value as a string; the read models cast them (see [Read models](../concepts/models.md)). + +::: code-group +<<< @/../tests/Fixtures/Contract/units/get.json [GET /units/{id} (response)] +<<< @/../tests/Fixtures/Contract/units/list.json [GET /units (response)] +::: + + ## Pitfalls - **Single-item list quirk.** With only one unit in the account Billomat returns an object instead of a list; `UnitsApi::list()` normalizes this. diff --git a/src/Model/Article.php b/src/Model/Article.php index cbf63f6..be26f4f 100644 --- a/src/Model/Article.php +++ b/src/Model/Article.php @@ -5,6 +5,7 @@ namespace Justpilot\Billomat\Model; use DateTimeImmutable; +use Justpilot\Billomat\Internal\ListCaster; use Justpilot\Billomat\Internal\ScalarCaster; use Justpilot\Billomat\Model\Enum\ItemType; use Justpilot\Billomat\Model\Enum\NetGross; @@ -52,9 +53,13 @@ 'revenue_account_number' => true, 'cost_center' => true, 'purchase_price_net_gross' => true, + 'article-property-values' => true, ]; - /** @param array $extra */ + /** + * @param list $propertyValues + * @param array $extra + */ public function __construct( /** Interne Billomat-ID des Artikels. */ public int $id, @@ -130,6 +135,12 @@ public function __construct( public ?string $costCenter = null, /** Preisbasis des Einkaufspreises (netto oder brutto). */ public ?NetGross $purchasePriceNetGross = null, + /** + * Attributwerte des Artikels. + * + * Von Billomat geliefert, aber nicht dokumentiert (leer: ""). + */ + public array $propertyValues = [], /** * Felder, die Billomat liefert, das SDK aber (noch) nicht abbildet – roh, wie in der Response. * @@ -172,6 +183,7 @@ public static function fromArray(array $data): self revenueAccountNumber: ScalarCaster::toStringOrNull($data['revenue_account_number'] ?? null), costCenter: ScalarCaster::toStringOrNull($data['cost_center'] ?? null), purchasePriceNetGross: NetGross::tryFrom(ScalarCaster::toStringOrNull($data['purchase_price_net_gross'] ?? null) ?? ''), + propertyValues: ListCaster::toNestedList($data['article-property-values'] ?? null, 'article-property-value', 'id', ArticlePropertyValue::fromArray(...)), extra: array_diff_key($data, self::FIELDS), ); } @@ -185,7 +197,7 @@ public static function fromArray(array $data): self */ public function toArray(): array { - return [ + $data = [ ...$this->extra, 'id' => $this->id, 'created' => $this->created?->format(DATE_ATOM), @@ -213,5 +225,13 @@ public function toArray(): array 'cost_center' => $this->costCenter, 'purchase_price_net_gross' => $this->purchasePriceNetGross?->value, ]; + + if ([] !== $this->propertyValues) { + $data['article-property-values'] = [ + 'article-property-value' => array_map(static fn (ArticlePropertyValue $item): array => $item->toArray(), $this->propertyValues), + ]; + } + + return $data; } } diff --git a/src/Model/CountryTax.php b/src/Model/CountryTax.php index 016c1a7..223fe9c 100644 --- a/src/Model/CountryTax.php +++ b/src/Model/CountryTax.php @@ -4,8 +4,11 @@ namespace Justpilot\Billomat\Model; +use DateTimeImmutable; use Justpilot\Billomat\Internal\ScalarCaster; +use const DATE_ATOM; + /** * Steuerfreies Land, für das Billomat keine Mehrwertsteuer berechnet. * @@ -22,19 +25,28 @@ /** Billomat-Felder, die das Model abbildet. */ private const array FIELDS = [ 'id' => true, + 'created' => true, + 'updated' => true, 'country_code' => true, + 'customfield' => true, ]; /** @param array $extra */ public function __construct( /** Interne Billomat-ID des Eintrags. */ public int $id, + /** Zeitpunkt der Erstellung. */ + public ?DateTimeImmutable $created = null, + /** Zeitpunkt der letzten Änderung. */ + public ?DateTimeImmutable $updated = null, /** * Ländercode nach ISO 3166 Alpha-2. * * Beispiel: "CH" */ public ?string $countryCode = null, + /** Freies Zusatzfeld (siehe Custom-Meta-Attribute). */ + public ?string $customfield = null, /** * Felder, die Billomat liefert, das SDK aber (noch) nicht abbildet – roh, wie in der Response. * @@ -53,7 +65,10 @@ public static function fromArray(array $data): self { return new self( id: ScalarCaster::required(ScalarCaster::toIntOrNull($data['id'] ?? null), self::class, 'id'), + created: ScalarCaster::toDateTimeOrNull($data['created'] ?? null), + updated: ScalarCaster::toDateTimeOrNull($data['updated'] ?? null), countryCode: ScalarCaster::toStringOrNull($data['country_code'] ?? null), + customfield: ScalarCaster::toStringOrNull($data['customfield'] ?? null), extra: array_diff_key($data, self::FIELDS), ); } @@ -70,7 +85,10 @@ public function toArray(): array return [ ...$this->extra, 'id' => $this->id, + 'created' => $this->created?->format(DATE_ATOM), + 'updated' => $this->updated?->format(DATE_ATOM), 'country_code' => $this->countryCode, + 'customfield' => $this->customfield, ]; } } diff --git a/src/Model/Incoming.php b/src/Model/Incoming.php index 2cd619e..0490a2a 100644 --- a/src/Model/Incoming.php +++ b/src/Model/Incoming.php @@ -5,6 +5,7 @@ namespace Justpilot\Billomat\Model; use DateTimeImmutable; +use Justpilot\Billomat\Internal\ListCaster; use Justpilot\Billomat\Internal\ScalarCaster; use Justpilot\Billomat\Model\Enum\IncomingStatus; @@ -47,9 +48,13 @@ 'category' => true, 'page_count' => true, 'has_attachment' => true, + 'incoming-property-values' => true, ]; - /** @param array $extra */ + /** + * @param list $propertyValues + * @param array $extra + */ public function __construct( /** Interne Billomat-ID der Eingangsrechnung. */ public int $id, @@ -97,6 +102,12 @@ public function __construct( public ?int $pageCount = null, /** Ist ein Belegdokument angehängt? */ public ?bool $hasAttachment = null, + /** + * Attributwerte der Eingangsrechnung. + * + * Von Billomat geliefert, aber nicht dokumentiert (leer: ""). + */ + public array $propertyValues = [], /** * Felder, die Billomat liefert, das SDK aber (noch) nicht abbildet – roh, wie in der Response. * @@ -137,6 +148,7 @@ public static function fromArray(array $data): self category: ScalarCaster::toStringOrNull($data['category'] ?? null), pageCount: ScalarCaster::toIntOrNull($data['page_count'] ?? null), hasAttachment: ScalarCaster::toBoolOrNull($data['has_attachment'] ?? null), + propertyValues: ListCaster::toNestedList($data['incoming-property-values'] ?? null, 'incoming-property-value', 'id', IncomingPropertyValue::fromArray(...)), extra: array_diff_key($data, self::FIELDS), ); } @@ -150,7 +162,7 @@ public static function fromArray(array $data): self */ public function toArray(): array { - return [ + $data = [ ...$this->extra, 'id' => $this->id, 'supplier_id' => $this->supplierId, @@ -176,5 +188,13 @@ public function toArray(): array 'page_count' => $this->pageCount, 'has_attachment' => $this->hasAttachment, ]; + + if ([] !== $this->propertyValues) { + $data['incoming-property-values'] = [ + 'incoming-property-value' => array_map(static fn (IncomingPropertyValue $item): array => $item->toArray(), $this->propertyValues), + ]; + } + + return $data; } } diff --git a/tests/Contract/ContractFixturesTest.php b/tests/Contract/ContractFixturesTest.php index 78883b8..a4c15aa 100644 --- a/tests/Contract/ContractFixturesTest.php +++ b/tests/Contract/ContractFixturesTest.php @@ -162,15 +162,15 @@ private function calls(): array return [ 'clients' => ['key' => 'client', 'list' => static fn (BillomatClient $b): array => $b->clients->list(), 'get' => static fn (BillomatClient $b): ?object => $b->clients->get(1)], 'contacts' => ['key' => 'contact', 'list' => static fn (BillomatClient $b): array => $b->contacts->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->contacts->get(1)], - 'client-tags' => ['key' => 'tag', 'list' => static fn (BillomatClient $b): array => $b->clients->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->clients->tags->get(1)], + 'client-tags' => ['key' => 'client-tag', 'list' => static fn (BillomatClient $b): array => $b->clients->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->clients->tags->get(1)], 'client-properties' => ['key' => 'client-property', 'list' => static fn (BillomatClient $b): array => $b->clients->properties->list(), 'get' => static fn (BillomatClient $b): ?object => $b->clients->properties->get(1)], 'client-property-values' => ['key' => 'client-property-value', 'list' => static fn (BillomatClient $b): array => $b->clients->propertyValues->list(), 'get' => static fn (BillomatClient $b): ?object => $b->clients->propertyValues->get(1)], 'suppliers' => ['key' => 'supplier', 'list' => static fn (BillomatClient $b): array => $b->suppliers->list(), 'get' => static fn (BillomatClient $b): ?object => $b->suppliers->get(1)], - 'supplier-tags' => ['key' => 'tag', 'list' => static fn (BillomatClient $b): array => $b->suppliers->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->suppliers->tags->get(1)], + 'supplier-tags' => ['key' => 'supplier-tag', 'list' => static fn (BillomatClient $b): array => $b->suppliers->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->suppliers->tags->get(1)], 'supplier-properties' => ['key' => 'supplier-property', 'list' => static fn (BillomatClient $b): array => $b->suppliers->properties->list(), 'get' => static fn (BillomatClient $b): ?object => $b->suppliers->properties->get(1)], 'supplier-property-values' => ['key' => 'supplier-property-value', 'list' => static fn (BillomatClient $b): array => $b->suppliers->propertyValues->list(), 'get' => static fn (BillomatClient $b): ?object => $b->suppliers->propertyValues->get(1)], 'articles' => ['key' => 'article', 'list' => static fn (BillomatClient $b): array => $b->articles->list(), 'get' => static fn (BillomatClient $b): ?object => $b->articles->get(1)], - 'article-tags' => ['key' => 'tag', 'list' => static fn (BillomatClient $b): array => $b->articles->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->articles->tags->get(1)], + 'article-tags' => ['key' => 'article-tag', 'list' => static fn (BillomatClient $b): array => $b->articles->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->articles->tags->get(1)], 'article-properties' => ['key' => 'article-property', 'list' => static fn (BillomatClient $b): array => $b->articles->properties->list(), 'get' => static fn (BillomatClient $b): ?object => $b->articles->properties->get(1)], 'article-property-values' => ['key' => 'article-property-value', 'list' => static fn (BillomatClient $b): array => $b->articles->propertyValues->list(), 'get' => static fn (BillomatClient $b): ?object => $b->articles->propertyValues->get(1)], 'units' => ['key' => 'unit', 'list' => static fn (BillomatClient $b): array => $b->units->list(), 'get' => static fn (BillomatClient $b): ?object => $b->units->get(1)], @@ -179,38 +179,38 @@ private function calls(): array 'invoice-items' => ['key' => 'invoice-item', 'list' => static fn (BillomatClient $b): array => $b->invoices->items->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->invoices->items->get(1)], 'invoice-payments' => ['key' => 'invoice-payment', 'list' => static fn (BillomatClient $b): array => $b->invoices->payments->list(), 'get' => static fn (BillomatClient $b): ?object => $b->invoices->payments->get(1)], 'invoice-comments' => ['key' => 'invoice-comment', 'list' => static fn (BillomatClient $b): array => $b->invoices->comments->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->invoices->comments->get(1)], - 'invoice-tags' => ['key' => 'tag', 'list' => static fn (BillomatClient $b): array => $b->invoices->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->invoices->tags->get(1)], + 'invoice-tags' => ['key' => 'invoice-tag', 'list' => static fn (BillomatClient $b): array => $b->invoices->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->invoices->tags->get(1)], 'offers' => ['key' => 'offer', 'list' => static fn (BillomatClient $b): array => $b->offers->list(), 'get' => static fn (BillomatClient $b): ?object => $b->offers->get(1)], 'offer-items' => ['key' => 'offer-item', 'list' => static fn (BillomatClient $b): array => $b->offers->items->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->offers->items->get(1)], 'offer-comments' => ['key' => 'offer-comment', 'list' => static fn (BillomatClient $b): array => $b->offers->comments->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->offers->comments->get(1)], - 'offer-tags' => ['key' => 'tag', 'list' => static fn (BillomatClient $b): array => $b->offers->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->offers->tags->get(1)], + 'offer-tags' => ['key' => 'offer-tag', 'list' => static fn (BillomatClient $b): array => $b->offers->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->offers->tags->get(1)], 'confirmations' => ['key' => 'confirmation', 'list' => static fn (BillomatClient $b): array => $b->confirmations->list(), 'get' => static fn (BillomatClient $b): ?object => $b->confirmations->get(1)], 'confirmation-items' => ['key' => 'confirmation-item', 'list' => static fn (BillomatClient $b): array => $b->confirmations->items->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->confirmations->items->get(1)], 'confirmation-comments' => ['key' => 'confirmation-comment', 'list' => static fn (BillomatClient $b): array => $b->confirmations->comments->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->confirmations->comments->get(1)], - 'confirmation-tags' => ['key' => 'tag', 'list' => static fn (BillomatClient $b): array => $b->confirmations->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->confirmations->tags->get(1)], + 'confirmation-tags' => ['key' => 'confirmation-tag', 'list' => static fn (BillomatClient $b): array => $b->confirmations->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->confirmations->tags->get(1)], 'credit-notes' => ['key' => 'credit-note', 'list' => static fn (BillomatClient $b): array => $b->creditNotes->list(), 'get' => static fn (BillomatClient $b): ?object => $b->creditNotes->get(1)], 'credit-note-items' => ['key' => 'credit-note-item', 'list' => static fn (BillomatClient $b): array => $b->creditNotes->items->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->creditNotes->items->get(1)], 'credit-note-payments' => ['key' => 'credit-note-payment', 'list' => static fn (BillomatClient $b): array => $b->creditNotes->payments->list(), 'get' => static fn (BillomatClient $b): ?object => $b->creditNotes->payments->get(1)], 'credit-note-comments' => ['key' => 'credit-note-comment', 'list' => static fn (BillomatClient $b): array => $b->creditNotes->comments->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->creditNotes->comments->get(1)], - 'credit-note-tags' => ['key' => 'tag', 'list' => static fn (BillomatClient $b): array => $b->creditNotes->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->creditNotes->tags->get(1)], + 'credit-note-tags' => ['key' => 'credit-note-tag', 'list' => static fn (BillomatClient $b): array => $b->creditNotes->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->creditNotes->tags->get(1)], 'delivery-notes' => ['key' => 'delivery-note', 'list' => static fn (BillomatClient $b): array => $b->deliveryNotes->list(), 'get' => static fn (BillomatClient $b): ?object => $b->deliveryNotes->get(1)], 'delivery-note-items' => ['key' => 'delivery-note-item', 'list' => static fn (BillomatClient $b): array => $b->deliveryNotes->items->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->deliveryNotes->items->get(1)], 'delivery-note-comments' => ['key' => 'delivery-note-comment', 'list' => static fn (BillomatClient $b): array => $b->deliveryNotes->comments->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->deliveryNotes->comments->get(1)], - 'delivery-note-tags' => ['key' => 'tag', 'list' => static fn (BillomatClient $b): array => $b->deliveryNotes->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->deliveryNotes->tags->get(1)], + 'delivery-note-tags' => ['key' => 'delivery-note-tag', 'list' => static fn (BillomatClient $b): array => $b->deliveryNotes->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->deliveryNotes->tags->get(1)], 'reminders' => ['key' => 'reminder', 'list' => static fn (BillomatClient $b): array => $b->reminders->list(), 'get' => static fn (BillomatClient $b): ?object => $b->reminders->get(1)], 'reminder-items' => ['key' => 'reminder-item', 'list' => static fn (BillomatClient $b): array => $b->reminders->items->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->reminders->items->get(1)], - 'reminder-tags' => ['key' => 'tag', 'list' => static fn (BillomatClient $b): array => $b->reminders->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->reminders->tags->get(1)], + 'reminder-tags' => ['key' => 'reminder-tag', 'list' => static fn (BillomatClient $b): array => $b->reminders->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->reminders->tags->get(1)], 'letters' => ['key' => 'letter', 'list' => static fn (BillomatClient $b): array => $b->letters->list(), 'get' => static fn (BillomatClient $b): ?object => $b->letters->get(1)], 'letter-comments' => ['key' => 'letter-comment', 'list' => static fn (BillomatClient $b): array => $b->letters->comments->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->letters->comments->get(1)], - 'letter-tags' => ['key' => 'tag', 'list' => static fn (BillomatClient $b): array => $b->letters->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->letters->tags->get(1)], + 'letter-tags' => ['key' => 'letter-tag', 'list' => static fn (BillomatClient $b): array => $b->letters->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->letters->tags->get(1)], 'recurrings' => ['key' => 'recurring', 'list' => static fn (BillomatClient $b): array => $b->recurrings->list(), 'get' => static fn (BillomatClient $b): ?object => $b->recurrings->get(1)], 'recurring-items' => ['key' => 'recurring-item', 'list' => static fn (BillomatClient $b): array => $b->recurrings->items->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->recurrings->items->get(1)], - 'recurring-tags' => ['key' => 'tag', 'list' => static fn (BillomatClient $b): array => $b->recurrings->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->recurrings->tags->get(1)], + 'recurring-tags' => ['key' => 'recurring-tag', 'list' => static fn (BillomatClient $b): array => $b->recurrings->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->recurrings->tags->get(1)], 'recurring-email-receivers' => ['key' => 'recurring-email-receiver', 'list' => static fn (BillomatClient $b): array => $b->recurrings->emailReceivers->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->recurrings->emailReceivers->get(1)], 'incomings' => ['key' => 'incoming', 'list' => static fn (BillomatClient $b): array => $b->incomings->list(), 'get' => static fn (BillomatClient $b): ?object => $b->incomings->get(1)], 'incoming-payments' => ['key' => 'incoming-payment', 'list' => static fn (BillomatClient $b): array => $b->incomings->payments->list(), 'get' => static fn (BillomatClient $b): ?object => $b->incomings->payments->get(1)], 'incoming-comments' => ['key' => 'incoming-comment', 'list' => static fn (BillomatClient $b): array => $b->incomings->comments->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->incomings->comments->get(1)], - 'incoming-tags' => ['key' => 'tag', 'list' => static fn (BillomatClient $b): array => $b->incomings->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->incomings->tags->get(1)], + 'incoming-tags' => ['key' => 'incoming-tag', 'list' => static fn (BillomatClient $b): array => $b->incomings->tags->list(1), 'get' => static fn (BillomatClient $b): ?object => $b->incomings->tags->get(1)], 'incoming-properties' => ['key' => 'incoming-property', 'list' => static fn (BillomatClient $b): array => $b->incomings->properties->list(), 'get' => static fn (BillomatClient $b): ?object => $b->incomings->properties->get(1)], 'incoming-property-values' => ['key' => 'incoming-property-value', 'list' => static fn (BillomatClient $b): array => $b->incomings->propertyValues->list(), 'get' => static fn (BillomatClient $b): ?object => $b->incomings->propertyValues->get(1)], 'incoming-categories' => ['key' => 'incoming-category', 'list' => static fn (BillomatClient $b): array => $b->incomingCategories->list(), 'get' => static fn (BillomatClient $b): ?object => $b->incomingCategories->get('accounting_costs')], diff --git a/tests/Fixtures/Contract/activity-feed/list.json b/tests/Fixtures/Contract/activity-feed/list.json index edd92be..f838c6b 100644 --- a/tests/Fixtures/Contract/activity-feed/list.json +++ b/tests/Fixtures/Contract/activity-feed/list.json @@ -2,27 +2,27 @@ "activity-feed": { "activity": [ { - "resource": "invoices", - "id": "22849134", - "date": "2026-10-25T18:47:31+01:00", - "title": "Text 44", - "text": "Text 45", + "resource": "incomings", + "id": "2063418", + "date": "2026-10-26T16:59:09+01:00", + "title": "Text 60", + "text": "Text 46", "user_id": "136536" }, { - "resource": "invoices", - "id": "22849134", - "date": "2026-10-25T18:47:30+01:00", - "title": "Text 44", - "text": "Text 46", + "resource": "incomings", + "id": "2063418", + "date": "2026-10-26T16:59:09+01:00", + "title": "Text 60", + "text": "Text 16", "user_id": "136536" }, { - "resource": "invoices", - "id": "22849134", - "date": "2026-10-25T18:47:29+01:00", - "title": "Text 44", - "text": "Text 47", + "resource": "incomings", + "id": "2063418", + "date": "2026-10-26T16:59:09+01:00", + "title": "Text 60", + "text": "Text 45", "user_id": "136536" } ], diff --git a/tests/Fixtures/Contract/article-properties/get.json b/tests/Fixtures/Contract/article-properties/get.json index 1d40c3d..6648f80 100644 --- a/tests/Fixtures/Contract/article-properties/get.json +++ b/tests/Fixtures/Contract/article-properties/get.json @@ -1,7 +1,7 @@ { "article-property": { "id": "6031", - "name": "Name 5", + "name": "Name 10", "default_value": "", "is_nvl": "", "type": "TEXTFIELD", diff --git a/tests/Fixtures/Contract/article-properties/list.json b/tests/Fixtures/Contract/article-properties/list.json index 43f8a38..12dc514 100644 --- a/tests/Fixtures/Contract/article-properties/list.json +++ b/tests/Fixtures/Contract/article-properties/list.json @@ -3,7 +3,7 @@ "article-property": [ { "id": "6031", - "name": "Name 5", + "name": "Name 10", "default_value": "", "is_nvl": "", "type": "TEXTFIELD", @@ -11,7 +11,7 @@ }, { "id": "6033", - "name": "Name 6", + "name": "Name 11", "default_value": "", "is_nvl": "", "type": "TEXTFIELD", diff --git a/tests/Fixtures/Contract/article-property-values/get.json b/tests/Fixtures/Contract/article-property-values/get.json new file mode 100644 index 0000000..8e9700c --- /dev/null +++ b/tests/Fixtures/Contract/article-property-values/get.json @@ -0,0 +1,13 @@ +{ + "article-property-value": { + "id": "4605801", + "created": "2026-10-26T16:58:57+01:00", + "updated": "2026-10-26T16:58:57+01:00", + "article_id": "1755418", + "article_property_id": "6031", + "type": "TEXTFIELD", + "name": "Name 10", + "value": "Text 2", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/article-property-values/list.json b/tests/Fixtures/Contract/article-property-values/list.json index 6763836..0b38260 100644 --- a/tests/Fixtures/Contract/article-property-values/list.json +++ b/tests/Fixtures/Contract/article-property-values/list.json @@ -1,7 +1,18 @@ { "article-property-values": { + "article-property-value": { + "id": "4605801", + "created": "2026-10-26T16:58:57+01:00", + "updated": "2026-10-26T16:58:57+01:00", + "article_id": "1755418", + "article_property_id": "6031", + "type": "TEXTFIELD", + "name": "Name 10", + "value": "Text 2", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/article-tags/list.json b/tests/Fixtures/Contract/article-tags/list.json new file mode 100644 index 0000000..3f108bc --- /dev/null +++ b/tests/Fixtures/Contract/article-tags/list.json @@ -0,0 +1,13 @@ +{ + "article-tags": { + "article-tag": { + "id": "206847", + "name": "Name 3", + "article_id": "1755418", + "customfield": "" + }, + "@page": "1", + "@per_page": "3", + "@total": "1" + } +} diff --git a/tests/Fixtures/Contract/articles/get.json b/tests/Fixtures/Contract/articles/get.json new file mode 100644 index 0000000..fc9f86c --- /dev/null +++ b/tests/Fixtures/Contract/articles/get.json @@ -0,0 +1,42 @@ +{ + "article": { + "id": "1755418", + "created": "2026-10-26T16:58:56+01:00", + "updated": "2026-10-26T16:58:57+01:00", + "archived": "0", + "unit_id": "", + "article_number": "ART239", + "number": "239", + "number_pre": "ART", + "number_length": "0", + "type": "SERVICE", + "title": "Text 4", + "description": "", + "sales_price": "120", + "sales_price2": "", + "sales_price3": "", + "sales_price4": "", + "sales_price5": "", + "currency_code": "EUR", + "tax_id": "271925", + "revenue_account_number": "", + "cost_center": "", + "purchase_price": "", + "purchase_price_net_gross": "NET", + "supplier_id": "", + "customfield": "", + "article-property-values": { + "article-property-value": { + "id": "4605801", + "created": "2026-10-26T16:58:57+01:00", + "updated": "2026-10-26T16:58:57+01:00", + "article_id": "1755418", + "article_property_id": "6031", + "type": "TEXTFIELD", + "name": "Name 10", + "value": "Text 2", + "customfield": "" + } + } + } +} diff --git a/tests/Fixtures/Contract/articles/list.json b/tests/Fixtures/Contract/articles/list.json index c1ad4ec..6c747bb 100644 --- a/tests/Fixtures/Contract/articles/list.json +++ b/tests/Fixtures/Contract/articles/list.json @@ -1,7 +1,47 @@ { "articles": { + "article": { + "id": "1755418", + "created": "2026-10-26T16:58:56+01:00", + "updated": "2026-10-26T16:58:57+01:00", + "archived": "0", + "unit_id": "", + "article_number": "ART239", + "number": "239", + "number_pre": "ART", + "number_length": "0", + "type": "SERVICE", + "title": "Text 4", + "description": "", + "sales_price": "120", + "sales_price2": "", + "sales_price3": "", + "sales_price4": "", + "sales_price5": "", + "currency_code": "EUR", + "tax_id": "271925", + "revenue_account_number": "", + "cost_center": "", + "purchase_price": "", + "purchase_price_net_gross": "NET", + "supplier_id": "", + "customfield": "", + "article-property-values": { + "article-property-value": { + "id": "4605801", + "created": "2026-10-26T16:58:57+01:00", + "updated": "2026-10-26T16:58:57+01:00", + "article_id": "1755418", + "article_property_id": "6031", + "type": "TEXTFIELD", + "name": "Name 10", + "value": "Text 2", + "customfield": "" + } + } + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/client-properties/get.json b/tests/Fixtures/Contract/client-properties/get.json index 7cf8730..562e5d5 100644 --- a/tests/Fixtures/Contract/client-properties/get.json +++ b/tests/Fixtures/Contract/client-properties/get.json @@ -1,7 +1,7 @@ { "client-property": { "id": "19196", - "name": "Name 2", + "name": "Name 4", "default_value": "", "is_nvl": "", "type": "TEXTFIELD", diff --git a/tests/Fixtures/Contract/client-properties/list.json b/tests/Fixtures/Contract/client-properties/list.json index 3d69d82..a943ffc 100644 --- a/tests/Fixtures/Contract/client-properties/list.json +++ b/tests/Fixtures/Contract/client-properties/list.json @@ -1,15 +1,25 @@ { "client-properties": { - "client-property": { - "id": "19196", - "name": "Name 2", - "default_value": "", - "is_nvl": "", - "type": "TEXTFIELD", - "customfield": "" - }, + "client-property": [ + { + "id": "19196", + "name": "Name 4", + "default_value": "", + "is_nvl": "", + "type": "TEXTFIELD", + "customfield": "" + }, + { + "id": "19272", + "name": "Name 5", + "default_value": "", + "is_nvl": "", + "type": "TEXTFIELD", + "customfield": "" + } + ], "@page": "1", "@per_page": "3", - "@total": "1" + "@total": "2" } } diff --git a/tests/Fixtures/Contract/client-property-values/get.json b/tests/Fixtures/Contract/client-property-values/get.json new file mode 100644 index 0000000..b934544 --- /dev/null +++ b/tests/Fixtures/Contract/client-property-values/get.json @@ -0,0 +1,13 @@ +{ + "client-property-value": { + "id": "11621057", + "created": "2026-10-26T16:58:55+01:00", + "updated": "2026-10-26T16:58:55+01:00", + "client_id": "10651661", + "client_property_id": "19196", + "type": "TEXTFIELD", + "name": "Name 4", + "value": "Text 2", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/client-property-values/list.json b/tests/Fixtures/Contract/client-property-values/list.json index 63e9533..11d2dab 100644 --- a/tests/Fixtures/Contract/client-property-values/list.json +++ b/tests/Fixtures/Contract/client-property-values/list.json @@ -1,7 +1,18 @@ { "client-property-values": { + "client-property-value": { + "id": "11621057", + "created": "2026-10-26T16:58:55+01:00", + "updated": "2026-10-26T16:58:55+01:00", + "client_id": "10651661", + "client_property_id": "19196", + "type": "TEXTFIELD", + "name": "Name 4", + "value": "Text 2", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/client-tags/list.json b/tests/Fixtures/Contract/client-tags/list.json index 478a12c..2bf1034 100644 --- a/tests/Fixtures/Contract/client-tags/list.json +++ b/tests/Fixtures/Contract/client-tags/list.json @@ -1,7 +1,13 @@ { "client-tags": { + "client-tag": { + "id": "1099489", + "name": "Name 3", + "client_id": "10651661", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/clients/get.json b/tests/Fixtures/Contract/clients/get.json index a56f8dd..88bce35 100644 --- a/tests/Fixtures/Contract/clients/get.json +++ b/tests/Fixtures/Contract/clients/get.json @@ -2,11 +2,11 @@ "client": { "id": "9340866", "created": "2025-12-24T22:59:58+01:00", - "updated": "2026-10-25T17:29:56+01:00", + "updated": "2026-10-26T16:33:08+01:00", "archived": "0", "dig_exclude": "0", "facturx_identifier": "", - "client_number": "KD1", + "client_number": "KD00001", "number": "1", "number_pre": "KD", "number_length": "0", @@ -57,8 +57,8 @@ "offer_validity_days": "28", "dunning_run": "1", "note": "Text 1", - "revenue_gross": "24653.07", - "revenue_net": "20716.83", + "revenue_gross": "25767.15", + "revenue_net": "21653.03", "customfield": "", "client-property-values": "" } diff --git a/tests/Fixtures/Contract/clients/list.json b/tests/Fixtures/Contract/clients/list.json index e68cbcd..e51e6e5 100644 --- a/tests/Fixtures/Contract/clients/list.json +++ b/tests/Fixtures/Contract/clients/list.json @@ -4,11 +4,11 @@ { "id": "9340866", "created": "2025-12-24T22:59:58+01:00", - "updated": "2026-10-25T17:29:56+01:00", + "updated": "2026-10-26T16:33:08+01:00", "archived": "0", "dig_exclude": "0", "facturx_identifier": "", - "client_number": "KD1", + "client_number": "KD00001", "number": "1", "number_pre": "KD", "number_length": "0", @@ -59,8 +59,8 @@ "offer_validity_days": "28", "dunning_run": "1", "note": "Text 1", - "revenue_gross": "24653.07", - "revenue_net": "20716.83", + "revenue_gross": "25767.15", + "revenue_net": "21653.03", "customfield": "", "client-property-values": "" }, @@ -71,7 +71,7 @@ "archived": "0", "dig_exclude": "0", "facturx_identifier": "", - "client_number": "PAT44473", + "client_number": "KD00002", "number": "44473", "number_pre": "PAT", "number_length": "5", @@ -134,7 +134,7 @@ "archived": "0", "dig_exclude": "0", "facturx_identifier": "", - "client_number": "PAT44473", + "client_number": "KD00002", "number": "44473", "number_pre": "PAT", "number_length": "5", @@ -193,6 +193,6 @@ ], "@page": "1", "@per_page": "3", - "@total": "12574" + "@total": "12777" } } diff --git a/tests/Fixtures/Contract/confirmation-comments/get.json b/tests/Fixtures/Contract/confirmation-comments/get.json index 6e99529..99fa7cc 100644 --- a/tests/Fixtures/Contract/confirmation-comments/get.json +++ b/tests/Fixtures/Contract/confirmation-comments/get.json @@ -1,15 +1,15 @@ { "confirmation-comment": { - "id": "1516010", - "created": "2026-10-25T14:50:00+01:00", - "comment": "Text 20", + "id": "1516574", + "created": "2026-10-26T16:59:03+01:00", + "comment": "Text 28", "actionkey": "CREATE", "public": "0", "by_client": "0", "user_id": "136536", "email_id": "", "client_id": "", - "confirmation_id": "550206", + "confirmation_id": "550449", "customfield": "" } } diff --git a/tests/Fixtures/Contract/confirmation-comments/list.json b/tests/Fixtures/Contract/confirmation-comments/list.json index a8cfeb5..81530a8 100644 --- a/tests/Fixtures/Contract/confirmation-comments/list.json +++ b/tests/Fixtures/Contract/confirmation-comments/list.json @@ -1,20 +1,35 @@ { "confirmation-comments": { - "confirmation-comment": { - "id": "1516010", - "created": "2026-10-25T14:50:00+01:00", - "comment": "Text 20", - "actionkey": "CREATE", - "public": "0", - "by_client": "0", - "user_id": "136536", - "email_id": "", - "client_id": "", - "confirmation_id": "550206", - "customfield": "" - }, + "confirmation-comment": [ + { + "id": "1516574", + "created": "2026-10-26T16:59:03+01:00", + "comment": "Text 28", + "actionkey": "CREATE", + "public": "0", + "by_client": "0", + "user_id": "136536", + "email_id": "", + "client_id": "", + "confirmation_id": "550449", + "customfield": "" + }, + { + "id": "1516575", + "created": "2026-10-26T16:59:04+01:00", + "comment": "Text 16", + "actionkey": "COMMENT", + "public": "0", + "by_client": "0", + "user_id": "136536", + "email_id": "", + "client_id": "", + "confirmation_id": "550449", + "customfield": "" + } + ], "@page": "1", "@per_page": "3", - "@total": "1" + "@total": "2" } } diff --git a/tests/Fixtures/Contract/confirmation-items/get.json b/tests/Fixtures/Contract/confirmation-items/get.json index 3d0bdce..e089864 100644 --- a/tests/Fixtures/Contract/confirmation-items/get.json +++ b/tests/Fixtures/Contract/confirmation-items/get.json @@ -1,22 +1,22 @@ { "confirmation-item": { - "id": "2235610", + "id": "2236285", "article_id": "", - "confirmation_id": "550206", + "confirmation_id": "550449", "position": "1", - "unit": "Stück", - "quantity": "1", + "unit": "Stunden", + "quantity": "2", "type": "", - "unit_price": "81.39", + "unit_price": "49.9", "tax_name": "USt", "tax_rate": "19", - "title": "Text 19", + "title": "Text 14", "description": "", - "total_net": "68.395", - "total_gross": "81.39", + "total_net": "99.8", + "total_gross": "118.762", "reduction": "", - "total_net_unreduced": "68.395", - "total_gross_unreduced": "81.39", + "total_net_unreduced": "99.8", + "total_gross_unreduced": "118.762", "tax_changed_manually": "0", "customfield": "" } diff --git a/tests/Fixtures/Contract/confirmation-items/list.json b/tests/Fixtures/Contract/confirmation-items/list.json index 971efc2..296dbae 100644 --- a/tests/Fixtures/Contract/confirmation-items/list.json +++ b/tests/Fixtures/Contract/confirmation-items/list.json @@ -1,23 +1,23 @@ { "confirmation-items": { "confirmation-item": { - "id": "2235610", + "id": "2236285", "article_id": "", - "confirmation_id": "550206", + "confirmation_id": "550449", "position": "1", - "unit": "Stück", - "quantity": "1", + "unit": "Stunden", + "quantity": "2", "type": "", - "unit_price": "81.39", + "unit_price": "49.9", "tax_name": "USt", "tax_rate": "19", - "title": "Text 19", + "title": "Text 14", "description": "", - "total_net": "68.395", - "total_gross": "81.39", + "total_net": "99.8", + "total_gross": "118.762", "reduction": "", - "total_net_unreduced": "68.395", - "total_gross_unreduced": "81.39", + "total_net_unreduced": "99.8", + "total_gross_unreduced": "118.762", "tax_changed_manually": "0", "customfield": "" }, diff --git a/tests/Fixtures/Contract/confirmation-tags/list.json b/tests/Fixtures/Contract/confirmation-tags/list.json index 2edb140..f6186cd 100644 --- a/tests/Fixtures/Contract/confirmation-tags/list.json +++ b/tests/Fixtures/Contract/confirmation-tags/list.json @@ -1,7 +1,13 @@ { "confirmation-tags": { + "confirmation-tag": { + "id": "55968", + "name": "Name 3", + "confirmation_id": "550449", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/confirmations/get.json b/tests/Fixtures/Contract/confirmations/get.json index aee075f..25a8bfb 100644 --- a/tests/Fixtures/Contract/confirmations/get.json +++ b/tests/Fixtures/Contract/confirmations/get.json @@ -9,13 +9,13 @@ "number": "", "number_pre": "AB", "number_length": "0", - "title": "Text 16", + "title": "Text 24", "date": "2026-10-25", "address": "Firma 1 GmbH\nMusterstraße 1\n10001 Musterstadt 1", "status": "DRAFT", "label": "", - "intro": "Text 17", - "note": "Text 18", + "intro": "Text 25", + "note": "Text 26", "total_net": "68.39", "total_gross": "81.39", "reduction": "", @@ -27,7 +27,7 @@ "net_gross": "GROSS", "taxes": { "tax": { - "name": "Name 7", + "name": "Name 13", "rate": "19", "amount": "13", "amount_plain": "13", diff --git a/tests/Fixtures/Contract/confirmations/list.json b/tests/Fixtures/Contract/confirmations/list.json index 3f439fb..c704706 100644 --- a/tests/Fixtures/Contract/confirmations/list.json +++ b/tests/Fixtures/Contract/confirmations/list.json @@ -1,52 +1,99 @@ { "confirmations": { - "confirmation": { - "id": "550206", - "created": "2026-10-25T14:50:00+01:00", - "updated": "2026-10-25T14:50:00+01:00", - "client_id": "9340866", - "contact_id": "", - "confirmation_number": "", - "number": "", - "number_pre": "AB", - "number_length": "0", - "title": "Text 16", - "date": "2026-10-25", - "address": "Firma 1 GmbH\nMusterstraße 1\n10001 Musterstadt 1", - "status": "DRAFT", - "label": "", - "intro": "Text 17", - "note": "Text 18", - "total_net": "68.39", - "total_gross": "81.39", - "reduction": "", - "total_reduction": "0", - "total_net_unreduced": "68.4", - "total_gross_unreduced": "81.39", - "currency_code": "EUR", - "quote": "1", - "net_gross": "GROSS", - "taxes": { - "tax": { - "name": "Name 7", - "rate": "19", - "amount": "13", - "amount_plain": "13", - "amount_rounded": "13", - "amount_net": "68.395", - "amount_net_plain": "68.395", - "amount_net_rounded": "68.4", - "amount_gross": "81.39", - "amount_gross_plain": "81.39", - "amount_gross_rounded": "81.39" - } + "confirmation": [ + { + "id": "550206", + "created": "2026-10-25T14:50:00+01:00", + "updated": "2026-10-25T14:50:00+01:00", + "client_id": "9340866", + "contact_id": "", + "confirmation_number": "", + "number": "", + "number_pre": "AB", + "number_length": "0", + "title": "Text 24", + "date": "2026-10-25", + "address": "Firma 1 GmbH\nMusterstraße 1\n10001 Musterstadt 1", + "status": "DRAFT", + "label": "", + "intro": "Text 25", + "note": "Text 26", + "total_net": "68.39", + "total_gross": "81.39", + "reduction": "", + "total_reduction": "0", + "total_net_unreduced": "68.4", + "total_gross_unreduced": "81.39", + "currency_code": "EUR", + "quote": "1", + "net_gross": "GROSS", + "taxes": { + "tax": { + "name": "Name 13", + "rate": "19", + "amount": "13", + "amount_plain": "13", + "amount_rounded": "13", + "amount_net": "68.395", + "amount_net_plain": "68.395", + "amount_net_rounded": "68.4", + "amount_gross": "81.39", + "amount_gross_plain": "81.39", + "amount_gross_rounded": "81.39" + } + }, + "offer_id": "", + "template_id": "971612", + "customfield": "" }, - "offer_id": "", - "template_id": "971612", - "customfield": "" - }, + { + "id": "550449", + "created": "2026-10-26T16:59:03+01:00", + "updated": "2026-10-26T16:59:04+01:00", + "client_id": "10651661", + "contact_id": "", + "confirmation_number": "", + "number": "", + "number_pre": "AB", + "number_length": "0", + "title": "Text 27", + "date": "2026-10-26", + "address": "Firma 9 GmbH\nMusterstraße 9\n10009 Musterstadt 9", + "status": "DRAFT", + "label": "", + "intro": "Text 25", + "note": "Text 26", + "total_net": "99.8", + "total_gross": "118.76", + "reduction": "", + "total_reduction": "0", + "total_net_unreduced": "99.8", + "total_gross_unreduced": "118.76", + "currency_code": "EUR", + "quote": "1", + "net_gross": "NET", + "taxes": { + "tax": { + "name": "Name 13", + "rate": "19", + "amount": "18.96", + "amount_plain": "18.96", + "amount_rounded": "18.96", + "amount_net": "99.8", + "amount_net_plain": "99.8", + "amount_net_rounded": "99.8", + "amount_gross": "118.762", + "amount_gross_plain": "118.762", + "amount_gross_rounded": "118.76" + } + }, + "offer_id": "", + "template_id": "971612", + "customfield": "" + } + ], "@page": "1", "@per_page": "3", - "@total": "1" + "@total": "2" } } diff --git a/tests/Fixtures/Contract/contacts/get.json b/tests/Fixtures/Contract/contacts/get.json new file mode 100644 index 0000000..115dc28 --- /dev/null +++ b/tests/Fixtures/Contract/contacts/get.json @@ -0,0 +1,26 @@ +{ + "contact": { + "id": "159697", + "created": "2026-10-26T16:58:54+01:00", + "updated": "2026-10-26T16:58:54+01:00", + "client_id": "10651661", + "label": "", + "name": "Name 2", + "salutation": "", + "first_name": "Vorname4", + "last_name": "Nachname3", + "street": "Musterstraße 4", + "zip": "10003", + "city": "Musterstadt 4", + "state": "", + "country_code": "DE", + "address": "Firma 4 GmbH\nMusterstraße 4\n10004 Musterstadt 4", + "phone": "", + "fax": "", + "mobile": "", + "email": "kontakt3@example.com", + "www": "", + "locale": "", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/contacts/list.json b/tests/Fixtures/Contract/contacts/list.json index 0cf3b4c..47d63e7 100644 --- a/tests/Fixtures/Contract/contacts/list.json +++ b/tests/Fixtures/Contract/contacts/list.json @@ -1,7 +1,31 @@ { "contacts": { + "contact": { + "id": "159697", + "created": "2026-10-26T16:58:54+01:00", + "updated": "2026-10-26T16:58:54+01:00", + "client_id": "10651661", + "label": "", + "name": "Name 2", + "salutation": "", + "first_name": "Vorname4", + "last_name": "Nachname3", + "street": "Musterstraße 4", + "zip": "10003", + "city": "Musterstadt 4", + "state": "", + "country_code": "DE", + "address": "Firma 4 GmbH\nMusterstraße 4\n10004 Musterstadt 4", + "phone": "", + "fax": "", + "mobile": "", + "email": "kontakt3@example.com", + "www": "", + "locale": "", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/countries/list.json b/tests/Fixtures/Contract/countries/list.json index 034f482..040ef23 100644 --- a/tests/Fixtures/Contract/countries/list.json +++ b/tests/Fixtures/Contract/countries/list.json @@ -2,17 +2,17 @@ "countries": { "country": [ { - "name": "Name 9", + "name": "Name 18", "code": "AF", "id": "1" }, { - "name": "Name 10", + "name": "Name 19", "code": "EG", "id": "2" }, { - "name": "Name 11", + "name": "Name 20", "code": "AL", "id": "3" } diff --git a/tests/Fixtures/Contract/country-taxes/get.json b/tests/Fixtures/Contract/country-taxes/get.json new file mode 100644 index 0000000..0c95f25 --- /dev/null +++ b/tests/Fixtures/Contract/country-taxes/get.json @@ -0,0 +1,9 @@ +{ + "country-tax": { + "id": "13465", + "created": "2026-10-26T16:59:12+01:00", + "updated": "2026-10-26T16:59:12+01:00", + "country_code": "CH", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/country-taxes/list.json b/tests/Fixtures/Contract/country-taxes/list.json index 45db104..4aa3418 100644 --- a/tests/Fixtures/Contract/country-taxes/list.json +++ b/tests/Fixtures/Contract/country-taxes/list.json @@ -1,7 +1,14 @@ { "country-taxes": { + "country-tax": { + "id": "13465", + "created": "2026-10-26T16:59:12+01:00", + "updated": "2026-10-26T16:59:12+01:00", + "country_code": "CH", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/credit-note-comments/get.json b/tests/Fixtures/Contract/credit-note-comments/get.json new file mode 100644 index 0000000..e9016a9 --- /dev/null +++ b/tests/Fixtures/Contract/credit-note-comments/get.json @@ -0,0 +1,15 @@ +{ + "credit-note-comment": { + "id": "4230158", + "created": "2026-10-26T16:59:05+01:00", + "comment": "Text 32", + "actionkey": "CREATE", + "public": "0", + "by_client": "0", + "user_id": "136536", + "email_id": "", + "client_id": "", + "credit_note_id": "1794656", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/credit-note-comments/list.json b/tests/Fixtures/Contract/credit-note-comments/list.json new file mode 100644 index 0000000..58c3dee --- /dev/null +++ b/tests/Fixtures/Contract/credit-note-comments/list.json @@ -0,0 +1,48 @@ +{ + "credit-note-comments": { + "credit-note-comment": [ + { + "id": "4230158", + "created": "2026-10-26T16:59:05+01:00", + "comment": "Text 32", + "actionkey": "CREATE", + "public": "0", + "by_client": "0", + "user_id": "136536", + "email_id": "", + "client_id": "", + "credit_note_id": "1794656", + "customfield": "" + }, + { + "id": "4230159", + "created": "2026-10-26T16:59:05+01:00", + "comment": "Text 16", + "actionkey": "COMMENT", + "public": "0", + "by_client": "0", + "user_id": "136536", + "email_id": "", + "client_id": "", + "credit_note_id": "1794656", + "customfield": "" + }, + { + "id": "4230160", + "created": "2026-10-26T16:59:06+01:00", + "comment": "Text 23", + "actionkey": "STATUS", + "public": "0", + "by_client": "0", + "user_id": "136536", + "email_id": "", + "client_id": "", + "credit_note_id": "1794656", + "customfield": "" + } + ], + "@page": "1", + "@per_page": "3", + "@total": "4" + } +} diff --git a/tests/Fixtures/Contract/credit-note-items/get.json b/tests/Fixtures/Contract/credit-note-items/get.json new file mode 100644 index 0000000..ab8a402 --- /dev/null +++ b/tests/Fixtures/Contract/credit-note-items/get.json @@ -0,0 +1,24 @@ +{ + "credit-note-item": { + "id": "10888477", + "article_id": "", + "credit_note_id": "1794656", + "position": "1", + "unit": "Stunden", + "quantity": "2", + "type": "SERVICE", + "unit_price": "49.9", + "tax_name": "USt", + "tax_rate": "19", + "tax_rate_reverse_charge": "", + "tax_changed_manually": "0", + "title": "Text 14", + "description": "", + "total_net": "99.8", + "total_gross": "118.762", + "reduction": "", + "total_net_unreduced": "99.8", + "total_gross_unreduced": "118.762", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/credit-note-items/list.json b/tests/Fixtures/Contract/credit-note-items/list.json new file mode 100644 index 0000000..81d8afc --- /dev/null +++ b/tests/Fixtures/Contract/credit-note-items/list.json @@ -0,0 +1,29 @@ +{ + "credit-note-items": { + "credit-note-item": { + "id": "10888477", + "article_id": "", + "credit_note_id": "1794656", + "position": "1", + "unit": "Stunden", + "quantity": "2", + "type": "SERVICE", + "unit_price": "49.9", + "tax_name": "USt", + "tax_rate": "19", + "tax_rate_reverse_charge": "", + "tax_changed_manually": "0", + "title": "Text 14", + "description": "", + "total_net": "99.8", + "total_gross": "118.762", + "reduction": "", + "total_net_unreduced": "99.8", + "total_gross_unreduced": "118.762", + "customfield": "" + }, + "@page": "1", + "@per_page": "3", + "@total": "1" + } +} diff --git a/tests/Fixtures/Contract/credit-note-payments/get.json b/tests/Fixtures/Contract/credit-note-payments/get.json new file mode 100644 index 0000000..b8ff9f9 --- /dev/null +++ b/tests/Fixtures/Contract/credit-note-payments/get.json @@ -0,0 +1,20 @@ +{ + "credit-note-payment": { + "id": "415889", + "created": "2026-10-26T16:59:07+01:00", + "credit_note_id": "1794656", + "user_id": "136536", + "date": "2026-10-26", + "amount": "118.76", + "comment": "", + "transaction_purpose": "", + "currency_code": "EUR", + "quote": "1", + "payment_group": "7517192a-2b94-44b1-9c92-30c95a65e1c2", + "finapi_transaction_id": "", + "finapi_transaction_amount": "", + "type": "BANK_TRANSFER", + "document_title": "SDK-Beispiel Gutschrift", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/credit-note-payments/list.json b/tests/Fixtures/Contract/credit-note-payments/list.json index b7a1da9..bfce86b 100644 --- a/tests/Fixtures/Contract/credit-note-payments/list.json +++ b/tests/Fixtures/Contract/credit-note-payments/list.json @@ -1,7 +1,25 @@ { "credit-note-payments": { + "credit-note-payment": { + "id": "415889", + "created": "2026-10-26T16:59:07+01:00", + "credit_note_id": "1794656", + "user_id": "136536", + "date": "2026-10-26", + "amount": "118.76", + "comment": "", + "transaction_purpose": "", + "currency_code": "EUR", + "quote": "1", + "payment_group": "7517192a-2b94-44b1-9c92-30c95a65e1c2", + "finapi_transaction_id": "", + "finapi_transaction_amount": "", + "type": "BANK_TRANSFER", + "document_title": "SDK-Beispiel Gutschrift", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/credit-note-tags/list.json b/tests/Fixtures/Contract/credit-note-tags/list.json new file mode 100644 index 0000000..83938d2 --- /dev/null +++ b/tests/Fixtures/Contract/credit-note-tags/list.json @@ -0,0 +1,13 @@ +{ + "credit-note-tags": { + "credit-note-tag": { + "id": "35092", + "name": "Name 3", + "credit_note_id": "1794656", + "customfield": "" + }, + "@page": "1", + "@per_page": "3", + "@total": "1" + } +} diff --git a/tests/Fixtures/Contract/credit-notes/get.json b/tests/Fixtures/Contract/credit-notes/get.json new file mode 100644 index 0000000..9200586 --- /dev/null +++ b/tests/Fixtures/Contract/credit-notes/get.json @@ -0,0 +1,49 @@ +{ + "credit-note": { + "id": "1794656", + "created": "2026-10-26T16:59:05+01:00", + "updated": "2026-10-26T16:59:07+01:00", + "client_id": "10651661", + "contact_id": "", + "credit_note_number": "GS2", + "number": "2", + "number_pre": "GS", + "number_length": "0", + "title": "Text 29", + "date": "2026-10-26", + "address": "Firma 9 GmbH\nMusterstraße 9\n10009 Musterstadt 9", + "status": "PAID", + "label": "", + "intro": "Text 30", + "note": "Text 31", + "total_net": "99.8", + "total_gross": "118.76", + "reduction": "", + "total_reduction": "0", + "total_net_unreduced": "99.8", + "total_gross_unreduced": "118.76", + "currency_code": "EUR", + "quote": "1", + "net_gross": "NET", + "paid_amount": "118.76", + "open_amount": "0", + "taxes": { + "tax": { + "name": "Name 13", + "rate": "19", + "amount": "18.96", + "amount_plain": "18.96", + "amount_rounded": "18.96", + "amount_net": "99.8", + "amount_net_plain": "99.8", + "amount_net_rounded": "99.8", + "amount_gross": "118.762", + "amount_gross_plain": "118.762", + "amount_gross_rounded": "118.76" + } + }, + "invoice_id": "", + "template_id": "971611", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/credit-notes/list.json b/tests/Fixtures/Contract/credit-notes/list.json index 1ed6f38..61cb63f 100644 --- a/tests/Fixtures/Contract/credit-notes/list.json +++ b/tests/Fixtures/Contract/credit-notes/list.json @@ -1,7 +1,54 @@ { "credit-notes": { + "credit-note": { + "id": "1794656", + "created": "2026-10-26T16:59:05+01:00", + "updated": "2026-10-26T16:59:07+01:00", + "client_id": "10651661", + "contact_id": "", + "credit_note_number": "GS2", + "number": "2", + "number_pre": "GS", + "number_length": "0", + "title": "Text 29", + "date": "2026-10-26", + "address": "Firma 9 GmbH\nMusterstraße 9\n10009 Musterstadt 9", + "status": "PAID", + "label": "", + "intro": "Text 30", + "note": "Text 31", + "total_net": "99.8", + "total_gross": "118.76", + "reduction": "", + "total_reduction": "0", + "total_net_unreduced": "99.8", + "total_gross_unreduced": "118.76", + "currency_code": "EUR", + "quote": "1", + "net_gross": "NET", + "paid_amount": "118.76", + "open_amount": "0", + "taxes": { + "tax": { + "name": "Name 13", + "rate": "19", + "amount": "18.96", + "amount_plain": "18.96", + "amount_rounded": "18.96", + "amount_net": "99.8", + "amount_net_plain": "99.8", + "amount_net_rounded": "99.8", + "amount_gross": "118.762", + "amount_gross_plain": "118.762", + "amount_gross_rounded": "118.76" + } + }, + "invoice_id": "", + "template_id": "971611", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/currencies/list.json b/tests/Fixtures/Contract/currencies/list.json index 23ecdea..e62e73a 100644 --- a/tests/Fixtures/Contract/currencies/list.json +++ b/tests/Fixtures/Contract/currencies/list.json @@ -5,19 +5,19 @@ "id": "1", "code": "EUR", "symbol": "€", - "name": "Name 12" + "name": "Name 21" }, { "id": "2", "code": "USD", "symbol": "$", - "name": "Name 13" + "name": "Name 22" }, { "id": "3", "code": "CHF", "symbol": "CHF", - "name": "Name 14" + "name": "Name 23" } ] } diff --git a/tests/Fixtures/Contract/delivery-note-comments/get.json b/tests/Fixtures/Contract/delivery-note-comments/get.json index 0e454be..7cc13e3 100644 --- a/tests/Fixtures/Contract/delivery-note-comments/get.json +++ b/tests/Fixtures/Contract/delivery-note-comments/get.json @@ -1,15 +1,15 @@ { "delivery-note-comment": { - "id": "1976646", - "created": "2026-10-20T20:37:38+02:00", - "comment": "Text 25", + "id": "1978341", + "created": "2026-10-26T16:59:04+01:00", + "comment": "Text 36", "actionkey": "CREATE", "public": "0", "by_client": "0", "user_id": "136536", "email_id": "", "client_id": "", - "delivery_note_id": "889201", + "delivery_note_id": "890065", "customfield": "" } } diff --git a/tests/Fixtures/Contract/delivery-note-comments/list.json b/tests/Fixtures/Contract/delivery-note-comments/list.json index 710c819..f3a3a1c 100644 --- a/tests/Fixtures/Contract/delivery-note-comments/list.json +++ b/tests/Fixtures/Contract/delivery-note-comments/list.json @@ -1,20 +1,35 @@ { "delivery-note-comments": { - "delivery-note-comment": { - "id": "1976646", - "created": "2026-10-20T20:37:38+02:00", - "comment": "Text 25", - "actionkey": "CREATE", - "public": "0", - "by_client": "0", - "user_id": "136536", - "email_id": "", - "client_id": "", - "delivery_note_id": "889201", - "customfield": "" - }, + "delivery-note-comment": [ + { + "id": "1978341", + "created": "2026-10-26T16:59:04+01:00", + "comment": "Text 36", + "actionkey": "CREATE", + "public": "0", + "by_client": "0", + "user_id": "136536", + "email_id": "", + "client_id": "", + "delivery_note_id": "890065", + "customfield": "" + }, + { + "id": "1978342", + "created": "2026-10-26T16:59:04+01:00", + "comment": "Text 16", + "actionkey": "COMMENT", + "public": "0", + "by_client": "0", + "user_id": "136536", + "email_id": "", + "client_id": "", + "delivery_note_id": "890065", + "customfield": "" + } + ], "@page": "1", "@per_page": "3", - "@total": "1" + "@total": "2" } } diff --git a/tests/Fixtures/Contract/delivery-note-items/get.json b/tests/Fixtures/Contract/delivery-note-items/get.json index a11e0a0..bbe139c 100644 --- a/tests/Fixtures/Contract/delivery-note-items/get.json +++ b/tests/Fixtures/Contract/delivery-note-items/get.json @@ -1,12 +1,12 @@ { "delivery-note-item": { - "id": "3490922", + "id": "3493379", "article_id": "", - "delivery_note_id": "889201", + "delivery_note_id": "890065", "position": "1", - "unit": "Stück", - "quantity": "5", - "title": "Text 24", + "unit": "Stunden", + "quantity": "2", + "title": "Text 14", "description": "", "tax_changed_manually": "0", "customfield": "" diff --git a/tests/Fixtures/Contract/delivery-note-items/list.json b/tests/Fixtures/Contract/delivery-note-items/list.json index 2b9c7a0..ae6d720 100644 --- a/tests/Fixtures/Contract/delivery-note-items/list.json +++ b/tests/Fixtures/Contract/delivery-note-items/list.json @@ -1,13 +1,13 @@ { "delivery-note-items": { "delivery-note-item": { - "id": "3490922", + "id": "3493379", "article_id": "", - "delivery_note_id": "889201", + "delivery_note_id": "890065", "position": "1", - "unit": "Stück", - "quantity": "5", - "title": "Text 24", + "unit": "Stunden", + "quantity": "2", + "title": "Text 14", "description": "", "tax_changed_manually": "0", "customfield": "" diff --git a/tests/Fixtures/Contract/delivery-note-tags/list.json b/tests/Fixtures/Contract/delivery-note-tags/list.json index b7cbb07..c079bf0 100644 --- a/tests/Fixtures/Contract/delivery-note-tags/list.json +++ b/tests/Fixtures/Contract/delivery-note-tags/list.json @@ -1,7 +1,13 @@ { "delivery-note-tags": { + "delivery-note-tag": { + "id": "37965", + "name": "Name 3", + "delivery_note_id": "890065", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/delivery-notes/get.json b/tests/Fixtures/Contract/delivery-notes/get.json index 6d4c2ab..e96a71a 100644 --- a/tests/Fixtures/Contract/delivery-notes/get.json +++ b/tests/Fixtures/Contract/delivery-notes/get.json @@ -9,13 +9,13 @@ "number": "", "number_pre": "LS", "number_length": "0", - "title": "Text 21", + "title": "Text 33", "date": "", "address": "Firma 1 GmbH\nMusterstraße 1\n10001 Musterstadt 1", "status": "DRAFT", "label": "", - "intro": "Text 22", - "note": "Text 23", + "intro": "Text 34", + "note": "Text 35", "offer_id": "", "confirmation_id": "", "invoice_id": "", diff --git a/tests/Fixtures/Contract/delivery-notes/list.json b/tests/Fixtures/Contract/delivery-notes/list.json index 34a2e3b..ed15c82 100644 --- a/tests/Fixtures/Contract/delivery-notes/list.json +++ b/tests/Fixtures/Contract/delivery-notes/list.json @@ -1,30 +1,55 @@ { "delivery-notes": { - "delivery-note": { - "id": "889201", - "created": "2026-10-20T20:37:38+02:00", - "updated": "2026-10-20T20:37:38+02:00", - "client_id": "9340866", - "contact_id": "", - "delivery_note_number": "", - "number": "", - "number_pre": "LS", - "number_length": "0", - "title": "Text 21", - "date": "", - "address": "Firma 1 GmbH\nMusterstraße 1\n10001 Musterstadt 1", - "status": "DRAFT", - "label": "", - "intro": "Text 22", - "note": "Text 23", - "offer_id": "", - "confirmation_id": "", - "invoice_id": "", - "template_id": "971613", - "customfield": "" - }, + "delivery-note": [ + { + "id": "889201", + "created": "2026-10-20T20:37:38+02:00", + "updated": "2026-10-20T20:37:38+02:00", + "client_id": "9340866", + "contact_id": "", + "delivery_note_number": "", + "number": "", + "number_pre": "LS", + "number_length": "0", + "title": "Text 33", + "date": "", + "address": "Firma 1 GmbH\nMusterstraße 1\n10001 Musterstadt 1", + "status": "DRAFT", + "label": "", + "intro": "Text 34", + "note": "Text 35", + "offer_id": "", + "confirmation_id": "", + "invoice_id": "", + "template_id": "971613", + "customfield": "" + }, + { + "id": "890065", + "created": "2026-10-26T16:59:04+01:00", + "updated": "2026-10-26T16:59:05+01:00", + "client_id": "10651661", + "contact_id": "", + "delivery_note_number": "", + "number": "", + "number_pre": "LS", + "number_length": "0", + "title": "Text 33", + "date": "2026-10-26", + "address": "Firma 9 GmbH\nMusterstraße 9\n10009 Musterstadt 9", + "status": "DRAFT", + "label": "", + "intro": "Text 34", + "note": "Text 35", + "offer_id": "", + "confirmation_id": "", + "invoice_id": "", + "template_id": "971613", + "customfield": "" + } + ], "@page": "1", "@per_page": "3", - "@total": "1" + "@total": "2" } } diff --git a/tests/Fixtures/Contract/email-templates/get.json b/tests/Fixtures/Contract/email-templates/get.json index 3981606..560173d 100644 --- a/tests/Fixtures/Contract/email-templates/get.json +++ b/tests/Fixtures/Contract/email-templates/get.json @@ -3,11 +3,11 @@ "id": "768701", "created": "2025-12-24T22:59:58+01:00", "updated": "2025-12-24T22:59:58+01:00", - "name": "Name 8", + "name": "Name 16", "type": "INVOICES", - "subject": "Text 38", - "text": "Text 39", - "bcc": "kontakt3@example.com", + "subject": "Text 53", + "text": "Text 54", + "bcc": "kontakt5@example.com", "is_default": "1" } } diff --git a/tests/Fixtures/Contract/email-templates/list.json b/tests/Fixtures/Contract/email-templates/list.json index 3808c51..aeafa9e 100644 --- a/tests/Fixtures/Contract/email-templates/list.json +++ b/tests/Fixtures/Contract/email-templates/list.json @@ -5,33 +5,33 @@ "id": "768701", "created": "2025-12-24T22:59:58+01:00", "updated": "2025-12-24T22:59:58+01:00", - "name": "Name 8", + "name": "Name 16", "type": "INVOICES", - "subject": "Text 38", - "text": "Text 39", - "bcc": "kontakt3@example.com", + "subject": "Text 53", + "text": "Text 54", + "bcc": "kontakt5@example.com", "is_default": "1" }, { "id": "768702", "created": "2025-12-24T22:59:58+01:00", "updated": "2025-12-24T22:59:58+01:00", - "name": "Name 8", + "name": "Name 16", "type": "OFFERS", - "subject": "Text 40", - "text": "Text 41", - "bcc": "kontakt3@example.com", + "subject": "Text 55", + "text": "Text 56", + "bcc": "kontakt5@example.com", "is_default": "1" }, { "id": "768703", "created": "2025-12-24T22:59:58+01:00", "updated": "2025-12-24T22:59:58+01:00", - "name": "Name 8", + "name": "Name 16", "type": "CONFIRMATIONS", - "subject": "Text 42", - "text": "Text 43", - "bcc": "kontakt3@example.com", + "subject": "Text 57", + "text": "Text 58", + "bcc": "kontakt5@example.com", "is_default": "1" } ], diff --git a/tests/Fixtures/Contract/free-texts/get.json b/tests/Fixtures/Contract/free-texts/get.json index 1ea5c25..9825a29 100644 --- a/tests/Fixtures/Contract/free-texts/get.json +++ b/tests/Fixtures/Contract/free-texts/get.json @@ -4,11 +4,11 @@ "created": "2025-12-24T22:59:58+01:00", "updated": "2025-12-24T22:59:58+01:00", "type": "INVOICE", - "name": "Name 8", + "name": "Name 16", "title": "", "label": "", - "intro": "Text 32", - "note": "Text 33", + "intro": "Text 42", + "note": "Text 43", "is_default": "1" } } diff --git a/tests/Fixtures/Contract/free-texts/list.json b/tests/Fixtures/Contract/free-texts/list.json index 39a0f8f..ce1632e 100644 --- a/tests/Fixtures/Contract/free-texts/list.json +++ b/tests/Fixtures/Contract/free-texts/list.json @@ -6,11 +6,11 @@ "created": "2025-12-24T22:59:58+01:00", "updated": "2025-12-24T22:59:58+01:00", "type": "INVOICE", - "name": "Name 8", + "name": "Name 16", "title": "", "label": "", - "intro": "Text 32", - "note": "Text 33", + "intro": "Text 42", + "note": "Text 43", "is_default": "1" }, { @@ -18,11 +18,11 @@ "created": "2025-12-24T22:59:58+01:00", "updated": "2025-12-24T22:59:58+01:00", "type": "OFFER", - "name": "Name 8", + "name": "Name 16", "title": "", "label": "", - "intro": "Text 34", - "note": "Text 35", + "intro": "Text 19", + "note": "Text 20", "is_default": "1" }, { @@ -30,11 +30,11 @@ "created": "2025-12-24T22:59:58+01:00", "updated": "2025-12-24T22:59:58+01:00", "type": "CREDIT_NOTE", - "name": "Name 8", + "name": "Name 16", "title": "", "label": "", - "intro": "Text 36", - "note": "Text 37", + "intro": "Text 30", + "note": "Text 31", "is_default": "1" } ], diff --git a/tests/Fixtures/Contract/inbox-documents/get.json b/tests/Fixtures/Contract/inbox-documents/get.json new file mode 100644 index 0000000..36f69d7 --- /dev/null +++ b/tests/Fixtures/Contract/inbox-documents/get.json @@ -0,0 +1,17 @@ +{ + "inbox-document": { + "id": "2249574", + "created": "2026-10-26T16:59:11+01:00", + "updated": "2026-10-26T16:59:11+01:00", + "user_id": "136536", + "filename": "dokument-1.pdf", + "mimetype": "application/pdf", + "document_type": "", + "filesize": "125", + "page_count": "0", + "file_url": "https://www.example.com/1", + "metadata": "", + "xrechnung_extractions_id": "", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/inbox-documents/list.json b/tests/Fixtures/Contract/inbox-documents/list.json index d3e6c05..3639d4a 100644 --- a/tests/Fixtures/Contract/inbox-documents/list.json +++ b/tests/Fixtures/Contract/inbox-documents/list.json @@ -1,7 +1,22 @@ { "inbox-documents": { + "inbox-document": { + "id": "2249574", + "created": "2026-10-26T16:59:11+01:00", + "updated": "2026-10-26T16:59:11+01:00", + "user_id": "136536", + "filename": "dokument-1.pdf", + "mimetype": "application/pdf", + "document_type": "", + "filesize": "125", + "page_count": "0", + "file_url": "https://www.example.com/1", + "metadata": "", + "xrechnung_extractions_id": "", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/incoming-categories/get.json b/tests/Fixtures/Contract/incoming-categories/get.json index ed59832..33d836b 100644 --- a/tests/Fixtures/Contract/incoming-categories/get.json +++ b/tests/Fixtures/Contract/incoming-categories/get.json @@ -1,7 +1,7 @@ { "incoming-category": { "id": "accommodation_costs_employee", - "title": "Text 26", - "description": "Text 27" + "title": "Text 47", + "description": "Text 48" } } diff --git a/tests/Fixtures/Contract/incoming-categories/list.json b/tests/Fixtures/Contract/incoming-categories/list.json index 45a5b73..c7f8a89 100644 --- a/tests/Fixtures/Contract/incoming-categories/list.json +++ b/tests/Fixtures/Contract/incoming-categories/list.json @@ -3,18 +3,18 @@ "incoming-category": [ { "id": "accommodation_costs_employee", - "title": "Text 26", - "description": "Text 27" + "title": "Text 47", + "description": "Text 48" }, { "id": "accommodation_costs_owner", - "title": "Text 28", - "description": "Text 29" + "title": "Text 49", + "description": "Text 50" }, { "id": "accounting_costs", - "title": "Text 30", - "description": "Text 31" + "title": "Text 51", + "description": "Text 52" } ], "@page": "1", diff --git a/tests/Fixtures/Contract/incoming-comments/get.json b/tests/Fixtures/Contract/incoming-comments/get.json new file mode 100644 index 0000000..571428a --- /dev/null +++ b/tests/Fixtures/Contract/incoming-comments/get.json @@ -0,0 +1,11 @@ +{ + "incoming-comment": { + "id": "4296848", + "created": "2026-10-26T16:59:09+01:00", + "comment": "Text 45", + "actionkey": "CREATE", + "user_id": "136536", + "incoming_id": "2063418", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/incoming-comments/list.json b/tests/Fixtures/Contract/incoming-comments/list.json new file mode 100644 index 0000000..d9fcb67 --- /dev/null +++ b/tests/Fixtures/Contract/incoming-comments/list.json @@ -0,0 +1,36 @@ +{ + "incoming-comments": { + "incoming-comment": [ + { + "id": "4296848", + "created": "2026-10-26T16:59:09+01:00", + "comment": "Text 45", + "actionkey": "CREATE", + "user_id": "136536", + "incoming_id": "2063418", + "customfield": "" + }, + { + "id": "4296849", + "created": "2026-10-26T16:59:09+01:00", + "comment": "Text 16", + "actionkey": "COMMENT", + "user_id": "136536", + "incoming_id": "2063418", + "customfield": "" + }, + { + "id": "4296850", + "created": "2026-10-26T16:59:09+01:00", + "comment": "Text 46", + "actionkey": "PAYMENT", + "user_id": "136536", + "incoming_id": "2063418", + "customfield": "" + } + ], + "@page": "1", + "@per_page": "3", + "@total": "3" + } +} diff --git a/tests/Fixtures/Contract/incoming-payments/get.json b/tests/Fixtures/Contract/incoming-payments/get.json new file mode 100644 index 0000000..d22d324 --- /dev/null +++ b/tests/Fixtures/Contract/incoming-payments/get.json @@ -0,0 +1,20 @@ +{ + "incoming-payment": { + "id": "1877412", + "created": "2026-10-26T16:59:09+01:00", + "incoming_id": "2063418", + "user_id": "136536", + "date": "2026-10-26", + "amount": "50", + "comment": "", + "transaction_purpose": "", + "currency_code": "EUR", + "quote": "1", + "payment_group": "82a93d07-2c1e-4299-a1dd-a98829878877", + "finapi_transaction_id": "", + "finapi_transaction_amount": "", + "type": "BANK_TRANSFER", + "document_title": "SDK-778", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/incoming-payments/list.json b/tests/Fixtures/Contract/incoming-payments/list.json index 1e4c1d9..e4c17de 100644 --- a/tests/Fixtures/Contract/incoming-payments/list.json +++ b/tests/Fixtures/Contract/incoming-payments/list.json @@ -1,7 +1,25 @@ { "incoming-payments": { + "incoming-payment": { + "id": "1877412", + "created": "2026-10-26T16:59:09+01:00", + "incoming_id": "2063418", + "user_id": "136536", + "date": "2026-10-26", + "amount": "50", + "comment": "", + "transaction_purpose": "", + "currency_code": "EUR", + "quote": "1", + "payment_group": "82a93d07-2c1e-4299-a1dd-a98829878877", + "finapi_transaction_id": "", + "finapi_transaction_amount": "", + "type": "BANK_TRANSFER", + "document_title": "SDK-778", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/incoming-properties/get.json b/tests/Fixtures/Contract/incoming-properties/get.json new file mode 100644 index 0000000..04622ce --- /dev/null +++ b/tests/Fixtures/Contract/incoming-properties/get.json @@ -0,0 +1,10 @@ +{ + "incoming-property": { + "id": "1386", + "name": "Name 15", + "default_value": "", + "is_nvl": "", + "type": "TEXTFIELD", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/incoming-properties/list.json b/tests/Fixtures/Contract/incoming-properties/list.json index 02efe56..21121ec 100644 --- a/tests/Fixtures/Contract/incoming-properties/list.json +++ b/tests/Fixtures/Contract/incoming-properties/list.json @@ -1,7 +1,15 @@ { "incoming-properties": { + "incoming-property": { + "id": "1386", + "name": "Name 15", + "default_value": "", + "is_nvl": "", + "type": "TEXTFIELD", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/incoming-property-values/get.json b/tests/Fixtures/Contract/incoming-property-values/get.json new file mode 100644 index 0000000..ce50b14 --- /dev/null +++ b/tests/Fixtures/Contract/incoming-property-values/get.json @@ -0,0 +1,13 @@ +{ + "incoming-property-value": { + "id": "1879135", + "created": "2026-10-26T16:59:10+01:00", + "updated": "2026-10-26T16:59:10+01:00", + "incoming_id": "2063418", + "incoming_property_id": "1386", + "type": "TEXTFIELD", + "name": "Name 15", + "value": "Text 44", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/incoming-property-values/list.json b/tests/Fixtures/Contract/incoming-property-values/list.json index 3b77182..3530256 100644 --- a/tests/Fixtures/Contract/incoming-property-values/list.json +++ b/tests/Fixtures/Contract/incoming-property-values/list.json @@ -1,7 +1,18 @@ { "incoming-property-values": { + "incoming-property-value": { + "id": "1879135", + "created": "2026-10-26T16:59:10+01:00", + "updated": "2026-10-26T16:59:10+01:00", + "incoming_id": "2063418", + "incoming_property_id": "1386", + "type": "TEXTFIELD", + "name": "Name 15", + "value": "Text 44", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/incoming-tags/list.json b/tests/Fixtures/Contract/incoming-tags/list.json new file mode 100644 index 0000000..698448a --- /dev/null +++ b/tests/Fixtures/Contract/incoming-tags/list.json @@ -0,0 +1,13 @@ +{ + "incoming-tags": { + "incoming-tag": { + "id": "156151", + "name": "Name 3", + "incoming_id": "2063418", + "customfield": "" + }, + "@page": "1", + "@per_page": "3", + "@total": "1" + } +} diff --git a/tests/Fixtures/Contract/incomings/get.json b/tests/Fixtures/Contract/incomings/get.json new file mode 100644 index 0000000..6fe7b48 --- /dev/null +++ b/tests/Fixtures/Contract/incomings/get.json @@ -0,0 +1,40 @@ +{ + "incoming": { + "id": "2063418", + "created": "2026-10-26T16:59:09+01:00", + "updated": "2026-10-26T16:59:10+01:00", + "supplier_id": "392662", + "number": "SDK-778", + "client_number": "", + "date": "2026-10-26", + "due_date": "", + "address": "Firma 7 GmbH\nMusterstraße 7\n10007 Musterstadt 7", + "status": "OPEN", + "label": "", + "note": "", + "total_net": "100", + "total_gross": "119", + "currency_code": "EUR", + "quote": "1", + "paid_amount": "50", + "open_amount": "69", + "expense_account_number": "", + "category": "", + "page_count": "0", + "customfield": "", + "incoming-property-values": { + "incoming-property-value": { + "id": "1879135", + "created": "2026-10-26T16:59:10+01:00", + "updated": "2026-10-26T16:59:10+01:00", + "incoming_id": "2063418", + "incoming_property_id": "1386", + "type": "TEXTFIELD", + "name": "Name 15", + "value": "Text 44", + "customfield": "" + } + }, + "has_attachment": "0" + } +} diff --git a/tests/Fixtures/Contract/incomings/list.json b/tests/Fixtures/Contract/incomings/list.json index c6812eb..35126cc 100644 --- a/tests/Fixtures/Contract/incomings/list.json +++ b/tests/Fixtures/Contract/incomings/list.json @@ -1,7 +1,45 @@ { "incomings": { + "incoming": { + "id": "2063418", + "created": "2026-10-26T16:59:09+01:00", + "updated": "2026-10-26T16:59:10+01:00", + "supplier_id": "392662", + "number": "SDK-778", + "client_number": "", + "date": "2026-10-26", + "due_date": "", + "address": "Firma 7 GmbH\nMusterstraße 7\n10007 Musterstadt 7", + "status": "OPEN", + "label": "", + "note": "", + "total_net": "100", + "total_gross": "119", + "currency_code": "EUR", + "quote": "1", + "paid_amount": "50", + "open_amount": "69", + "expense_account_number": "", + "category": "", + "page_count": "0", + "customfield": "", + "incoming-property-values": { + "incoming-property-value": { + "id": "1879135", + "created": "2026-10-26T16:59:10+01:00", + "updated": "2026-10-26T16:59:10+01:00", + "incoming_id": "2063418", + "incoming_property_id": "1386", + "type": "TEXTFIELD", + "name": "Name 15", + "value": "Text 44", + "customfield": "" + } + }, + "has_attachment": "0" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/invoice-comments/get.json b/tests/Fixtures/Contract/invoice-comments/get.json index 91a59b1..43c3c2c 100644 --- a/tests/Fixtures/Contract/invoice-comments/get.json +++ b/tests/Fixtures/Contract/invoice-comments/get.json @@ -1,15 +1,15 @@ { "invoice-comment": { - "id": "92445240", - "created": "2025-12-31T14:48:32+01:00", - "comment": "Text 13", + "id": "102425323", + "created": "2026-10-26T16:58:57+01:00", + "comment": "Text 15", "actionkey": "CREATE", "public": "0", "by_client": "0", "user_id": "136536", "email_id": "", "client_id": "", - "invoice_id": "22808888", + "invoice_id": "25279655", "customfield": "" } } diff --git a/tests/Fixtures/Contract/invoice-comments/list.json b/tests/Fixtures/Contract/invoice-comments/list.json index 90a03de..964b27d 100644 --- a/tests/Fixtures/Contract/invoice-comments/list.json +++ b/tests/Fixtures/Contract/invoice-comments/list.json @@ -2,47 +2,47 @@ "invoice-comments": { "invoice-comment": [ { - "id": "92445240", - "created": "2025-12-31T14:48:32+01:00", - "comment": "Text 13", + "id": "102425323", + "created": "2026-10-26T16:58:57+01:00", + "comment": "Text 15", "actionkey": "CREATE", "public": "0", "by_client": "0", "user_id": "136536", "email_id": "", "client_id": "", - "invoice_id": "22808888", + "invoice_id": "25279655", "customfield": "" }, { - "id": "92445241", - "created": "2025-12-31T14:48:33+01:00", - "comment": "Text 14", - "actionkey": "STATUS", + "id": "102425324", + "created": "2026-10-26T16:58:58+01:00", + "comment": "Text 16", + "actionkey": "COMMENT", "public": "0", "by_client": "0", "user_id": "136536", "email_id": "", "client_id": "", - "invoice_id": "22808888", + "invoice_id": "25279655", "customfield": "" }, { - "id": "92445411", - "created": "2025-12-31T15:00:33+01:00", - "comment": "Text 15", - "actionkey": "CREATE_INVOICE", + "id": "102425325", + "created": "2026-10-26T16:58:59+01:00", + "comment": "Text 17", + "actionkey": "STATUS", "public": "0", "by_client": "0", "user_id": "136536", "email_id": "", "client_id": "", - "invoice_id": "22808888", + "invoice_id": "25279655", "customfield": "" } ], "@page": "1", "@per_page": "3", - "@total": "4" + "@total": "5" } } diff --git a/tests/Fixtures/Contract/invoice-items/get.json b/tests/Fixtures/Contract/invoice-items/get.json index d1e7246..a91f2ad 100644 --- a/tests/Fixtures/Contract/invoice-items/get.json +++ b/tests/Fixtures/Contract/invoice-items/get.json @@ -1,22 +1,22 @@ { "invoice-item": { - "id": "59565129", + "id": "66053608", "article_id": "", - "invoice_id": "22808888", + "invoice_id": "25279655", "position": "1", - "unit": "", - "quantity": "1", + "unit": "Stunden", + "quantity": "2", "type": "SERVICE", - "unit_price": "40", + "unit_price": "49.9", "tax_name": "USt", "tax_rate": "19", - "title": "Text 11", - "description": "Text 12", - "total_net": "33.6134", - "total_gross": "40", + "title": "Text 14", + "description": "", + "total_net": "99.8", + "total_gross": "118.762", "reduction": "", - "total_net_unreduced": "33.6134", - "total_gross_unreduced": "40", + "total_net_unreduced": "99.8", + "total_gross_unreduced": "118.762", "tax_changed_manually": "0", "customfield": "" } diff --git a/tests/Fixtures/Contract/invoice-items/list.json b/tests/Fixtures/Contract/invoice-items/list.json index fcf38ea..6b91e72 100644 --- a/tests/Fixtures/Contract/invoice-items/list.json +++ b/tests/Fixtures/Contract/invoice-items/list.json @@ -1,23 +1,23 @@ { "invoice-items": { "invoice-item": { - "id": "59565129", + "id": "66053608", "article_id": "", - "invoice_id": "22808888", + "invoice_id": "25279655", "position": "1", - "unit": "", - "quantity": "1", + "unit": "Stunden", + "quantity": "2", "type": "SERVICE", - "unit_price": "40", + "unit_price": "49.9", "tax_name": "USt", "tax_rate": "19", - "title": "Text 11", - "description": "Text 12", - "total_net": "33.6134", - "total_gross": "40", + "title": "Text 14", + "description": "", + "total_net": "99.8", + "total_gross": "118.762", "reduction": "", - "total_net_unreduced": "33.6134", - "total_gross_unreduced": "40", + "total_net_unreduced": "99.8", + "total_gross_unreduced": "118.762", "tax_changed_manually": "0", "customfield": "" }, diff --git a/tests/Fixtures/Contract/invoice-payments/list.json b/tests/Fixtures/Contract/invoice-payments/list.json index 1942e6a..6f4fbbb 100644 --- a/tests/Fixtures/Contract/invoice-payments/list.json +++ b/tests/Fixtures/Contract/invoice-payments/list.json @@ -58,6 +58,6 @@ ], "@page": "1", "@per_page": "3", - "@total": "156" + "@total": "162" } } diff --git a/tests/Fixtures/Contract/invoice-tags/list.json b/tests/Fixtures/Contract/invoice-tags/list.json index e93574d..952001c 100644 --- a/tests/Fixtures/Contract/invoice-tags/list.json +++ b/tests/Fixtures/Contract/invoice-tags/list.json @@ -1,7 +1,13 @@ { "invoice-tags": { + "invoice-tag": { + "id": "3419334", + "name": "Name 3", + "invoice_id": "25279655", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/invoices/get.json b/tests/Fixtures/Contract/invoices/get.json index a662650..da7f7d0 100644 --- a/tests/Fixtures/Contract/invoices/get.json +++ b/tests/Fixtures/Contract/invoices/get.json @@ -9,17 +9,17 @@ "number": "1", "number_pre": "RE3525", "number_length": "5", - "title": "Text 2", + "title": "Text 5", "date": "2025-12-31", "supply_date": "2026-01-16", "supply_date_type": "SUPPLY_DATE", "due_date": "2026-01-01", "due_days": "1", - "address": "Firma 6 GmbH\nMusterstraße 6\n10006 Musterstadt 6", + "address": "Firma 8 GmbH\nMusterstraße 8\n10008 Musterstadt 8", "status": "PAID", "label": "", - "intro": "Text 3", - "note": "Text 4", + "intro": "Text 6", + "note": "Text 7", "total_net": "33.61", "total_gross": "40", "reduction": "", @@ -38,7 +38,7 @@ "payment_types": "", "taxes": { "tax": { - "name": "Name 7", + "name": "Name 13", "rate": "19", "amount": "6.39", "amount_plain": "6.39", diff --git a/tests/Fixtures/Contract/invoices/list.json b/tests/Fixtures/Contract/invoices/list.json index 5bdf446..61384a4 100644 --- a/tests/Fixtures/Contract/invoices/list.json +++ b/tests/Fixtures/Contract/invoices/list.json @@ -11,17 +11,17 @@ "number": "1", "number_pre": "RE3525", "number_length": "5", - "title": "Text 2", + "title": "Text 5", "date": "2025-12-31", "supply_date": "2026-01-16", "supply_date_type": "SUPPLY_DATE", "due_date": "2026-01-01", "due_days": "1", - "address": "Firma 6 GmbH\nMusterstraße 6\n10006 Musterstadt 6", + "address": "Firma 8 GmbH\nMusterstraße 8\n10008 Musterstadt 8", "status": "PAID", "label": "", - "intro": "Text 3", - "note": "Text 4", + "intro": "Text 6", + "note": "Text 7", "total_net": "33.61", "total_gross": "40", "reduction": "", @@ -40,7 +40,7 @@ "payment_types": "", "taxes": { "tax": { - "name": "Name 7", + "name": "Name 13", "rate": "19", "amount": "6.39", "amount_plain": "6.39", @@ -72,17 +72,17 @@ "number": "2", "number_pre": "RE3625", "number_length": "5", - "title": "Text 5", + "title": "Text 8", "date": "2025-12-31", "supply_date": "2026-01-09", "supply_date_type": "SUPPLY_DATE", "due_date": "2026-01-01", "due_days": "1", - "address": "Firma 6 GmbH\nMusterstraße 6\n10006 Musterstadt 6", + "address": "Firma 8 GmbH\nMusterstraße 8\n10008 Musterstadt 8", "status": "PAID", "label": "", - "intro": "Text 6", - "note": "Text 4", + "intro": "Text 9", + "note": "Text 7", "total_net": "42.02", "total_gross": "50", "reduction": "", @@ -101,7 +101,7 @@ "payment_types": "", "taxes": { "tax": { - "name": "Name 7", + "name": "Name 13", "rate": "19", "amount": "7.98", "amount_plain": "7.98", @@ -133,17 +133,17 @@ "number": "3", "number_pre": "RE3525", "number_length": "6", - "title": "Text 7", + "title": "Text 10", "date": "2025-12-31", "supply_date": "", "supply_date_type": "", "due_date": "2025-12-31", "due_days": "0", - "address": "Firma 6 GmbH\nMusterstraße 6\n10006 Musterstadt 6", + "address": "Firma 8 GmbH\nMusterstraße 8\n10008 Musterstadt 8", "status": "PAID", - "label": "Text 8", - "intro": "Text 9", - "note": "Text 10", + "label": "Text 11", + "intro": "Text 12", + "note": "Text 13", "total_net": "-33.61", "total_gross": "-40", "reduction": "", @@ -162,7 +162,7 @@ "payment_types": "", "taxes": { "tax": { - "name": "Name 7", + "name": "Name 13", "rate": "19", "amount": "-6.39", "amount_plain": "-6.39", @@ -187,6 +187,6 @@ ], "@page": "1", "@per_page": "3", - "@total": "780" + "@total": "811" } } diff --git a/tests/Fixtures/Contract/letter-comments/get.json b/tests/Fixtures/Contract/letter-comments/get.json new file mode 100644 index 0000000..52c3d75 --- /dev/null +++ b/tests/Fixtures/Contract/letter-comments/get.json @@ -0,0 +1,15 @@ +{ + "letter-comment": { + "id": "1198593", + "created": "2026-10-26T16:59:07+01:00", + "comment": "Text 40", + "actionkey": "CREATE", + "public": "0", + "by_client": "0", + "user_id": "136536", + "email_id": "", + "client_id": "", + "letter_id": "131474", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/letter-comments/list.json b/tests/Fixtures/Contract/letter-comments/list.json new file mode 100644 index 0000000..2b316c5 --- /dev/null +++ b/tests/Fixtures/Contract/letter-comments/list.json @@ -0,0 +1,35 @@ +{ + "letter-comments": { + "letter-comment": [ + { + "id": "1198593", + "created": "2026-10-26T16:59:07+01:00", + "comment": "Text 40", + "actionkey": "CREATE", + "public": "0", + "by_client": "0", + "user_id": "136536", + "email_id": "", + "client_id": "", + "letter_id": "131474", + "customfield": "" + }, + { + "id": "1198594", + "created": "2026-10-26T16:59:07+01:00", + "comment": "Text 16", + "actionkey": "COMMENT", + "public": "0", + "by_client": "0", + "user_id": "136536", + "email_id": "", + "client_id": "", + "letter_id": "131474", + "customfield": "" + } + ], + "@page": "1", + "@per_page": "3", + "@total": "2" + } +} diff --git a/tests/Fixtures/Contract/letter-tags/list.json b/tests/Fixtures/Contract/letter-tags/list.json new file mode 100644 index 0000000..5020dad --- /dev/null +++ b/tests/Fixtures/Contract/letter-tags/list.json @@ -0,0 +1,13 @@ +{ + "letter-tags": { + "letter-tag": { + "id": "7691", + "name": "Name 3", + "letter_id": "131474", + "customfield": "" + }, + "@page": "1", + "@per_page": "3", + "@total": "1" + } +} diff --git a/tests/Fixtures/Contract/letters/get.json b/tests/Fixtures/Contract/letters/get.json new file mode 100644 index 0000000..366bae8 --- /dev/null +++ b/tests/Fixtures/Contract/letters/get.json @@ -0,0 +1,18 @@ +{ + "letter": { + "id": "131474", + "created": "2026-10-26T16:59:07+01:00", + "updated": "2026-10-26T16:59:08+01:00", + "client_id": "10651661", + "contact_id": "", + "supplier_id": "", + "date": "2026-10-26", + "address": "Firma 9 GmbH\nMusterstraße 9\n10009 Musterstadt 9", + "status": "DRAFT", + "label": "", + "subject": "Text 38", + "intro": "Text 39", + "template_id": "971614", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/letters/list.json b/tests/Fixtures/Contract/letters/list.json index 25c3cf6..f73e7f4 100644 --- a/tests/Fixtures/Contract/letters/list.json +++ b/tests/Fixtures/Contract/letters/list.json @@ -1,7 +1,23 @@ { "letters": { + "letter": { + "id": "131474", + "created": "2026-10-26T16:59:07+01:00", + "updated": "2026-10-26T16:59:08+01:00", + "client_id": "10651661", + "contact_id": "", + "supplier_id": "", + "date": "2026-10-26", + "address": "Firma 9 GmbH\nMusterstraße 9\n10009 Musterstadt 9", + "status": "DRAFT", + "label": "", + "subject": "Text 38", + "intro": "Text 39", + "template_id": "971614", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/offer-comments/get.json b/tests/Fixtures/Contract/offer-comments/get.json new file mode 100644 index 0000000..971ea53 --- /dev/null +++ b/tests/Fixtures/Contract/offer-comments/get.json @@ -0,0 +1,15 @@ +{ + "offer-comment": { + "id": "6058659", + "created": "2026-10-26T16:59:01+01:00", + "comment": "Text 22", + "actionkey": "CREATE", + "public": "0", + "by_client": "0", + "user_id": "136536", + "email_id": "", + "client_id": "", + "offer_id": "1834409", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/offer-comments/list.json b/tests/Fixtures/Contract/offer-comments/list.json new file mode 100644 index 0000000..18d6430 --- /dev/null +++ b/tests/Fixtures/Contract/offer-comments/list.json @@ -0,0 +1,48 @@ +{ + "offer-comments": { + "offer-comment": [ + { + "id": "6058659", + "created": "2026-10-26T16:59:01+01:00", + "comment": "Text 22", + "actionkey": "CREATE", + "public": "0", + "by_client": "0", + "user_id": "136536", + "email_id": "", + "client_id": "", + "offer_id": "1834409", + "customfield": "" + }, + { + "id": "6058660", + "created": "2026-10-26T16:59:02+01:00", + "comment": "Text 16", + "actionkey": "COMMENT", + "public": "0", + "by_client": "0", + "user_id": "136536", + "email_id": "", + "client_id": "", + "offer_id": "1834409", + "customfield": "" + }, + { + "id": "6058661", + "created": "2026-10-26T16:59:02+01:00", + "comment": "Text 23", + "actionkey": "STATUS", + "public": "0", + "by_client": "0", + "user_id": "136536", + "email_id": "", + "client_id": "", + "offer_id": "1834409", + "customfield": "" + } + ], + "@page": "1", + "@per_page": "3", + "@total": "3" + } +} diff --git a/tests/Fixtures/Contract/offer-items/get.json b/tests/Fixtures/Contract/offer-items/get.json new file mode 100644 index 0000000..2991598 --- /dev/null +++ b/tests/Fixtures/Contract/offer-items/get.json @@ -0,0 +1,24 @@ +{ + "offer-item": { + "id": "9306074", + "article_id": "", + "offer_id": "1834409", + "position": "1", + "unit": "Stunden", + "quantity": "2", + "type": "", + "unit_price": "49.9", + "tax_name": "USt", + "tax_rate": "19", + "title": "Text 14", + "description": "", + "total_net": "99.8", + "total_gross": "118.762", + "reduction": "", + "total_net_unreduced": "99.8", + "total_gross_unreduced": "118.762", + "optional": "0", + "tax_changed_manually": "0", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/offer-items/list.json b/tests/Fixtures/Contract/offer-items/list.json new file mode 100644 index 0000000..0dfa3aa --- /dev/null +++ b/tests/Fixtures/Contract/offer-items/list.json @@ -0,0 +1,29 @@ +{ + "offer-items": { + "offer-item": { + "id": "9306074", + "article_id": "", + "offer_id": "1834409", + "position": "1", + "unit": "Stunden", + "quantity": "2", + "type": "", + "unit_price": "49.9", + "tax_name": "USt", + "tax_rate": "19", + "title": "Text 14", + "description": "", + "total_net": "99.8", + "total_gross": "118.762", + "reduction": "", + "total_net_unreduced": "99.8", + "total_gross_unreduced": "118.762", + "optional": "0", + "tax_changed_manually": "0", + "customfield": "" + }, + "@page": "1", + "@per_page": "3", + "@total": "1" + } +} diff --git a/tests/Fixtures/Contract/offer-tags/list.json b/tests/Fixtures/Contract/offer-tags/list.json new file mode 100644 index 0000000..7fec620 --- /dev/null +++ b/tests/Fixtures/Contract/offer-tags/list.json @@ -0,0 +1,13 @@ +{ + "offer-tags": { + "offer-tag": { + "id": "140665", + "name": "Name 3", + "offer_id": "1834409", + "customfield": "" + }, + "@page": "1", + "@per_page": "3", + "@total": "1" + } +} diff --git a/tests/Fixtures/Contract/offers/get.json b/tests/Fixtures/Contract/offers/get.json new file mode 100644 index 0000000..7b2eb1f --- /dev/null +++ b/tests/Fixtures/Contract/offers/get.json @@ -0,0 +1,48 @@ +{ + "offer": { + "id": "1834370", + "created": "2026-10-26T16:23:11+01:00", + "updated": "2026-10-26T16:23:11+01:00", + "client_id": "9340866", + "contact_id": "", + "offer_number": "", + "number": "", + "number_pre": "AN", + "number_length": "6", + "title": "Text 18", + "date": "", + "validity_date": "", + "validity_days": "28", + "address": "Firma 1 GmbH\nMusterstraße 1\n10001 Musterstadt 1", + "status": "DRAFT", + "label": "", + "intro": "Text 19", + "note": "Text 20", + "total_net": "8.4", + "total_gross": "10", + "reduction": "", + "total_reduction": "0", + "total_net_unreduced": "8.4", + "total_gross_unreduced": "10", + "currency_code": "EUR", + "quote": "1", + "net_gross": "GROSS", + "taxes": { + "tax": { + "name": "Name 13", + "rate": "19", + "amount": "1.6", + "amount_plain": "1.6", + "amount_rounded": "1.6", + "amount_net": "8.4034", + "amount_net_plain": "8.4034", + "amount_net_rounded": "8.4", + "amount_gross": "10", + "amount_gross_plain": "10", + "amount_gross_rounded": "10" + } + }, + "template_id": "971609", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/offers/list.json b/tests/Fixtures/Contract/offers/list.json index ffe209c..230d7fe 100644 --- a/tests/Fixtures/Contract/offers/list.json +++ b/tests/Fixtures/Contract/offers/list.json @@ -1,7 +1,101 @@ { "offers": { + "offer": [ + { + "id": "1834370", + "created": "2026-10-26T16:23:11+01:00", + "updated": "2026-10-26T16:23:11+01:00", + "client_id": "9340866", + "contact_id": "", + "offer_number": "", + "number": "", + "number_pre": "AN", + "number_length": "6", + "title": "Text 18", + "date": "", + "validity_date": "", + "validity_days": "28", + "address": "Firma 1 GmbH\nMusterstraße 1\n10001 Musterstadt 1", + "status": "DRAFT", + "label": "", + "intro": "Text 19", + "note": "Text 20", + "total_net": "8.4", + "total_gross": "10", + "reduction": "", + "total_reduction": "0", + "total_net_unreduced": "8.4", + "total_gross_unreduced": "10", + "currency_code": "EUR", + "quote": "1", + "net_gross": "GROSS", + "taxes": { + "tax": { + "name": "Name 13", + "rate": "19", + "amount": "1.6", + "amount_plain": "1.6", + "amount_rounded": "1.6", + "amount_net": "8.4034", + "amount_net_plain": "8.4034", + "amount_net_rounded": "8.4", + "amount_gross": "10", + "amount_gross_plain": "10", + "amount_gross_rounded": "10" + } + }, + "template_id": "971609", + "customfield": "" + }, + { + "id": "1834409", + "created": "2026-10-26T16:59:01+01:00", + "updated": "2026-10-26T16:59:03+01:00", + "client_id": "10651661", + "contact_id": "", + "offer_number": "AN000011", + "number": "11", + "number_pre": "AN", + "number_length": "6", + "title": "Text 21", + "date": "2026-10-26", + "validity_date": "2026-11-25", + "validity_days": "30", + "address": "Firma 9 GmbH\nMusterstraße 9\n10009 Musterstadt 9", + "status": "OPEN", + "label": "", + "intro": "Text 19", + "note": "Text 20", + "total_net": "99.8", + "total_gross": "118.76", + "reduction": "", + "total_reduction": "0", + "total_net_unreduced": "99.8", + "total_gross_unreduced": "118.76", + "currency_code": "EUR", + "quote": "1", + "net_gross": "NET", + "taxes": { + "tax": { + "name": "Name 13", + "rate": "19", + "amount": "18.96", + "amount_plain": "18.96", + "amount_rounded": "18.96", + "amount_net": "99.8", + "amount_net_plain": "99.8", + "amount_net_rounded": "99.8", + "amount_gross": "118.762", + "amount_gross_plain": "118.762", + "amount_gross_rounded": "118.76" + } + }, + "template_id": "971609", + "customfield": "" + } + ], "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "2" } } diff --git a/tests/Fixtures/Contract/recurring-email-receivers/get.json b/tests/Fixtures/Contract/recurring-email-receivers/get.json new file mode 100644 index 0000000..a3c21ea --- /dev/null +++ b/tests/Fixtures/Contract/recurring-email-receivers/get.json @@ -0,0 +1,8 @@ +{ + "recurring-email-receiver": { + "id": "284185", + "recurring_id": "433297", + "type": "To", + "address": "Firma 10 GmbH\nMusterstraße 10\n10010 Musterstadt 10" + } +} diff --git a/tests/Fixtures/Contract/recurring-email-receivers/list.json b/tests/Fixtures/Contract/recurring-email-receivers/list.json new file mode 100644 index 0000000..b25deab --- /dev/null +++ b/tests/Fixtures/Contract/recurring-email-receivers/list.json @@ -0,0 +1,13 @@ +{ + "recurring-email-receivers": { + "recurring-email-receiver": { + "id": "284185", + "recurring_id": "433297", + "type": "To", + "address": "Firma 10 GmbH\nMusterstraße 10\n10010 Musterstadt 10" + }, + "@page": "1", + "@per_page": "3", + "@total": "1" + } +} diff --git a/tests/Fixtures/Contract/recurring-items/get.json b/tests/Fixtures/Contract/recurring-items/get.json new file mode 100644 index 0000000..248d8bc --- /dev/null +++ b/tests/Fixtures/Contract/recurring-items/get.json @@ -0,0 +1,23 @@ +{ + "recurring-item": { + "id": "2563699", + "article_id": "", + "recurring_id": "433297", + "position": "1", + "unit": "Stunden", + "quantity": "2", + "type": "SERVICE", + "unit_price": "49.9", + "tax_name": "USt", + "tax_rate": "19", + "title": "Text 14", + "description": "", + "total_net": "99.8", + "total_gross": "118.762", + "reduction": "", + "total_net_unreduced": "99.8", + "total_gross_unreduced": "118.762", + "tax_changed_manually": "0", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/recurring-items/list.json b/tests/Fixtures/Contract/recurring-items/list.json new file mode 100644 index 0000000..3c7e381 --- /dev/null +++ b/tests/Fixtures/Contract/recurring-items/list.json @@ -0,0 +1,28 @@ +{ + "recurring-items": { + "recurring-item": { + "id": "2563699", + "article_id": "", + "recurring_id": "433297", + "position": "1", + "unit": "Stunden", + "quantity": "2", + "type": "SERVICE", + "unit_price": "49.9", + "tax_name": "USt", + "tax_rate": "19", + "title": "Text 14", + "description": "", + "total_net": "99.8", + "total_gross": "118.762", + "reduction": "", + "total_net_unreduced": "99.8", + "total_gross_unreduced": "118.762", + "tax_changed_manually": "0", + "customfield": "" + }, + "@page": "1", + "@per_page": "3", + "@total": "1" + } +} diff --git a/tests/Fixtures/Contract/recurring-tags/list.json b/tests/Fixtures/Contract/recurring-tags/list.json new file mode 100644 index 0000000..1926655 --- /dev/null +++ b/tests/Fixtures/Contract/recurring-tags/list.json @@ -0,0 +1,13 @@ +{ + "recurring-tags": { + "recurring-tag": { + "id": "20793", + "name": "Name 3", + "recurring_id": "433297", + "customfield": "" + }, + "@page": "1", + "@per_page": "3", + "@total": "1" + } +} diff --git a/tests/Fixtures/Contract/recurrings/get.json b/tests/Fixtures/Contract/recurrings/get.json new file mode 100644 index 0000000..95242ad --- /dev/null +++ b/tests/Fixtures/Contract/recurrings/get.json @@ -0,0 +1,57 @@ +{ + "recurring": { + "id": "433297", + "created": "2026-10-26T16:59:08+01:00", + "updated": "2026-10-26T16:59:08+01:00", + "client_id": "10651661", + "contact_id": "", + "title": "Text 41", + "name": "Name 14", + "supply_date": "", + "supply_date_type": "", + "address": "Firma 9 GmbH\nMusterstraße 9\n10009 Musterstadt 9", + "label": "", + "intro": "Text 42", + "note": "Text 43", + "total_net": "99.8", + "total_gross": "118.76", + "reduction": "", + "total_reduction": "0", + "total_net_unreduced": "99.8", + "total_gross_unreduced": "118.76", + "currency_code": "EUR", + "quote": "1", + "net_gross": "NET", + "discount_rate": "", + "discount_days": "7", + "discount_amount": "0", + "payment_types": "", + "cycle_number": "1", + "cycle": "MONTHLY", + "action": "CREATE", + "hour": "16", + "start_date": "2036-10-26", + "end_date": "", + "last_creation_date": "", + "next_creation_date": "2036-10-26", + "status": "STARTED", + "in_progress": "0", + "iterations": "0", + "counter": "0", + "due_days": "0", + "ultimo": "0", + "email_sender": "", + "email_subject": "", + "email_message": "", + "email_filename": "", + "email_bcc": "", + "letter_color": "0", + "letter_duplex": "1", + "letter_paper_weight": "90", + "offer_id": "", + "confirmation_id": "", + "template_id": "971608", + "email_template_id": "", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/recurrings/list.json b/tests/Fixtures/Contract/recurrings/list.json index 25df266..a94c515 100644 --- a/tests/Fixtures/Contract/recurrings/list.json +++ b/tests/Fixtures/Contract/recurrings/list.json @@ -1,7 +1,62 @@ { "recurrings": { + "recurring": { + "id": "433297", + "created": "2026-10-26T16:59:08+01:00", + "updated": "2026-10-26T16:59:08+01:00", + "client_id": "10651661", + "contact_id": "", + "title": "Text 41", + "name": "Name 14", + "supply_date": "", + "supply_date_type": "", + "address": "Firma 9 GmbH\nMusterstraße 9\n10009 Musterstadt 9", + "label": "", + "intro": "Text 42", + "note": "Text 43", + "total_net": "99.8", + "total_gross": "118.76", + "reduction": "", + "total_reduction": "0", + "total_net_unreduced": "99.8", + "total_gross_unreduced": "118.76", + "currency_code": "EUR", + "quote": "1", + "net_gross": "NET", + "discount_rate": "", + "discount_days": "7", + "discount_amount": "0", + "payment_types": "", + "cycle_number": "1", + "cycle": "MONTHLY", + "action": "CREATE", + "hour": "16", + "start_date": "2036-10-26", + "end_date": "", + "last_creation_date": "", + "next_creation_date": "2036-10-26", + "status": "STARTED", + "in_progress": "0", + "iterations": "0", + "counter": "0", + "due_days": "0", + "ultimo": "0", + "email_sender": "", + "email_subject": "", + "email_message": "", + "email_filename": "", + "email_bcc": "", + "letter_color": "0", + "letter_duplex": "1", + "letter_paper_weight": "90", + "offer_id": "", + "confirmation_id": "", + "template_id": "971608", + "email_template_id": "", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/reminder-items/get.json b/tests/Fixtures/Contract/reminder-items/get.json new file mode 100644 index 0000000..a11d6ad --- /dev/null +++ b/tests/Fixtures/Contract/reminder-items/get.json @@ -0,0 +1,16 @@ +{ + "reminder-item": { + "id": "4287488", + "article_id": "", + "reminder_id": "3375689", + "position": "1", + "unit": "", + "quantity": "1", + "unit_price": "100", + "title": "Text 37", + "description": "", + "total": "100", + "is_charge": "0", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/reminder-items/list.json b/tests/Fixtures/Contract/reminder-items/list.json new file mode 100644 index 0000000..bbe172d --- /dev/null +++ b/tests/Fixtures/Contract/reminder-items/list.json @@ -0,0 +1,21 @@ +{ + "reminder-items": { + "reminder-item": { + "id": "4287488", + "article_id": "", + "reminder_id": "3375689", + "position": "1", + "unit": "", + "quantity": "1", + "unit_price": "100", + "title": "Text 37", + "description": "", + "total": "100", + "is_charge": "0", + "customfield": "" + }, + "@page": "1", + "@per_page": "3", + "@total": "1" + } +} diff --git a/tests/Fixtures/Contract/reminder-tags/list.json b/tests/Fixtures/Contract/reminder-tags/list.json new file mode 100644 index 0000000..95caa42 --- /dev/null +++ b/tests/Fixtures/Contract/reminder-tags/list.json @@ -0,0 +1,13 @@ +{ + "reminder-tags": { + "reminder-tag": { + "id": "29908", + "name": "Name 3", + "reminder_id": "3375689", + "customfield": "" + }, + "@page": "1", + "@per_page": "3", + "@total": "1" + } +} diff --git a/tests/Fixtures/Contract/reminder-texts/get.json b/tests/Fixtures/Contract/reminder-texts/get.json new file mode 100644 index 0000000..ac330e8 --- /dev/null +++ b/tests/Fixtures/Contract/reminder-texts/get.json @@ -0,0 +1,14 @@ +{ + "reminder-text": { + "id": "11622", + "sorting": "1", + "name": "Name 17", + "subject": "Text 59", + "header": "Sicher haben Sie übersehen …", + "footer": "Mit freundlichen Grüßen", + "charge_name": "", + "charge_description": "", + "charge_amount": "", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/reminder-texts/list.json b/tests/Fixtures/Contract/reminder-texts/list.json index 74ea310..e5b1052 100644 --- a/tests/Fixtures/Contract/reminder-texts/list.json +++ b/tests/Fixtures/Contract/reminder-texts/list.json @@ -1,7 +1,19 @@ { "reminder-texts": { + "reminder-text": { + "id": "11622", + "sorting": "1", + "name": "Name 17", + "subject": "Text 59", + "header": "Sicher haben Sie übersehen …", + "footer": "Mit freundlichen Grüßen", + "charge_name": "", + "charge_description": "", + "charge_amount": "", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/reminders/get.json b/tests/Fixtures/Contract/reminders/get.json new file mode 100644 index 0000000..a86889f --- /dev/null +++ b/tests/Fixtures/Contract/reminders/get.json @@ -0,0 +1,29 @@ +{ + "reminder": { + "id": "3375689", + "created": "2026-10-26T16:59:00+01:00", + "updated": "2026-10-26T16:59:01+01:00", + "invoice_id": "25279655", + "client_id": "10651661", + "contact_id": "", + "date": "2026-10-26", + "due_date": "2026-11-02", + "due_days": "7", + "address": "Firma 9 GmbH\nMusterstraße 9\n10009 Musterstadt 9", + "status": "DRAFT", + "label": "", + "subject": "", + "intro": "", + "note": "", + "total_gross": "100", + "currency_code": "EUR", + "paid_amount": "0", + "open_amount": "100", + "reminder_text_id": "", + "reminder_level": "1", + "reminder_level_name": "", + "is_old": "0", + "template_id": "971610", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/reminders/list.json b/tests/Fixtures/Contract/reminders/list.json index 09f7bf4..9804632 100644 --- a/tests/Fixtures/Contract/reminders/list.json +++ b/tests/Fixtures/Contract/reminders/list.json @@ -1,7 +1,34 @@ { "reminders": { + "reminder": { + "id": "3375689", + "created": "2026-10-26T16:59:00+01:00", + "updated": "2026-10-26T16:59:01+01:00", + "invoice_id": "25279655", + "client_id": "10651661", + "contact_id": "", + "date": "2026-10-26", + "due_date": "2026-11-02", + "due_days": "7", + "address": "Firma 9 GmbH\nMusterstraße 9\n10009 Musterstadt 9", + "status": "DRAFT", + "label": "", + "subject": "", + "intro": "", + "note": "", + "total_gross": "100", + "currency_code": "EUR", + "paid_amount": "0", + "open_amount": "100", + "reminder_text_id": "", + "reminder_level": "1", + "reminder_level_name": "", + "is_old": "0", + "template_id": "971610", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/roles/get.json b/tests/Fixtures/Contract/roles/get.json index b960f1e..4cdfa68 100644 --- a/tests/Fixtures/Contract/roles/get.json +++ b/tests/Fixtures/Contract/roles/get.json @@ -3,7 +3,7 @@ "id": "1", "created": "2013-09-27T10:49:44+02:00", "updated": "2013-09-27T10:49:44+02:00", - "name": "Name 15", + "name": "Name 25", "articles": "DELETE", "clients": "DELETE", "suppliers": "DELETE", diff --git a/tests/Fixtures/Contract/roles/list.json b/tests/Fixtures/Contract/roles/list.json index 467b06c..9937c7d 100644 --- a/tests/Fixtures/Contract/roles/list.json +++ b/tests/Fixtures/Contract/roles/list.json @@ -5,7 +5,7 @@ "id": "1", "created": "2013-09-27T10:49:44+02:00", "updated": "2013-09-27T10:49:44+02:00", - "name": "Name 15", + "name": "Name 25", "articles": "DELETE", "clients": "DELETE", "suppliers": "DELETE", @@ -31,7 +31,7 @@ "id": "2", "created": "2013-09-27T10:49:44+02:00", "updated": "2013-09-27T10:49:44+02:00", - "name": "Name 16", + "name": "Name 26", "articles": "DELETE", "clients": "DELETE", "suppliers": "DELETE", @@ -57,7 +57,7 @@ "id": "4", "created": "2013-09-27T10:49:44+02:00", "updated": "2018-01-15T06:11:27+01:00", - "name": "Name 17", + "name": "Name 27", "articles": "READ", "clients": "READ", "suppliers": "READ", diff --git a/tests/Fixtures/Contract/settings/get.json b/tests/Fixtures/Contract/settings/get.json index 44883ae..0be2e2c 100644 --- a/tests/Fixtures/Contract/settings/get.json +++ b/tests/Fixtures/Contract/settings/get.json @@ -1,7 +1,7 @@ { "settings": { "created": "2025-12-24T22:59:57+01:00", - "updated": "2026-10-25T18:56:56+01:00", + "updated": "2026-10-26T16:59:06+01:00", "bgcolor": "999999", "color1": "336600", "color2": "99CC00", @@ -13,57 +13,57 @@ "number_range_mode": "IGNORE_PREFIX", "article_number_pre": "ART", "article_number_length": "0", - "article_number_next": "225", + "article_number_next": "240", "price_group2": "Preisgruppe 2", "price_group3": "Preisgruppe 3", "price_group4": "Preisgruppe 4", "price_group5": "Preisgruppe 5", "client_number_pre": "PAT", "client_number_length": "6", - "client_number_next": "8260", + "client_number_next": "8441", "invoice_number_pre": "RE", "invoice_number_length": "5", - "invoice_number_next": "474", + "invoice_number_next": "495", "invoice_label": "", - "invoice_intro": "Text 32", - "invoice_note": "Text 33", + "invoice_intro": "Text 42", + "invoice_note": "Text 43", "invoice_filename": "", "due_days": "0", "discount_rate": "0", "discount_days": "7", "offer_number_pre": "AN", "offer_number_length": "6", - "offer_number_next": "7", + "offer_number_next": "12", "offer_label": "", - "offer_intro": "Text 34", - "offer_note": "Text 35", + "offer_intro": "Text 19", + "offer_note": "Text 20", "offer_filename": "", "offer_validity_days": "28", "confirmation_number_pre": "AB", "confirmation_number_length": "0", - "confirmation_number_next": "4", + "confirmation_number_next": "9", "confirmation_label": "", - "confirmation_intro": "Text 17", - "confirmation_note": "Text 18", + "confirmation_intro": "Text 25", + "confirmation_note": "Text 26", "confirmation_filename": "", "credit_note_number_pre": "GS", "credit_note_number_length": "0", - "credit_note_number_next": "2", + "credit_note_number_next": "3", "credit_note_label": "", - "credit_note_intro": "Text 36", - "credit_note_note": "Text 37", + "credit_note_intro": "Text 30", + "credit_note_note": "Text 31", "credit_note_filename": "", "delivery_note_number_pre": "LS", "delivery_note_number_length": "0", "delivery_note_number_next": "3", "delivery_note_label": "", - "delivery_note_intro": "Text 22", - "delivery_note_note": "Text 23", + "delivery_note_intro": "Text 34", + "delivery_note_note": "Text 35", "delivery_note_filename": "", "reminder_filename": "", "reminder_due_days": "7", "letter_label": "", - "letter_intro": "Text 48", + "letter_intro": "Text 61", "letter_filename": "", "template_engine": "DEFAULT", "print_version": "0", diff --git a/tests/Fixtures/Contract/supplier-properties/get.json b/tests/Fixtures/Contract/supplier-properties/get.json new file mode 100644 index 0000000..0c3cba6 --- /dev/null +++ b/tests/Fixtures/Contract/supplier-properties/get.json @@ -0,0 +1,10 @@ +{ + "supplier-property": { + "id": "560", + "name": "Name 9", + "default_value": "", + "is_nvl": "", + "type": "TEXTFIELD", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/supplier-properties/list.json b/tests/Fixtures/Contract/supplier-properties/list.json index f773d11..ced1cb8 100644 --- a/tests/Fixtures/Contract/supplier-properties/list.json +++ b/tests/Fixtures/Contract/supplier-properties/list.json @@ -1,7 +1,15 @@ { "supplier-properties": { + "supplier-property": { + "id": "560", + "name": "Name 9", + "default_value": "", + "is_nvl": "", + "type": "TEXTFIELD", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/supplier-property-values/get.json b/tests/Fixtures/Contract/supplier-property-values/get.json new file mode 100644 index 0000000..a3f3a2d --- /dev/null +++ b/tests/Fixtures/Contract/supplier-property-values/get.json @@ -0,0 +1,13 @@ +{ + "supplier-property-value": { + "id": "66191", + "created": "2026-10-26T16:58:56+01:00", + "updated": "2026-10-26T16:58:56+01:00", + "supplier_id": "392662", + "supplier_property_id": "560", + "type": "TEXTFIELD", + "name": "Name 9", + "value": "Text 3", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/supplier-property-values/list.json b/tests/Fixtures/Contract/supplier-property-values/list.json index 5e20c06..a4f51de 100644 --- a/tests/Fixtures/Contract/supplier-property-values/list.json +++ b/tests/Fixtures/Contract/supplier-property-values/list.json @@ -1,7 +1,18 @@ { "supplier-property-values": { + "supplier-property-value": { + "id": "66191", + "created": "2026-10-26T16:58:56+01:00", + "updated": "2026-10-26T16:58:56+01:00", + "supplier_id": "392662", + "supplier_property_id": "560", + "type": "TEXTFIELD", + "name": "Name 9", + "value": "Text 3", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/supplier-tags/list.json b/tests/Fixtures/Contract/supplier-tags/list.json index dc44262..0059803 100644 --- a/tests/Fixtures/Contract/supplier-tags/list.json +++ b/tests/Fixtures/Contract/supplier-tags/list.json @@ -1,7 +1,13 @@ { "supplier-tags": { + "supplier-tag": { + "id": "1157", + "name": "Name 3", + "supplier_id": "392662", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/suppliers/get.json b/tests/Fixtures/Contract/suppliers/get.json index 5719509..1fa0887 100644 --- a/tests/Fixtures/Contract/suppliers/get.json +++ b/tests/Fixtures/Contract/suppliers/get.json @@ -2,8 +2,8 @@ "supplier": { "id": "388763", "created": "2026-06-02T15:37:57+02:00", - "updated": "2026-10-25T17:31:00+01:00", - "name": "Name 3", + "updated": "2026-10-26T16:34:30+01:00", + "name": "Name 6", "salutation": "", "first_name": "", "last_name": "", @@ -13,7 +13,7 @@ "state": "", "country_code": "DE", "is_eu_country": "1", - "address": "Firma 4 GmbH\nMusterstraße 4\n10004 Musterstadt 4", + "address": "Firma 5 GmbH\nMusterstraße 5\n10005 Musterstadt 5", "phone": "", "fax": "", "mobile": "", diff --git a/tests/Fixtures/Contract/suppliers/list.json b/tests/Fixtures/Contract/suppliers/list.json index 47d2cf9..ad3126a 100644 --- a/tests/Fixtures/Contract/suppliers/list.json +++ b/tests/Fixtures/Contract/suppliers/list.json @@ -4,8 +4,8 @@ { "id": "388763", "created": "2026-06-02T15:37:57+02:00", - "updated": "2026-10-25T17:31:00+01:00", - "name": "Name 3", + "updated": "2026-10-26T16:34:30+01:00", + "name": "Name 6", "salutation": "", "first_name": "", "last_name": "", @@ -15,7 +15,7 @@ "state": "", "country_code": "DE", "is_eu_country": "1", - "address": "Firma 4 GmbH\nMusterstraße 4\n10004 Musterstadt 4", + "address": "Firma 5 GmbH\nMusterstraße 5\n10005 Musterstadt 5", "phone": "", "fax": "", "mobile": "", @@ -44,7 +44,7 @@ "id": "392588", "created": "2026-10-25T13:35:56+01:00", "updated": "2026-10-25T13:35:56+01:00", - "name": "Name 4", + "name": "Name 7", "salutation": "", "first_name": "", "last_name": "", @@ -54,7 +54,7 @@ "state": "", "country_code": "DE", "is_eu_country": "1", - "address": "Firma 5 GmbH\nMusterstraße 5\n10005 Musterstadt 5", + "address": "Firma 6 GmbH\nMusterstraße 6\n10006 Musterstadt 6", "phone": "", "fax": "", "mobile": "", @@ -78,10 +78,61 @@ "costs_net": "0", "customfield": "", "supplier-property-values": "" + }, + { + "id": "392662", + "created": "2026-10-26T16:58:55+01:00", + "updated": "2026-10-26T16:58:56+01:00", + "name": "Name 8", + "salutation": "", + "first_name": "", + "last_name": "", + "street": "", + "zip": "", + "city": "", + "state": "", + "country_code": "DE", + "is_eu_country": "1", + "address": "Firma 7 GmbH\nMusterstraße 7\n10007 Musterstadt 7", + "phone": "", + "fax": "", + "mobile": "", + "email": "kontakt4@example.com", + "www": "", + "tax_number": "", + "vat_number": "", + "bank_account_owner": "", + "bank_number": "", + "bank_name": "", + "bank_account_number": "", + "bank_swift": "", + "bank_iban": "", + "currency_code": "EUR", + "locale": "", + "note": "", + "client_number": "", + "creditor_account_number": "", + "creditor_identifier": "", + "costs_gross": "119", + "costs_net": "100", + "customfield": "", + "supplier-property-values": { + "supplier-property-value": { + "id": "66191", + "created": "2026-10-26T16:58:56+01:00", + "updated": "2026-10-26T16:58:56+01:00", + "supplier_id": "392662", + "supplier_property_id": "560", + "type": "TEXTFIELD", + "name": "Name 9", + "value": "Text 3", + "customfield": "" + } + } } ], "@page": "1", "@per_page": "3", - "@total": "2" + "@total": "3" } } diff --git a/tests/Fixtures/Contract/taxes/get.json b/tests/Fixtures/Contract/taxes/get.json index 147ef56..ade1821 100644 --- a/tests/Fixtures/Contract/taxes/get.json +++ b/tests/Fixtures/Contract/taxes/get.json @@ -3,7 +3,7 @@ "id": "271923", "created": "2025-12-24T22:59:58+01:00", "updated": "2025-12-24T22:59:58+01:00", - "name": "Name 7", + "name": "Name 13", "rate": "0", "is_default": "0", "can_delete": "0", diff --git a/tests/Fixtures/Contract/taxes/list.json b/tests/Fixtures/Contract/taxes/list.json index 4f590bd..5d1beb6 100644 --- a/tests/Fixtures/Contract/taxes/list.json +++ b/tests/Fixtures/Contract/taxes/list.json @@ -5,7 +5,7 @@ "id": "271923", "created": "2025-12-24T22:59:58+01:00", "updated": "2025-12-24T22:59:58+01:00", - "name": "Name 7", + "name": "Name 13", "rate": "0", "is_default": "0", "can_delete": "0", @@ -15,7 +15,7 @@ "id": "271924", "created": "2025-12-24T22:59:58+01:00", "updated": "2025-12-24T22:59:58+01:00", - "name": "Name 7", + "name": "Name 13", "rate": "7", "is_default": "0", "can_delete": "1", @@ -25,7 +25,7 @@ "id": "271925", "created": "2025-12-24T22:59:58+01:00", "updated": "2025-12-24T22:59:58+01:00", - "name": "Name 7", + "name": "Name 13", "rate": "19", "is_default": "1", "can_delete": "1", diff --git a/tests/Fixtures/Contract/templates/get.json b/tests/Fixtures/Contract/templates/get.json index 8023f23..456fae4 100644 --- a/tests/Fixtures/Contract/templates/get.json +++ b/tests/Fixtures/Contract/templates/get.json @@ -5,7 +5,7 @@ "updated": "2025-12-29T10:43:03+01:00", "type": "INVOICE", "template_type": "DEFINED", - "name": "Name 8", + "name": "Name 16", "is_background_available": "0", "is_default": "1", "customfield": "" diff --git a/tests/Fixtures/Contract/templates/list.json b/tests/Fixtures/Contract/templates/list.json index b62007b..c545f4b 100644 --- a/tests/Fixtures/Contract/templates/list.json +++ b/tests/Fixtures/Contract/templates/list.json @@ -7,7 +7,7 @@ "updated": "2025-12-29T10:43:03+01:00", "type": "INVOICE", "template_type": "DEFINED", - "name": "Name 8", + "name": "Name 16", "is_background_available": "0", "is_default": "1", "customfield": "" @@ -18,7 +18,7 @@ "updated": "2025-12-29T10:43:03+01:00", "type": "OFFER", "template_type": "DEFINED", - "name": "Name 8", + "name": "Name 16", "is_background_available": "0", "is_default": "1", "customfield": "" @@ -29,7 +29,7 @@ "updated": "2025-12-29T10:43:04+01:00", "type": "REMINDER", "template_type": "DEFINED", - "name": "Name 8", + "name": "Name 16", "is_background_available": "0", "is_default": "1", "customfield": "" diff --git a/tests/Fixtures/Contract/units/get.json b/tests/Fixtures/Contract/units/get.json new file mode 100644 index 0000000..7933e4f --- /dev/null +++ b/tests/Fixtures/Contract/units/get.json @@ -0,0 +1,9 @@ +{ + "unit": { + "id": "78783", + "created": "2026-10-26T16:59:11+01:00", + "updated": "2026-10-26T16:59:11+01:00", + "name": "Name 12", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/units/list.json b/tests/Fixtures/Contract/units/list.json index ab414f9..3864e23 100644 --- a/tests/Fixtures/Contract/units/list.json +++ b/tests/Fixtures/Contract/units/list.json @@ -1,7 +1,14 @@ { "units": { + "unit": { + "id": "78783", + "created": "2026-10-26T16:59:11+01:00", + "updated": "2026-10-26T16:59:11+01:00", + "name": "Name 12", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/user-properties/get.json b/tests/Fixtures/Contract/user-properties/get.json new file mode 100644 index 0000000..4fb6928 --- /dev/null +++ b/tests/Fixtures/Contract/user-properties/get.json @@ -0,0 +1,10 @@ +{ + "user-property": { + "id": "1986", + "name": "Name 24", + "default_value": "", + "is_nvl": "", + "type": "TEXTFIELD", + "customfield": "" + } +} diff --git a/tests/Fixtures/Contract/user-properties/list.json b/tests/Fixtures/Contract/user-properties/list.json index 77d6421..bdc9eda 100644 --- a/tests/Fixtures/Contract/user-properties/list.json +++ b/tests/Fixtures/Contract/user-properties/list.json @@ -1,7 +1,15 @@ { "user-properties": { + "user-property": { + "id": "1986", + "name": "Name 24", + "default_value": "", + "is_nvl": "", + "type": "TEXTFIELD", + "customfield": "" + }, "@page": "1", "@per_page": "3", - "@total": "0" + "@total": "1" } } diff --git a/tests/Fixtures/Contract/users/get.json b/tests/Fixtures/Contract/users/get.json index f5f21cc..a1f8a18 100644 --- a/tests/Fixtures/Contract/users/get.json +++ b/tests/Fixtures/Contract/users/get.json @@ -4,9 +4,9 @@ "created": "2025-12-24T22:59:57+01:00", "updated": "2026-10-25T13:43:59+01:00", "salutation": "MR", - "first_name": "Vorname4", - "last_name": "Nachname3", - "email": "kontakt4@example.com", + "first_name": "Vorname5", + "last_name": "Nachname4", + "email": "kontakt6@example.com", "locale": "de_DE", "timezone": "Europe/Berlin", "is_account_owner": "1", diff --git a/tests/Fixtures/Contract/users/list.json b/tests/Fixtures/Contract/users/list.json index 971551d..1ad50f2 100644 --- a/tests/Fixtures/Contract/users/list.json +++ b/tests/Fixtures/Contract/users/list.json @@ -5,9 +5,9 @@ "created": "2025-12-24T22:59:57+01:00", "updated": "2026-10-25T13:43:59+01:00", "salutation": "MR", - "first_name": "Vorname4", - "last_name": "Nachname3", - "email": "kontakt4@example.com", + "first_name": "Vorname5", + "last_name": "Nachname4", + "email": "kontakt6@example.com", "locale": "de_DE", "timezone": "Europe/Berlin", "is_account_owner": "1", diff --git a/tools/codegen/definitions/articles.php b/tools/codegen/definitions/articles.php index 9278fea..f10ab74 100644 --- a/tools/codegen/definitions/articles.php +++ b/tools/codegen/definitions/articles.php @@ -101,5 +101,13 @@ 'revenue_account_number' => ['type' => 'string', 'readOnly' => true, 'doc' => 'Erlöskonto.'], 'cost_center' => ['type' => 'string', 'readOnly' => true, 'doc' => 'Kostenstelle.'], 'purchase_price_net_gross' => ['enum' => 'NetGross', 'doc' => 'Preisbasis des Einkaufspreises (netto oder brutto).'], + 'article-property-values' => [ + 'type' => 'list', + 'readOnly' => true, + 'list' => ['class' => 'ArticlePropertyValue', 'item' => 'article-property-value'], + 'model' => ['property' => 'propertyValues'], + 'doc' => 'Attributwerte des Artikels.', + 'details' => ['Von Billomat geliefert, aber nicht dokumentiert (leer: "").'], + ], ], ]; diff --git a/tools/codegen/definitions/country-taxes.php b/tools/codegen/definitions/country-taxes.php index 6071b94..39a17a4 100644 --- a/tools/codegen/definitions/country-taxes.php +++ b/tools/codegen/definitions/country-taxes.php @@ -27,6 +27,9 @@ 'fields' => [ 'id' => ['type' => 'int', 'readOnly' => true, 'model' => ['required' => true], 'doc' => 'Interne Billomat-ID des Eintrags.'], + 'created' => ['type' => 'datetime', 'readOnly' => true, 'doc' => 'Zeitpunkt der Erstellung.'], + 'updated' => ['type' => 'datetime', 'readOnly' => true, 'doc' => 'Zeitpunkt der letzten Änderung.'], 'country_code' => ['doc' => 'Ländercode nach ISO 3166 Alpha-2.', 'details' => ['Beispiel: "CH"']], + 'customfield' => ['type' => 'string', 'readOnly' => true, 'doc' => 'Freies Zusatzfeld (siehe Custom-Meta-Attribute).'], ], ]; diff --git a/tools/codegen/definitions/incomings.php b/tools/codegen/definitions/incomings.php index dde2ddc..773b441 100644 --- a/tools/codegen/definitions/incomings.php +++ b/tools/codegen/definitions/incomings.php @@ -90,5 +90,13 @@ 'page_count' => ['type' => 'int', 'readOnly' => true, 'doc' => 'Seitenzahl des Belegdokuments.'], 'has_attachment' => ['type' => 'bool', 'readOnly' => true, 'doc' => 'Ist ein Belegdokument angehängt?'], 'base64file' => ['optionsOnly' => true, 'doc' => 'Base64-codiertes Belegdokument (PDF oder Bild).'], + 'incoming-property-values' => [ + 'type' => 'list', + 'readOnly' => true, + 'list' => ['class' => 'IncomingPropertyValue', 'item' => 'incoming-property-value'], + 'model' => ['property' => 'propertyValues'], + 'doc' => 'Attributwerte der Eingangsrechnung.', + 'details' => ['Von Billomat geliefert, aber nicht dokumentiert (leer: "").'], + ], ], ]; diff --git a/tools/generate-json-examples.php b/tools/generate-json-examples.php index dbb30e3..0cfb721 100644 --- a/tools/generate-json-examples.php +++ b/tools/generate-json-examples.php @@ -227,31 +227,34 @@ function requests(): array */ const PAGES = [ 'clients' => ['clients.create', 'clients/get', 'clients/list'], - 'contacts' => ['contacts.create'], + 'contacts' => ['contacts.create', 'contacts/get', 'contacts/list'], 'suppliers' => ['suppliers.create', 'suppliers/get', 'suppliers/list'], - 'articles' => ['articles.create'], - 'client-tags' => ['client-tags.create'], + 'articles' => ['articles.create', 'articles/get', 'articles/list'], + 'client-tags' => ['client-tags.create', 'client-tags/list'], 'properties' => ['client-properties.create', 'client-properties/get', 'client-properties/list'], 'invoices' => ['invoices.create', 'invoices/get', 'invoices/list'], 'invoice-items' => ['invoice-items.create', 'invoice-items/get', 'invoice-items/list'], 'invoice-payments' => ['invoice-payments.create', 'invoice-payments/get', 'invoice-payments/list'], 'invoice-comments' => ['invoice-comments.create', 'invoice-comments/get', 'invoice-comments/list'], - 'invoice-tags' => ['invoice-tags.create'], - 'offers' => ['offers.create'], + 'invoice-tags' => ['invoice-tags.create', 'invoice-tags/list'], + 'offers' => ['offers.create', 'offers/get', 'offers/list'], 'confirmations' => ['confirmations.create', 'confirmations/get', 'confirmations/list'], - 'credit-notes' => ['credit-notes.create'], + 'credit-notes' => ['credit-notes.create', 'credit-notes/get', 'credit-notes/list'], 'delivery-notes' => ['delivery-notes.create', 'delivery-notes/get', 'delivery-notes/list'], - 'letters' => ['letters.create'], - 'reminders' => ['reminders.create'], - 'recurrings' => ['recurrings.create'], - 'incomings' => ['incomings.create'], - 'inbox-documents' => ['inbox-documents.create'], + 'letters' => ['letters.create', 'letters/get', 'letters/list'], + 'reminders' => ['reminders.create', 'reminders/get', 'reminders/list'], + 'recurrings' => ['recurrings.create', 'recurrings/get', 'recurrings/list'], + 'incomings' => ['incomings.create', 'incomings/get', 'incomings/list'], + 'inbox-documents' => ['inbox-documents.create', 'inbox-documents/get', 'inbox-documents/list'], 'taxes' => ['taxes.create', 'taxes/get', 'taxes/list'], 'templates' => ['templates.create', 'templates/get', 'templates/list'], 'settings' => ['settings.update', 'settings/get'], 'settings-email-templates' => ['email-templates/get', 'email-templates/list'], 'settings-free-texts' => ['free-texts/get', 'free-texts/list'], 'settings-roles' => ['roles/get', 'roles/list'], + 'settings-units' => ['units/get', 'units/list'], + 'settings-reminder-levels' => ['reminder-texts/get', 'reminder-texts/list'], + 'settings-tax-free-countries' => ['country-taxes/get', 'country-taxes/list'], 'users' => ['users/get', 'users/list'], 'incoming-categories' => ['incoming-categories/get', 'incoming-categories/list'], 'countries' => ['countries/list'], diff --git a/tools/record-fixtures.php b/tools/record-fixtures.php index fe1b547..ece6add 100644 --- a/tools/record-fixtures.php +++ b/tools/record-fixtures.php @@ -43,7 +43,7 @@ const FIXTURE_DIR = PROJECT_ROOT.'/tests/Fixtures/Contract'; // Obergrenze pro Lauf; das Sandbox-Limit liegt bei 1000 Requests / 15 Minuten. -const MAX_REQUESTS = 150; +const MAX_REQUESTS = 200; // Einträge pro Listen-Request: klein halten, aber genug für Varianten. const PER_PAGE = 3; @@ -95,6 +95,29 @@ 'settings' => ['key' => 'settings', 'list' => false], ]; +/* + * Sub-Ressourcen werden am frei erfundenen Beispieldatensatz („SDK-Beispiel …“) aufgenommen + * statt am ersten Listeneintrag: Die Sandbox enthält echte Kundendaten, und an die soll nichts + * angehängt werden. `client`/`supplier` steht für die ID des Beispielkunden bzw. -lieferanten. + * Fehlt der Beispieldatensatz, gilt der erste Listeneintrag. + */ +const SEED_CLIENT = 'SDK-Beispiel GmbH'; +const SEED_SUPPLIER = 'SDK-Beispiel Lieferant AG'; +const SEED_PARENTS = [ + 'clients' => ['name' => SEED_CLIENT], + 'suppliers' => ['name' => SEED_SUPPLIER], + 'articles' => ['title' => 'SDK-Beispiel Beratungsstunde'], + 'invoices' => ['client_id' => 'client'], + 'offers' => ['client_id' => 'client'], + 'confirmations' => ['client_id' => 'client'], + 'credit-notes' => ['client_id' => 'client'], + 'delivery-notes' => ['client_id' => 'client'], + 'reminders' => ['client_id' => 'client'], + 'letters' => ['client_id' => 'client'], + 'recurrings' => ['client_id' => 'client'], + 'incomings' => ['supplier_id' => 'supplier'], +]; + /* * Feldnamen → Art des Ersatzwerts. Gilt auf jeder Ebene (auch in Positionen, * Steuerzeilen und Einstellungen); nicht aufgeführte Strings durchlaufen nur @@ -111,6 +134,8 @@ 'bank_name' => 'bank_name', 'bank_iban' => 'iban', 'iban' => 'iban', 'bank_swift' => 'bic', 'bic' => 'bic', 'swift' => 'bic', 'bank_account_number' => 'digits', 'bank_number' => 'digits', 'creditor_identifier' => 'creditor_id', 'sepa_mandate' => 'text', 'tax_number' => 'tax_number', 'vat_number' => 'vat_number', + // Kundennummern tragen in der Sandbox teils Patientennummern (z. B. „PAT…“). + 'client_number' => 'client_number', 'note' => 'text', 'notes' => 'text', 'intro' => 'text', 'description' => 'text', 'comment' => 'text', 'text' => 'text', 'subject' => 'text', 'body' => 'text', 'title' => 'text', 'label' => 'text', 'message' => 'text', 'signature' => 'text', 'customfield' => 'text', 'value' => 'text', 'reference' => 'text', 'filename' => 'filename', 'file_name' => 'filename', @@ -173,6 +198,11 @@ function main(array $argv): void $recorder = new Recorder(new BillomatHttpClient(new Psr18Client(), $config), $cacheDir); $anonymizer = new Anonymizer($billomatId); + $seedIds = [ + 'client' => seedId($recorder, 'clients', 'client', ['name' => SEED_CLIENT]), + 'supplier' => seedId($recorder, 'suppliers', 'supplier', ['name' => SEED_SUPPLIER]), + ]; + foreach (RESOURCES as $resource => $definition) { if (false === ($definition['list'] ?? true)) { $body = $recorder->fetch("/{$resource}"); @@ -203,6 +233,11 @@ function main(array $argv): void } } + if (isset($definition['children'], SEED_PARENTS[$resource])) { + $filter = array_map(static fn (string $value): string => $seedIds[$value] ?? $value, SEED_PARENTS[$resource]); + $id = \in_array(null, $filter, true) ? $id : (seedId($recorder, $resource, $definition['key'], $filter) ?? $id); + } + $parentKey = str_replace('-', '_', $definition['key']).'_id'; foreach ($definition['children'] ?? [] as $child => $childKey) { $childList = $recorder->fetch("/{$child}", [$parentKey => $id, 'per_page' => PER_PAGE]); @@ -224,6 +259,18 @@ function main(array $argv): void echo "Fertig: {$recorder->requests} Requests.\n"; } +/** + * ID des ersten Eintrags, der auf den Filter passt; null, wenn es keinen gibt. + * + * @param array $filter + */ +function seedId(Recorder $recorder, string $resource, string $key, array $filter): ?string +{ + $list = $recorder->fetch("/{$resource}", [...$filter, 'per_page' => 1]); + + return null === $list ? null : firstId($list, $resource, $key); +} + /** * ID des ersten Eintrags einer Liste (`{ "clients": { "client": [...] | {...} } }`). * @@ -442,6 +489,7 @@ private function fake(string $kind, string $original): string 'creditor_id' => \sprintf('DE00ZZZ%011d', $i), 'tax_number' => \sprintf('000/000/%05d', $i), 'vat_number' => \sprintf('DE%09d', $i), + 'client_number' => \sprintf('KD%05d', $i), 'filename' => "dokument-{$n}".(preg_match('/\.[a-z0-9]{2,4}$/i', $original, $m) ? strtolower($m[0]) : ''), 'base64' => base64_encode(FAKE_PDF), default => "Text {$n}", From 651e51209fbd4da3400315a91da5ebb49c0a82fe Mon Sep 17 00:00:00 2001 From: Dimitri Dovgan Date: Mon, 26 Oct 2026 17:12:06 +0100 Subject: [PATCH 2/2] test: declare ListCaster usage where Article and Incoming hydrate property values --- tests/Api/ArticlesApiTest.php | 2 ++ tests/Api/IncomingsApiTest.php | 2 ++ tests/Model/ArticleTest.php | 2 ++ tests/Model/IncomingTest.php | 2 ++ 4 files changed, 8 insertions(+) diff --git a/tests/Api/ArticlesApiTest.php b/tests/Api/ArticlesApiTest.php index 77b70d8..ad3ed9d 100644 --- a/tests/Api/ArticlesApiTest.php +++ b/tests/Api/ArticlesApiTest.php @@ -11,6 +11,7 @@ use Justpilot\Billomat\Config\RetryPolicy; use Justpilot\Billomat\Exception\HttpException; use Justpilot\Billomat\Http\BillomatHttpClient; +use Justpilot\Billomat\Internal\ListCaster; use Justpilot\Billomat\Internal\ScalarCaster; use Justpilot\Billomat\Model\Article; use Justpilot\Billomat\Model\Enum\ItemType; @@ -30,6 +31,7 @@ #[CoversClass(ArticleCreateOptions::class)] #[CoversClass(ArticleUpdateOptions::class)] #[CoversClass(Article::class)] +#[UsesClass(ListCaster::class)] #[UsesClass(BillomatConfig::class)] #[UsesClass(RetryPolicy::class)] #[UsesClass(HttpException::class)] diff --git a/tests/Api/IncomingsApiTest.php b/tests/Api/IncomingsApiTest.php index 35d9b03..ac0a6b0 100644 --- a/tests/Api/IncomingsApiTest.php +++ b/tests/Api/IncomingsApiTest.php @@ -13,6 +13,7 @@ use Justpilot\Billomat\Exception\HttpException; use Justpilot\Billomat\Exception\ValidationException; use Justpilot\Billomat\Http\BillomatHttpClient; +use Justpilot\Billomat\Internal\ListCaster; use Justpilot\Billomat\Internal\ScalarCaster; use Justpilot\Billomat\Model\Enum\IncomingStatus; use Justpilot\Billomat\Model\Incoming; @@ -33,6 +34,7 @@ #[CoversClass(IncomingUpdateOptions::class)] #[CoversClass(Incoming::class)] #[CoversClass(IncomingStatus::class)] +#[UsesClass(ListCaster::class)] #[UsesClass(BillomatConfig::class)] #[UsesClass(RetryPolicy::class)] #[UsesClass(HttpException::class)] diff --git a/tests/Model/ArticleTest.php b/tests/Model/ArticleTest.php index 701fd40..05d82e7 100644 --- a/tests/Model/ArticleTest.php +++ b/tests/Model/ArticleTest.php @@ -5,6 +5,7 @@ namespace Justpilot\Billomat\Tests\Model; use DateTimeImmutable; +use Justpilot\Billomat\Internal\ListCaster; use Justpilot\Billomat\Internal\ScalarCaster; use Justpilot\Billomat\Model\Article; use Justpilot\Billomat\Model\Enum\ItemType; @@ -16,6 +17,7 @@ #[CoversClass(Article::class)] #[UsesClass(ItemType::class)] +#[UsesClass(ListCaster::class)] #[UsesClass(ScalarCaster::class)] #[UsesClass(Money::class)] final class ArticleTest extends TestCase diff --git a/tests/Model/IncomingTest.php b/tests/Model/IncomingTest.php index 3bdedef..fc321b2 100644 --- a/tests/Model/IncomingTest.php +++ b/tests/Model/IncomingTest.php @@ -5,6 +5,7 @@ namespace Justpilot\Billomat\Tests\Model; use DateTimeImmutable; +use Justpilot\Billomat\Internal\ListCaster; use Justpilot\Billomat\Internal\ScalarCaster; use Justpilot\Billomat\Model\Enum\IncomingStatus; use Justpilot\Billomat\Model\Incoming; @@ -15,6 +16,7 @@ use PHPUnit\Framework\TestCase; #[CoversClass(Incoming::class)] +#[UsesClass(ListCaster::class)] #[UsesClass(ScalarCaster::class)] #[UsesClass(IncomingStatus::class)] #[UsesClass(Money::class)]