From cef4977d8a8d908bea5e92532ccaa2295cfada7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20J=C3=B8nsson?= Date: Mon, 22 Jan 2024 08:16:27 +0100 Subject: [PATCH] Feature/nem handel type (#4) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✨ Add nemHandelType to recipient * Fix styling --------- Co-authored-by: SimonJnsson --- src/DTOs/Recipient.php | 5 +++++ src/Enums/NemHandelType.php | 10 ++++++++++ src/Traits/Resources/EndpointResolvable.php | 8 ++++---- src/Traits/Resources/GetSingleable.php | 2 +- 4 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 src/Enums/NemHandelType.php diff --git a/src/DTOs/Recipient.php b/src/DTOs/Recipient.php index bade302..6f874e0 100644 --- a/src/DTOs/Recipient.php +++ b/src/DTOs/Recipient.php @@ -3,6 +3,7 @@ namespace Morningtrain\Economic\DTOs; use Morningtrain\Economic\Abstracts\Resource; +use Morningtrain\Economic\Enums\NemHandelType; use Morningtrain\Economic\Resources\VatZone; class Recipient extends Resource @@ -25,6 +26,8 @@ class Recipient extends Resource public ?Attention $attention = null; + public ?NemHandelType $nemHandelType = null; + public static function new( string $name, VatZone $vatZone, @@ -35,6 +38,7 @@ public static function new( ?string $ean = null, ?string $publicEntryNumber = null, ?Attention $attention = null, + ?NemHandelType $nemHandelType = null, ): static { return new static([ 'name' => $name, @@ -46,6 +50,7 @@ public static function new( 'ean' => $ean, 'publicEntryNumber' => $publicEntryNumber, 'attention' => $attention, + 'nemHandelType' => $nemHandelType, ]); } } diff --git a/src/Enums/NemHandelType.php b/src/Enums/NemHandelType.php new file mode 100644 index 0000000..0cf5d11 --- /dev/null +++ b/src/Enums/NemHandelType.php @@ -0,0 +1,10 @@ +