diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 38389d3..915d2e2 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -12,6 +12,7 @@ '@PHPUnit84Migration:risky' => true, 'ordered_imports' => true, 'phpdoc_line_span' => [ + 'class' => 'single', 'const' => 'single', 'method' => 'single', 'property' => 'single', diff --git a/generator/ComponentClassGenerator.php b/generator/ComponentClassGenerator.php index 7e678f1..2a3b747 100644 --- a/generator/ComponentClassGenerator.php +++ b/generator/ComponentClassGenerator.php @@ -57,9 +57,10 @@ public function resolve(string $name, string $namespace, string $version): strin $type = $this->resolve($parameter->getReference(), 'Data', $version); $typedParameters[$parameterName] = $type; } else { - $type = Helpers::phpType($parameter->type, $parameter->type); + $primaryType = Helpers::primaryType($parameter->type); + $type = Helpers::phpType($parameter->type, $primaryType ?? 'mixed'); - if ('string' === $parameter->type && 'date-time' === $parameter->format) { + if ('string' === $primaryType && 'date-time' === $parameter->format) { $type = Carbon::class; $dateParameters[] = $parameterName; @@ -71,14 +72,15 @@ public function resolve(string $name, string $namespace, string $version): strin $arrayParameters[$parameterName] = $commentType; $commentType = '\\'.$commentType; } else { - $commentType = $parameter->items?->type ?? 'mixed'; + $commentType = $parameter->items ? Helpers::primaryType($parameter->items->type) : null; + $commentType ??= 'mixed'; } $constructor->addComment('@param array<'.$commentType.'> $'.$this->propertyName($parameterName)); } } - $nullable = !\in_array($parameterName, ['Records', 'ValidationMessages'], true) && (($parameter->nullable ?? false) || class_exists($type)); + $nullable = !\in_array($parameterName, ['Records', 'ValidationMessages'], true) && (Helpers::isNullable($parameter) || class_exists($type)); $constructor ->addPromotedParameter($this->propertyName($parameterName)) diff --git a/generator/Generator.php b/generator/Generator.php index 9bfc4d5..51b45b9 100644 --- a/generator/Generator.php +++ b/generator/Generator.php @@ -54,7 +54,6 @@ public static function resolveVersions(): array $versions = []; foreach ($config['sources'] as $source) { if (preg_match('/Version v(\d+\.\d+)/', $source['title'], $versionMatch) - && !str_starts_with($versionMatch[1], '3.') ) { $versions[$versionMatch[1]] = self::$baseUrl.$source['url']; } @@ -135,21 +134,22 @@ className: $namespace.'Request', $responseReference = $operation->responses['200']->content['application/json']->schema ?? null; if ($responseReference instanceof Schema) { - $returnType = $responseReference->type; + $returnType = Helpers::primaryType($responseReference->type); $arrayType = null; - if ('array' === $returnType) { + if ('array' === $returnType && $responseReference->items instanceof Reference) { $arrayType = $this->componentClassGenerator->resolve( $responseReference->items->getReference(), 'Responses', $this->getVersion($version) ); + } elseif ('array' === $returnType && $responseReference->items instanceof Schema) { + $itemType = Helpers::primaryType($responseReference->items->type); + $arrayType = Helpers::phpType($itemType, $itemType ?? 'mixed'); } $classMethod = $requestGenerator->addMethod($method, $uri, $operation, $returnType, arrayType: $arrayType); - } else { - Assert::isInstanceOf($responseReference, Reference::class); - + } elseif ($responseReference instanceof Reference) { $requestSchema = $requestProperties instanceof Reference ? $this->resolveReference($requestProperties->getReference())->properties : []; @@ -179,6 +179,8 @@ className: $namespace.'Request', } $classMethod = $requestGenerator->addMethod($method, $uri, $operation, returnType: $returnType, paginated: $paginatedResponse ?: null); + } else { + $classMethod = $requestGenerator->addMethod($method, $uri, $operation, void: true); } if ($operation->description) { diff --git a/generator/Helpers.php b/generator/Helpers.php index bb317c5..f975504 100644 --- a/generator/Helpers.php +++ b/generator/Helpers.php @@ -48,7 +48,9 @@ public static function resolveParameterType(Schema|Reference $property): string $property = $property->resolve(); } - if ('array' === $property->type) { + $primary = self::primaryType($property->type); + + if ('array' === $primary) { if ($property->items instanceof Reference) { $property = clone $property; @@ -60,7 +62,7 @@ public static function resolveParameterType(Schema|Reference $property): string } else { $type = 'array'; } - } elseif ('object' === $property->type) { + } elseif ('object' === $primary) { $properties = []; foreach ($property->properties as $parameterName => $propertyValue) { $properties[] = \sprintf('%s?: %s', $parameterName, self::resolveParameterType($propertyValue)); @@ -68,7 +70,7 @@ public static function resolveParameterType(Schema|Reference $property): string $type = \sprintf('array{%s}', implode(', ', $properties)); } else { - $type = $property->type.($property->nullable ? '|null' : ''); + $type = ($primary ?? 'mixed').(self::isNullable($property) ? '|null' : ''); } return $type; @@ -97,6 +99,10 @@ public static function makePhpDoc(array $properties, string $format): array public static function phpType(mixed $type, string $default = 'mixed'): string { + if (\is_array($type)) { + $type = self::primaryType($type); + } + return match ($type) { 'integer' => 'int', 'number' => 'float', @@ -104,4 +110,32 @@ public static function phpType(mixed $type, string $default = 'mixed'): string default => $default, }; } + + public static function primaryType(mixed $type): ?string + { + if (\is_array($type)) { + foreach ($type as $candidate) { + if (\is_string($candidate) && 'null' !== $candidate) { + return $candidate; + } + } + + return null; + } + + return \is_string($type) ? $type : null; + } + + public static function isNullable(Schema|Reference $property): bool + { + if ($property instanceof Reference) { + return false; + } + + if (\is_array($property->type) && \in_array('null', $property->type, true)) { + return true; + } + + return (bool) ($property->nullable ?? false); + } } diff --git a/generator/RequestClassGenerator.php b/generator/RequestClassGenerator.php index 8564e22..7b994a6 100644 --- a/generator/RequestClassGenerator.php +++ b/generator/RequestClassGenerator.php @@ -28,7 +28,7 @@ public function __construct( $this->class->setExtends(Request::class); } - public function addMethod(string $httpMethod, string $uri, Operation $operation, ?string $returnType = null, ?PaginateType $paginated = null, ?string $arrayType = null): Method + public function addMethod(string $httpMethod, string $uri, Operation $operation, ?string $returnType = null, ?PaginateType $paginated = null, ?string $arrayType = null, bool $void = false): Method { $action = last(explode('/', ltrim($uri, '/'))); $requestSchema = $operation->requestBody?->content['application/json']?->schema; @@ -44,7 +44,7 @@ public function addMethod(string $httpMethod, string $uri, Operation $operation, continue; } - $parameterType = Helpers::phpType($parameter->schema->type, $parameter->schema->type); + $parameterType = Helpers::phpType($parameter->schema->type, Helpers::primaryType($parameter->schema->type) ?? 'mixed'); $method ->addParameter($parameter->name) @@ -61,7 +61,8 @@ public function addMethod(string $httpMethod, string $uri, Operation $operation, $parameterDoc = "array{\n".implode("\n", Helpers::makePhpDoc($requestProperties, ' %s,'))."\n}"; } else { if ($requestSchema->items instanceof Schema) { - $parameterDoc = "array<{$requestSchema->items->type}>"; + $itemType = Helpers::primaryType($requestSchema->items->type) ?? 'mixed'; + $parameterDoc = "array<{$itemType}>"; } else { $requestProperties = $requestSchema->items->resolve()->properties; @@ -92,6 +93,17 @@ public function addMethod(string $httpMethod, string $uri, Operation $operation, ? ', '.preg_replace('/\'\{\$(.*)\}\'/', '\$$1', var_export($requestParameters, true)) : ''; + if ($void) { + $method->setReturnType('void'); + $method->setBody( + <<getClient()->{$httpMethod}('{$uri}'{$parametersPhp}); + PHP + ); + + return $method; + } + $returnType = Helpers::phpType($returnType, $returnType ?? 'mixed'); if ($paginated && class_exists($returnType)) { @@ -115,6 +127,15 @@ public function addMethod(string $httpMethod, string $uri, Operation $operation, PHP ); + } elseif ('array' === $returnType && $arrayType) { + $method->addComment("\n@return array"); + $method->setBody( + <<buildResponse( + \$this->getClient()->{$httpMethod}('{$uri}'{$parametersPhp}), + ); + PHP + ); } elseif (class_exists($returnType)) { if ($paginated) { $paginateMethod = match ($paginated) { diff --git a/src/Data/V10/BuyOrderDeliveryRead.php b/src/Data/V10/BuyOrderDeliveryRead.php index c84e5db..4a02e01 100644 --- a/src/Data/V10/BuyOrderDeliveryRead.php +++ b/src/Data/V10/BuyOrderDeliveryRead.php @@ -18,7 +18,7 @@ public function __construct( public ?string $remarks, public ?string $description, public ?int $branchId, - public array $rows, + public ?array $rows, public ?string $pickingListNumber, ) { } diff --git a/src/Data/V10/ContactCharacteristic.php b/src/Data/V10/ContactCharacteristic.php index 716683c..342e89d 100644 --- a/src/Data/V10/ContactCharacteristic.php +++ b/src/Data/V10/ContactCharacteristic.php @@ -9,7 +9,7 @@ class ContactCharacteristic public function __construct( public int $contactId, public ?int $debtorId, - public string $contactType, + public ?ContactTypeEnum $contactType, public ?string $relationCharacteristic, ) { } @@ -20,7 +20,7 @@ public static function make(array $data): self return new self( contactId: $data['ContactId'] ?? 0, debtorId: $data['DebtorId'] ?? null, - contactType: $data['ContactType'] ?? '', + contactType: isset($data['ContactType']) ? ContactTypeEnum::make($data['ContactType']) : null, relationCharacteristic: $data['RelationCharacteristic'] ?? null, ); } diff --git a/src/Data/V10/ContactTypeEnum.php b/src/Data/V10/ContactTypeEnum.php new file mode 100644 index 0000000..2a40ec2 --- /dev/null +++ b/src/Data/V10/ContactTypeEnum.php @@ -0,0 +1,19 @@ + $data */ + public static function make(array $data): self + { + return new self( + ); + } +} diff --git a/src/Data/V10/Customer.php b/src/Data/V10/Customer.php index 4a5b5dd..5ad4639 100644 --- a/src/Data/V10/Customer.php +++ b/src/Data/V10/Customer.php @@ -9,7 +9,6 @@ class Customer /** @param array $pricelistIds */ public function __construct( public int $id, - public ?string $loginName, public ?int $relationGroupId, public ?int $relationGroup2Id, public bool $hide, @@ -29,6 +28,7 @@ public function __construct( public ?string $firstName, public ?string $lastName, public ?string $emailAddress, + public ?string $loginName, public ?int $paymentMethodId, public ?array $pricelistIds, public ?string $telephoneNumber, @@ -65,7 +65,6 @@ public static function make(array $data): self { return new self( id: $data['Id'] ?? 0, - loginName: $data['LoginName'] ?? null, relationGroupId: $data['RelationGroupId'] ?? null, relationGroup2Id: $data['RelationGroup2Id'] ?? null, hide: $data['Hide'] ?? false, @@ -85,6 +84,7 @@ public static function make(array $data): self firstName: $data['FirstName'] ?? null, lastName: $data['LastName'] ?? null, emailAddress: $data['EmailAddress'] ?? null, + loginName: $data['LoginName'] ?? null, paymentMethodId: $data['PaymentMethodId'] ?? null, pricelistIds: $data['PricelistIds'] ?? null, telephoneNumber: $data['TelephoneNumber'] ?? null, diff --git a/src/Data/V10/EmailMessage.php b/src/Data/V10/EmailMessage.php index 1ba8033..03260eb 100644 --- a/src/Data/V10/EmailMessage.php +++ b/src/Data/V10/EmailMessage.php @@ -23,7 +23,7 @@ public function __construct( public ?\Carbon\Carbon $isReplyedOn, public ?\Carbon\Carbon $isForwardedOn, public ?EmailMessageStatus $status, - public array $toEmailAddresses, + public ?array $toEmailAddresses, public ?EmailAddress $fromEmailAddress, public ?array $CCEmailAddresses, public ?array $BCCEmailAddresses, diff --git a/src/Data/V10/Int32DecimalKeyValuePair.php b/src/Data/V10/KeyValuePairOfintAnddecimal.php similarity index 92% rename from src/Data/V10/Int32DecimalKeyValuePair.php rename to src/Data/V10/KeyValuePairOfintAnddecimal.php index fee5d5c..83d3a2c 100644 --- a/src/Data/V10/Int32DecimalKeyValuePair.php +++ b/src/Data/V10/KeyValuePairOfintAnddecimal.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Data\V10; -class Int32DecimalKeyValuePair +class KeyValuePairOfintAnddecimal { public function __construct( public int $key, diff --git a/src/Data/V10/Order.php b/src/Data/V10/Order.php index 793c9d3..c5cb26a 100644 --- a/src/Data/V10/Order.php +++ b/src/Data/V10/Order.php @@ -23,7 +23,10 @@ public function __construct( public ?array $payments, public ?DebtorCostCentre $costCentre, public ?CustomerAddress $accountAddress, - public array $orderRows, + public ?array $orderRows, + public ?int $deliveryProvinceId, + public ?int $invoiceProvinceId, + public ?int $accountProvinceId, public ?string $lastClickGclIdValues, public ?string $lastClickUtmValues, public ?CustomerAddress $deliveryAddress, @@ -73,6 +76,9 @@ public static function make(array $data): self costCentre: isset($data['CostCentre']) ? DebtorCostCentre::make($data['CostCentre']) : null, accountAddress: isset($data['AccountAddress']) ? CustomerAddress::make($data['AccountAddress']) : null, orderRows: array_map(static fn (array $item) => OrderRow::make($item), $data['OrderRows'] ?? []), + deliveryProvinceId: $data['DeliveryProvinceId'] ?? null, + invoiceProvinceId: $data['InvoiceProvinceId'] ?? null, + accountProvinceId: $data['AccountProvinceId'] ?? null, lastClickGclIdValues: $data['LastClickGclIdValues'] ?? null, lastClickUtmValues: $data['LastClickUtmValues'] ?? null, deliveryAddress: isset($data['DeliveryAddress']) ? CustomerAddress::make($data['DeliveryAddress']) : null, diff --git a/src/Data/V10/OrderShipment.php b/src/Data/V10/OrderShipment.php index 777bc1a..98782cc 100644 --- a/src/Data/V10/OrderShipment.php +++ b/src/Data/V10/OrderShipment.php @@ -8,7 +8,9 @@ class OrderShipment { public function __construct( public int $id, + public ?int $deliveryId, public ?\Carbon\Carbon $dateTimeAdded, + public ?bool $sendEmail, public int $orderId, public int $shipperId, public ?string $barcode, @@ -21,7 +23,9 @@ public static function make(array $data): self { return new self( id: $data['Id'] ?? 0, + deliveryId: $data['DeliveryId'] ?? null, dateTimeAdded: isset($data['DateTimeAdded']) ? \Carbon\Carbon::parse($data['DateTimeAdded']) : null, + sendEmail: $data['SendEmail'] ?? null, orderId: $data['OrderId'] ?? 0, shipperId: $data['ShipperId'] ?? 0, barcode: $data['Barcode'] ?? null, diff --git a/src/Data/V10/Payment.php b/src/Data/V10/Payment.php index b17b68c..45c9d82 100644 --- a/src/Data/V10/Payment.php +++ b/src/Data/V10/Payment.php @@ -10,7 +10,7 @@ public function __construct( public ?int $orderId, public ?int $invoiceId, public float $amountIncl, - public string $description, + public ?string $description, public int $bookingId, public int $matchingLedgerId, public ?\Carbon\Carbon $dateTime, @@ -25,7 +25,7 @@ public static function make(array $data): self orderId: $data['OrderId'] ?? null, invoiceId: $data['InvoiceId'] ?? null, amountIncl: $data['AmountIncl'] ?? 0.0, - description: $data['Description'] ?? '', + description: $data['Description'] ?? null, bookingId: $data['BookingId'] ?? 0, matchingLedgerId: $data['MatchingLedgerId'] ?? 0, dateTime: isset($data['DateTime']) ? \Carbon\Carbon::parse($data['DateTime']) : null, diff --git a/src/Data/V10/ProductGroupTranslation.php b/src/Data/V10/ProductGroupTranslation.php index db95ceb..5bce85e 100644 --- a/src/Data/V10/ProductGroupTranslation.php +++ b/src/Data/V10/ProductGroupTranslation.php @@ -9,14 +9,15 @@ class ProductGroupTranslation public function __construct( public int $productGroupId, public int $globalisationId, + public ?int $websiteDomainId, public ?string $h1Tag, public ?string $keywords, public ?string $name, public ?string $productGroupInfo, public ?string $value, public ?string $metaDescription, - public ?int $websiteDomainId, public ?string $shortName, + public ?string $USPDescription, public ?string $globalisationCode, ) { } @@ -27,14 +28,15 @@ public static function make(array $data): self return new self( productGroupId: $data['Product_GroupId'] ?? 0, globalisationId: $data['GlobalisationId'] ?? 0, + websiteDomainId: $data['WebsiteDomainId'] ?? null, h1Tag: $data['H1Tag'] ?? null, keywords: $data['Keywords'] ?? null, name: $data['Name'] ?? null, productGroupInfo: $data['ProductGroupInfo'] ?? null, value: $data['Value'] ?? null, metaDescription: $data['MetaDescription'] ?? null, - websiteDomainId: $data['WebsiteDomainId'] ?? null, shortName: $data['ShortName'] ?? null, + USPDescription: $data['USPDescription'] ?? null, globalisationCode: $data['GlobalisationCode'] ?? null, ); } diff --git a/src/Data/V10/ProductSupplier.php b/src/Data/V10/ProductSupplier.php index 195d8d6..f2760f9 100644 --- a/src/Data/V10/ProductSupplier.php +++ b/src/Data/V10/ProductSupplier.php @@ -6,7 +6,7 @@ class ProductSupplier { - /** @param array $creditorBuyPrices */ + /** @param array $creditorBuyPrices */ public function __construct( public int $productId, public ?string $creditorName, @@ -26,7 +26,7 @@ public static function make(array $data): self creditorProductCode: $data['CreditorProductCode'] ?? null, isActive: $data['IsActive'] ?? false, creditorId: $data['CreditorId'] ?? 0, - creditorBuyPrices: array_map(static fn (array $item) => Int32DecimalKeyValuePair::make($item), $data['CreditorBuyPrices'] ?? []), + creditorBuyPrices: array_map(static fn (array $item) => KeyValuePairOfintAnddecimal::make($item), $data['CreditorBuyPrices'] ?? []), ); } } diff --git a/src/Data/V10/ProductV11.php b/src/Data/V10/ProductV11.php index 19da626..93b4b02 100644 --- a/src/Data/V10/ProductV11.php +++ b/src/Data/V10/ProductV11.php @@ -96,6 +96,9 @@ public function __construct( public ?array $tags, public ?int $defaultPickLocation, public ?int $defaultBulkLocation, + public bool $hidePricesOnWebsite, + public bool $showOfferButtonOnWebsite, + public bool $hideStartingPricesOnWebsite, ) { } @@ -183,6 +186,9 @@ public static function make(array $data): self tags: $data['Tags'] ?? null, defaultPickLocation: $data['DefaultPickLocation'] ?? null, defaultBulkLocation: $data['DefaultBulkLocation'] ?? null, + hidePricesOnWebsite: $data['HidePricesOnWebsite'] ?? false, + showOfferButtonOnWebsite: $data['ShowOfferButtonOnWebsite'] ?? false, + hideStartingPricesOnWebsite: $data['HideStartingPricesOnWebsite'] ?? false, ); } } diff --git a/src/Data/V10/SalesOrderDelivery.php b/src/Data/V10/SalesOrderDelivery.php index 47f25c1..0f1fdac 100644 --- a/src/Data/V10/SalesOrderDelivery.php +++ b/src/Data/V10/SalesOrderDelivery.php @@ -8,6 +8,7 @@ class SalesOrderDelivery { /** @param array $details */ public function __construct( + public int $deliveryId, public ?int $orderId, public int $orderStatusId, public ?\Carbon\Carbon $deliveryDate, @@ -23,6 +24,7 @@ public function __construct( public static function make(array $data): self { return new self( + deliveryId: $data['DeliveryId'] ?? 0, orderId: $data['OrderId'] ?? null, orderStatusId: $data['OrderStatusId'] ?? 0, deliveryDate: isset($data['DeliveryDate']) ? \Carbon\Carbon::parse($data['DeliveryDate']) : null, diff --git a/src/Data/V10/ProductV11WebshopUserProduct.php b/src/Data/V10/WebshopUserProductOfProductV11.php similarity index 97% rename from src/Data/V10/ProductV11WebshopUserProduct.php rename to src/Data/V10/WebshopUserProductOfProductV11.php index 547a5c4..176ae67 100644 --- a/src/Data/V10/ProductV11WebshopUserProduct.php +++ b/src/Data/V10/WebshopUserProductOfProductV11.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Data\V10; -class ProductV11WebshopUserProduct +class WebshopUserProductOfProductV11 { public function __construct( public int $id, diff --git a/src/Data/V10/WebshopVisitorBehaviour.php b/src/Data/V10/WebshopVisitorBehaviour.php index 476173f..3e8316d 100644 --- a/src/Data/V10/WebshopVisitorBehaviour.php +++ b/src/Data/V10/WebshopVisitorBehaviour.php @@ -14,7 +14,7 @@ public function __construct( public ?int $composedProductParentId, public ?float $qtyDec, public ?string $commission, - public string $webshopUserProductListType, + public ?WebsiteProductListType $webshopUserProductListType, public ?int $debtorId, public ?int $websiteDomainId, ) { @@ -31,7 +31,7 @@ public static function make(array $data): self composedProductParentId: $data['ComposedProductParentId'] ?? null, qtyDec: $data['QtyDec'] ?? null, commission: $data['Commission'] ?? null, - webshopUserProductListType: $data['WebshopUserProductListType'] ?? '', + webshopUserProductListType: isset($data['WebshopUserProductListType']) ? WebsiteProductListType::make($data['WebshopUserProductListType']) : null, debtorId: $data['DebtorId'] ?? null, websiteDomainId: $data['WebsiteDomainId'] ?? null, ); diff --git a/src/Data/V10/WebsiteProductListType.php b/src/Data/V10/WebsiteProductListType.php new file mode 100644 index 0000000..f7531a7 --- /dev/null +++ b/src/Data/V10/WebsiteProductListType.php @@ -0,0 +1,19 @@ + $data */ + public static function make(array $data): self + { + return new self( + ); + } +} diff --git a/src/Data/V11/Customer.php b/src/Data/V11/Customer.php index 27e2be4..bce29b6 100644 --- a/src/Data/V11/Customer.php +++ b/src/Data/V11/Customer.php @@ -9,7 +9,6 @@ class Customer /** @param array $pricelistIds */ public function __construct( public int $id, - public ?string $loginName, public ?int $relationGroupId, public ?int $relationGroup2Id, public bool $hide, @@ -29,6 +28,7 @@ public function __construct( public ?string $firstName, public ?string $lastName, public ?string $emailAddress, + public ?string $loginName, public ?int $paymentMethodId, public ?array $pricelistIds, public ?string $telephoneNumber, @@ -65,7 +65,6 @@ public static function make(array $data): self { return new self( id: $data['Id'] ?? 0, - loginName: $data['LoginName'] ?? null, relationGroupId: $data['RelationGroupId'] ?? null, relationGroup2Id: $data['RelationGroup2Id'] ?? null, hide: $data['Hide'] ?? false, @@ -85,6 +84,7 @@ public static function make(array $data): self firstName: $data['FirstName'] ?? null, lastName: $data['LastName'] ?? null, emailAddress: $data['EmailAddress'] ?? null, + loginName: $data['LoginName'] ?? null, paymentMethodId: $data['PaymentMethodId'] ?? null, pricelistIds: $data['PricelistIds'] ?? null, telephoneNumber: $data['TelephoneNumber'] ?? null, diff --git a/src/Data/V11/Int32DecimalKeyValuePair.php b/src/Data/V11/KeyValuePairOfintAnddecimal.php similarity index 92% rename from src/Data/V11/Int32DecimalKeyValuePair.php rename to src/Data/V11/KeyValuePairOfintAnddecimal.php index 8b2e060..e15ce17 100644 --- a/src/Data/V11/Int32DecimalKeyValuePair.php +++ b/src/Data/V11/KeyValuePairOfintAnddecimal.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Data\V11; -class Int32DecimalKeyValuePair +class KeyValuePairOfintAnddecimal { public function __construct( public int $key, diff --git a/src/Data/V11/Order.php b/src/Data/V11/Order.php index 5d23cec..837c8aa 100644 --- a/src/Data/V11/Order.php +++ b/src/Data/V11/Order.php @@ -23,7 +23,10 @@ public function __construct( public ?array $payments, public ?DebtorCostCentre $costCentre, public ?CustomerAddress $accountAddress, - public array $orderRows, + public ?array $orderRows, + public ?int $deliveryProvinceId, + public ?int $invoiceProvinceId, + public ?int $accountProvinceId, public ?string $lastClickGclIdValues, public ?string $lastClickUtmValues, public ?CustomerAddress $deliveryAddress, @@ -73,6 +76,9 @@ public static function make(array $data): self costCentre: isset($data['CostCentre']) ? DebtorCostCentre::make($data['CostCentre']) : null, accountAddress: isset($data['AccountAddress']) ? CustomerAddress::make($data['AccountAddress']) : null, orderRows: array_map(static fn (array $item) => OrderRow::make($item), $data['OrderRows'] ?? []), + deliveryProvinceId: $data['DeliveryProvinceId'] ?? null, + invoiceProvinceId: $data['InvoiceProvinceId'] ?? null, + accountProvinceId: $data['AccountProvinceId'] ?? null, lastClickGclIdValues: $data['LastClickGclIdValues'] ?? null, lastClickUtmValues: $data['LastClickUtmValues'] ?? null, deliveryAddress: isset($data['DeliveryAddress']) ? CustomerAddress::make($data['DeliveryAddress']) : null, diff --git a/src/Data/V11/OrderShipment.php b/src/Data/V11/OrderShipment.php index cb95c5f..52e0fd8 100644 --- a/src/Data/V11/OrderShipment.php +++ b/src/Data/V11/OrderShipment.php @@ -8,7 +8,9 @@ class OrderShipment { public function __construct( public int $id, + public ?int $deliveryId, public ?\Carbon\Carbon $dateTimeAdded, + public ?bool $sendEmail, public int $orderId, public int $shipperId, public ?string $barcode, @@ -21,7 +23,9 @@ public static function make(array $data): self { return new self( id: $data['Id'] ?? 0, + deliveryId: $data['DeliveryId'] ?? null, dateTimeAdded: isset($data['DateTimeAdded']) ? \Carbon\Carbon::parse($data['DateTimeAdded']) : null, + sendEmail: $data['SendEmail'] ?? null, orderId: $data['OrderId'] ?? 0, shipperId: $data['ShipperId'] ?? 0, barcode: $data['Barcode'] ?? null, diff --git a/src/Data/V11/Payment.php b/src/Data/V11/Payment.php index 660f997..1d165b9 100644 --- a/src/Data/V11/Payment.php +++ b/src/Data/V11/Payment.php @@ -10,7 +10,7 @@ public function __construct( public ?int $orderId, public ?int $invoiceId, public float $amountIncl, - public string $description, + public ?string $description, public int $bookingId, public int $matchingLedgerId, public ?\Carbon\Carbon $dateTime, @@ -25,7 +25,7 @@ public static function make(array $data): self orderId: $data['OrderId'] ?? null, invoiceId: $data['InvoiceId'] ?? null, amountIncl: $data['AmountIncl'] ?? 0.0, - description: $data['Description'] ?? '', + description: $data['Description'] ?? null, bookingId: $data['BookingId'] ?? 0, matchingLedgerId: $data['MatchingLedgerId'] ?? 0, dateTime: isset($data['DateTime']) ? \Carbon\Carbon::parse($data['DateTime']) : null, diff --git a/src/Data/V11/ProductGroupTranslation.php b/src/Data/V11/ProductGroupTranslation.php index 52ef651..79afe26 100644 --- a/src/Data/V11/ProductGroupTranslation.php +++ b/src/Data/V11/ProductGroupTranslation.php @@ -9,14 +9,15 @@ class ProductGroupTranslation public function __construct( public int $productGroupId, public int $globalisationId, + public ?int $websiteDomainId, public ?string $h1Tag, public ?string $keywords, public ?string $name, public ?string $productGroupInfo, public ?string $value, public ?string $metaDescription, - public ?int $websiteDomainId, public ?string $shortName, + public ?string $USPDescription, public ?string $globalisationCode, ) { } @@ -27,14 +28,15 @@ public static function make(array $data): self return new self( productGroupId: $data['Product_GroupId'] ?? 0, globalisationId: $data['GlobalisationId'] ?? 0, + websiteDomainId: $data['WebsiteDomainId'] ?? null, h1Tag: $data['H1Tag'] ?? null, keywords: $data['Keywords'] ?? null, name: $data['Name'] ?? null, productGroupInfo: $data['ProductGroupInfo'] ?? null, value: $data['Value'] ?? null, metaDescription: $data['MetaDescription'] ?? null, - websiteDomainId: $data['WebsiteDomainId'] ?? null, shortName: $data['ShortName'] ?? null, + USPDescription: $data['USPDescription'] ?? null, globalisationCode: $data['GlobalisationCode'] ?? null, ); } diff --git a/src/Data/V11/ProductSupplier.php b/src/Data/V11/ProductSupplier.php index 1a67b5f..31c739b 100644 --- a/src/Data/V11/ProductSupplier.php +++ b/src/Data/V11/ProductSupplier.php @@ -6,7 +6,7 @@ class ProductSupplier { - /** @param array $creditorBuyPrices */ + /** @param array $creditorBuyPrices */ public function __construct( public int $productId, public ?string $creditorName, @@ -26,7 +26,7 @@ public static function make(array $data): self creditorProductCode: $data['CreditorProductCode'] ?? null, isActive: $data['IsActive'] ?? false, creditorId: $data['CreditorId'] ?? 0, - creditorBuyPrices: array_map(static fn (array $item) => Int32DecimalKeyValuePair::make($item), $data['CreditorBuyPrices'] ?? []), + creditorBuyPrices: array_map(static fn (array $item) => KeyValuePairOfintAnddecimal::make($item), $data['CreditorBuyPrices'] ?? []), ); } } diff --git a/src/Data/V11/ProductV11.php b/src/Data/V11/ProductV11.php index b6d375c..7c3875f 100644 --- a/src/Data/V11/ProductV11.php +++ b/src/Data/V11/ProductV11.php @@ -96,6 +96,9 @@ public function __construct( public ?array $tags, public ?int $defaultPickLocation, public ?int $defaultBulkLocation, + public bool $hidePricesOnWebsite, + public bool $showOfferButtonOnWebsite, + public bool $hideStartingPricesOnWebsite, ) { } @@ -183,6 +186,9 @@ public static function make(array $data): self tags: $data['Tags'] ?? null, defaultPickLocation: $data['DefaultPickLocation'] ?? null, defaultBulkLocation: $data['DefaultBulkLocation'] ?? null, + hidePricesOnWebsite: $data['HidePricesOnWebsite'] ?? false, + showOfferButtonOnWebsite: $data['ShowOfferButtonOnWebsite'] ?? false, + hideStartingPricesOnWebsite: $data['HideStartingPricesOnWebsite'] ?? false, ); } } diff --git a/src/Data/V11/ProductV12.php b/src/Data/V11/ProductV12.php index e8dc6bd..12fce02 100644 --- a/src/Data/V11/ProductV12.php +++ b/src/Data/V11/ProductV12.php @@ -95,6 +95,9 @@ public function __construct( public ?array $tags, public ?int $defaultPickLocation, public ?int $defaultBulkLocation, + public bool $hidePricesOnWebsite, + public bool $showOfferButtonOnWebsite, + public bool $hideStartingPricesOnWebsite, ) { } @@ -181,6 +184,9 @@ public static function make(array $data): self tags: $data['Tags'] ?? null, defaultPickLocation: $data['DefaultPickLocation'] ?? null, defaultBulkLocation: $data['DefaultBulkLocation'] ?? null, + hidePricesOnWebsite: $data['HidePricesOnWebsite'] ?? false, + showOfferButtonOnWebsite: $data['ShowOfferButtonOnWebsite'] ?? false, + hideStartingPricesOnWebsite: $data['HideStartingPricesOnWebsite'] ?? false, ); } } diff --git a/src/Data/V11/ProductV12WebshopUserProduct.php b/src/Data/V11/WebshopUserProductOfProductV12.php similarity index 97% rename from src/Data/V11/ProductV12WebshopUserProduct.php rename to src/Data/V11/WebshopUserProductOfProductV12.php index 00edbb2..4c633d3 100644 --- a/src/Data/V11/ProductV12WebshopUserProduct.php +++ b/src/Data/V11/WebshopUserProductOfProductV12.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Data\V11; -class ProductV12WebshopUserProduct +class WebshopUserProductOfProductV12 { public function __construct( public int $id, diff --git a/src/Data/V12/Int32DecimalKeyValuePair.php b/src/Data/V12/KeyValuePairOfintAnddecimal.php similarity index 92% rename from src/Data/V12/Int32DecimalKeyValuePair.php rename to src/Data/V12/KeyValuePairOfintAnddecimal.php index f418399..3b980d4 100644 --- a/src/Data/V12/Int32DecimalKeyValuePair.php +++ b/src/Data/V12/KeyValuePairOfintAnddecimal.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Data\V12; -class Int32DecimalKeyValuePair +class KeyValuePairOfintAnddecimal { public function __construct( public int $key, diff --git a/src/Data/V12/Order.php b/src/Data/V12/Order.php index 2e9272b..1b3f5b6 100644 --- a/src/Data/V12/Order.php +++ b/src/Data/V12/Order.php @@ -23,7 +23,10 @@ public function __construct( public ?array $payments, public ?DebtorCostCentre $costCentre, public ?CustomerAddress $accountAddress, - public array $orderRows, + public ?array $orderRows, + public ?int $deliveryProvinceId, + public ?int $invoiceProvinceId, + public ?int $accountProvinceId, public ?string $lastClickGclIdValues, public ?string $lastClickUtmValues, public ?CustomerAddress $deliveryAddress, @@ -73,6 +76,9 @@ public static function make(array $data): self costCentre: isset($data['CostCentre']) ? DebtorCostCentre::make($data['CostCentre']) : null, accountAddress: isset($data['AccountAddress']) ? CustomerAddress::make($data['AccountAddress']) : null, orderRows: array_map(static fn (array $item) => OrderRow::make($item), $data['OrderRows'] ?? []), + deliveryProvinceId: $data['DeliveryProvinceId'] ?? null, + invoiceProvinceId: $data['InvoiceProvinceId'] ?? null, + accountProvinceId: $data['AccountProvinceId'] ?? null, lastClickGclIdValues: $data['LastClickGclIdValues'] ?? null, lastClickUtmValues: $data['LastClickUtmValues'] ?? null, deliveryAddress: isset($data['DeliveryAddress']) ? CustomerAddress::make($data['DeliveryAddress']) : null, diff --git a/src/Data/V12/OrderShipment.php b/src/Data/V12/OrderShipment.php index 65557df..709f230 100644 --- a/src/Data/V12/OrderShipment.php +++ b/src/Data/V12/OrderShipment.php @@ -8,7 +8,9 @@ class OrderShipment { public function __construct( public int $id, + public ?int $deliveryId, public ?\Carbon\Carbon $dateTimeAdded, + public ?bool $sendEmail, public int $orderId, public int $shipperId, public ?string $barcode, @@ -21,7 +23,9 @@ public static function make(array $data): self { return new self( id: $data['Id'] ?? 0, + deliveryId: $data['DeliveryId'] ?? null, dateTimeAdded: isset($data['DateTimeAdded']) ? \Carbon\Carbon::parse($data['DateTimeAdded']) : null, + sendEmail: $data['SendEmail'] ?? null, orderId: $data['OrderId'] ?? 0, shipperId: $data['ShipperId'] ?? 0, barcode: $data['Barcode'] ?? null, diff --git a/src/Data/V12/Payment.php b/src/Data/V12/Payment.php index 46c4e6e..52a3c6b 100644 --- a/src/Data/V12/Payment.php +++ b/src/Data/V12/Payment.php @@ -10,7 +10,7 @@ public function __construct( public ?int $orderId, public ?int $invoiceId, public float $amountIncl, - public string $description, + public ?string $description, public int $bookingId, public int $matchingLedgerId, public ?\Carbon\Carbon $dateTime, @@ -25,7 +25,7 @@ public static function make(array $data): self orderId: $data['OrderId'] ?? null, invoiceId: $data['InvoiceId'] ?? null, amountIncl: $data['AmountIncl'] ?? 0.0, - description: $data['Description'] ?? '', + description: $data['Description'] ?? null, bookingId: $data['BookingId'] ?? 0, matchingLedgerId: $data['MatchingLedgerId'] ?? 0, dateTime: isset($data['DateTime']) ? \Carbon\Carbon::parse($data['DateTime']) : null, diff --git a/src/Data/V12/ProductGroupTranslation.php b/src/Data/V12/ProductGroupTranslation.php index 448af74..74557da 100644 --- a/src/Data/V12/ProductGroupTranslation.php +++ b/src/Data/V12/ProductGroupTranslation.php @@ -9,14 +9,15 @@ class ProductGroupTranslation public function __construct( public int $productGroupId, public int $globalisationId, + public ?int $websiteDomainId, public ?string $h1Tag, public ?string $keywords, public ?string $name, public ?string $productGroupInfo, public ?string $value, public ?string $metaDescription, - public ?int $websiteDomainId, public ?string $shortName, + public ?string $USPDescription, public ?string $globalisationCode, ) { } @@ -27,14 +28,15 @@ public static function make(array $data): self return new self( productGroupId: $data['Product_GroupId'] ?? 0, globalisationId: $data['GlobalisationId'] ?? 0, + websiteDomainId: $data['WebsiteDomainId'] ?? null, h1Tag: $data['H1Tag'] ?? null, keywords: $data['Keywords'] ?? null, name: $data['Name'] ?? null, productGroupInfo: $data['ProductGroupInfo'] ?? null, value: $data['Value'] ?? null, metaDescription: $data['MetaDescription'] ?? null, - websiteDomainId: $data['WebsiteDomainId'] ?? null, shortName: $data['ShortName'] ?? null, + USPDescription: $data['USPDescription'] ?? null, globalisationCode: $data['GlobalisationCode'] ?? null, ); } diff --git a/src/Data/V12/ProductSupplier.php b/src/Data/V12/ProductSupplier.php index df4d1aa..511f725 100644 --- a/src/Data/V12/ProductSupplier.php +++ b/src/Data/V12/ProductSupplier.php @@ -6,7 +6,7 @@ class ProductSupplier { - /** @param array $creditorBuyPrices */ + /** @param array $creditorBuyPrices */ public function __construct( public int $productId, public ?string $creditorName, @@ -26,7 +26,7 @@ public static function make(array $data): self creditorProductCode: $data['CreditorProductCode'] ?? null, isActive: $data['IsActive'] ?? false, creditorId: $data['CreditorId'] ?? 0, - creditorBuyPrices: array_map(static fn (array $item) => Int32DecimalKeyValuePair::make($item), $data['CreditorBuyPrices'] ?? []), + creditorBuyPrices: array_map(static fn (array $item) => KeyValuePairOfintAnddecimal::make($item), $data['CreditorBuyPrices'] ?? []), ); } } diff --git a/src/Data/V12/ProductV11.php b/src/Data/V12/ProductV11.php index e11861c..7966daf 100644 --- a/src/Data/V12/ProductV11.php +++ b/src/Data/V12/ProductV11.php @@ -96,6 +96,9 @@ public function __construct( public ?array $tags, public ?int $defaultPickLocation, public ?int $defaultBulkLocation, + public bool $hidePricesOnWebsite, + public bool $showOfferButtonOnWebsite, + public bool $hideStartingPricesOnWebsite, ) { } @@ -183,6 +186,9 @@ public static function make(array $data): self tags: $data['Tags'] ?? null, defaultPickLocation: $data['DefaultPickLocation'] ?? null, defaultBulkLocation: $data['DefaultBulkLocation'] ?? null, + hidePricesOnWebsite: $data['HidePricesOnWebsite'] ?? false, + showOfferButtonOnWebsite: $data['ShowOfferButtonOnWebsite'] ?? false, + hideStartingPricesOnWebsite: $data['HideStartingPricesOnWebsite'] ?? false, ); } } diff --git a/src/Data/V13/Order.php b/src/Data/V13/Order.php index 2cc3aa0..a86ff23 100644 --- a/src/Data/V13/Order.php +++ b/src/Data/V13/Order.php @@ -23,7 +23,10 @@ public function __construct( public ?array $payments, public ?DebtorCostCentre $costCentre, public ?CustomerAddress $accountAddress, - public array $orderRows, + public ?array $orderRows, + public ?int $deliveryProvinceId, + public ?int $invoiceProvinceId, + public ?int $accountProvinceId, public ?string $lastClickGclIdValues, public ?string $lastClickUtmValues, public ?CustomerAddress $deliveryAddress, @@ -73,6 +76,9 @@ public static function make(array $data): self costCentre: isset($data['CostCentre']) ? DebtorCostCentre::make($data['CostCentre']) : null, accountAddress: isset($data['AccountAddress']) ? CustomerAddress::make($data['AccountAddress']) : null, orderRows: array_map(static fn (array $item) => OrderRow::make($item), $data['OrderRows'] ?? []), + deliveryProvinceId: $data['DeliveryProvinceId'] ?? null, + invoiceProvinceId: $data['InvoiceProvinceId'] ?? null, + accountProvinceId: $data['AccountProvinceId'] ?? null, lastClickGclIdValues: $data['LastClickGclIdValues'] ?? null, lastClickUtmValues: $data['LastClickUtmValues'] ?? null, deliveryAddress: isset($data['DeliveryAddress']) ? CustomerAddress::make($data['DeliveryAddress']) : null, diff --git a/src/Data/V13/OrderShipment.php b/src/Data/V13/OrderShipment.php index 9208ea3..b7a5857 100644 --- a/src/Data/V13/OrderShipment.php +++ b/src/Data/V13/OrderShipment.php @@ -8,7 +8,9 @@ class OrderShipment { public function __construct( public int $id, + public ?int $deliveryId, public ?\Carbon\Carbon $dateTimeAdded, + public ?bool $sendEmail, public int $orderId, public int $shipperId, public ?string $barcode, @@ -21,7 +23,9 @@ public static function make(array $data): self { return new self( id: $data['Id'] ?? 0, + deliveryId: $data['DeliveryId'] ?? null, dateTimeAdded: isset($data['DateTimeAdded']) ? \Carbon\Carbon::parse($data['DateTimeAdded']) : null, + sendEmail: $data['SendEmail'] ?? null, orderId: $data['OrderId'] ?? 0, shipperId: $data['ShipperId'] ?? 0, barcode: $data['Barcode'] ?? null, diff --git a/src/Data/V13/Payment.php b/src/Data/V13/Payment.php index d06b7e0..640b0f1 100644 --- a/src/Data/V13/Payment.php +++ b/src/Data/V13/Payment.php @@ -10,7 +10,7 @@ public function __construct( public ?int $orderId, public ?int $invoiceId, public float $amountIncl, - public string $description, + public ?string $description, public int $bookingId, public int $matchingLedgerId, public ?\Carbon\Carbon $dateTime, @@ -25,7 +25,7 @@ public static function make(array $data): self orderId: $data['OrderId'] ?? null, invoiceId: $data['InvoiceId'] ?? null, amountIncl: $data['AmountIncl'] ?? 0.0, - description: $data['Description'] ?? '', + description: $data['Description'] ?? null, bookingId: $data['BookingId'] ?? 0, matchingLedgerId: $data['MatchingLedgerId'] ?? 0, dateTime: isset($data['DateTime']) ? \Carbon\Carbon::parse($data['DateTime']) : null, diff --git a/src/Data/V13/ProductGroupTranslation.php b/src/Data/V13/ProductGroupTranslation.php index c9da125..03b72cb 100644 --- a/src/Data/V13/ProductGroupTranslation.php +++ b/src/Data/V13/ProductGroupTranslation.php @@ -9,14 +9,15 @@ class ProductGroupTranslation public function __construct( public int $productGroupId, public int $globalisationId, + public ?int $websiteDomainId, public ?string $h1Tag, public ?string $keywords, public ?string $name, public ?string $productGroupInfo, public ?string $value, public ?string $metaDescription, - public ?int $websiteDomainId, public ?string $shortName, + public ?string $USPDescription, public ?string $globalisationCode, ) { } @@ -27,14 +28,15 @@ public static function make(array $data): self return new self( productGroupId: $data['Product_GroupId'] ?? 0, globalisationId: $data['GlobalisationId'] ?? 0, + websiteDomainId: $data['WebsiteDomainId'] ?? null, h1Tag: $data['H1Tag'] ?? null, keywords: $data['Keywords'] ?? null, name: $data['Name'] ?? null, productGroupInfo: $data['ProductGroupInfo'] ?? null, value: $data['Value'] ?? null, metaDescription: $data['MetaDescription'] ?? null, - websiteDomainId: $data['WebsiteDomainId'] ?? null, shortName: $data['ShortName'] ?? null, + USPDescription: $data['USPDescription'] ?? null, globalisationCode: $data['GlobalisationCode'] ?? null, ); } diff --git a/src/Data/V13/ProductV11.php b/src/Data/V13/ProductV11.php index e1c0870..7770f2c 100644 --- a/src/Data/V13/ProductV11.php +++ b/src/Data/V13/ProductV11.php @@ -96,6 +96,9 @@ public function __construct( public ?array $tags, public ?int $defaultPickLocation, public ?int $defaultBulkLocation, + public bool $hidePricesOnWebsite, + public bool $showOfferButtonOnWebsite, + public bool $hideStartingPricesOnWebsite, ) { } @@ -183,6 +186,9 @@ public static function make(array $data): self tags: $data['Tags'] ?? null, defaultPickLocation: $data['DefaultPickLocation'] ?? null, defaultBulkLocation: $data['DefaultBulkLocation'] ?? null, + hidePricesOnWebsite: $data['HidePricesOnWebsite'] ?? false, + showOfferButtonOnWebsite: $data['ShowOfferButtonOnWebsite'] ?? false, + hideStartingPricesOnWebsite: $data['HideStartingPricesOnWebsite'] ?? false, ); } } diff --git a/src/Data/V14/ProductGroupTranslation.php b/src/Data/V14/ProductGroupTranslation.php index d54d139..0cbb878 100644 --- a/src/Data/V14/ProductGroupTranslation.php +++ b/src/Data/V14/ProductGroupTranslation.php @@ -9,14 +9,15 @@ class ProductGroupTranslation public function __construct( public int $productGroupId, public int $globalisationId, + public ?int $websiteDomainId, public ?string $h1Tag, public ?string $keywords, public ?string $name, public ?string $productGroupInfo, public ?string $value, public ?string $metaDescription, - public ?int $websiteDomainId, public ?string $shortName, + public ?string $USPDescription, public ?string $globalisationCode, ) { } @@ -27,14 +28,15 @@ public static function make(array $data): self return new self( productGroupId: $data['Product_GroupId'] ?? 0, globalisationId: $data['GlobalisationId'] ?? 0, + websiteDomainId: $data['WebsiteDomainId'] ?? null, h1Tag: $data['H1Tag'] ?? null, keywords: $data['Keywords'] ?? null, name: $data['Name'] ?? null, productGroupInfo: $data['ProductGroupInfo'] ?? null, value: $data['Value'] ?? null, metaDescription: $data['MetaDescription'] ?? null, - websiteDomainId: $data['WebsiteDomainId'] ?? null, shortName: $data['ShortName'] ?? null, + USPDescription: $data['USPDescription'] ?? null, globalisationCode: $data['GlobalisationCode'] ?? null, ); } diff --git a/src/Data/V14/ProductV14.php b/src/Data/V14/ProductV14.php index 8ba5ef6..2686ff9 100644 --- a/src/Data/V14/ProductV14.php +++ b/src/Data/V14/ProductV14.php @@ -96,6 +96,9 @@ public function __construct( public ?array $tags, public ?int $defaultPickLocation, public ?int $defaultBulkLocation, + public bool $hidePricesOnWebsite, + public bool $showOfferButtonOnWebsite, + public bool $hideStartingPricesOnWebsite, ) { } @@ -183,6 +186,9 @@ public static function make(array $data): self tags: $data['Tags'] ?? null, defaultPickLocation: $data['DefaultPickLocation'] ?? null, defaultBulkLocation: $data['DefaultBulkLocation'] ?? null, + hidePricesOnWebsite: $data['HidePricesOnWebsite'] ?? false, + showOfferButtonOnWebsite: $data['ShowOfferButtonOnWebsite'] ?? false, + hideStartingPricesOnWebsite: $data['HideStartingPricesOnWebsite'] ?? false, ); } } diff --git a/src/Data/V20/OrderShipment.php b/src/Data/V20/OrderShipment.php index 915fde4..045a386 100644 --- a/src/Data/V20/OrderShipment.php +++ b/src/Data/V20/OrderShipment.php @@ -8,7 +8,9 @@ class OrderShipment { public function __construct( public int $id, + public ?int $deliveryId, public ?\Carbon\Carbon $dateTimeAdded, + public ?bool $sendEmail, public int $orderId, public int $shipperId, public ?string $barcode, @@ -21,7 +23,9 @@ public static function make(array $data): self { return new self( id: $data['Id'] ?? 0, + deliveryId: $data['DeliveryId'] ?? null, dateTimeAdded: isset($data['DateTimeAdded']) ? \Carbon\Carbon::parse($data['DateTimeAdded']) : null, + sendEmail: $data['SendEmail'] ?? null, orderId: $data['OrderId'] ?? 0, shipperId: $data['ShipperId'] ?? 0, barcode: $data['Barcode'] ?? null, diff --git a/src/Data/V20/Payment.php b/src/Data/V20/Payment.php index 5f2e987..0b2f6e2 100644 --- a/src/Data/V20/Payment.php +++ b/src/Data/V20/Payment.php @@ -10,7 +10,7 @@ public function __construct( public ?int $orderId, public ?int $invoiceId, public float $amountIncl, - public string $description, + public ?string $description, public int $bookingId, public int $matchingLedgerId, public ?\Carbon\Carbon $dateTime, @@ -25,7 +25,7 @@ public static function make(array $data): self orderId: $data['OrderId'] ?? null, invoiceId: $data['InvoiceId'] ?? null, amountIncl: $data['AmountIncl'] ?? 0.0, - description: $data['Description'] ?? '', + description: $data['Description'] ?? null, bookingId: $data['BookingId'] ?? 0, matchingLedgerId: $data['MatchingLedgerId'] ?? 0, dateTime: isset($data['DateTime']) ? \Carbon\Carbon::parse($data['DateTime']) : null, diff --git a/src/Data/V20/ReturnOrderV2.php b/src/Data/V20/ReturnOrderV2.php index 8a1c39a..25d60da 100644 --- a/src/Data/V20/ReturnOrderV2.php +++ b/src/Data/V20/ReturnOrderV2.php @@ -29,7 +29,10 @@ public function __construct( public ?array $payments, public ?DebtorCostCentre $costCentre, public ?CustomerAddress $accountAddress, - public array $orderRows, + public ?array $orderRows, + public ?int $deliveryProvinceId, + public ?int $invoiceProvinceId, + public ?int $accountProvinceId, public ?string $lastClickGclIdValues, public ?string $lastClickUtmValues, public ?CustomerAddress $deliveryAddress, @@ -85,6 +88,9 @@ public static function make(array $data): self costCentre: isset($data['CostCentre']) ? DebtorCostCentre::make($data['CostCentre']) : null, accountAddress: isset($data['AccountAddress']) ? CustomerAddress::make($data['AccountAddress']) : null, orderRows: array_map(static fn (array $item) => OrderRow::make($item), $data['OrderRows'] ?? []), + deliveryProvinceId: $data['DeliveryProvinceId'] ?? null, + invoiceProvinceId: $data['InvoiceProvinceId'] ?? null, + accountProvinceId: $data['AccountProvinceId'] ?? null, lastClickGclIdValues: $data['LastClickGclIdValues'] ?? null, lastClickUtmValues: $data['LastClickUtmValues'] ?? null, deliveryAddress: isset($data['DeliveryAddress']) ? CustomerAddress::make($data['DeliveryAddress']) : null, diff --git a/src/Data/V20/SalesOrderDelivery.php b/src/Data/V20/SalesOrderDelivery.php index c6c5b94..9012e04 100644 --- a/src/Data/V20/SalesOrderDelivery.php +++ b/src/Data/V20/SalesOrderDelivery.php @@ -8,6 +8,7 @@ class SalesOrderDelivery { /** @param array $details */ public function __construct( + public int $deliveryId, public ?int $orderId, public int $orderStatusId, public ?\Carbon\Carbon $deliveryDate, @@ -23,6 +24,7 @@ public function __construct( public static function make(array $data): self { return new self( + deliveryId: $data['DeliveryId'] ?? 0, orderId: $data['OrderId'] ?? null, orderStatusId: $data['OrderStatusId'] ?? 0, deliveryDate: isset($data['DeliveryDate']) ? \Carbon\Carbon::parse($data['DeliveryDate']) : null, diff --git a/src/Data/V30/AddressType.php b/src/Data/V30/AddressType.php new file mode 100644 index 0000000..61ed48b --- /dev/null +++ b/src/Data/V30/AddressType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Data/V30/BarcodeWithAmount.php b/src/Data/V30/BarcodeWithAmount.php new file mode 100644 index 0000000..3264f3c --- /dev/null +++ b/src/Data/V30/BarcodeWithAmount.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + qty: $data['Qty'] ?? 0, + barcode: $data['Barcode'] ?? null, + ); + } +} diff --git a/src/Data/V30/BasicProductData.php b/src/Data/V30/BasicProductData.php new file mode 100644 index 0000000..aeffee3 --- /dev/null +++ b/src/Data/V30/BasicProductData.php @@ -0,0 +1,37 @@ + $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + vendorCode: $data['VendorCode'] ?? null, + productCode: $data['ProductCode'] ?? null, + description1: $data['Description1'] ?? null, + description2: $data['Description2'] ?? null, + pictureName: $data['PictureName'] ?? null, + domain: $data['Domain'] ?? null, + defaultPickStockLocationId: $data['DefaultPickStockLocationId'] ?? null, + statusName: $data['StatusName'] ?? null, + ); + } +} diff --git a/src/Data/V30/BundleGroup.php b/src/Data/V30/BundleGroup.php new file mode 100644 index 0000000..6cb1cdb --- /dev/null +++ b/src/Data/V30/BundleGroup.php @@ -0,0 +1,28 @@ + $children */ + public function __construct( + public int $id, + public int $sortId, + public ?string $description, + public ?array $children, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + sortId: $data['SortId'] ?? 0, + description: $data['Description'] ?? null, + children: array_map(static fn (array $item) => Child::make($item), $data['Children'] ?? []), + ); + } +} diff --git a/src/Data/V30/BuyOrderDeliveryRowRead.php b/src/Data/V30/BuyOrderDeliveryRowRead.php new file mode 100644 index 0000000..23d6946 --- /dev/null +++ b/src/Data/V30/BuyOrderDeliveryRowRead.php @@ -0,0 +1,45 @@ + $data */ + public static function make(array $data): self + { + return new self( + buyPrice: $data['BuyPrice'] ?? null, + id: $data['Id'] ?? 0, + productCode: $data['ProductCode'] ?? null, + vendorCode: $data['VendorCode'] ?? null, + productCodeSupplier: $data['ProductCodeSupplier'] ?? null, + buyOrderRowId: $data['BuyOrderRowId'] ?? null, + debtorName: $data['DebtorName'] ?? null, + orderId: $data['OrderId'] ?? null, + productId: $data['ProductId'] ?? 0, + qtyDelivered: $data['Qty_Delivered'] ?? 0.0, + remarks: $data['Remarks'] ?? null, + stockLocationId: $data['StockLocationId'] ?? null, + amountOfLabelsToPrint: $data['AmountOfLabelsToPrint'] ?? null, + ); + } +} diff --git a/src/Data/V30/CRMActivityStatus.php b/src/Data/V30/CRMActivityStatus.php new file mode 100644 index 0000000..4b8d6dc --- /dev/null +++ b/src/Data/V30/CRMActivityStatus.php @@ -0,0 +1,27 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + sorting: $data['Sorting'] ?? 0, + isCompleted: $data['IsCompleted'] ?? false, + ); + } +} diff --git a/src/Data/V30/CRMActivityType.php b/src/Data/V30/CRMActivityType.php new file mode 100644 index 0000000..1fe4977 --- /dev/null +++ b/src/Data/V30/CRMActivityType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Data/V30/CRMProjectStatus.php b/src/Data/V30/CRMProjectStatus.php new file mode 100644 index 0000000..e45c3fb --- /dev/null +++ b/src/Data/V30/CRMProjectStatus.php @@ -0,0 +1,27 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + sorting: $data['Sorting'] ?? 0, + isCompleted: $data['IsCompleted'] ?? false, + ); + } +} diff --git a/src/Data/V30/CRMProjectType.php b/src/Data/V30/CRMProjectType.php new file mode 100644 index 0000000..18d3fa4 --- /dev/null +++ b/src/Data/V30/CRMProjectType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Data/V30/Child.php b/src/Data/V30/Child.php new file mode 100644 index 0000000..78454a9 --- /dev/null +++ b/src/Data/V30/Child.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + sortId: $data['SortId'] ?? 0, + ); + } +} diff --git a/src/Data/V30/ContactTypeEnum.php b/src/Data/V30/ContactTypeEnum.php new file mode 100644 index 0000000..eb09c2d --- /dev/null +++ b/src/Data/V30/ContactTypeEnum.php @@ -0,0 +1,19 @@ + $data */ + public static function make(array $data): self + { + return new self( + ); + } +} diff --git a/src/Data/V30/CreditorTypeDto.php b/src/Data/V30/CreditorTypeDto.php new file mode 100644 index 0000000..5bc35ee --- /dev/null +++ b/src/Data/V30/CreditorTypeDto.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? null, + value: $data['Value'] ?? null, + ); + } +} diff --git a/src/Data/V30/CustomerAddress.php b/src/Data/V30/CustomerAddress.php new file mode 100644 index 0000000..e4faeb8 --- /dev/null +++ b/src/Data/V30/CustomerAddress.php @@ -0,0 +1,65 @@ + $data */ + public static function make(array $data): self + { + return new self( + type: isset($data['Type']) ? AddressType::make($data['Type']) : null, + province: isset($data['Province']) ? Province::make($data['Province']) : null, + email: $data['Email'] ?? null, + contactName: $data['ContactName'] ?? null, + companyName: $data['CompanyName'] ?? null, + address1: $data['Address1'] ?? null, + address2: $data['Address2'] ?? null, + id: $data['Id'] ?? null, + debtorId: $data['DebtorId'] ?? null, + creditorId: $data['CreditorId'] ?? null, + isMainContact: $data['IsMainContact'] ?? false, + isHidden: $data['IsHidden'] ?? null, + ownContactNumber: $data['OwnContactNumber'] ?? null, + countryCode: $data['CountryCode'] ?? null, + isoCode: $data['IsoCode'] ?? null, + city: $data['City'] ?? null, + zipcode: $data['Zipcode'] ?? null, + street: $data['Street'] ?? null, + houseNumber: $data['HouseNumber'] ?? null, + houseNumberAddition: $data['HouseNumberAddition'] ?? null, + telephoneNumber: $data['TelephoneNumber'] ?? null, + countryId: $data['CountryId'] ?? 0, + zoneId: $data['ZoneId'] ?? 0, + ); + } +} diff --git a/src/Data/V30/DatabankViewOption.php b/src/Data/V30/DatabankViewOption.php new file mode 100644 index 0000000..84b4ce1 --- /dev/null +++ b/src/Data/V30/DatabankViewOption.php @@ -0,0 +1,19 @@ + $data */ + public static function make(array $data): self + { + return new self( + ); + } +} diff --git a/src/Data/V30/DebtorCostCentre.php b/src/Data/V30/DebtorCostCentre.php new file mode 100644 index 0000000..abf72b7 --- /dev/null +++ b/src/Data/V30/DebtorCostCentre.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + code: $data['Code'] ?? null, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Data/V30/DebtorWebsiteDomains.php b/src/Data/V30/DebtorWebsiteDomains.php new file mode 100644 index 0000000..4fb9fb2 --- /dev/null +++ b/src/Data/V30/DebtorWebsiteDomains.php @@ -0,0 +1,24 @@ + $websiteDomainIds */ + public function __construct( + public int $debtorId, + public ?array $websiteDomainIds, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + debtorId: $data['DebtorId'] ?? 0, + websiteDomainIds: $data['WebsiteDomainIds'] ?? null, + ); + } +} diff --git a/src/Data/V30/EmailAddress.php b/src/Data/V30/EmailAddress.php new file mode 100644 index 0000000..9a35769 --- /dev/null +++ b/src/Data/V30/EmailAddress.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + name: $data['Name'] ?? null, + email: $data['Email'] ?? null, + ); + } +} diff --git a/src/Data/V30/EmailMessageStatus.php b/src/Data/V30/EmailMessageStatus.php new file mode 100644 index 0000000..57e9d20 --- /dev/null +++ b/src/Data/V30/EmailMessageStatus.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + color: $data['Color'] ?? 0, + ); + } +} diff --git a/src/Data/V30/EmailUserEmailAddress.php b/src/Data/V30/EmailUserEmailAddress.php new file mode 100644 index 0000000..3e8b3d8 --- /dev/null +++ b/src/Data/V30/EmailUserEmailAddress.php @@ -0,0 +1,33 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + fullAddress: $data['FullAddress'] ?? null, + emailAddress: $data['EmailAddress'] ?? null, + isDefaultEmailAddress: $data['IsDefaultEmailAddress'] ?? false, + emailHtmlSignature: $data['EmailHtmlSignature'] ?? null, + emailTextSignature: $data['EmailTextSignature'] ?? null, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Data/V30/ExplodedViewHighlight.php b/src/Data/V30/ExplodedViewHighlight.php new file mode 100644 index 0000000..ea7794c --- /dev/null +++ b/src/Data/V30/ExplodedViewHighlight.php @@ -0,0 +1,26 @@ + $products */ + public function __construct( + public int $id, + public ?string $name, + public ?array $products, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + products: array_map(static fn (array $item) => ExplodedViewHighlightProduct::make($item), $data['Products'] ?? []), + ); + } +} diff --git a/src/Data/V30/ExplodedViewHighlightProduct.php b/src/Data/V30/ExplodedViewHighlightProduct.php new file mode 100644 index 0000000..d4fe8e6 --- /dev/null +++ b/src/Data/V30/ExplodedViewHighlightProduct.php @@ -0,0 +1,26 @@ + $productNameTranslations */ + public function __construct( + public int $productId, + public ?string $productName1, + public ?array $productNameTranslations, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + productName1: $data['ProductName1'] ?? null, + productNameTranslations: array_map(static fn (array $item) => Translation::make($item), $data['ProductNameTranslations'] ?? []), + ); + } +} diff --git a/src/Data/V30/ExplodedViewProductGroup.php b/src/Data/V30/ExplodedViewProductGroup.php new file mode 100644 index 0000000..2c5f763 --- /dev/null +++ b/src/Data/V30/ExplodedViewProductGroup.php @@ -0,0 +1,26 @@ + $productGroupNameTranslations */ + public function __construct( + public int $productGroupId, + public ?string $productGroupName, + public ?array $productGroupNameTranslations, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + productGroupId: $data['ProductGroupId'] ?? 0, + productGroupName: $data['ProductGroupName'] ?? null, + productGroupNameTranslations: array_map(static fn (array $item) => Translation::make($item), $data['ProductGroupNameTranslations'] ?? []), + ); + } +} diff --git a/src/Data/V30/ExternalValue.php b/src/Data/V30/ExternalValue.php new file mode 100644 index 0000000..7673080 --- /dev/null +++ b/src/Data/V30/ExternalValue.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + typeId: $data['TypeId'] ?? 0, + value: $data['Value'] ?? null, + ); + } +} diff --git a/src/Data/V30/FinancialBookBookingMutation.php b/src/Data/V30/FinancialBookBookingMutation.php new file mode 100644 index 0000000..924c01c --- /dev/null +++ b/src/Data/V30/FinancialBookBookingMutation.php @@ -0,0 +1,34 @@ + $matchings */ + public function __construct( + public ?\Carbon\Carbon $bookingDateTime, + public float $amountIncl, + public ?int $creditorId, + public ?int $debtorId, + public ?int $paymentMethodId, + public ?\Carbon\Carbon $dateTimeCreated, + public ?array $matchings, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + bookingDateTime: isset($data['BookingDateTime']) ? \Carbon\Carbon::parse($data['BookingDateTime']) : null, + amountIncl: $data['AmountIncl'] ?? 0.0, + creditorId: $data['CreditorId'] ?? null, + debtorId: $data['DebtorId'] ?? null, + paymentMethodId: $data['PaymentMethodId'] ?? null, + dateTimeCreated: isset($data['DateTimeCreated']) ? \Carbon\Carbon::parse($data['DateTimeCreated']) : null, + matchings: array_map(static fn (array $item) => FinancialBookBookingMutationMatching::make($item), $data['Matchings'] ?? []), + ); + } +} diff --git a/src/Data/V30/FinancialBookBookingMutationMatching.php b/src/Data/V30/FinancialBookBookingMutationMatching.php new file mode 100644 index 0000000..eb2ee49 --- /dev/null +++ b/src/Data/V30/FinancialBookBookingMutationMatching.php @@ -0,0 +1,39 @@ + $data */ + public static function make(array $data): self + { + return new self( + amount: $data['Amount'] ?? 0.0, + orderId: $data['OrderId'] ?? null, + ledgerId: $data['LedgerId'] ?? 0, + vatCode: $data['VatCode'] ?? 0, + description: $data['Description'] ?? null, + vatAmount: $data['VatAmount'] ?? 0.0, + exclVatAmount: $data['ExclVatAmount'] ?? 0.0, + inclVatAmount: $data['InclVatAmount'] ?? 0.0, + financialCostCenterId: $data['FinancialCostCenterId'] ?? null, + productId: $data['ProductId'] ?? null, + ); + } +} diff --git a/src/Data/V30/FreeValue.php b/src/Data/V30/FreeValue.php new file mode 100644 index 0000000..3af3f02 --- /dev/null +++ b/src/Data/V30/FreeValue.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + key: $data['Key'] ?? null, + value: $data['Value'] ?? null, + ); + } +} diff --git a/src/Data/V30/Gender.php b/src/Data/V30/Gender.php new file mode 100644 index 0000000..20393b0 --- /dev/null +++ b/src/Data/V30/Gender.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Data/V30/GetProductImage.php b/src/Data/V30/GetProductImage.php new file mode 100644 index 0000000..2fe17fa --- /dev/null +++ b/src/Data/V30/GetProductImage.php @@ -0,0 +1,27 @@ + $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + imageName: $data['ImageName'] ?? null, + imageId: $data['ImageId'] ?? 0, + sortId: $data['SortId'] ?? null, + ); + } +} diff --git a/src/Data/V30/ITSIssueFreeType.php b/src/Data/V30/ITSIssueFreeType.php new file mode 100644 index 0000000..cbecbba --- /dev/null +++ b/src/Data/V30/ITSIssueFreeType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Data/V30/ITSIssueGroup.php b/src/Data/V30/ITSIssueGroup.php new file mode 100644 index 0000000..9058c5a --- /dev/null +++ b/src/Data/V30/ITSIssueGroup.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Data/V30/ITSIssueLevel.php b/src/Data/V30/ITSIssueLevel.php new file mode 100644 index 0000000..1398776 --- /dev/null +++ b/src/Data/V30/ITSIssueLevel.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Data/V30/ITSIssueStatus.php b/src/Data/V30/ITSIssueStatus.php new file mode 100644 index 0000000..f66ca86 --- /dev/null +++ b/src/Data/V30/ITSIssueStatus.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Data/V30/ITSIssueType.php b/src/Data/V30/ITSIssueType.php new file mode 100644 index 0000000..8d086fb --- /dev/null +++ b/src/Data/V30/ITSIssueType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Data/V30/ITSPriority.php b/src/Data/V30/ITSPriority.php new file mode 100644 index 0000000..41f2728 --- /dev/null +++ b/src/Data/V30/ITSPriority.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Data/V30/ITSProject.php b/src/Data/V30/ITSProject.php new file mode 100644 index 0000000..ef5dd5b --- /dev/null +++ b/src/Data/V30/ITSProject.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Data/V30/KeyValuePairOfintAnddecimal.php b/src/Data/V30/KeyValuePairOfintAnddecimal.php new file mode 100644 index 0000000..e447b03 --- /dev/null +++ b/src/Data/V30/KeyValuePairOfintAnddecimal.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + key: $data['Key'] ?? 0, + value: $data['Value'] ?? 0.0, + ); + } +} diff --git a/src/Data/V30/OrderRow.php b/src/Data/V30/OrderRow.php new file mode 100644 index 0000000..ff4f7aa --- /dev/null +++ b/src/Data/V30/OrderRow.php @@ -0,0 +1,104 @@ + $serialNumbers */ + public function __construct( + public ?array $serialNumbers, + public ?float $expectedNextQtyOnDelivery, + public ?float $discountPercent, + public float $qtyReserved, + public float $inclPrice, + public ?string $internalNotes, + public bool $isAssemblyChild, + public ?int $packingMaterialDepositId, + public ?int $id, + public ?string $description, + public ?string $description2, + public ?int $productId, + public float $qty, + public ?float $buyPrice, + public ?float $grossPrice, + public ?float $nettPrice, + public float $qtyDeliverd, + public float $qtyDeliverdNotInvoiced, + public ?string $productCode, + public ?string $productBarcode1, + public ?float $VATPercentage, + public ?string $notes, + public int $debtorId, + public ?int $orderId, + public ?int $warehouseId, + public ?string $commission, + public ?int $deliveryOptionId, + public ?int $vatCodeId, + public ?int $vatCodeIdOverrule, + public ?string $freeValue1, + public ?string $freeValue2, + public ?string $freeValue3, + public ?string $freeValue4, + public ?string $freeValue5, + public ?\Carbon\Carbon $expectedNextDelivery, + public ?ExternalValue $externalValue, + public ?\Carbon\Carbon $agreedDeliveryDate, + public ?int $type1Id, + public ?int $type2Id, + public ?int $type3Id, + public ?int $type4Id, + public ?int $type5Id, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + serialNumbers: $data['SerialNumbers'] ?? null, + expectedNextQtyOnDelivery: $data['ExpectedNextQtyOnDelivery'] ?? null, + discountPercent: $data['DiscountPercent'] ?? null, + qtyReserved: $data['QtyReserved'] ?? 0.0, + inclPrice: $data['InclPrice'] ?? 0.0, + internalNotes: $data['InternalNotes'] ?? null, + isAssemblyChild: $data['IsAssemblyChild'] ?? false, + packingMaterialDepositId: $data['PackingMaterialDepositId'] ?? null, + id: $data['Id'] ?? null, + description: $data['Description'] ?? null, + description2: $data['Description2'] ?? null, + productId: $data['ProductId'] ?? null, + qty: $data['Qty'] ?? 0.0, + buyPrice: $data['BuyPrice'] ?? null, + grossPrice: $data['GrossPrice'] ?? null, + nettPrice: $data['NettPrice'] ?? null, + qtyDeliverd: $data['QtyDeliverd'] ?? 0.0, + qtyDeliverdNotInvoiced: $data['QtyDeliverd_NotInvoiced'] ?? 0.0, + productCode: $data['ProductCode'] ?? null, + productBarcode1: $data['ProductBarcode1'] ?? null, + VATPercentage: $data['VATPercentage'] ?? null, + notes: $data['Notes'] ?? null, + debtorId: $data['DebtorId'] ?? 0, + orderId: $data['OrderId'] ?? null, + warehouseId: $data['WarehouseId'] ?? null, + commission: $data['Commission'] ?? null, + deliveryOptionId: $data['DeliveryOptionId'] ?? null, + vatCodeId: $data['VatCodeId'] ?? null, + vatCodeIdOverrule: $data['VatCodeIdOverrule'] ?? null, + freeValue1: $data['FreeValue1'] ?? null, + freeValue2: $data['FreeValue2'] ?? null, + freeValue3: $data['FreeValue3'] ?? null, + freeValue4: $data['FreeValue4'] ?? null, + freeValue5: $data['FreeValue5'] ?? null, + expectedNextDelivery: isset($data['ExpectedNextDelivery']) ? \Carbon\Carbon::parse($data['ExpectedNextDelivery']) : null, + externalValue: isset($data['ExternalValue']) ? ExternalValue::make($data['ExternalValue']) : null, + agreedDeliveryDate: isset($data['AgreedDeliveryDate']) ? \Carbon\Carbon::parse($data['AgreedDeliveryDate']) : null, + type1Id: $data['Type1Id'] ?? null, + type2Id: $data['Type2Id'] ?? null, + type3Id: $data['Type3Id'] ?? null, + type4Id: $data['Type4Id'] ?? null, + type5Id: $data['Type5Id'] ?? null, + ); + } +} diff --git a/src/Data/V30/OrderShipment.php b/src/Data/V30/OrderShipment.php new file mode 100644 index 0000000..1763d71 --- /dev/null +++ b/src/Data/V30/OrderShipment.php @@ -0,0 +1,35 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + deliveryId: $data['DeliveryId'] ?? null, + dateTimeAdded: isset($data['DateTimeAdded']) ? \Carbon\Carbon::parse($data['DateTimeAdded']) : null, + sendEmail: $data['SendEmail'] ?? null, + orderId: $data['OrderId'] ?? 0, + shipperId: $data['ShipperId'] ?? 0, + barcode: $data['Barcode'] ?? null, + trackTraceUrl: $data['TrackTraceUrl'] ?? null, + ); + } +} diff --git a/src/Data/V30/OrderShipmentFreeValue.php b/src/Data/V30/OrderShipmentFreeValue.php new file mode 100644 index 0000000..40bb811 --- /dev/null +++ b/src/Data/V30/OrderShipmentFreeValue.php @@ -0,0 +1,31 @@ + $data */ + public static function make(array $data): self + { + return new self( + shipperTypeId: $data['ShipperTypeId'] ?? 0, + freevalue1: $data['Freevalue1'] ?? null, + freevalue2: $data['Freevalue2'] ?? null, + freevalue3: $data['Freevalue3'] ?? null, + freevalue4: $data['Freevalue4'] ?? null, + freevalue5: $data['Freevalue5'] ?? null, + ); + } +} diff --git a/src/Data/V30/OrderShippingMethod.php b/src/Data/V30/OrderShippingMethod.php new file mode 100644 index 0000000..86a4864 --- /dev/null +++ b/src/Data/V30/OrderShippingMethod.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + exportCode: $data['ExportCode'] ?? null, + ); + } +} diff --git a/src/Data/V30/OrderStatus.php b/src/Data/V30/OrderStatus.php new file mode 100644 index 0000000..82c75f9 --- /dev/null +++ b/src/Data/V30/OrderStatus.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + value: $data['Value'] ?? null, + ); + } +} diff --git a/src/Data/V30/OrderTotalsRead.php b/src/Data/V30/OrderTotalsRead.php new file mode 100644 index 0000000..07cafdb --- /dev/null +++ b/src/Data/V30/OrderTotalsRead.php @@ -0,0 +1,33 @@ + $data */ + public static function make(array $data): self + { + return new self( + amountEx: $data['AmountEx'] ?? 0.0, + VATPercentage: $data['VATPercentage'] ?? 0.0, + calcTotalPayed: $data['Calc_TotalPayed'] ?? null, + amountIncl: $data['AmountIncl'] ?? 0.0, + isPaid: $data['IsPaid'] ?? false, + shippingCost: $data['ShippingCost'] ?? 0.0, + shippingCostIncl: $data['ShippingCostIncl'] ?? null, + ); + } +} diff --git a/src/Data/V30/Payment.php b/src/Data/V30/Payment.php new file mode 100644 index 0000000..0240901 --- /dev/null +++ b/src/Data/V30/Payment.php @@ -0,0 +1,35 @@ + $data */ + public static function make(array $data): self + { + return new self( + orderId: $data['OrderId'] ?? null, + invoiceId: $data['InvoiceId'] ?? null, + amountIncl: $data['AmountIncl'] ?? 0.0, + description: $data['Description'] ?? null, + bookingId: $data['BookingId'] ?? 0, + matchingLedgerId: $data['MatchingLedgerId'] ?? 0, + dateTime: isset($data['DateTime']) ? \Carbon\Carbon::parse($data['DateTime']) : null, + ledgerCode: $data['LedgerCode'] ?? null, + ); + } +} diff --git a/src/Data/V30/PaymentConditionDto.php b/src/Data/V30/PaymentConditionDto.php new file mode 100644 index 0000000..fa9bba9 --- /dev/null +++ b/src/Data/V30/PaymentConditionDto.php @@ -0,0 +1,21 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? null, + ); + } +} diff --git a/src/Data/V30/PaymentMethod.php b/src/Data/V30/PaymentMethod.php new file mode 100644 index 0000000..a3ea0aa --- /dev/null +++ b/src/Data/V30/PaymentMethod.php @@ -0,0 +1,27 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + maxAmount: $data['MaxAmount'] ?? null, + selectKey: $data['SelectKey'] ?? null, + ); + } +} diff --git a/src/Data/V30/ProductExtraBarcode.php b/src/Data/V30/ProductExtraBarcode.php new file mode 100644 index 0000000..1aa3ede --- /dev/null +++ b/src/Data/V30/ProductExtraBarcode.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + barcode: $data['Barcode'] ?? null, + qty: $data['Qty'] ?? 0, + ); + } +} diff --git a/src/Data/V30/ProductGroup.php b/src/Data/V30/ProductGroup.php new file mode 100644 index 0000000..17ff326 --- /dev/null +++ b/src/Data/V30/ProductGroup.php @@ -0,0 +1,44 @@ + $translations */ + public function __construct( + public int $id, + public ?string $name, + public ?int $parentProductGroupId, + public ?string $shortname, + public ?string $pictureUrl, + public int $sortValue, + public ?string $pictureName, + public int $productGroupTypeId, + public bool $isVisibleOnWebshop, + public int $depthLevel, + public bool $showUnitOnWebsite, + public ?array $translations, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + parentProductGroupId: $data['ParentProductGroupId'] ?? null, + shortname: $data['Shortname'] ?? null, + pictureUrl: $data['PictureUrl'] ?? null, + sortValue: $data['SortValue'] ?? 0, + pictureName: $data['PictureName'] ?? null, + productGroupTypeId: $data['ProductGroupTypeId'] ?? 0, + isVisibleOnWebshop: $data['IsVisibleOnWebshop'] ?? false, + depthLevel: $data['DepthLevel'] ?? 0, + showUnitOnWebsite: $data['ShowUnitOnWebsite'] ?? false, + translations: array_map(static fn (array $item) => ProductGroupTranslation::make($item), $data['Translations'] ?? []), + ); + } +} diff --git a/src/Data/V30/ProductGroupTranslation.php b/src/Data/V30/ProductGroupTranslation.php new file mode 100644 index 0000000..7451db7 --- /dev/null +++ b/src/Data/V30/ProductGroupTranslation.php @@ -0,0 +1,43 @@ + $data */ + public static function make(array $data): self + { + return new self( + productGroupId: $data['Product_GroupId'] ?? 0, + globalisationId: $data['GlobalisationId'] ?? 0, + websiteDomainId: $data['WebsiteDomainId'] ?? null, + h1Tag: $data['H1Tag'] ?? null, + keywords: $data['Keywords'] ?? null, + name: $data['Name'] ?? null, + productGroupInfo: $data['ProductGroupInfo'] ?? null, + value: $data['Value'] ?? null, + metaDescription: $data['MetaDescription'] ?? null, + shortName: $data['ShortName'] ?? null, + USPDescription: $data['USPDescription'] ?? null, + globalisationCode: $data['GlobalisationCode'] ?? null, + ); + } +} diff --git a/src/Data/V30/ProductOffer.php b/src/Data/V30/ProductOffer.php new file mode 100644 index 0000000..67c544b --- /dev/null +++ b/src/Data/V30/ProductOffer.php @@ -0,0 +1,31 @@ + $data */ + public static function make(array $data): self + { + return new self( + startDate: isset($data['StartDate']) ? \Carbon\Carbon::parse($data['StartDate']) : null, + endDate: isset($data['EndDate']) ? \Carbon\Carbon::parse($data['EndDate']) : null, + fromPrice: $data['FromPrice'] ?? null, + toPrice: $data['ToPrice'] ?? null, + offerGroupId: $data['OfferGroupId'] ?? null, + productId: $data['ProductId'] ?? 0, + ); + } +} diff --git a/src/Data/V30/ProductPricelistContractPrice.php b/src/Data/V30/ProductPricelistContractPrice.php new file mode 100644 index 0000000..be6b682 --- /dev/null +++ b/src/Data/V30/ProductPricelistContractPrice.php @@ -0,0 +1,29 @@ + $data */ + public static function make(array $data): self + { + return new self( + priceEx: $data['PriceEx'] ?? 0.0, + qty: $data['Qty'] ?? 0, + fromDate: isset($data['FromDate']) ? \Carbon\Carbon::parse($data['FromDate']) : null, + toDate: isset($data['ToDate']) ? \Carbon\Carbon::parse($data['ToDate']) : null, + productId: $data['ProductId'] ?? 0, + ); + } +} diff --git a/src/Data/V30/ProductResource.php b/src/Data/V30/ProductResource.php new file mode 100644 index 0000000..45eaea5 --- /dev/null +++ b/src/Data/V30/ProductResource.php @@ -0,0 +1,29 @@ + $data */ + public static function make(array $data): self + { + return new self( + fileName: $data['FileName'] ?? null, + type: isset($data['Type']) ? DatabankViewOption::make($data['Type']) : null, + description: $data['Description'] ?? null, + sorting: $data['Sorting'] ?? null, + url: $data['Url'] ?? null, + ); + } +} diff --git a/src/Data/V30/ProductShiftPrice.php b/src/Data/V30/ProductShiftPrice.php new file mode 100644 index 0000000..23eee2d --- /dev/null +++ b/src/Data/V30/ProductShiftPrice.php @@ -0,0 +1,33 @@ + $data */ + public static function make(array $data): self + { + return new self( + qty: $data['Qty'] ?? 0, + buyPrice: $data['BuyPrice'] ?? 0.0, + margin: $data['Margin'] ?? 0.0, + sellPriceExcl: $data['SellPriceExcl'] ?? 0.0, + sellPriceGrossExcl: $data['SellPriceGrossExcl'] ?? 0.0, + description: $data['Description'] ?? null, + discountType: $data['DiscountType'] ?? null, + ); + } +} diff --git a/src/Data/V30/ProductShiftPriceV14.php b/src/Data/V30/ProductShiftPriceV14.php new file mode 100644 index 0000000..6bc7b90 --- /dev/null +++ b/src/Data/V30/ProductShiftPriceV14.php @@ -0,0 +1,35 @@ + $data */ + public static function make(array $data): self + { + return new self( + costPrice: $data['CostPrice'] ?? 0.0, + qty: $data['Qty'] ?? 0, + buyPrice: $data['BuyPrice'] ?? 0.0, + margin: $data['Margin'] ?? 0.0, + sellPriceExcl: $data['SellPriceExcl'] ?? 0.0, + sellPriceGrossExcl: $data['SellPriceGrossExcl'] ?? 0.0, + description: $data['Description'] ?? null, + discountType: $data['DiscountType'] ?? null, + ); + } +} diff --git a/src/Data/V30/ProductStockControlRow.php b/src/Data/V30/ProductStockControlRow.php new file mode 100644 index 0000000..e7f4268 --- /dev/null +++ b/src/Data/V30/ProductStockControlRow.php @@ -0,0 +1,50 @@ + $barcodeExtraList */ + public function __construct( + public ?int $id, + public ?int $productStockHeadId, + public int $productId, + public ?string $productDescription, + public ?string $productDescription2, + public ?string $vendorcode, + public float $stockTotal, + public float $stockOnCurrentLocation, + public ?float $stockCountedByUser, + public ?\Carbon\Carbon $stockLevelDate, + public ?string $barcode, + public ?string $productCode, + public ?string $barcode2, + public ?string $systemBarcode, + public ?array $barcodeExtraList, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? null, + productStockHeadId: $data['ProductStockHeadId'] ?? null, + productId: $data['ProductId'] ?? 0, + productDescription: $data['ProductDescription'] ?? null, + productDescription2: $data['ProductDescription2'] ?? null, + vendorcode: $data['Vendorcode'] ?? null, + stockTotal: $data['StockTotal'] ?? 0.0, + stockOnCurrentLocation: $data['StockOnCurrentLocation'] ?? 0.0, + stockCountedByUser: $data['StockCountedByUser'] ?? null, + stockLevelDate: isset($data['StockLevelDate']) ? \Carbon\Carbon::parse($data['StockLevelDate']) : null, + barcode: $data['Barcode'] ?? null, + productCode: $data['ProductCode'] ?? null, + barcode2: $data['Barcode2'] ?? null, + systemBarcode: $data['SystemBarcode'] ?? null, + barcodeExtraList: array_map(static fn (array $item) => ProductExtraBarcode::make($item), $data['BarcodeExtraList'] ?? []), + ); + } +} diff --git a/src/Data/V30/ProductStockInformationStockLocationStock.php b/src/Data/V30/ProductStockInformationStockLocationStock.php new file mode 100644 index 0000000..25b189a --- /dev/null +++ b/src/Data/V30/ProductStockInformationStockLocationStock.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + locationId: $data['LocationId'] ?? 0, + actualStock: $data['ActualStock'] ?? 0.0, + zoneId: $data['ZoneId'] ?? null, + ); + } +} diff --git a/src/Data/V30/ProductStockInformationWarehouseDefaultPickLocation.php b/src/Data/V30/ProductStockInformationWarehouseDefaultPickLocation.php new file mode 100644 index 0000000..b2c26eb --- /dev/null +++ b/src/Data/V30/ProductStockInformationWarehouseDefaultPickLocation.php @@ -0,0 +1,27 @@ + $data */ + public static function make(array $data): self + { + return new self( + warehouseId: $data['WarehouseId'] ?? 0, + minimalStock: $data['MinimalStock'] ?? 0.0, + maximumStock: $data['MaximumStock'] ?? null, + defaultPickLocationId: $data['DefaultPickLocationId'] ?? null, + ); + } +} diff --git a/src/Data/V30/ProductStockInformationWarehouseStock.php b/src/Data/V30/ProductStockInformationWarehouseStock.php new file mode 100644 index 0000000..948d28a --- /dev/null +++ b/src/Data/V30/ProductStockInformationWarehouseStock.php @@ -0,0 +1,30 @@ + $locations */ + public function __construct( + public int $warehouseId, + public ?string $warehouseName, + public float $actualStock, + public float $freeStock, + public ?array $locations, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + warehouseId: $data['WarehouseId'] ?? 0, + warehouseName: $data['WarehouseName'] ?? null, + actualStock: $data['ActualStock'] ?? 0.0, + freeStock: $data['FreeStock'] ?? 0.0, + locations: array_map(static fn (array $item) => ProductStockInformationStockLocationStock::make($item), $data['Locations'] ?? []), + ); + } +} diff --git a/src/Data/V30/ProductStockWarehouse.php b/src/Data/V30/ProductStockWarehouse.php new file mode 100644 index 0000000..f58b814 --- /dev/null +++ b/src/Data/V30/ProductStockWarehouse.php @@ -0,0 +1,29 @@ + $data */ + public static function make(array $data): self + { + return new self( + warehouseId: $data['WarehouseId'] ?? 0, + warehouseName: $data['WarehouseName'] ?? null, + minimalStock: $data['MinimalStock'] ?? 0.0, + maxStock: $data['MaxStock'] ?? null, + defaultStockLocationId: $data['DefaultStockLocationId'] ?? null, + ); + } +} diff --git a/src/Data/V30/ProductTemplatePropertyWithTranslation.php b/src/Data/V30/ProductTemplatePropertyWithTranslation.php new file mode 100644 index 0000000..824a981 --- /dev/null +++ b/src/Data/V30/ProductTemplatePropertyWithTranslation.php @@ -0,0 +1,26 @@ + $translations */ + public function __construct( + public int $templatePropertyId, + public ?string $templatePropertyName, + public ?array $translations, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + templatePropertyId: $data['TemplatePropertyId'] ?? 0, + templatePropertyName: $data['TemplatePropertyName'] ?? null, + translations: array_map(static fn (array $item) => Translation::make($item), $data['Translations'] ?? []), + ); + } +} diff --git a/src/Data/V30/ProductTemplateValuesWithTranslation.php b/src/Data/V30/ProductTemplateValuesWithTranslation.php new file mode 100644 index 0000000..4ac483a --- /dev/null +++ b/src/Data/V30/ProductTemplateValuesWithTranslation.php @@ -0,0 +1,24 @@ + $templates */ + public function __construct( + public int $productId, + public ?array $templates, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + templates: array_map(static fn (array $item) => ProductTemplateValuesWithTranslationTemplateProperty::make($item), $data['Templates'] ?? []), + ); + } +} diff --git a/src/Data/V30/ProductTemplateValuesWithTranslationTemplateProperty.php b/src/Data/V30/ProductTemplateValuesWithTranslationTemplateProperty.php new file mode 100644 index 0000000..7146d33 --- /dev/null +++ b/src/Data/V30/ProductTemplateValuesWithTranslationTemplateProperty.php @@ -0,0 +1,24 @@ + $values */ + public function __construct( + public int $templatePropertyId, + public ?array $values, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + templatePropertyId: $data['TemplatePropertyId'] ?? 0, + values: array_map(static fn (array $item) => ProductTemplateValuesWithTranslationTemplatePropertyValue::make($item), $data['Values'] ?? []), + ); + } +} diff --git a/src/Data/V30/ProductTemplateValuesWithTranslationTemplatePropertyValue.php b/src/Data/V30/ProductTemplateValuesWithTranslationTemplatePropertyValue.php new file mode 100644 index 0000000..d99c525 --- /dev/null +++ b/src/Data/V30/ProductTemplateValuesWithTranslationTemplatePropertyValue.php @@ -0,0 +1,24 @@ + $translations */ + public function __construct( + public ?string $value, + public ?array $translations, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + value: $data['Value'] ?? null, + translations: array_map(static fn (array $item) => Translation::make($item), $data['Translations'] ?? []), + ); + } +} diff --git a/src/Data/V30/ProductType.php b/src/Data/V30/ProductType.php new file mode 100644 index 0000000..7515d04 --- /dev/null +++ b/src/Data/V30/ProductType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + value: $data['Value'] ?? null, + ); + } +} diff --git a/src/Data/V30/ProductV12.php b/src/Data/V30/ProductV12.php new file mode 100644 index 0000000..dc57a98 --- /dev/null +++ b/src/Data/V30/ProductV12.php @@ -0,0 +1,192 @@ + $freeValues + * @param array $descriptions + * @param array $shiftPrices + * @param array $productGroups + * @param array $barcodeExtraList + * @param array $wareHouses + * @param array $tags + */ + public function __construct( + public int $productId, + public ?string $productCode, + public ?string $productName1, + public ?string $productName2, + public ?string $productInfo, + public int $statusId, + public ?string $statusname, + public int $brandId, + public ?string $brandname, + public ?string $imagename1, + public ?string $imageUrl1, + public ?string $imagename2, + public ?string $imageUrl2, + public ?string $imagename3, + public ?string $imageUrl3, + public ?string $unit, + public int $unitId, + public int $minSaleAmount, + public ?int $minSaleAmountWebshop, + public ?int $minSaleBuyAmountDropShipment, + public ?int $saleCountIncrement, + public ?int $saleCountIncrementWebshop, + public ?int $saleCountIncrementDropShipment, + public ?int $minBuyAmount, + public float $vatPercent, + public ?int $vatCodeId, + public float $sellPriceGross, + public float $weight, + public float $volume, + public ?ProductOffer $offer, + public ?float $sellPriceAdvice, + public float $buyPrice, + public int $productGroupId1, + public ?int $productGroupId2, + public ?int $productGroupId3, + public ?int $productGroupId4, + public ?int $buyCountIncrement, + public ?float $sellPriceLowestForWebshop, + public bool $excludePriceFromPricelistCalculations, + public ?float $additionalBuyPriceAmount, + public ?float $additionalBuyPricePercentage, + public ?bool $isComposedProduct, + public bool $isAssemblyProduct, + public bool $composedProductSetChildSellPricesToZero, + public ?bool $composedProductSetSellPriceToZero, + public float $freeStock, + public ?int $externalStockActiveSupplier, + public ?int $creditorDiscountGroupId, + public ?\Carbon\Carbon $dateTimeLastChanged, + public ?\Carbon\Carbon $dateTimeAdded, + public ?string $barCode1, + public ?array $freeValues, + public ?int $sorting, + public ?\Carbon\Carbon $nextDelivery, + public ?array $descriptions, + public ?array $shiftPrices, + public ?array $productGroups, + public ?string $barcode2, + public ?array $barcodeExtraList, + public ?string $systemBarcode, + public int $productGroup1ProductGroupTypeId, + public ?array $wareHouses, + public ?int $minimalStock, + public int $PCSinInsidePackage, + public int $PCSinOutsidePackage, + public ?ProductType $productType1, + public ?ProductType $productType2, + public ?ProductType $productType3, + public ?ProductType $productType4, + public ?ProductType $productType5, + public ?float $standardAmount, + public ?string $vendorCode, + public ?int $productTemplateId, + public ?string $productTemplateName, + public bool $hasVariants, + public ?int $variantParentProductId, + public ?array $tags, + public ?int $defaultPickLocation, + public ?int $defaultBulkLocation, + public bool $hidePricesOnWebsite, + public bool $showOfferButtonOnWebsite, + public bool $hideStartingPricesOnWebsite, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + productCode: $data['ProductCode'] ?? null, + productName1: $data['ProductName1'] ?? null, + productName2: $data['ProductName2'] ?? null, + productInfo: $data['ProductInfo'] ?? null, + statusId: $data['StatusId'] ?? 0, + statusname: $data['Statusname'] ?? null, + brandId: $data['BrandId'] ?? 0, + brandname: $data['Brandname'] ?? null, + imagename1: $data['Imagename1'] ?? null, + imageUrl1: $data['ImageUrl1'] ?? null, + imagename2: $data['Imagename2'] ?? null, + imageUrl2: $data['ImageUrl2'] ?? null, + imagename3: $data['Imagename3'] ?? null, + imageUrl3: $data['ImageUrl3'] ?? null, + unit: $data['Unit'] ?? null, + unitId: $data['UnitId'] ?? 0, + minSaleAmount: $data['MinSaleAmount'] ?? 0, + minSaleAmountWebshop: $data['MinSaleAmountWebshop'] ?? null, + minSaleBuyAmountDropShipment: $data['MinSaleBuyAmountDropShipment'] ?? null, + saleCountIncrement: $data['SaleCountIncrement'] ?? null, + saleCountIncrementWebshop: $data['SaleCountIncrementWebshop'] ?? null, + saleCountIncrementDropShipment: $data['SaleCountIncrementDropShipment'] ?? null, + minBuyAmount: $data['MinBuyAmount'] ?? null, + vatPercent: $data['VatPercent'] ?? 0.0, + vatCodeId: $data['VatCodeId'] ?? null, + sellPriceGross: $data['SellPriceGross'] ?? 0.0, + weight: $data['Weight'] ?? 0.0, + volume: $data['Volume'] ?? 0.0, + offer: isset($data['Offer']) ? ProductOffer::make($data['Offer']) : null, + sellPriceAdvice: $data['SellPriceAdvice'] ?? null, + buyPrice: $data['BuyPrice'] ?? 0.0, + productGroupId1: $data['ProductGroupId1'] ?? 0, + productGroupId2: $data['ProductGroupId2'] ?? null, + productGroupId3: $data['ProductGroupId3'] ?? null, + productGroupId4: $data['ProductGroupId4'] ?? null, + buyCountIncrement: $data['BuyCountIncrement'] ?? null, + sellPriceLowestForWebshop: $data['SellPriceLowestForWebshop'] ?? null, + excludePriceFromPricelistCalculations: $data['ExcludePriceFromPricelistCalculations'] ?? false, + additionalBuyPriceAmount: $data['AdditionalBuyPriceAmount'] ?? null, + additionalBuyPricePercentage: $data['AdditionalBuyPricePercentage'] ?? null, + isComposedProduct: $data['IsComposedProduct'] ?? null, + isAssemblyProduct: $data['IsAssemblyProduct'] ?? false, + composedProductSetChildSellPricesToZero: $data['ComposedProductSetChildSellPricesToZero'] ?? false, + composedProductSetSellPriceToZero: $data['ComposedProductSetSellPriceToZero'] ?? null, + freeStock: $data['FreeStock'] ?? 0.0, + externalStockActiveSupplier: $data['ExternalStockActiveSupplier'] ?? null, + creditorDiscountGroupId: $data['CreditorDiscountGroupId'] ?? null, + dateTimeLastChanged: isset($data['DateTimeLastChanged']) ? \Carbon\Carbon::parse($data['DateTimeLastChanged']) : null, + dateTimeAdded: isset($data['DateTimeAdded']) ? \Carbon\Carbon::parse($data['DateTimeAdded']) : null, + barCode1: $data['BarCode1'] ?? null, + freeValues: array_map(static fn (array $item) => FreeValue::make($item), $data['FreeValues'] ?? []), + sorting: $data['Sorting'] ?? null, + nextDelivery: isset($data['NextDelivery']) ? \Carbon\Carbon::parse($data['NextDelivery']) : null, + descriptions: array_map(static fn (array $item) => Translation::make($item), $data['Descriptions'] ?? []), + shiftPrices: array_map(static fn (array $item) => ProductShiftPrice::make($item), $data['ShiftPrices'] ?? []), + productGroups: array_map(static fn (array $item) => ProductGroup::make($item), $data['ProductGroups'] ?? []), + barcode2: $data['Barcode2'] ?? null, + barcodeExtraList: array_map(static fn (array $item) => ProductExtraBarcode::make($item), $data['BarcodeExtraList'] ?? []), + systemBarcode: $data['SystemBarcode'] ?? null, + productGroup1ProductGroupTypeId: $data['ProductGroup1ProductGroupTypeId'] ?? 0, + wareHouses: array_map(static fn (array $item) => ProductStockWarehouse::make($item), $data['WareHouses'] ?? []), + minimalStock: $data['MinimalStock'] ?? null, + PCSinInsidePackage: $data['PCSinInsidePackage'] ?? 0, + PCSinOutsidePackage: $data['PCSinOutsidePackage'] ?? 0, + productType1: isset($data['ProductType1']) ? ProductType::make($data['ProductType1']) : null, + productType2: isset($data['ProductType2']) ? ProductType::make($data['ProductType2']) : null, + productType3: isset($data['ProductType3']) ? ProductType::make($data['ProductType3']) : null, + productType4: isset($data['ProductType4']) ? ProductType::make($data['ProductType4']) : null, + productType5: isset($data['ProductType5']) ? ProductType::make($data['ProductType5']) : null, + standardAmount: $data['StandardAmount'] ?? null, + vendorCode: $data['VendorCode'] ?? null, + productTemplateId: $data['ProductTemplateId'] ?? null, + productTemplateName: $data['ProductTemplateName'] ?? null, + hasVariants: $data['HasVariants'] ?? false, + variantParentProductId: $data['VariantParentProductId'] ?? null, + tags: $data['Tags'] ?? null, + defaultPickLocation: $data['DefaultPickLocation'] ?? null, + defaultBulkLocation: $data['DefaultBulkLocation'] ?? null, + hidePricesOnWebsite: $data['HidePricesOnWebsite'] ?? false, + showOfferButtonOnWebsite: $data['ShowOfferButtonOnWebsite'] ?? false, + hideStartingPricesOnWebsite: $data['HideStartingPricesOnWebsite'] ?? false, + ); + } +} diff --git a/src/Data/V30/ProductVariant.php b/src/Data/V30/ProductVariant.php new file mode 100644 index 0000000..a57edd8 --- /dev/null +++ b/src/Data/V30/ProductVariant.php @@ -0,0 +1,32 @@ + $translations */ + public function __construct( + public ?string $name, + public int $id, + public int $sort, + public ?int $categoryId, + public ?string $shortCode, + public ?array $translations, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + name: $data['Name'] ?? null, + id: $data['Id'] ?? 0, + sort: $data['Sort'] ?? 0, + categoryId: $data['CategoryId'] ?? null, + shortCode: $data['ShortCode'] ?? null, + translations: array_map(static fn (array $item) => Translation::make($item), $data['Translations'] ?? []), + ); + } +} diff --git a/src/Data/V30/ProductVariantBalkChildrenGroupChildVariantOptions.php b/src/Data/V30/ProductVariantBalkChildrenGroupChildVariantOptions.php new file mode 100644 index 0000000..29ee304 --- /dev/null +++ b/src/Data/V30/ProductVariantBalkChildrenGroupChildVariantOptions.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + variantBalkId: $data['VariantBalkId'] ?? 0, + variantOptionid: $data['VariantOptionid'] ?? 0, + ); + } +} diff --git a/src/Data/V30/ProductVariantBalkChildrenGroupChildren.php b/src/Data/V30/ProductVariantBalkChildrenGroupChildren.php new file mode 100644 index 0000000..3a1c9cd --- /dev/null +++ b/src/Data/V30/ProductVariantBalkChildrenGroupChildren.php @@ -0,0 +1,24 @@ + $variantOptions */ + public function __construct( + public int $productId, + public ?array $variantOptions, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + variantOptions: array_map(static fn (array $item) => ProductVariantBalkChildrenGroupChildVariantOptions::make($item), $data['VariantOptions'] ?? []), + ); + } +} diff --git a/src/Data/V30/ProductVariantBalkTranslation.php b/src/Data/V30/ProductVariantBalkTranslation.php new file mode 100644 index 0000000..11e9ba5 --- /dev/null +++ b/src/Data/V30/ProductVariantBalkTranslation.php @@ -0,0 +1,27 @@ + $data */ + public static function make(array $data): self + { + return new self( + value: $data['Value'] ?? null, + globalisationCode: $data['GlobalisationCode'] ?? null, + globalisationId: $data['GlobalisationId'] ?? 0, + websiteDomainId: $data['WebsiteDomainId'] ?? null, + ); + } +} diff --git a/src/Data/V30/Province.php b/src/Data/V30/Province.php new file mode 100644 index 0000000..bc99c61 --- /dev/null +++ b/src/Data/V30/Province.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Data/V30/RelatedProductV3.php b/src/Data/V30/RelatedProductV3.php new file mode 100644 index 0000000..73f2d0a --- /dev/null +++ b/src/Data/V30/RelatedProductV3.php @@ -0,0 +1,27 @@ + $data */ + public static function make(array $data): self + { + return new self( + relatedProductId: $data['RelatedProductId'] ?? 0, + relatedTypeId: $data['RelatedTypeId'] ?? 0, + freeValue1: $data['FreeValue1'] ?? null, + freeValue2: $data['FreeValue2'] ?? null, + ); + } +} diff --git a/src/Data/V30/RelationStatus.php b/src/Data/V30/RelationStatus.php new file mode 100644 index 0000000..292fc35 --- /dev/null +++ b/src/Data/V30/RelationStatus.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Data/V30/RelationType.php b/src/Data/V30/RelationType.php new file mode 100644 index 0000000..7eb5f17 --- /dev/null +++ b/src/Data/V30/RelationType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Data/V30/Representative.php b/src/Data/V30/Representative.php new file mode 100644 index 0000000..a5d5fe0 --- /dev/null +++ b/src/Data/V30/Representative.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Data/V30/ReturnProblem.php b/src/Data/V30/ReturnProblem.php new file mode 100644 index 0000000..de9cae3 --- /dev/null +++ b/src/Data/V30/ReturnProblem.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Data/V30/ReturnSolution.php b/src/Data/V30/ReturnSolution.php new file mode 100644 index 0000000..5244b2c --- /dev/null +++ b/src/Data/V30/ReturnSolution.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Data/V30/SalesOrderDeliveryDetailRow.php b/src/Data/V30/SalesOrderDeliveryDetailRow.php new file mode 100644 index 0000000..ba17ec7 --- /dev/null +++ b/src/Data/V30/SalesOrderDeliveryDetailRow.php @@ -0,0 +1,39 @@ + $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + productCode: $data['ProductCode'] ?? null, + buyPrice: $data['BuyPrice'] ?? 0.0, + sellPrice: $data['SellPrice'] ?? 0.0, + description: $data['Description'] ?? null, + useWarehouseIdForReservation: $data['UseWarehouseIdForReservation'] ?? null, + supplierProductCode: $data['Supplier_ProductCode'] ?? null, + commission: $data['Commission'] ?? null, + rowId: $data['RowId'] ?? 0, + amountDelivered: $data['AmountDelivered'] ?? 0.0, + ); + } +} diff --git a/src/Data/V30/StockLocationForProductItem.php b/src/Data/V30/StockLocationForProductItem.php new file mode 100644 index 0000000..21f29cd --- /dev/null +++ b/src/Data/V30/StockLocationForProductItem.php @@ -0,0 +1,37 @@ + $data */ + public static function make(array $data): self + { + return new self( + isDefault: $data['IsDefault'] ?? false, + location: $data['Location'] ?? null, + locationId: $data['LocationId'] ?? 0, + qty: $data['Qty'] ?? 0.0, + warehouseSortId: $data['WarehouseSortId'] ?? 0, + rowSortId: $data['RowSortId'] ?? 0, + columnSortId: $data['ColumnSortId'] ?? 0, + locationSortId: $data['LocationSortId'] ?? 0, + productId: $data['ProductId'] ?? 0, + ); + } +} diff --git a/src/Data/V30/Translation.php b/src/Data/V30/Translation.php new file mode 100644 index 0000000..e2e828d --- /dev/null +++ b/src/Data/V30/Translation.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + globalisationCode: $data['GlobalisationCode'] ?? null, + globalisationId: $data['GlobalisationId'] ?? 0, + value: $data['Value'] ?? null, + ); + } +} diff --git a/src/Data/V30/VariantBalkCategoryTranslation.php b/src/Data/V30/VariantBalkCategoryTranslation.php new file mode 100644 index 0000000..54f3cce --- /dev/null +++ b/src/Data/V30/VariantBalkCategoryTranslation.php @@ -0,0 +1,29 @@ + $data */ + public static function make(array $data): self + { + return new self( + title: $data['Title'] ?? null, + information: $data['Information'] ?? null, + shortDescription: $data['ShortDescription'] ?? null, + globalisationId: $data['GlobalisationId'] ?? 0, + websiteDomainId: $data['WebsiteDomainId'] ?? null, + ); + } +} diff --git a/src/Data/V30/VatCode.php b/src/Data/V30/VatCode.php new file mode 100644 index 0000000..ee14e60 --- /dev/null +++ b/src/Data/V30/VatCode.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + percent: $data['Percent'] ?? 0.0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Data/V30/WarehouseMinimalStockNumber.php b/src/Data/V30/WarehouseMinimalStockNumber.php new file mode 100644 index 0000000..e1f9583 --- /dev/null +++ b/src/Data/V30/WarehouseMinimalStockNumber.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + warehouseId: $data['WarehouseId'] ?? 0, + minimalStock: $data['MinimalStock'] ?? null, + ); + } +} diff --git a/src/Data/V30/WebsiteDomain.php b/src/Data/V30/WebsiteDomain.php new file mode 100644 index 0000000..be651b2 --- /dev/null +++ b/src/Data/V30/WebsiteDomain.php @@ -0,0 +1,27 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + url: $data['Url'] ?? null, + title: $data['Title'] ?? null, + isMainDomain: $data['IsMainDomain'] ?? false, + ); + } +} diff --git a/src/Data/V30/WebsiteProductListType.php b/src/Data/V30/WebsiteProductListType.php new file mode 100644 index 0000000..4e96424 --- /dev/null +++ b/src/Data/V30/WebsiteProductListType.php @@ -0,0 +1,19 @@ + $data */ + public static function make(array $data): self + { + return new self( + ); + } +} diff --git a/src/Requests/V10/AppointmentRequest.php b/src/Requests/V10/AppointmentsRequest.php similarity index 97% rename from src/Requests/V10/AppointmentRequest.php rename to src/Requests/V10/AppointmentsRequest.php index 71f0e81..32a4721 100644 --- a/src/Requests/V10/AppointmentRequest.php +++ b/src/Requests/V10/AppointmentsRequest.php @@ -9,7 +9,7 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -class AppointmentRequest extends Request +class AppointmentsRequest extends Request { /** * @param array{ diff --git a/src/Requests/V10/BackOfficeRequest.php b/src/Requests/V10/BackOfficeRequest.php index 215bac0..46aba44 100644 --- a/src/Requests/V10/BackOfficeRequest.php +++ b/src/Requests/V10/BackOfficeRequest.php @@ -6,8 +6,8 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\BooleanLogic4Response; -use Webparking\Logic4Client\Responses\V10\DatabaseConfigurationLogic4Response; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfboolean; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfDatabaseConfiguration; class BackOfficeRequest extends Request { @@ -17,8 +17,8 @@ class BackOfficeRequest extends Request * @throws Logic4ApiException */ public function getDatabaseConfiguration( - ): DatabaseConfigurationLogic4Response { - return DatabaseConfigurationLogic4Response::make( + ): Logic4ResponseOfDatabaseConfiguration { + return Logic4ResponseOfDatabaseConfiguration::make( $this->buildResponse( $this->getClient()->get('/v1/Backoffice/GetDatabaseConfiguration'), ) @@ -29,7 +29,7 @@ public function getDatabaseConfiguration( * Maak een nieuwe taak aan. * * @param array{ - * Type?: string, + * Type?: mixed, * SerializedJson?: string|null, * } $parameters * @@ -37,8 +37,8 @@ public function getDatabaseConfiguration( */ public function postCreateBackofficeAction( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Backoffice/PostCreateBackofficeAction', ['json' => $parameters]), ) diff --git a/src/Requests/V10/BuyOrderDeliveryRequest.php b/src/Requests/V10/BuyOrderDeliveryRequest.php index 663cfea..4c43b4c 100644 --- a/src/Requests/V10/BuyOrderDeliveryRequest.php +++ b/src/Requests/V10/BuyOrderDeliveryRequest.php @@ -7,10 +7,10 @@ use Webparking\Logic4Client\Data\V10\BuyOrderDeliveryRead; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\BuyOrderDeliveryAndOrderMovementLogic4Response; -use Webparking\Logic4Client\Responses\V10\BuyOrderDeliveryStatusValueLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\BuyOrderDeliveryTypeValueLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\StringLogic4Response; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfBuyOrderDeliveryStatusValue; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfBuyOrderDeliveryTypeValue; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfBuyOrderDeliveryAndOrderMovement; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfstring; class BuyOrderDeliveryRequest extends Request { @@ -19,7 +19,7 @@ class BuyOrderDeliveryRequest extends Request * * @param array{ * ProcessMutationButDoNotCreatePickbon?: bool, - * Status?: string, + * Status?: mixed, * SupplierId?: int|null, * BuyOrderId?: int|null, * Remarks?: string|null, @@ -33,8 +33,8 @@ class BuyOrderDeliveryRequest extends Request */ public function createBuyOrderDelivery( array $parameters = [], - ): StringLogic4Response { - return StringLogic4Response::make( + ): Logic4ResponseOfstring { + return Logic4ResponseOfstring::make( $this->buildResponse( $this->getClient()->post('/v1/BuyOrderDeliveries/CreateBuyOrderDelivery', ['json' => $parameters]), ) @@ -48,7 +48,7 @@ public function createBuyOrderDelivery( * @param array{ * OrderId?: int|null, * ProcessMutationButDoNotCreatePickbon?: bool, - * Status?: string, + * Status?: mixed, * SupplierId?: int|null, * BuyOrderId?: int|null, * Remarks?: string|null, @@ -62,8 +62,8 @@ public function createBuyOrderDelivery( */ public function createBuyOrderDeliveryAndOrderMovement( array $parameters = [], - ): BuyOrderDeliveryAndOrderMovementLogic4Response { - return BuyOrderDeliveryAndOrderMovementLogic4Response::make( + ): Logic4ResponseOfBuyOrderDeliveryAndOrderMovement { + return Logic4ResponseOfBuyOrderDeliveryAndOrderMovement::make( $this->buildResponse( $this->getClient()->post('/v1/BuyOrderDeliveries/CreateBuyOrderDeliveryAndOrderMovement', ['json' => $parameters]), ) @@ -104,8 +104,8 @@ public function getBuyOrderDeliveries(array $parameters = []): \Generator * @throws Logic4ApiException */ public function getBuyOrderDeliveryStatusses( - ): BuyOrderDeliveryStatusValueLogic4ResponseList { - return BuyOrderDeliveryStatusValueLogic4ResponseList::make( + ): Logic4ResponseListOfBuyOrderDeliveryStatusValue { + return Logic4ResponseListOfBuyOrderDeliveryStatusValue::make( $this->buildResponse( $this->getClient()->get('/v1/BuyOrderDeliveries/GetBuyOrderDeliveryStatusses'), ) @@ -118,8 +118,8 @@ public function getBuyOrderDeliveryStatusses( * @throws Logic4ApiException */ public function getBuyOrderDeliveryTypes( - ): BuyOrderDeliveryTypeValueLogic4ResponseList { - return BuyOrderDeliveryTypeValueLogic4ResponseList::make( + ): Logic4ResponseListOfBuyOrderDeliveryTypeValue { + return Logic4ResponseListOfBuyOrderDeliveryTypeValue::make( $this->buildResponse( $this->getClient()->get('/v1/BuyOrderDeliveries/GetBuyOrderDeliveryTypes'), ) diff --git a/src/Requests/V10/BuyOrderRequest.php b/src/Requests/V10/BuyOrderRequest.php index 17df08f..fee3ce2 100644 --- a/src/Requests/V10/BuyOrderRequest.php +++ b/src/Requests/V10/BuyOrderRequest.php @@ -6,11 +6,11 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\BooleanLogic4Response; -use Webparking\Logic4Client\Responses\V10\BuyOrderBaseInfoLogic4Response; -use Webparking\Logic4Client\Responses\V10\BuyOrderBaseInfoLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\BuyOrderRowLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\Int32ProductBuyOrderDeliveryRowListDictionaryLogic4Response; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfBuyOrderBaseInfo; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfBuyOrderRow; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfboolean; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfBuyOrderBaseInfo; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfDictionaryOfintAndListOfProductBuyOrderDeliveryRow; class BuyOrderRequest extends Request { @@ -34,9 +34,10 @@ class BuyOrderRequest extends Request * * @throws Logic4ApiException */ - public function addBuyOrderRow(array $parameters = []): BooleanLogic4Response - { - return BooleanLogic4Response::make( + public function addBuyOrderRow( + array $parameters = [], + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/BuyOrders/AddBuyOrderRow', ['json' => $parameters]), ) @@ -70,13 +71,11 @@ public function addBuyOrderRow(array $parameters = []): BooleanLogic4Response * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik een nieuwere versie. - Inkooporderregel aanmaken of updaten */ public function addUpdateBuyOrderRow( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/BuyOrders/AddUpdateBuyOrderRow', ['json' => $parameters]), ) @@ -103,8 +102,8 @@ public function addUpdateBuyOrderRow( */ public function createBuyOrder( array $parameters = [], - ): BuyOrderBaseInfoLogic4Response { - return BuyOrderBaseInfoLogic4Response::make( + ): Logic4ResponseOfBuyOrderBaseInfo { + return Logic4ResponseOfBuyOrderBaseInfo::make( $this->buildResponse( $this->getClient()->post('/v1/BuyOrders/CreateBuyOrder', ['json' => $parameters]), ) @@ -116,9 +115,9 @@ public function createBuyOrder( * * @throws Logic4ApiException */ - public function getBuyOrderRows(int $value): BuyOrderRowLogic4ResponseList + public function getBuyOrderRows(int $value): Logic4ResponseListOfBuyOrderRow { - return BuyOrderRowLogic4ResponseList::make( + return Logic4ResponseListOfBuyOrderRow::make( $this->buildResponse( $this->getClient()->post('/v1/BuyOrders/GetBuyOrderRows', ['json' => $value]), ) @@ -138,13 +137,11 @@ public function getBuyOrderRows(int $value): BuyOrderRowLogic4ResponseList * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v3.0. - Inkoopordersregels ophalen o.b.v. filter */ public function getBuyOrderRowsByFilter( array $parameters = [], - ): BuyOrderRowLogic4ResponseList { - return BuyOrderRowLogic4ResponseList::make( + ): Logic4ResponseListOfBuyOrderRow { + return Logic4ResponseListOfBuyOrderRow::make( $this->buildResponse( $this->getClient()->post('/v1/BuyOrders/GetBuyOrderRowsByFilter', ['json' => $parameters]), ) @@ -164,8 +161,8 @@ public function getBuyOrderRowsByFilter( */ public function getBuyOrderRowsPerProduct( array $parameters = [], - ): Int32ProductBuyOrderDeliveryRowListDictionaryLogic4Response { - return Int32ProductBuyOrderDeliveryRowListDictionaryLogic4Response::make( + ): Logic4ResponseOfDictionaryOfintAndListOfProductBuyOrderDeliveryRow { + return Logic4ResponseOfDictionaryOfintAndListOfProductBuyOrderDeliveryRow::make( $this->buildResponse( $this->getClient()->post('/v1/BuyOrders/GetBuyOrderRowsPerProduct', ['json' => $parameters]), ) @@ -190,13 +187,11 @@ public function getBuyOrderRowsPerProduct( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v3.0. - Inkooporders ophalen o.b.v. filter. */ public function getBuyOrders( array $parameters = [], - ): BuyOrderBaseInfoLogic4ResponseList { - return BuyOrderBaseInfoLogic4ResponseList::make( + ): Logic4ResponseListOfBuyOrderBaseInfo { + return Logic4ResponseListOfBuyOrderBaseInfo::make( $this->buildResponse( $this->getClient()->post('/v1/BuyOrders/GetBuyOrders', ['json' => $parameters]), ) @@ -207,7 +202,7 @@ public function getBuyOrders( * Wijzig een bestaande inkooporder. * * @param array{ - * Id?: int, + * Id?: int|null, * CreditorId?: int, * Remarks?: string|null, * BranchId?: int|null, @@ -219,8 +214,8 @@ public function getBuyOrders( */ public function updateBuyOrder( array $parameters = [], - ): BuyOrderBaseInfoLogic4Response { - return BuyOrderBaseInfoLogic4Response::make( + ): Logic4ResponseOfBuyOrderBaseInfo { + return Logic4ResponseOfBuyOrderBaseInfo::make( $this->buildResponse( $this->getClient()->post('/v1/BuyOrders/UpdateBuyOrder', ['json' => $parameters]), ) @@ -249,8 +244,8 @@ public function updateBuyOrder( */ public function updateBuyOrderRow( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->patch('/v1/BuyOrders/UpdateBuyOrderRow', ['json' => $parameters]), ) diff --git a/src/Requests/V10/CRMRequest.php b/src/Requests/V10/CRMRequest.php index b3f1e4b..03a7aaa 100644 --- a/src/Requests/V10/CRMRequest.php +++ b/src/Requests/V10/CRMRequest.php @@ -6,12 +6,12 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\CRMActivityLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\CRMActivityStatusLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\CRMActivityTypeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\CRMProjectLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\CRMProjectStatusLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\CRMProjectTypeLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfCRMActivity; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfCRMActivityStatus; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfCRMActivityType; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfCRMProject; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfCRMProjectStatus; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfCRMProjectType; class CRMRequest extends Request { @@ -38,13 +38,11 @@ class CRMRequest extends Request * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v3.0. - CRM activiteiten o.b.v. filter */ public function getCRMActivities( array $parameters = [], - ): CRMActivityLogic4ResponseList { - return CRMActivityLogic4ResponseList::make( + ): Logic4ResponseListOfCRMActivity { + return Logic4ResponseListOfCRMActivity::make( $this->buildResponse( $this->getClient()->post('/v1/CRM/GetCRMActivities', ['json' => $parameters]), ) @@ -56,9 +54,9 @@ public function getCRMActivities( * * @throws Logic4ApiException */ - public function getCRMActivityStatusses(): CRMActivityStatusLogic4ResponseList - { - return CRMActivityStatusLogic4ResponseList::make( + public function getCRMActivityStatusses( + ): Logic4ResponseListOfCRMActivityStatus { + return Logic4ResponseListOfCRMActivityStatus::make( $this->buildResponse( $this->getClient()->get('/v1/CRM/GetCRMActivityStatusses'), ) @@ -70,9 +68,9 @@ public function getCRMActivityStatusses(): CRMActivityStatusLogic4ResponseList * * @throws Logic4ApiException */ - public function getCRMActivityTypes(): CRMActivityTypeLogic4ResponseList + public function getCRMActivityTypes(): Logic4ResponseListOfCRMActivityType { - return CRMActivityTypeLogic4ResponseList::make( + return Logic4ResponseListOfCRMActivityType::make( $this->buildResponse( $this->getClient()->get('/v1/CRM/GetCRMActivityTypes'), ) @@ -97,8 +95,8 @@ public function getCRMActivityTypes(): CRMActivityTypeLogic4ResponseList */ public function getCRMProjects( array $parameters = [], - ): CRMProjectLogic4ResponseList { - return CRMProjectLogic4ResponseList::make( + ): Logic4ResponseListOfCRMProject { + return Logic4ResponseListOfCRMProject::make( $this->buildResponse( $this->getClient()->post('/v1/CRM/GetCRMProjects', ['json' => $parameters]), ) @@ -110,9 +108,9 @@ public function getCRMProjects( * * @throws Logic4ApiException */ - public function getCRMProjectStatusses(): CRMProjectStatusLogic4ResponseList + public function getCRMProjectStatusses(): Logic4ResponseListOfCRMProjectStatus { - return CRMProjectStatusLogic4ResponseList::make( + return Logic4ResponseListOfCRMProjectStatus::make( $this->buildResponse( $this->getClient()->get('/v1/CRM/GetCRMProjectStatusses'), ) @@ -124,9 +122,9 @@ public function getCRMProjectStatusses(): CRMProjectStatusLogic4ResponseList * * @throws Logic4ApiException */ - public function getCRMProjectTypes(): CRMProjectTypeLogic4ResponseList + public function getCRMProjectTypes(): Logic4ResponseListOfCRMProjectType { - return CRMProjectTypeLogic4ResponseList::make( + return Logic4ResponseListOfCRMProjectType::make( $this->buildResponse( $this->getClient()->get('/v1/CRM/GetCRMProjectTypes'), ) @@ -138,9 +136,9 @@ public function getCRMProjectTypes(): CRMProjectTypeLogic4ResponseList * * @throws Logic4ApiException */ - public function getCRMProjectTypes2(): CRMProjectTypeLogic4ResponseList + public function getCRMProjectTypes2(): Logic4ResponseListOfCRMProjectType { - return CRMProjectTypeLogic4ResponseList::make( + return Logic4ResponseListOfCRMProjectType::make( $this->buildResponse( $this->getClient()->get('/v1/CRM/GetCRMProjectTypes2'), ) diff --git a/src/Requests/V10/CompanyRequest.php b/src/Requests/V10/CompanyRequest.php index 6e48431..b99459f 100644 --- a/src/Requests/V10/CompanyRequest.php +++ b/src/Requests/V10/CompanyRequest.php @@ -6,12 +6,12 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\AdministrationLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\BranchLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\CompanyInformationLogic4Response; -use Webparking\Logic4Client\Responses\V10\CompanyValuesLogic4Response; -use Webparking\Logic4Client\Responses\V10\StringLogic4Response; -use Webparking\Logic4Client\Responses\V10\UserstatusLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfAdministration; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfBranch; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfUserstatus; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfCompanyInformation; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfCompanyValues; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfstring; class CompanyRequest extends Request { @@ -20,9 +20,9 @@ class CompanyRequest extends Request * * @throws Logic4ApiException */ - public function getAdministrationsForUser(): AdministrationLogic4ResponseList - { - return AdministrationLogic4ResponseList::make( + public function getAdministrationsForUser( + ): Logic4ResponseListOfAdministration { + return Logic4ResponseListOfAdministration::make( $this->buildResponse( $this->getClient()->get('/v1/Company/GetAdministrationsForUser'), ) @@ -34,9 +34,9 @@ public function getAdministrationsForUser(): AdministrationLogic4ResponseList * * @throws Logic4ApiException */ - public function getBranches(): BranchLogic4ResponseList + public function getBranches(): Logic4ResponseListOfBranch { - return BranchLogic4ResponseList::make( + return Logic4ResponseListOfBranch::make( $this->buildResponse( $this->getClient()->get('/v1/Company/GetBranches'), ) @@ -48,9 +48,9 @@ public function getBranches(): BranchLogic4ResponseList * * @throws Logic4ApiException */ - public function getCompanyInformation(): CompanyInformationLogic4Response + public function getCompanyInformation(): Logic4ResponseOfCompanyInformation { - return CompanyInformationLogic4Response::make( + return Logic4ResponseOfCompanyInformation::make( $this->buildResponse( $this->getClient()->get('/v1/Company/GetCompanyInformation'), ) @@ -62,9 +62,9 @@ public function getCompanyInformation(): CompanyInformationLogic4Response * * @throws Logic4ApiException */ - public function getCompanyValues(): CompanyValuesLogic4Response + public function getCompanyValues(): Logic4ResponseOfCompanyValues { - return CompanyValuesLogic4Response::make( + return Logic4ResponseOfCompanyValues::make( $this->buildResponse( $this->getClient()->get('/v1/Company/GetCompanyValues'), ) @@ -76,9 +76,9 @@ public function getCompanyValues(): CompanyValuesLogic4Response * * @throws Logic4ApiException */ - public function getNotice(): StringLogic4Response + public function getNotice(): Logic4ResponseOfstring { - return StringLogic4Response::make( + return Logic4ResponseOfstring::make( $this->buildResponse( $this->getClient()->get('/v1/Company/GetNotice'), ) @@ -90,9 +90,9 @@ public function getNotice(): StringLogic4Response * * @throws Logic4ApiException */ - public function getUserStatuses(): UserstatusLogic4ResponseList + public function getUserStatuses(): Logic4ResponseListOfUserstatus { - return UserstatusLogic4ResponseList::make( + return Logic4ResponseListOfUserstatus::make( $this->buildResponse( $this->getClient()->get('/v1/Company/GetUserStatuses'), ) diff --git a/src/Requests/V10/DeliveryRequest.php b/src/Requests/V10/DeliveryRequest.php index e405a39..f42de90 100644 --- a/src/Requests/V10/DeliveryRequest.php +++ b/src/Requests/V10/DeliveryRequest.php @@ -7,7 +7,7 @@ use Webparking\Logic4Client\Data\V10\SalesOrderDelivery; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\SalesOrderDeliveryRowLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfSalesOrderDeliveryRow; class DeliveryRequest extends Request { @@ -22,8 +22,8 @@ class DeliveryRequest extends Request */ public function createDeliveryForOrderRows( array $parameters = [], - ): SalesOrderDeliveryRowLogic4ResponseList { - return SalesOrderDeliveryRowLogic4ResponseList::make( + ): Logic4ResponseListOfSalesOrderDeliveryRow { + return Logic4ResponseListOfSalesOrderDeliveryRow::make( $this->buildResponse( $this->getClient()->post('/v1/Delivery/CreateDeliveryForOrderRows', ['json' => $parameters]), ) @@ -31,6 +31,8 @@ public function createDeliveryForOrderRows( } /** + * Zoeken op verkooporder uitleveringen. + * * @param array{ * DateFrom?: string|null, * DateTo?: string|null, @@ -47,8 +49,6 @@ public function createDeliveryForOrderRows( * @return \Generator * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v3.0. - Zoeken op verkooporder uitleveringen. */ public function getDeliveries(array $parameters = []): \Generator { diff --git a/src/Requests/V10/EmailRequest.php b/src/Requests/V10/EmailRequest.php index 4b85ec2..4db5399 100644 --- a/src/Requests/V10/EmailRequest.php +++ b/src/Requests/V10/EmailRequest.php @@ -7,17 +7,19 @@ use Webparking\Logic4Client\Data\V10\EmailMessage; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\BooleanLogic4Response; -use Webparking\Logic4Client\Responses\V10\EmailAddressLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\EmailAttachmentLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\EmailBoxLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\EmailMessageStatusLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\EmailUserLogic4Response; -use Webparking\Logic4Client\Responses\V10\Int32Logic4Response; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfEmailAddress; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfEmailAttachment; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfEmailBox; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfEmailMessageStatus; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfboolean; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfEmailUser; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfint; class EmailRequest extends Request { /** + * Voeg een nieuwe bijlage toe aan een email zonder de byte array. + * * @param array{ * Id?: int, * EmailMessageId?: int, @@ -30,8 +32,8 @@ class EmailRequest extends Request */ public function addEmailAttachment( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Email/AddEmailAttachment', ['json' => $parameters]), ) @@ -39,6 +41,8 @@ public function addEmailAttachment( } /** + * Voeg een nieuwe bijlages toe aan een email zonder de byte array. + * * @param arraybuildResponse( $this->getClient()->post('/v1/Email/AddEmailAttachments', ['json' => $parameters]), ) @@ -76,9 +80,9 @@ public function addEmailAttachments( * * @throws Logic4ApiException */ - public function addEmailBox(array $parameters = []): BooleanLogic4Response + public function addEmailBox(array $parameters = []): Logic4ResponseOfboolean { - return BooleanLogic4Response::make( + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Email/AddEmailBox', ['json' => $parameters]), ) @@ -86,6 +90,8 @@ public function addEmailBox(array $parameters = []): BooleanLogic4Response } /** + * Voeg een nieuwe email toe in de conceptenmap van de gebruiker. + * * @param array{ * Id?: int, * Subject?: string|null, @@ -109,9 +115,9 @@ public function addEmailBox(array $parameters = []): BooleanLogic4Response * * @throws Logic4ApiException */ - public function addEmailMessage(array $parameters = []): Int32Logic4Response + public function addEmailMessage(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Email/AddEmailMessage', ['json' => $parameters]), ) @@ -119,11 +125,13 @@ public function addEmailMessage(array $parameters = []): Int32Logic4Response } /** + * Verwijder een emailbijlage o.b.v. email-attachment Id. + * * @throws Logic4ApiException */ - public function deleteEmailAttachment(int $value): BooleanLogic4Response + public function deleteEmailAttachment(int $value): Logic4ResponseOfboolean { - return BooleanLogic4Response::make( + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Email/DeleteEmailAttachment', ['json' => $value]), ) @@ -135,9 +143,9 @@ public function deleteEmailAttachment(int $value): BooleanLogic4Response * * @throws Logic4ApiException */ - public function deleteEmailBox(int $value): BooleanLogic4Response + public function deleteEmailBox(int $value): Logic4ResponseOfboolean { - return BooleanLogic4Response::make( + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Email/DeleteEmailBox', ['json' => $value]), ) @@ -145,11 +153,13 @@ public function deleteEmailBox(int $value): BooleanLogic4Response } /** + * Verwijder een email. + * * @throws Logic4ApiException */ - public function deleteEmailMessage(int $value): BooleanLogic4Response + public function deleteEmailMessage(int $value): Logic4ResponseOfboolean { - return BooleanLogic4Response::make( + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Email/DeleteEmailMessage', ['json' => $value]), ) @@ -157,20 +167,22 @@ public function deleteEmailMessage(int $value): BooleanLogic4Response } /** + * Update minimale gegevens van een email. + * * @param array{ * EmailIds?: array, * EmailBoxId?: int|null, * EmailStatusId?: int|null, * IsRead?: bool|null, - * Action?: string, + * Action?: mixed, * } $parameters * * @throws Logic4ApiException */ public function emailMessagesAction( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Email/EmailMessagesAction', ['json' => $parameters]), ) @@ -178,6 +190,8 @@ public function emailMessagesAction( } /** + * Verkrijg emailbijlagen van een emailmessage. + * * @param array{ * EmailMessageId?: int, * } $parameters @@ -186,8 +200,8 @@ public function emailMessagesAction( */ public function getEmailAttachments( array $parameters = [], - ): EmailAttachmentLogic4ResponseList { - return EmailAttachmentLogic4ResponseList::make( + ): Logic4ResponseListOfEmailAttachment { + return Logic4ResponseListOfEmailAttachment::make( $this->buildResponse( $this->getClient()->post('/v1/Email/GetEmailAttachments', ['json' => $parameters]), ) @@ -195,6 +209,8 @@ public function getEmailAttachments( } /** + * Verkrijg emailboxen o.b.v. meegestuurde user Id. + * * @param array{ * ParentId?: int|null, * ShowOnlyTopLevelEmailboxes?: bool|null, @@ -204,8 +220,8 @@ public function getEmailAttachments( */ public function getEmailBoxes( array $parameters = [], - ): EmailBoxLogic4ResponseList { - return EmailBoxLogic4ResponseList::make( + ): Logic4ResponseListOfEmailBox { + return Logic4ResponseListOfEmailBox::make( $this->buildResponse( $this->getClient()->post('/v1/Email/GetEmailBoxes', ['json' => $parameters]), ) @@ -213,6 +229,8 @@ public function getEmailBoxes( } /** + * Verkrijg emailmessages o.b.v. het meegestuurde filter. + * * @param array{ * EmailId?: int|null, * EmailboxId?: int|null, @@ -251,11 +269,13 @@ public function getEmailMessages(array $parameters = []): \Generator } /** + * Verkrijg emailberichten statussen. + * * @throws Logic4ApiException */ public function getEmailMessageStatuses( - ): EmailMessageStatusLogic4ResponseList { - return EmailMessageStatusLogic4ResponseList::make( + ): Logic4ResponseListOfEmailMessageStatus { + return Logic4ResponseListOfEmailMessageStatus::make( $this->buildResponse( $this->getClient()->get('/v1/Email/GetEmailMessageStatuses'), ) @@ -263,11 +283,13 @@ public function getEmailMessageStatuses( } /** + * Verkrijg een emailuser o.b.v. meegestuurde user Id. + * * @throws Logic4ApiException */ - public function getEmailUser(): EmailUserLogic4Response + public function getEmailUser(): Logic4ResponseOfEmailUser { - return EmailUserLogic4Response::make( + return Logic4ResponseOfEmailUser::make( $this->buildResponse( $this->getClient()->get('/v1/Email/GetEmailUser'), ) @@ -275,11 +297,13 @@ public function getEmailUser(): EmailUserLogic4Response } /** + * Verkrijg email-snelkeuzes. + * * @throws Logic4ApiException */ - public function getUsedEmailAddresses(): EmailAddressLogic4ResponseList + public function getUsedEmailAddresses(): Logic4ResponseListOfEmailAddress { - return EmailAddressLogic4ResponseList::make( + return Logic4ResponseListOfEmailAddress::make( $this->buildResponse( $this->getClient()->get('/v1/Email/GetUsedEmailAddresses'), ) @@ -302,9 +326,10 @@ public function getUsedEmailAddresses(): EmailAddressLogic4ResponseList * * @throws Logic4ApiException */ - public function updateEmailBox(array $parameters = []): BooleanLogic4Response - { - return BooleanLogic4Response::make( + public function updateEmailBox( + array $parameters = [], + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Email/UpdateEmailBox', ['json' => $parameters]), ) @@ -312,6 +337,8 @@ public function updateEmailBox(array $parameters = []): BooleanLogic4Response } /** + * Update een bestaande email. + * * @param array{ * Id?: int, * Subject?: string|null, @@ -337,8 +364,8 @@ public function updateEmailBox(array $parameters = []): BooleanLogic4Response */ public function updateEmailMessage( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->put('/v1/Email/UpdateEmailMessage', ['json' => $parameters]), ) diff --git a/src/Requests/V10/ExplodedViewRequest.php b/src/Requests/V10/ExplodedViewsRequest.php similarity index 95% rename from src/Requests/V10/ExplodedViewRequest.php rename to src/Requests/V10/ExplodedViewsRequest.php index 4bd4401..a7ec231 100644 --- a/src/Requests/V10/ExplodedViewRequest.php +++ b/src/Requests/V10/ExplodedViewsRequest.php @@ -8,7 +8,7 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -class ExplodedViewRequest extends Request +class ExplodedViewsRequest extends Request { /** * Verkrijg exploded view o.b.v. het meegestuurde filter. diff --git a/src/Requests/V10/FinancialRequest.php b/src/Requests/V10/FinancialRequest.php index ff055ca..f5b18d9 100644 --- a/src/Requests/V10/FinancialRequest.php +++ b/src/Requests/V10/FinancialRequest.php @@ -8,24 +8,25 @@ use Webparking\Logic4Client\Data\V10\FinancialJournal; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\BooleanLogic4Response; -use Webparking\Logic4Client\Responses\V10\FinancialBookLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\FinancialJournalStatusLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\Int32Logic4Response; -use Webparking\Logic4Client\Responses\V10\LedgerLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\PaymentMethodLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\StringLogic4Response; -use Webparking\Logic4Client\Responses\V10\TypeCostCenterLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\TypeEntityCodeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\TypeFinancialBookingStatusLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\TypeLedgerColumnLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\TypeTransactionCodeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\VatCodeLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfFinancialBook; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfFinancialJournalStatus; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfLedger; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfPaymentMethod; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfTypeCostCenter; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfTypeEntityCode; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfTypeFinancialBookingStatus; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfTypeLedgerColumn; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfTypeTransactionCode; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfVatCode; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfboolean; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfint; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfstring; class FinancialRequest extends Request { /** - * Maak een financiele dagboekboeking met mutaties aan. + * Maak een financiële dagboekboeking met mutaties aan. + * Voor deze aanroep zijn extra rechten vereist. * * @param array{ * Description?: string|null, @@ -33,7 +34,7 @@ class FinancialRequest extends Request * FreeValue1?: string|null, * FreeValue2?: string|null, * FreeValue3?: string|null, - * Reference?: string, + * Reference?: string|null, * BookingDateTime?: string, * FinancialBookId?: int, * JournalStatusId?: int|null, @@ -41,13 +42,11 @@ class FinancialRequest extends Request * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik een nieuwere versie. - Financiële dagboekboeking met mutaties aanmaken */ public function addFinancialBookingWithMutations( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Financial/AddFinancialBookingWithMutations', ['json' => $parameters]), ) @@ -55,13 +54,15 @@ public function addFinancialBookingWithMutations( } /** - * Maak een financiele memoriaal dagboekboeking met mutaties aan. + * Maak een financiële memoriaal dagboekboeking met mutaties aan. + * Geeft terug het id van de aangemaakte boeking. + * Voor deze aanroep zijn extra rechten vereist. * * @param array{ * FreeValue1?: string|null, * FreeValue2?: string|null, * FreeValue3?: string|null, - * Reference?: string, + * Reference?: string|null, * BookingDateTime?: string, * FinancialBookId?: int, * JournalStatusId?: int|null, @@ -72,8 +73,8 @@ public function addFinancialBookingWithMutations( */ public function addFinancialGeneralBookingWithMutations( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Financial/AddFinancialGeneralBookingWithMutations', ['json' => $parameters]), ) @@ -81,13 +82,14 @@ public function addFinancialGeneralBookingWithMutations( } /** + * Verkrijg boeking status types. * Voor deze aanroep zijn extra rechten vereist. * * @throws Logic4ApiException */ public function getBookingStatusTypes( - ): TypeFinancialBookingStatusLogic4ResponseList { - return TypeFinancialBookingStatusLogic4ResponseList::make( + ): Logic4ResponseListOfTypeFinancialBookingStatus { + return Logic4ResponseListOfTypeFinancialBookingStatus::make( $this->buildResponse( $this->getClient()->get('/v1/Financial/GetBookingStatusTypes'), ) @@ -97,6 +99,7 @@ public function getBookingStatusTypes( /** * Financieel dagboekboeking met mutaties verkrijgen o.b.v. het aangeleverde filter. * Levert alleen boekingen uit verkoop, inkoop of memoriale dagboeken. + * Voor deze aanroep zijn extra rechten vereist. * * @param array{ * BookingId?: int|null, @@ -142,8 +145,8 @@ public function getFinancialBookingsWithMutations(array $parameters = []): \Gene */ public function getFinancialBooks( array $parameters = [], - ): FinancialBookLogic4ResponseList { - return FinancialBookLogic4ResponseList::make( + ): Logic4ResponseListOfFinancialBook { + return Logic4ResponseListOfFinancialBook::make( $this->buildResponse( $this->getClient()->post('/v1/Financial/GetFinancialBooks', ['json' => $parameters]), ) @@ -152,7 +155,6 @@ public function getFinancialBooks( /** * Verkrijg de financiële journalen o.b.v. het aangeleverde filter. - * * Voor deze aanroep zijn extra rechten vereist. * * @param array{ @@ -182,8 +184,8 @@ public function getFinancialJournals(array $parameters = []): \Generator * @throws Logic4ApiException */ public function getFinancialJournalStatuses( - ): FinancialJournalStatusLogic4ResponseList { - return FinancialJournalStatusLogic4ResponseList::make( + ): Logic4ResponseListOfFinancialJournalStatus { + return Logic4ResponseListOfFinancialJournalStatus::make( $this->buildResponse( $this->getClient()->get('/v1/Financial/GetFinancialJournalStatuses'), ) @@ -195,9 +197,9 @@ public function getFinancialJournalStatuses( * * @throws Logic4ApiException */ - public function getLedgerColumnTypes(): TypeLedgerColumnLogic4ResponseList + public function getLedgerColumnTypes(): Logic4ResponseListOfTypeLedgerColumn { - return TypeLedgerColumnLogic4ResponseList::make( + return Logic4ResponseListOfTypeLedgerColumn::make( $this->buildResponse( $this->getClient()->get('/v1/Financial/GetLedgerColumnTypes'), ) @@ -209,9 +211,9 @@ public function getLedgerColumnTypes(): TypeLedgerColumnLogic4ResponseList * * @throws Logic4ApiException */ - public function getLedgers(): LedgerLogic4ResponseList + public function getLedgers(): Logic4ResponseListOfLedger { - return LedgerLogic4ResponseList::make( + return Logic4ResponseListOfLedger::make( $this->buildResponse( $this->getClient()->get('/v1/Financial/GetLedgers'), ) @@ -223,9 +225,9 @@ public function getLedgers(): LedgerLogic4ResponseList * * @throws Logic4ApiException */ - public function getPaymentMethods(): PaymentMethodLogic4ResponseList + public function getPaymentMethods(): Logic4ResponseListOfPaymentMethod { - return PaymentMethodLogic4ResponseList::make( + return Logic4ResponseListOfPaymentMethod::make( $this->buildResponse( $this->getClient()->get('/v1/Financial/GetPaymentMethods'), ) @@ -233,13 +235,14 @@ public function getPaymentMethods(): PaymentMethodLogic4ResponseList } /** + * Verkrijg type Kosten Centra. * Voor deze aanroep zijn extra rechten vereist. * * @throws Logic4ApiException */ - public function getTypeCostCenters(): TypeCostCenterLogic4ResponseList + public function getTypeCostCenters(): Logic4ResponseListOfTypeCostCenter { - return TypeCostCenterLogic4ResponseList::make( + return Logic4ResponseListOfTypeCostCenter::make( $this->buildResponse( $this->getClient()->get('/v1/Financial/GetTypeCostCenters'), ) @@ -247,13 +250,14 @@ public function getTypeCostCenters(): TypeCostCenterLogic4ResponseList } /** + * Verkrijg type Entiteit Codes. * Voor deze aanroep zijn extra rechten vereist. * * @throws Logic4ApiException */ - public function getTypeEntityCodes(): TypeEntityCodeLogic4ResponseList + public function getTypeEntityCodes(): Logic4ResponseListOfTypeEntityCode { - return TypeEntityCodeLogic4ResponseList::make( + return Logic4ResponseListOfTypeEntityCode::make( $this->buildResponse( $this->getClient()->get('/v1/Financial/GetTypeEntityCodes'), ) @@ -261,13 +265,14 @@ public function getTypeEntityCodes(): TypeEntityCodeLogic4ResponseList } /** + * Verkrijg type Transactie Codes. * Voor deze aanroep zijn extra rechten vereist. * * @throws Logic4ApiException */ public function getTypeTransactionCodes( - ): TypeTransactionCodeLogic4ResponseList { - return TypeTransactionCodeLogic4ResponseList::make( + ): Logic4ResponseListOfTypeTransactionCode { + return Logic4ResponseListOfTypeTransactionCode::make( $this->buildResponse( $this->getClient()->get('/v1/Financial/GetTypeTransactionCodes'), ) @@ -279,9 +284,9 @@ public function getTypeTransactionCodes( * * @throws Logic4ApiException */ - public function getVatCodes(): VatCodeLogic4ResponseList + public function getVatCodes(): Logic4ResponseListOfVatCode { - return VatCodeLogic4ResponseList::make( + return Logic4ResponseListOfVatCode::make( $this->buildResponse( $this->getClient()->get('/v1/Financial/GetVatCodes'), ) @@ -290,17 +295,15 @@ public function getVatCodes(): VatCodeLogic4ResponseList /** * Importeer UBL factuur naar het inkoopboek. - * . - * + *
* Indien het veld CreditorID wordt meegegeven in de request, wordt de betreffende crediteur direct gekoppeld aan de nieuwe inkoopboeking. * Wanneer het veld CreditorID leeg wordt gelaten, probeert het systeem automatisch een crediteur te matchen. Dit gebeurt op basis van een aantal regels. - * - * + *
* Eerst worden er crediteuren gematched op basis van het KvK-nummer en het btw-nummer. - * Alléén als dit geen resultaat levert, probeert het systeem te matchen op bedrijfsnaam, postcode en stadsnaam (alleen velden die in de UBL gevult zijn worden gebruikt.) - * Nadat er gematched is wordt er een crediteur gekozen of gecreëert afhankelijk van het volgende: - * - *
  • Als er één unieke match wordt gevonden, wordt deze crediteur gekoppeld aan de inkoopboeking.
  • Als er geen match wordt gevonden, wordt automatisch een nieuwe crediteur aangemaakt.
  • Als er meerdere crediteuren zijn gematched, wordt er ook een nieuwe crediteur aangemaakt in plaats van dat er een bestaande gebruikt wordt.
+ * Alléén als dit geen resultaat levert, probeert het systeem te matchen op bedrijfsnaam, postcode en stadsnaam (alleen velden die in de UBL gevuld zijn worden gebruikt.) + * Nadat er gematched is wordt er een crediteur gekozen of gecreëerd afhankelijk van het volgende: + *
+ *
    . * * @param array{ * Xml?: string|null, @@ -314,8 +317,8 @@ public function getVatCodes(): VatCodeLogic4ResponseList */ public function postUblInvoiceToBuyBooking( array $parameters = [], - ): StringLogic4Response { - return StringLogic4Response::make( + ): Logic4ResponseOfstring { + return Logic4ResponseOfstring::make( $this->buildResponse( $this->getClient()->post('/v1/Financial/PostUblInvoiceToBuyBooking', ['json' => $parameters]), ) @@ -323,6 +326,8 @@ public function postUblInvoiceToBuyBooking( } /** + * Wijzig de status van een financiële boeking. + * Geeft terug het id van de gewijzigde boeking. * Voor deze aanroep zijn extra rechten vereist. * * @param array{ @@ -334,8 +339,8 @@ public function postUblInvoiceToBuyBooking( */ public function updateFinancialBookingStatus( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->patch('/v1/Financial/UpdateFinancialBookingStatus', ['json' => $parameters]), ) diff --git a/src/Requests/V10/HRMRequest.php b/src/Requests/V10/HRMRequest.php index 206cde8..afe2ebd 100644 --- a/src/Requests/V10/HRMRequest.php +++ b/src/Requests/V10/HRMRequest.php @@ -6,7 +6,7 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\HRMTimeRegistrationRowListLogic4Response; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfListOfHRMTimeRegistrationRow; class HRMRequest extends Request { @@ -33,8 +33,8 @@ class HRMRequest extends Request */ public function addTimeRegistrations( array $parameters = [], - ): HRMTimeRegistrationRowListLogic4Response { - return HRMTimeRegistrationRowListLogic4Response::make( + ): Logic4ResponseOfListOfHRMTimeRegistrationRow { + return Logic4ResponseOfListOfHRMTimeRegistrationRow::make( $this->buildResponse( $this->getClient()->post('/v1/HRM/AddTimeRegistrations', ['json' => $parameters]), ) diff --git a/src/Requests/V10/ITSRequest.php b/src/Requests/V10/ITSRequest.php index 02d6a04..e7472fc 100644 --- a/src/Requests/V10/ITSRequest.php +++ b/src/Requests/V10/ITSRequest.php @@ -7,70 +7,60 @@ use Webparking\Logic4Client\Data\V10\ITSIssue; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\ITSFreeValueLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ITSIssueGroupLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ITSIssueLevelLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ITSIssueStatusLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ITSIssueTypeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ITSProjectLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ITSTaskPriorityLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfITSFreeValue; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfITSIssueGroup; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfITSIssueLevel; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfITSIssueStatus; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfITSIssueType; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfITSProject; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfITSTaskPriority; class ITSRequest extends Request { - /** - * @throws Logic4ApiException - */ - public function getFreeValues1(): ITSFreeValueLogic4ResponseList + /** @throws Logic4ApiException */ + public function getFreeValues1(): Logic4ResponseListOfITSFreeValue { - return ITSFreeValueLogic4ResponseList::make( + return Logic4ResponseListOfITSFreeValue::make( $this->buildResponse( $this->getClient()->get('/v1/ITS/GetFreeValues1'), ) ); } - /** - * @throws Logic4ApiException - */ - public function getFreeValues2(): ITSFreeValueLogic4ResponseList + /** @throws Logic4ApiException */ + public function getFreeValues2(): Logic4ResponseListOfITSFreeValue { - return ITSFreeValueLogic4ResponseList::make( + return Logic4ResponseListOfITSFreeValue::make( $this->buildResponse( $this->getClient()->get('/v1/ITS/GetFreeValues2'), ) ); } - /** - * @throws Logic4ApiException - */ - public function getFreeValues3(): ITSFreeValueLogic4ResponseList + /** @throws Logic4ApiException */ + public function getFreeValues3(): Logic4ResponseListOfITSFreeValue { - return ITSFreeValueLogic4ResponseList::make( + return Logic4ResponseListOfITSFreeValue::make( $this->buildResponse( $this->getClient()->get('/v1/ITS/GetFreeValues3'), ) ); } - /** - * @throws Logic4ApiException - */ - public function getIssueGroups(): ITSIssueGroupLogic4ResponseList + /** @throws Logic4ApiException */ + public function getIssueGroups(): Logic4ResponseListOfITSIssueGroup { - return ITSIssueGroupLogic4ResponseList::make( + return Logic4ResponseListOfITSIssueGroup::make( $this->buildResponse( $this->getClient()->get('/v1/ITS/GetIssueGroups'), ) ); } - /** - * @throws Logic4ApiException - */ - public function getIssueLevels(): ITSIssueLevelLogic4ResponseList + /** @throws Logic4ApiException */ + public function getIssueLevels(): Logic4ResponseListOfITSIssueLevel { - return ITSIssueLevelLogic4ResponseList::make( + return Logic4ResponseListOfITSIssueLevel::make( $this->buildResponse( $this->getClient()->get('/v1/ITS/GetIssueLevels'), ) @@ -103,8 +93,6 @@ public function getIssueLevels(): ITSIssueLevelLogic4ResponseList * @return \Generator * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v3.0. - ITS issues ophalen o.b.v. filter */ public function getIssues(array $parameters = []): \Generator { @@ -115,24 +103,20 @@ public function getIssues(array $parameters = []): \Generator } } - /** - * @throws Logic4ApiException - */ - public function getIssueStatusses(): ITSIssueStatusLogic4ResponseList + /** @throws Logic4ApiException */ + public function getIssueStatusses(): Logic4ResponseListOfITSIssueStatus { - return ITSIssueStatusLogic4ResponseList::make( + return Logic4ResponseListOfITSIssueStatus::make( $this->buildResponse( $this->getClient()->get('/v1/ITS/GetIssueStatusses'), ) ); } - /** - * @throws Logic4ApiException - */ - public function getIssueTypes(): ITSIssueTypeLogic4ResponseList + /** @throws Logic4ApiException */ + public function getIssueTypes(): Logic4ResponseListOfITSIssueType { - return ITSIssueTypeLogic4ResponseList::make( + return Logic4ResponseListOfITSIssueType::make( $this->buildResponse( $this->getClient()->get('/v1/ITS/GetIssueTypes'), ) @@ -144,21 +128,19 @@ public function getIssueTypes(): ITSIssueTypeLogic4ResponseList * * @throws Logic4ApiException */ - public function getProjects(): ITSProjectLogic4ResponseList + public function getProjects(): Logic4ResponseListOfITSProject { - return ITSProjectLogic4ResponseList::make( + return Logic4ResponseListOfITSProject::make( $this->buildResponse( $this->getClient()->get('/v1/ITS/GetProjects'), ) ); } - /** - * @throws Logic4ApiException - */ - public function getTaskPriorities(): ITSTaskPriorityLogic4ResponseList + /** @throws Logic4ApiException */ + public function getTaskPriorities(): Logic4ResponseListOfITSTaskPriority { - return ITSTaskPriorityLogic4ResponseList::make( + return Logic4ResponseListOfITSTaskPriority::make( $this->buildResponse( $this->getClient()->get('/v1/ITS/GetTaskPriorities'), ) diff --git a/src/Requests/V10/ManagementRequest.php b/src/Requests/V10/ManagementRequest.php index 224dc58..76b2eb8 100644 --- a/src/Requests/V10/ManagementRequest.php +++ b/src/Requests/V10/ManagementRequest.php @@ -6,10 +6,10 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\DecimalLogic4Response; -use Webparking\Logic4Client\Responses\V10\ProductSalesInformationLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\Top10ItemLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ValuevsBudgetLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductSalesInformation; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfTop10Item; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfValuevsBudget; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfdecimal; class ManagementRequest extends Request { @@ -17,7 +17,7 @@ class ManagementRequest extends Request * Verkrijg van één of meerdere artikelen verkoop gegevens zoals verkoopaantallen, over een bepaalde periode (dag/week/maand/kwartaal/jaar). * * @param array{ - * TimeFrame?: string, + * TimeFrame?: mixed, * HistoryPoints?: int, * ProductCodes?: array, * IncludingCurrentPeriod?: bool, @@ -29,8 +29,8 @@ class ManagementRequest extends Request */ public function getProductCollectionSalesInformation( array $parameters = [], - ): ProductSalesInformationLogic4ResponseList { - return ProductSalesInformationLogic4ResponseList::make( + ): Logic4ResponseListOfProductSalesInformation { + return Logic4ResponseListOfProductSalesInformation::make( $this->buildResponse( $this->getClient()->post('/v1/Management/GetProductCollectionSalesInformation', ['json' => $parameters]), ) @@ -41,7 +41,7 @@ public function getProductCollectionSalesInformation( * Omzet van een bepaalde periode (Facturen/open orders/abonnementen). * * @param array{ - * TimeFrame?: string, + * TimeFrame?: mixed, * IncludingCurrentPeriod?: bool, * HistoryPoints?: int, * IncludeOffers?: bool|null, @@ -64,8 +64,8 @@ public function getProductCollectionSalesInformation( */ public function getReportingGetSalesHistory( array $parameters = [], - ): ValuevsBudgetLogic4ResponseList { - return ValuevsBudgetLogic4ResponseList::make( + ): Logic4ResponseListOfValuevsBudget { + return Logic4ResponseListOfValuevsBudget::make( $this->buildResponse( $this->getClient()->post('/v1/Management/GetReportingGetSalesHistory', ['json' => $parameters]), ) @@ -76,7 +76,7 @@ public function getReportingGetSalesHistory( * Omzet o.b.v. order/factuur regels voor een bepaalde periode. * * @param array{ - * TimeFrame?: string, + * TimeFrame?: mixed, * IncludingCurrentPeriod?: bool, * HistoryPoints?: int, * IncludeOffers?: bool|null, @@ -99,8 +99,8 @@ public function getReportingGetSalesHistory( */ public function getReportingGetSalesHistoryForOrderRows( array $parameters = [], - ): ValuevsBudgetLogic4ResponseList { - return ValuevsBudgetLogic4ResponseList::make( + ): Logic4ResponseListOfValuevsBudget { + return Logic4ResponseListOfValuevsBudget::make( $this->buildResponse( $this->getClient()->post('/v1/Management/GetReportingGetSalesHistoryForOrderRows', ['json' => $parameters]), ) @@ -111,7 +111,7 @@ public function getReportingGetSalesHistoryForOrderRows( * Omzet van een bepaalde periode per type contact groep (Facturen/open orders/abonnementen). * * @param array{ - * TimeFrame?: string, + * TimeFrame?: mixed, * IncludingCurrentPeriod?: bool, * HistoryPoints?: int, * IncludeOffers?: bool|null, @@ -134,8 +134,8 @@ public function getReportingGetSalesHistoryForOrderRows( */ public function getReportingGetSalesHistoryForTypeContactGroups( array $parameters = [], - ): ValuevsBudgetLogic4ResponseList { - return ValuevsBudgetLogic4ResponseList::make( + ): Logic4ResponseListOfValuevsBudget { + return Logic4ResponseListOfValuevsBudget::make( $this->buildResponse( $this->getClient()->post('/v1/Management/GetReportingGetSalesHistoryForTypeContactGroups', ['json' => $parameters]), ) @@ -150,7 +150,7 @@ public function getReportingGetSalesHistoryForTypeContactGroups( * GetOnlyMutationTotal?: bool, * CreditCorrection?: bool, * LedgerColumnTypeIds?: array, - * TimeFrame?: string, + * TimeFrame?: mixed, * IncludingCurrentPeriod?: bool, * HistoryPoints?: int, * IncludeOffers?: bool|null, @@ -173,8 +173,8 @@ public function getReportingGetSalesHistoryForTypeContactGroups( */ public function getReportingLedgerHistoryAndBudget( array $parameters = [], - ): ValuevsBudgetLogic4ResponseList { - return ValuevsBudgetLogic4ResponseList::make( + ): Logic4ResponseListOfValuevsBudget { + return Logic4ResponseListOfValuevsBudget::make( $this->buildResponse( $this->getClient()->post('/v1/Management/GetReportingLedgerHistoryAndBudget', ['json' => $parameters]), ) @@ -185,7 +185,7 @@ public function getReportingLedgerHistoryAndBudget( * Omzet van huidige jaar o.b.v. facturen (Let op! er wordt geen rekening gehouden met de geschiedenispunten). * * @param array{ - * TimeFrame?: string, + * TimeFrame?: mixed, * IncludingCurrentPeriod?: bool, * HistoryPoints?: int, * IncludeOffers?: bool|null, @@ -208,8 +208,8 @@ public function getReportingLedgerHistoryAndBudget( */ public function getSalesTotalIncludingOrdersAndRepeating( array $parameters = [], - ): DecimalLogic4Response { - return DecimalLogic4Response::make( + ): Logic4ResponseOfdecimal { + return Logic4ResponseOfdecimal::make( $this->buildResponse( $this->getClient()->post('/v1/Management/GetSalesTotalIncludingOrdersAndRepeating', ['json' => $parameters]), ) @@ -220,7 +220,7 @@ public function getSalesTotalIncludingOrdersAndRepeating( * Top 10 filialen (dag/week/maand/kwartaal/jaar). * * @param array{ - * TimeFrame?: string, + * TimeFrame?: mixed, * IncludingCurrentPeriod?: bool, * ExcludeDebtorIds?: array, * WebSiteDomainsIds?: array, @@ -230,8 +230,8 @@ public function getSalesTotalIncludingOrdersAndRepeating( */ public function getTop10Branches( array $parameters = [], - ): Top10ItemLogic4ResponseList { - return Top10ItemLogic4ResponseList::make( + ): Logic4ResponseListOfTop10Item { + return Logic4ResponseListOfTop10Item::make( $this->buildResponse( $this->getClient()->post('/v1/Management/GetTop10Branches', ['json' => $parameters]), ) @@ -242,7 +242,7 @@ public function getTop10Branches( * Top 10 klanten (dag/week/maand/kwartaal/jaar). * * @param array{ - * TimeFrame?: string, + * TimeFrame?: mixed, * IncludingCurrentPeriod?: bool, * ExcludeDebtorIds?: array, * WebSiteDomainsIds?: array, @@ -252,8 +252,8 @@ public function getTop10Branches( */ public function getTop10Debtors( array $parameters = [], - ): Top10ItemLogic4ResponseList { - return Top10ItemLogic4ResponseList::make( + ): Logic4ResponseListOfTop10Item { + return Logic4ResponseListOfTop10Item::make( $this->buildResponse( $this->getClient()->post('/v1/Management/GetTop10Debtors', ['json' => $parameters]), ) @@ -264,7 +264,7 @@ public function getTop10Debtors( * Top 10 productgroepen (dag/week/maand/kwartaal/jaar). * * @param array{ - * TimeFrame?: string, + * TimeFrame?: mixed, * IncludingCurrentPeriod?: bool, * ExcludeDebtorIds?: array, * WebSiteDomainsIds?: array, @@ -274,8 +274,8 @@ public function getTop10Debtors( */ public function getTop10Productgroups( array $parameters = [], - ): Top10ItemLogic4ResponseList { - return Top10ItemLogic4ResponseList::make( + ): Logic4ResponseListOfTop10Item { + return Logic4ResponseListOfTop10Item::make( $this->buildResponse( $this->getClient()->post('/v1/Management/GetTop10Productgroups', ['json' => $parameters]), ) @@ -286,7 +286,7 @@ public function getTop10Productgroups( * Top 10 artikelen (dag/week/maand/kwartaal/jaar). * * @param array{ - * TimeFrame?: string, + * TimeFrame?: mixed, * IncludingCurrentPeriod?: bool, * ExcludeDebtorIds?: array, * WebSiteDomainsIds?: array, @@ -296,8 +296,8 @@ public function getTop10Productgroups( */ public function getTop10Products( array $parameters = [], - ): Top10ItemLogic4ResponseList { - return Top10ItemLogic4ResponseList::make( + ): Logic4ResponseListOfTop10Item { + return Logic4ResponseListOfTop10Item::make( $this->buildResponse( $this->getClient()->post('/v1/Management/GetTop10Products', ['json' => $parameters]), ) @@ -308,7 +308,7 @@ public function getTop10Products( * Top 10 provincies (dag/week/maand/kwartaal/jaar). * * @param array{ - * TimeFrame?: string, + * TimeFrame?: mixed, * IncludingCurrentPeriod?: bool, * ExcludeDebtorIds?: array, * WebSiteDomainsIds?: array, @@ -318,8 +318,8 @@ public function getTop10Products( */ public function getTop10Provinces( array $parameters = [], - ): Top10ItemLogic4ResponseList { - return Top10ItemLogic4ResponseList::make( + ): Logic4ResponseListOfTop10Item { + return Logic4ResponseListOfTop10Item::make( $this->buildResponse( $this->getClient()->post('/v1/Management/GetTop10Provinces', ['json' => $parameters]), ) @@ -330,7 +330,7 @@ public function getTop10Provinces( * Top 10 medewerkers (dag/week/maand/kwartaal/jaar). * * @param array{ - * TimeFrame?: string, + * TimeFrame?: mixed, * IncludingCurrentPeriod?: bool, * ExcludeDebtorIds?: array, * WebSiteDomainsIds?: array, @@ -340,8 +340,8 @@ public function getTop10Provinces( */ public function getTop10Users( array $parameters = [], - ): Top10ItemLogic4ResponseList { - return Top10ItemLogic4ResponseList::make( + ): Logic4ResponseListOfTop10Item { + return Logic4ResponseListOfTop10Item::make( $this->buildResponse( $this->getClient()->post('/v1/Management/GetTop10Users', ['json' => $parameters]), ) diff --git a/src/Requests/V10/MarketingRequest.php b/src/Requests/V10/MarketingRequest.php index 9e24137..1f2f7af 100644 --- a/src/Requests/V10/MarketingRequest.php +++ b/src/Requests/V10/MarketingRequest.php @@ -6,7 +6,7 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\SubscriberLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfSubscriber; class MarketingRequest extends Request { @@ -22,8 +22,8 @@ class MarketingRequest extends Request */ public function getSubscribers( array $parameters = [], - ): SubscriberLogic4ResponseList { - return SubscriberLogic4ResponseList::make( + ): Logic4ResponseListOfSubscriber { + return Logic4ResponseListOfSubscriber::make( $this->buildResponse( $this->getClient()->post('/v1/Marketing/GetSubscribers', ['json' => $parameters]), ) diff --git a/src/Requests/V10/OrderRequest.php b/src/Requests/V10/OrderRequest.php index fc664b6..dc78f06 100644 --- a/src/Requests/V10/OrderRequest.php +++ b/src/Requests/V10/OrderRequest.php @@ -7,20 +7,20 @@ use Webparking\Logic4Client\Data\V10\AssemblyAction; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\BooleanLogic4Response; -use Webparking\Logic4Client\Responses\V10\Int32Logic4Response; -use Webparking\Logic4Client\Responses\V10\Int32Logic4ResponseList; -use Webparking\Logic4Client\Responses\V10\InvoiceOpenPaymentLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\OrderActionLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\OrderActionTypeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\OrderLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\OrderOpenPaymentLogic4Response; -use Webparking\Logic4Client\Responses\V10\OrderOpenPaymentLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\OrderRowV11Logic4ResponseList; -use Webparking\Logic4Client\Responses\V10\OrderStatusLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ReturnCategoryLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ReturnProblemLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ReturnSolutionLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfint; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfInvoiceOpenPayment; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfOrder; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfOrderAction; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfOrderActionType; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfOrderOpenPayment; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfOrderRowV11; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfOrderStatus; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfReturnCategory; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfReturnProblem; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfReturnSolution; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfboolean; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfint; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfOrderOpenPayment; class OrderRequest extends Request { @@ -34,8 +34,8 @@ class OrderRequest extends Request */ public function addOrderRowSerialNumbers( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/AddOrderRowSerialNumbers', ['json' => $parameters]), ) @@ -49,7 +49,7 @@ public function addOrderRowSerialNumbers( * OrderId?: int|null, * InvoiceId?: int|null, * AmountIncl?: number, - * Description?: string, + * Description?: string|null, * BookingId?: int, * MatchingLedgerId?: int, * DateTime?: string|null, @@ -58,9 +58,9 @@ public function addOrderRowSerialNumbers( * * @throws Logic4ApiException */ - public function addPayment(array $parameters = []): BooleanLogic4Response + public function addPayment(array $parameters = []): Logic4ResponseOfboolean { - return BooleanLogic4Response::make( + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/AddPayment', ['json' => $parameters]), ) @@ -73,7 +73,6 @@ public function addPayment(array $parameters = []): BooleanLogic4Response * Bij het succesvol aanmaken/updaten wordt het (nieuwe) factuurnummer in de response gevuld. * * @param array{ - * CheckForOrderCostAndPaymentRegulation?: bool, * DebtorId?: int|null, * CustomerThirdPartyExternalIdentifer?: array{DebtorId?: int|null, TypeId?: int|null, Value?: string|null}, * Id?: int|null, @@ -114,12 +113,10 @@ public function addPayment(array $parameters = []): BooleanLogic4Response * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.3. - Factuur toevoegen of updaten */ - public function addUpdateInvoice(array $parameters = []): Int32Logic4Response + public function addUpdateInvoice(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/AddUpdateInvoice', ['json' => $parameters]), ) @@ -132,7 +129,6 @@ public function addUpdateInvoice(array $parameters = []): Int32Logic4Response * Bij het succesvol aanmaken/updaten wordt het (nieuwe) ordernummer in de response gevuld. * * @param array{ - * CheckForOrderCostAndPaymentRegulation?: bool, * DebtorId?: int|null, * CustomerThirdPartyExternalIdentifer?: array{DebtorId?: int|null, TypeId?: int|null, Value?: string|null}, * Id?: int|null, @@ -173,12 +169,10 @@ public function addUpdateInvoice(array $parameters = []): Int32Logic4Response * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.3. - Order toevoegen of updaten */ - public function addUpdateOrder(array $parameters = []): Int32Logic4Response + public function addUpdateOrder(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/AddUpdateOrder', ['json' => $parameters]), ) @@ -229,12 +223,10 @@ public function addUpdateOrder(array $parameters = []): Int32Logic4Response * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Update gegevens van een orderregel */ - public function addUpdateOrderRow(array $parameters = []): Int32Logic4Response + public function addUpdateOrderRow(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/AddUpdateOrderRow', ['json' => $parameters]), ) @@ -249,8 +241,8 @@ public function addUpdateOrderRow(array $parameters = []): Int32Logic4Response */ public function createAndProcessInvoiceForOrder( int $value, - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/CreateAndProcessInvoiceForOrder', ['json' => $value]), ) @@ -266,7 +258,7 @@ public function createAndProcessInvoiceForOrder( * Totals?: array{AmountEx?: number, VATPercentage?: number, Calc_TotalPayed?: number|null, AmountIncl?: number, IsPaid?: bool, ShippingCost?: number, ShippingCostIncl?: number|null}, * OriginalOrderId?: int, * OriginalOrderDate?: string, - * OriginalOrderZipCode?: string, + * OriginalOrderZipCode?: string|null, * ProblemId?: int, * SolutionId?: int, * ReceivedReturnOrderDate?: string|null, @@ -311,12 +303,10 @@ public function createAndProcessInvoiceForOrder( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Retourorders toevoegen */ - public function createReturnOrder(array $parameters = []): Int32Logic4Response + public function createReturnOrder(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/CreateReturnOrder', ['json' => $parameters]), ) @@ -355,9 +345,9 @@ public function getAssemblyActions(array $parameters = []): \Generator * * @throws Logic4ApiException */ - public function getAssemblyActionsTypes(): OrderActionTypeLogic4ResponseList + public function getAssemblyActionsTypes(): Logic4ResponseListOfOrderActionType { - return OrderActionTypeLogic4ResponseList::make( + return Logic4ResponseListOfOrderActionType::make( $this->buildResponse( $this->getClient()->get('/v1/Orders/GetAssemblyActionsTypes'), ) @@ -366,7 +356,7 @@ public function getAssemblyActionsTypes(): OrderActionTypeLogic4ResponseList /** * Verkrijg factuurregels o.b.v. het meegestuurde filter. - * + *
    * Levert maximaal 10.000 regels. * * @param array{ @@ -382,8 +372,8 @@ public function getAssemblyActionsTypes(): OrderActionTypeLogic4ResponseList */ public function getInvoiceRows( array $parameters = [], - ): OrderRowV11Logic4ResponseList { - return OrderRowV11Logic4ResponseList::make( + ): Logic4ResponseListOfOrderRowV11 { + return Logic4ResponseListOfOrderRowV11::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/GetInvoiceRows', ['json' => $parameters]), ) @@ -424,12 +414,10 @@ public function getInvoiceRows( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.2. - Facturen ophalen */ - public function getInvoices(array $parameters = []): OrderLogic4ResponseList + public function getInvoices(array $parameters = []): Logic4ResponseListOfOrder { - return OrderLogic4ResponseList::make( + return Logic4ResponseListOfOrder::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/GetInvoices', ['json' => $parameters]), ) @@ -450,8 +438,8 @@ public function getInvoices(array $parameters = []): OrderLogic4ResponseList */ public function getOpenPaymentInvoices( array $parameters = [], - ): InvoiceOpenPaymentLogic4ResponseList { - return InvoiceOpenPaymentLogic4ResponseList::make( + ): Logic4ResponseListOfInvoiceOpenPayment { + return Logic4ResponseListOfInvoiceOpenPayment::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/GetOpenPaymentInvoices', ['json' => $parameters]), ) @@ -462,7 +450,7 @@ public function getOpenPaymentInvoices( * Verkrijg het nog te betalen bedrag van nog niet uitgeleverde orders. * * @param array{ - * TimeFrame?: string|null, + * TimeFrame?: mixed, * HistoryPoints?: int|null, * OrderstatusIds?: array, * WebsiteDomainIds?: array, @@ -472,13 +460,11 @@ public function getOpenPaymentInvoices( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Openstaande bedragen niet uitgeleverde orders ophalen */ public function getOpenPaymentOrders( array $parameters = [], - ): OrderOpenPaymentLogic4ResponseList { - return OrderOpenPaymentLogic4ResponseList::make( + ): Logic4ResponseListOfOrderOpenPayment { + return Logic4ResponseListOfOrderOpenPayment::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/GetOpenPaymentOrders', ['json' => $parameters]), ) @@ -489,7 +475,7 @@ public function getOpenPaymentOrders( * Verkrijg het nog te betalen bedrag van nog niet uitgeleverde orders in totalen. * * @param array{ - * TimeFrame?: string|null, + * TimeFrame?: mixed, * HistoryPoints?: int|null, * OrderstatusIds?: array, * WebsiteDomainIds?: array, @@ -502,8 +488,8 @@ public function getOpenPaymentOrders( */ public function getOpenPaymentOrdersTotals( array $parameters = [], - ): OrderOpenPaymentLogic4Response { - return OrderOpenPaymentLogic4Response::make( + ): Logic4ResponseOfOrderOpenPayment { + return Logic4ResponseOfOrderOpenPayment::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/GetOpenPaymentOrdersTotals', ['json' => $parameters]), ) @@ -524,8 +510,8 @@ public function getOpenPaymentOrdersTotals( */ public function getOrderActions( array $parameters = [], - ): OrderActionLogic4ResponseList { - return OrderActionLogic4ResponseList::make( + ): Logic4ResponseListOfOrderAction { + return Logic4ResponseListOfOrderAction::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/GetOrderActions', ['json' => $parameters]), ) @@ -537,9 +523,9 @@ public function getOrderActions( * * @throws Logic4ApiException */ - public function getOrderActionsTypes(): OrderActionTypeLogic4ResponseList + public function getOrderActionsTypes(): Logic4ResponseListOfOrderActionType { - return OrderActionTypeLogic4ResponseList::make( + return Logic4ResponseListOfOrderActionType::make( $this->buildResponse( $this->getClient()->get('/v1/Orders/GetOrderActionsTypes'), ) @@ -562,9 +548,9 @@ public function getOrderActionsTypes(): OrderActionTypeLogic4ResponseList * * @throws Logic4ApiException */ - public function getOrderIds(array $parameters = []): Int32Logic4ResponseList + public function getOrderIds(array $parameters = []): Logic4ResponseListOfint { - return Int32Logic4ResponseList::make( + return Logic4ResponseListOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/GetOrderIds', ['json' => $parameters]), ) @@ -573,7 +559,7 @@ public function getOrderIds(array $parameters = []): Int32Logic4ResponseList /** * Verkrijg ordersregels o.b.v. het meegestuurde filter. - * + *
    * Levert maximaal 10.000 regels. * * @param array{ @@ -589,8 +575,8 @@ public function getOrderIds(array $parameters = []): Int32Logic4ResponseList */ public function getOrderRows( array $parameters = [], - ): OrderRowV11Logic4ResponseList { - return OrderRowV11Logic4ResponseList::make( + ): Logic4ResponseListOfOrderRowV11 { + return Logic4ResponseListOfOrderRowV11::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/GetOrderRows', ['json' => $parameters]), ) @@ -631,12 +617,10 @@ public function getOrderRows( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.3. - Orders ophalen */ - public function getOrders(array $parameters = []): OrderLogic4ResponseList + public function getOrders(array $parameters = []): Logic4ResponseListOfOrder { - return OrderLogic4ResponseList::make( + return Logic4ResponseListOfOrder::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/GetOrders', ['json' => $parameters]), ) @@ -648,9 +632,9 @@ public function getOrders(array $parameters = []): OrderLogic4ResponseList * * @throws Logic4ApiException */ - public function getOrderStatuses(): OrderStatusLogic4ResponseList + public function getOrderStatuses(): Logic4ResponseListOfOrderStatus { - return OrderStatusLogic4ResponseList::make( + return Logic4ResponseListOfOrderStatus::make( $this->buildResponse( $this->getClient()->get('/v1/Orders/GetOrderStatuses'), ) @@ -662,9 +646,9 @@ public function getOrderStatuses(): OrderStatusLogic4ResponseList * * @throws Logic4ApiException */ - public function getReturnCategories(): ReturnCategoryLogic4ResponseList + public function getReturnCategories(): Logic4ResponseListOfReturnCategory { - return ReturnCategoryLogic4ResponseList::make( + return Logic4ResponseListOfReturnCategory::make( $this->buildResponse( $this->getClient()->get('/v1/Orders/GetReturnCategories'), ) @@ -709,13 +693,11 @@ public function getReturnCategories(): ReturnCategoryLogic4ResponseList * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v2.0. - Retourorders ophalen */ public function getReturnOrders( array $parameters = [], - ): OrderLogic4ResponseList { - return OrderLogic4ResponseList::make( + ): Logic4ResponseListOfOrder { + return Logic4ResponseListOfOrder::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/GetReturnOrders', ['json' => $parameters]), ) @@ -726,12 +708,10 @@ public function getReturnOrders( * Verkrijg alle order retourproblemen. * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Order retourproblemen */ - public function getReturnProblems(): ReturnProblemLogic4ResponseList + public function getReturnProblems(): Logic4ResponseListOfReturnProblem { - return ReturnProblemLogic4ResponseList::make( + return Logic4ResponseListOfReturnProblem::make( $this->buildResponse( $this->getClient()->get('/v1/Orders/GetReturnProblems'), ) @@ -742,24 +722,20 @@ public function getReturnProblems(): ReturnProblemLogic4ResponseList * Verkrijg alle order retouroplossingen. * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Order retouroplossingen */ - public function getReturnSolutions(): ReturnSolutionLogic4ResponseList + public function getReturnSolutions(): Logic4ResponseListOfReturnSolution { - return ReturnSolutionLogic4ResponseList::make( + return Logic4ResponseListOfReturnSolution::make( $this->buildResponse( $this->getClient()->get('/v1/Orders/GetReturnSolutions'), ) ); } - /** - * @throws Logic4ApiException - */ - public function getSerialnumberTypes(): OrderLogic4ResponseList + /** @throws Logic4ApiException */ + public function getSerialnumberTypes(): Logic4ResponseListOfOrder { - return OrderLogic4ResponseList::make( + return Logic4ResponseListOfOrder::make( $this->buildResponse( $this->getClient()->get('/v1/Orders/GetSerialnumberTypes'), ) @@ -773,9 +749,9 @@ public function getSerialnumberTypes(): OrderLogic4ResponseList * * @throws Logic4ApiException */ - public function processInvoice(int $value): Int32Logic4Response + public function processInvoice(int $value): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/ProcessInvoice', ['json' => $value]), ) @@ -783,7 +759,9 @@ public function processInvoice(int $value): Int32Logic4Response } /** - * Email wordt standaard niet verstuurd als de debuteur of de betaalmethode facturen via email uit heeft staan. + * Verstuur een electrische factuur via email. + * Email wordt standaard niet verstuurd als de debiteur of de betaalmethode facturen via email uit heeft staan. + * Voor deze aanroep zijn extra rechten vereist. * * @param array{ * InvoiceId?: int, @@ -795,8 +773,8 @@ public function processInvoice(int $value): Int32Logic4Response */ public function sendEmailForInvoice( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/SendEmailForInvoice', ['json' => $parameters]), ) @@ -815,8 +793,8 @@ public function sendEmailForInvoice( */ public function updateAgreedDeliveryDatesForOrderRows( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/UpdateAgreedDeliveryDatesForOrderRows', ['json' => $parameters]), ) @@ -833,13 +811,11 @@ public function updateAgreedDeliveryDatesForOrderRows( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Contactadres wijzigen van een order of factuur */ public function updateContactAddressForOrderOrInvoice( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/UpdateContactAddressForOrderOrInvoice', ['json' => $parameters]), ) @@ -856,13 +832,11 @@ public function updateContactAddressForOrderOrInvoice( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Afleveradres wijzigen van een order of factuur */ public function updateDeliveryAddressForOrderOrInvoice( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/UpdateDeliveryAddressForOrderOrInvoice', ['json' => $parameters]), ) @@ -879,13 +853,11 @@ public function updateDeliveryAddressForOrderOrInvoice( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Factuuradres wijzigen van een order of factuur */ public function updateInvoiceAddressForOrderOrInvoice( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/UpdateInvoiceAddressForOrderOrInvoice', ['json' => $parameters]), ) @@ -904,8 +876,8 @@ public function updateInvoiceAddressForOrderOrInvoice( */ public function updateOrderStatus( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Orders/UpdateOrderStatus', ['json' => $parameters]), ) diff --git a/src/Requests/V10/PickbonsRequest.php b/src/Requests/V10/PickbonsRequest.php index d1138f8..0f98f4f 100644 --- a/src/Requests/V10/PickbonsRequest.php +++ b/src/Requests/V10/PickbonsRequest.php @@ -6,13 +6,13 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\Int32Logic4ResponseList; -use Webparking\Logic4Client\Responses\V10\OrderHeadPickbonLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\OrderHeadPickbonRowLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\PickbonSoftBlockedLogic4Response; -use Webparking\Logic4Client\Responses\V10\PickbonSoftBlockedLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\StringLogic4Response; -use Webparking\Logic4Client\Responses\V10\WarehouseZoneLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfint; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfOrderHeadPickbon; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfOrderHeadPickbonRow; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfPickbonSoftBlocked; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfWarehouseZone; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfPickbonSoftBlocked; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfstring; class PickbonsRequest extends Request { @@ -20,13 +20,11 @@ class PickbonsRequest extends Request * Maak nieuwe pickbon(nen) aan voor een gehele order op het moment dat de 'nog te leveren' regels volledig gepickt kunnen worden. * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v3.0. - Maak nieuwe pickbon(nen) aan wanneer de 'nog te leveren' regels volledig gepickt kunnen worden */ public function createCompletePickbonForOrder( int $value, - ): Int32Logic4ResponseList { - return Int32Logic4ResponseList::make( + ): Logic4ResponseListOfint { + return Logic4ResponseListOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Pickbons/CreateCompletePickbonForOrder', ['json' => $value]), ) @@ -38,9 +36,9 @@ public function createCompletePickbonForOrder( * * @throws Logic4ApiException */ - public function createPickbonForOrder(int $value): Int32Logic4ResponseList + public function createPickbonForOrder(int $value): Logic4ResponseListOfint { - return Int32Logic4ResponseList::make( + return Logic4ResponseListOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Pickbons/CreatePickbonForOrder', ['json' => $value]), ) @@ -54,8 +52,8 @@ public function createPickbonForOrder(int $value): Int32Logic4ResponseList */ public function getIsPickbonSoftBlocked( int $value, - ): PickbonSoftBlockedLogic4Response { - return PickbonSoftBlockedLogic4Response::make( + ): Logic4ResponseOfPickbonSoftBlocked { + return Logic4ResponseOfPickbonSoftBlocked::make( $this->buildResponse( $this->getClient()->post('/v1/Pickbons/GetIsPickbonSoftBlocked', ['json' => $value]), ) @@ -69,8 +67,8 @@ public function getIsPickbonSoftBlocked( */ public function getOrderHeadPickbonRows( int $value, - ): OrderHeadPickbonRowLogic4ResponseList { - return OrderHeadPickbonRowLogic4ResponseList::make( + ): Logic4ResponseListOfOrderHeadPickbonRow { + return Logic4ResponseListOfOrderHeadPickbonRow::make( $this->buildResponse( $this->getClient()->post('/v1/Pickbons/GetOrderHeadPickbonRows', ['json' => $value]), ) @@ -86,8 +84,8 @@ public function getOrderHeadPickbonRows( */ public function getOrderHeadPickbonRowsForMultiplePickbons( array $parameters = [], - ): OrderHeadPickbonRowLogic4ResponseList { - return OrderHeadPickbonRowLogic4ResponseList::make( + ): Logic4ResponseListOfOrderHeadPickbonRow { + return Logic4ResponseListOfOrderHeadPickbonRow::make( $this->buildResponse( $this->getClient()->post('/v1/Pickbons/GetOrderHeadPickbonRowsForMultiplePickbons', ['json' => $parameters]), ) @@ -106,13 +104,11 @@ public function getOrderHeadPickbonRowsForMultiplePickbons( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v3.0. - Verkrijg pickbonnen op basis van het meegegeven filter */ public function getOrderHeadPickbons( array $parameters = [], - ): OrderHeadPickbonLogic4ResponseList { - return OrderHeadPickbonLogic4ResponseList::make( + ): Logic4ResponseListOfOrderHeadPickbon { + return Logic4ResponseListOfOrderHeadPickbon::make( $this->buildResponse( $this->getClient()->post('/v1/Pickbons/GetOrderHeadPickbons', ['json' => $parameters]), ) @@ -128,8 +124,8 @@ public function getOrderHeadPickbons( */ public function getPickbonsAreSoftBlocked( array $parameters = [], - ): PickbonSoftBlockedLogic4ResponseList { - return PickbonSoftBlockedLogic4ResponseList::make( + ): Logic4ResponseListOfPickbonSoftBlocked { + return Logic4ResponseListOfPickbonSoftBlocked::make( $this->buildResponse( $this->getClient()->post('/v1/Pickbons/GetPickbonsAreSoftBlocked', ['json' => $parameters]), ) @@ -141,9 +137,9 @@ public function getPickbonsAreSoftBlocked( * * @throws Logic4ApiException */ - public function getWarehouseZones(): WarehouseZoneLogic4ResponseList + public function getWarehouseZones(): Logic4ResponseListOfWarehouseZone { - return WarehouseZoneLogic4ResponseList::make( + return Logic4ResponseListOfWarehouseZone::make( $this->buildResponse( $this->getClient()->get('/v1/Pickbons/GetWarehouseZones'), ) @@ -155,9 +151,9 @@ public function getWarehouseZones(): WarehouseZoneLogic4ResponseList * * @throws Logic4ApiException */ - public function postSoftBlockPickbon(int $value): StringLogic4Response + public function postSoftBlockPickbon(int $value): Logic4ResponseOfstring { - return StringLogic4Response::make( + return Logic4ResponseOfstring::make( $this->buildResponse( $this->getClient()->post('/v1/Pickbons/PostSoftBlockPickbon', ['json' => $value]), ) @@ -170,13 +166,11 @@ public function postSoftBlockPickbon(int $value): StringLogic4Response * @param array $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v3.0. - Soft-block meerdere pickbonnen */ public function postSoftBlockPickbons( array $parameters = [], - ): StringLogic4Response { - return StringLogic4Response::make( + ): Logic4ResponseOfstring { + return Logic4ResponseOfstring::make( $this->buildResponse( $this->getClient()->post('/v1/Pickbons/PostSoftBlockPickbons', ['json' => $parameters]), ) @@ -188,7 +182,7 @@ public function postSoftBlockPickbons( * * @param array{ * AmountOfColli?: int, - * Corrections?: array, + * Corrections?: array, * Mutations?: array, * OrderHeadPickbonId?: int, * InterimLocationId?: int|null, @@ -197,9 +191,9 @@ public function postSoftBlockPickbons( * * @throws Logic4ApiException */ - public function processPickbon(array $parameters = []): StringLogic4Response + public function processPickbon(array $parameters = []): Logic4ResponseOfstring { - return StringLogic4Response::make( + return Logic4ResponseOfstring::make( $this->buildResponse( $this->getClient()->post('/v1/Pickbons/ProcessPickbon', ['json' => $parameters]), ) @@ -211,7 +205,7 @@ public function processPickbon(array $parameters = []): StringLogic4Response * * @param array, + * Corrections?: array, * Mutations?: array, * OrderHeadPickbonId?: int, * InterimLocationId?: int|null, @@ -219,12 +213,11 @@ public function processPickbon(array $parameters = []): StringLogic4Response * }> $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v3.0. - Verwerk meerdere pickbonnen */ - public function processPickbons(array $parameters = []): StringLogic4Response - { - return StringLogic4Response::make( + public function processPickbons( + array $parameters = [], + ): Logic4ResponseOfstring { + return Logic4ResponseOfstring::make( $this->buildResponse( $this->getClient()->post('/v1/Pickbons/ProcessPickbons', ['json' => $parameters]), ) diff --git a/src/Requests/V10/PriceListsRequest.php b/src/Requests/V10/PriceListsRequest.php index fc60f66..398485c 100644 --- a/src/Requests/V10/PriceListsRequest.php +++ b/src/Requests/V10/PriceListsRequest.php @@ -6,8 +6,8 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\Int32Logic4Response; -use Webparking\Logic4Client\Responses\V10\ProductPricelistLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductPricelist; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfint; class PriceListsRequest extends Request { @@ -24,8 +24,8 @@ class PriceListsRequest extends Request */ public function getPricelists( array $parameters = [], - ): ProductPricelistLogic4ResponseList { - return ProductPricelistLogic4ResponseList::make( + ): Logic4ResponseListOfProductPricelist { + return Logic4ResponseListOfProductPricelist::make( $this->buildResponse( $this->getClient()->post('/v1/PriceLists/GetPricelists', ['json' => $parameters]), ) @@ -33,6 +33,8 @@ public function getPricelists( } /** + * Contractprijzen bijwerken binnen de prijslijst. + * * @param array{ * PriceListId?: int, * ProductStaggeredPrices?: array}>, @@ -42,8 +44,8 @@ public function getPricelists( */ public function updatePriceListForProducts( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->put('/v1/PriceLists/UpdatePriceListForProducts', ['json' => $parameters]), ) diff --git a/src/Requests/V10/ProductGroupsRequest.php b/src/Requests/V10/ProductGroupsRequest.php index 2b2a030..c6c8fa5 100644 --- a/src/Requests/V10/ProductGroupsRequest.php +++ b/src/Requests/V10/ProductGroupsRequest.php @@ -6,8 +6,8 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\ProductGroupLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductGroupTypeLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductGroup; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductGroupType; class ProductGroupsRequest extends Request { @@ -26,13 +26,11 @@ class ProductGroupsRequest extends Request * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Artikelgroepen */ public function getProductGroups( array $parameters = [], - ): ProductGroupLogic4ResponseList { - return ProductGroupLogic4ResponseList::make( + ): Logic4ResponseListOfProductGroup { + return Logic4ResponseListOfProductGroup::make( $this->buildResponse( $this->getClient()->post('/v1/ProductGroups/GetProductGroups', ['json' => $parameters]), ) @@ -44,9 +42,9 @@ public function getProductGroups( * * @throws Logic4ApiException */ - public function getProductGroupTypes(): ProductGroupTypeLogic4ResponseList + public function getProductGroupTypes(): Logic4ResponseListOfProductGroupType { - return ProductGroupTypeLogic4ResponseList::make( + return Logic4ResponseListOfProductGroupType::make( $this->buildResponse( $this->getClient()->get('/v1/ProductGroups/GetProductGroupTypes'), ) diff --git a/src/Requests/V10/ProductRequest.php b/src/Requests/V10/ProductRequest.php index 870b8cd..629cfd0 100644 --- a/src/Requests/V10/ProductRequest.php +++ b/src/Requests/V10/ProductRequest.php @@ -9,34 +9,34 @@ use Webparking\Logic4Client\Data\V10\ProductVariantBalkChildrenGroup; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\BasicProductDataLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\BooleanLogic4Response; -use Webparking\Logic4Client\Responses\V10\BrandLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\Int32Logic4Response; -use Webparking\Logic4Client\Responses\V10\Int32Logic4ResponseList; use Webparking\Logic4Client\Responses\V10\Logic4Response; -use Webparking\Logic4Client\Responses\V10\PackingMaterialDepositTypeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductAssemblyRecipeItemLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductBarcodeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductCodeWithSupplierCodeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductCompositionItemLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductDimensionsLogic4Response; -use Webparking\Logic4Client\Responses\V10\ProductPickLocationBasedOnSystemSettingsLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductPriceInformationLogic4Response; -use Webparking\Logic4Client\Responses\V10\ProductPricelistLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductReviewLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductShippingInformationLogic4Response; -use Webparking\Logic4Client\Responses\V10\ProductStatusLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductSupplierLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductUnitLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductVariantBalkLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\VariantBalkCategoryLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\WebsiteDomainsForProductLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfBasicProductData; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfBrand; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfint; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfPackingMaterialDepositType; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductAssemblyRecipeItem; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductBarcode; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductCodeWithSupplierCode; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductCompositionItem; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductPickLocationBasedOnSystemSettings; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductPricelist; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductReview; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductStatus; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductSupplier; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductUnit; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductVariantBalk; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfVariantBalkCategory; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfWebsiteDomainsForProduct; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfboolean; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfint; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfProductDimensions; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfProductPriceInformation; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfProductShippingInformation; class ProductRequest extends Request { /** - * Koppelen van een website aan een product, max 1000 producten per call. + * Koppelen van een website aan een product, max 1000 producten per request. * Als een webshopdomein al reeds gekoppeld is, dan wordt deze overgeslagen. * * @param array{ @@ -48,8 +48,8 @@ class ProductRequest extends Request */ public function addWebsiteDomainForProducts( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Products/AddWebsiteDomainForProducts', ['json' => $parameters]), ) @@ -57,8 +57,9 @@ public function addWebsiteDomainForProducts( } /** - * Verwijder een website dat gekoppeld zit aan een product, max 1000 producten per call. - * Enkel gevonden records worden verwijderd, er vindt geen controle plaats op ProductId en/of WebsiteDomainId. Id's die niet gevonden worden, worden overgeslagen. + * Verwijder een website dat gekoppeld zit aan een product, max 1000 producten per request. + * Enkel gevonden records worden verwijderd, er vindt geen controle plaats op ProductId en/of WebsiteDomainId. + * Id's die niet gevonden worden, worden overgeslagen. * * @param array{ * ProductIds?: array, @@ -86,8 +87,8 @@ public function deleteWebsiteDomainForProducts( */ public function getBarcodesForProductIds( array $parameters = [], - ): ProductBarcodeLogic4ResponseList { - return ProductBarcodeLogic4ResponseList::make( + ): Logic4ResponseListOfProductBarcode { + return Logic4ResponseListOfProductBarcode::make( $this->buildResponse( $this->getClient()->post('/v1/Products/GetBarcodesForProductIds', ['json' => $parameters]), ) @@ -103,8 +104,8 @@ public function getBarcodesForProductIds( */ public function getBasicProductDataForProducts( array $parameters = [], - ): BasicProductDataLogic4ResponseList { - return BasicProductDataLogic4ResponseList::make( + ): Logic4ResponseListOfBasicProductData { + return Logic4ResponseListOfBasicProductData::make( $this->buildResponse( $this->getClient()->post('/v1/Products/GetBasicProductDataForProducts', ['json' => $parameters]), ) @@ -115,12 +116,10 @@ public function getBasicProductDataForProducts( * Haal alle merken op. * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.2. - Merken */ - public function getBrands(): BrandLogic4ResponseList + public function getBrands(): Logic4ResponseListOfBrand { - return BrandLogic4ResponseList::make( + return Logic4ResponseListOfBrand::make( $this->buildResponse( $this->getClient()->get('/v1/Products/GetBrands'), ) @@ -134,8 +133,8 @@ public function getBrands(): BrandLogic4ResponseList */ public function getComposedProductComposition( int $value, - ): ProductCompositionItemLogic4ResponseList { - return ProductCompositionItemLogic4ResponseList::make( + ): Logic4ResponseListOfProductCompositionItem { + return Logic4ResponseListOfProductCompositionItem::make( $this->buildResponse( $this->getClient()->post('/v1/Products/GetComposedProductComposition', ['json' => $value]), ) @@ -143,11 +142,13 @@ public function getComposedProductComposition( } /** + * Haal emballagetypen op. + * * @throws Logic4ApiException */ public function getPackageMaterialDepositTypes( - ): PackingMaterialDepositTypeLogic4ResponseList { - return PackingMaterialDepositTypeLogic4ResponseList::make( + ): Logic4ResponseListOfPackingMaterialDepositType { + return Logic4ResponseListOfPackingMaterialDepositType::make( $this->buildResponse( $this->getClient()->get('/v1/Products/GetPackageMaterialDepositTypes'), ) @@ -166,8 +167,8 @@ public function getPackageMaterialDepositTypes( */ public function getPriceInformationForProduct( array $parameters = [], - ): ProductPriceInformationLogic4Response { - return ProductPriceInformationLogic4Response::make( + ): Logic4ResponseOfProductPriceInformation { + return Logic4ResponseOfProductPriceInformation::make( $this->buildResponse( $this->getClient()->post('/v1/Products/GetPriceInformationForProduct', ['json' => $parameters]), ) @@ -184,13 +185,11 @@ public function getPriceInformationForProduct( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik een nieuwere versie. - Prijslijsten */ public function getPricelists( array $parameters = [], - ): ProductPricelistLogic4ResponseList { - return ProductPricelistLogic4ResponseList::make( + ): Logic4ResponseListOfProductPricelist { + return Logic4ResponseListOfProductPricelist::make( $this->buildResponse( $this->getClient()->post('/v1/Products/GetPricelists', ['json' => $parameters]), ) @@ -204,8 +203,8 @@ public function getPricelists( */ public function getProductAssemblyRecipe( int $value, - ): ProductAssemblyRecipeItemLogic4ResponseList { - return ProductAssemblyRecipeItemLogic4ResponseList::make( + ): Logic4ResponseListOfProductAssemblyRecipeItem { + return Logic4ResponseListOfProductAssemblyRecipeItem::make( $this->buildResponse( $this->getClient()->post('/v1/Products/GetProductAssemblyRecipe', ['json' => $value]), ) @@ -213,7 +212,7 @@ public function getProductAssemblyRecipe( } /** - * Verkrijg productcodes o.b.v. leverancier productcodes (maximaal 10000). + * Verkrijg productcodes o.b.v. leverancier productcodes (maximaal 10.000). * * @param array{ * SupplierId?: int, @@ -224,8 +223,8 @@ public function getProductAssemblyRecipe( */ public function getProductCodesBySupplierProductCodes( array $parameters = [], - ): ProductCodeWithSupplierCodeLogic4ResponseList { - return ProductCodeWithSupplierCodeLogic4ResponseList::make( + ): Logic4ResponseListOfProductCodeWithSupplierCode { + return Logic4ResponseListOfProductCodeWithSupplierCode::make( $this->buildResponse( $this->getClient()->post('/v1/Products/GetProductCodesBySupplierProductCodes', ['json' => $parameters]), ) @@ -240,13 +239,11 @@ public function getProductCodesBySupplierProductCodes( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v2.0. - Afmetingen van het artikel */ public function getProductDimensions( array $parameters = [], - ): ProductDimensionsLogic4Response { - return ProductDimensionsLogic4Response::make( + ): Logic4ResponseOfProductDimensions { + return Logic4ResponseOfProductDimensions::make( $this->buildResponse( $this->getClient()->post('/v1/Products/GetProductDimensions', ['json' => $parameters]), ) @@ -266,8 +263,8 @@ public function getProductDimensions( */ public function getProductPickStockLocationIds( array $parameters = [], - ): ProductPickLocationBasedOnSystemSettingsLogic4ResponseList { - return ProductPickLocationBasedOnSystemSettingsLogic4ResponseList::make( + ): Logic4ResponseListOfProductPickLocationBasedOnSystemSettings { + return Logic4ResponseListOfProductPickLocationBasedOnSystemSettings::make( $this->buildResponse( $this->getClient()->post('/v1/Products/GetProductPickStockLocationIds', ['json' => $parameters]), ) @@ -287,8 +284,8 @@ public function getProductPickStockLocationIds( */ public function getProductReviews( array $parameters = [], - ): ProductReviewLogic4ResponseList { - return ProductReviewLogic4ResponseList::make( + ): Logic4ResponseListOfProductReview { + return Logic4ResponseListOfProductReview::make( $this->buildResponse( $this->getClient()->post('/v1/Products/GetProductReviews', ['json' => $parameters]), ) @@ -314,7 +311,7 @@ public function getProductReviews( * WebshopPriceListId?: int|null, * UseDropShipmentAmountsForWebshopPrices?: bool|null, * ProductIds?: array, - * ProductFilterListChoice?: string|null, + * ProductFilterListChoice?: mixed, * ProductHistoryBasedOnInvoices?: bool|null, * WebshopUserOrderlistProductType?: int|null, * ActiveOffers?: bool|null, @@ -326,6 +323,7 @@ public function getProductReviews( * LoadExternalStockActiveSupplier?: bool|null, * SkipRecords?: int|null, * TakeRecords?: int|null, + * FromId?: int|null, * LoadProductGroups?: bool|null, * LoadExtraBarcodes?: bool, * OnlyShowParentProducts?: bool|null, @@ -342,8 +340,6 @@ public function getProductReviews( * @return \Generator * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.4. - Artikelen ophalen */ public function getProducts(array $parameters = []): \Generator { @@ -365,8 +361,8 @@ public function getProducts(array $parameters = []): \Generator */ public function getProductShippingInformation( array $parameters = [], - ): ProductShippingInformationLogic4Response { - return ProductShippingInformationLogic4Response::make( + ): Logic4ResponseOfProductShippingInformation { + return Logic4ResponseOfProductShippingInformation::make( $this->buildResponse( $this->getClient()->post('/v1/Products/GetProductShippingInformation', ['json' => $parameters]), ) @@ -390,7 +386,7 @@ public function getProductShippingInformation( * WebshopPriceListId?: int|null, * UseDropShipmentAmountsForWebshopPrices?: bool|null, * ProductIds?: array, - * ProductFilterListChoice?: string|null, + * ProductFilterListChoice?: mixed, * ProductHistoryBasedOnInvoices?: bool|null, * WebshopUserOrderlistProductType?: int|null, * ActiveOffers?: bool|null, @@ -402,6 +398,7 @@ public function getProductShippingInformation( * LoadExternalStockActiveSupplier?: bool|null, * SkipRecords?: int|null, * TakeRecords?: int|null, + * FromId?: int|null, * LoadProductGroups?: bool|null, * LoadExtraBarcodes?: bool, * OnlyShowParentProducts?: bool|null, @@ -419,8 +416,8 @@ public function getProductShippingInformation( */ public function getProductsIds( array $parameters = [], - ): Int32Logic4ResponseList { - return Int32Logic4ResponseList::make( + ): Logic4ResponseListOfint { + return Logic4ResponseListOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Products/GetProductsIds', ['json' => $parameters]), ) @@ -452,9 +449,9 @@ public function getProductVariantBalkChildren(array $parameters = []): \Generato * * @throws Logic4ApiException */ - public function getStatuses(): ProductStatusLogic4ResponseList + public function getStatuses(): Logic4ResponseListOfProductStatus { - return ProductStatusLogic4ResponseList::make( + return Logic4ResponseListOfProductStatus::make( $this->buildResponse( $this->getClient()->get('/v1/Products/GetStatuses'), ) @@ -462,14 +459,14 @@ public function getStatuses(): ProductStatusLogic4ResponseList } /** - * Verkrijg alle leveranciers van een product. + * Verkrijg alle leveranciers van één product. * * @throws Logic4ApiException */ public function getSuppliersForProduct( int $value, - ): ProductSupplierLogic4ResponseList { - return ProductSupplierLogic4ResponseList::make( + ): Logic4ResponseListOfProductSupplier { + return Logic4ResponseListOfProductSupplier::make( $this->buildResponse( $this->getClient()->post('/v1/Products/GetSuppliersForProduct', ['json' => $value]), ) @@ -503,9 +500,9 @@ public function getSuppliersForProducts(array $parameters = []): \Generator * * @throws Logic4ApiException */ - public function getUnits(): ProductUnitLogic4ResponseList + public function getUnits(): Logic4ResponseListOfProductUnit { - return ProductUnitLogic4ResponseList::make( + return Logic4ResponseListOfProductUnit::make( $this->buildResponse( $this->getClient()->get('/v1/Products/GetUnits'), ) @@ -513,6 +510,8 @@ public function getUnits(): ProductUnitLogic4ResponseList } /** + * Haal artikel variantbalk categorie gegevens op, waaronder de mogelijke waarden en vertalingen. + * * @param array{ * VariantBalkCategoryIds?: array, * } $parameters @@ -521,8 +520,8 @@ public function getUnits(): ProductUnitLogic4ResponseList */ public function getVariantbalkCategories( array $parameters = [], - ): VariantBalkCategoryLogic4ResponseList { - return VariantBalkCategoryLogic4ResponseList::make( + ): Logic4ResponseListOfVariantBalkCategory { + return Logic4ResponseListOfVariantBalkCategory::make( $this->buildResponse( $this->getClient()->post('/v1/Products/GetVariantbalkCategories', ['json' => $parameters]), ) @@ -530,6 +529,9 @@ public function getVariantbalkCategories( } /** + * Haal artikel variantbalk gegevens op, waaronder de mogelijke waarden, vertalingen en de categorieën. + * Voor nieuwe vertalingen kan het maximaal 10 minuten duren voordat deze terugkomen in de resultaten. + * * @param array{ * VariantBalkIds?: array, * } $parameters @@ -538,8 +540,8 @@ public function getVariantbalkCategories( */ public function getVariantbalks( array $parameters = [], - ): ProductVariantBalkLogic4ResponseList { - return ProductVariantBalkLogic4ResponseList::make( + ): Logic4ResponseListOfProductVariantBalk { + return Logic4ResponseListOfProductVariantBalk::make( $this->buildResponse( $this->getClient()->post('/v1/Products/GetVariantbalks', ['json' => $parameters]), ) @@ -547,7 +549,7 @@ public function getVariantbalks( } /** - * Het ophalen van gekoppelde webshops per product, max. 1000 producten per call. + * Het ophalen van gekoppelde webshops per product, max. 1000 producten per request. * * @param array{ * ProductIds?: array, @@ -557,8 +559,8 @@ public function getVariantbalks( */ public function getWebsiteDomainsForProducts( array $parameters = [], - ): WebsiteDomainsForProductLogic4ResponseList { - return WebsiteDomainsForProductLogic4ResponseList::make( + ): Logic4ResponseListOfWebsiteDomainsForProduct { + return Logic4ResponseListOfWebsiteDomainsForProduct::make( $this->buildResponse( $this->getClient()->post('/v1/Products/GetWebsiteDomainsForProducts', ['json' => $parameters]), ) @@ -566,18 +568,17 @@ public function getWebsiteDomainsForProducts( } /** - * Een SEO informatie record word op basis van een combinatie van ProductId, GlobalizationId en WebsiteDomainId geselecteerd. + * Verander de SEO informatie voor een product op basis van taal en webshopdomein. + * Een SEO informatie record wordt op basis van een combinatie van ProductId, GlobalizationId en WebsiteDomainId geselecteerd. * WebsiteDomainId mag null zijn, dan geldt de gegeven SEO informatie voor alle webhopdomeinen. - * - * Als een record niet bestaat wordt deze aangemaakt. Lege records worden automatisch verwijdert. + *
    + * Als een record niet bestaat wordt deze aangemaakt. Lege records worden automatisch verwijderd. * Niet-lege records moeten ten minste een Title of Description hebben. - * - * - * Bij het meegeven van een lege string of 'null' voor informatie velden, wordt bestaande informatie leeg gehaald. + *
    + * Bij het meegeven van een lege string of 'null' voor informatievelden, wordt bestaande informatie leeg gehaald. * Velden die niet in de request staan worden niet gewijzigd. - * - * - * Als een product geen SEO informatie heeft voor een bepaalde taal en webshopdomein vindt er een fallback plaats op de basis informatie van het artikel. + *
    + * Als een product geen SEO informatie heeft voor een bepaalde taal en webshopdomein vindt er een fallback plaats op de basisinformatie van het artikel. * * @param array{ * WebsiteDomainId?: int|null, @@ -594,8 +595,8 @@ public function getWebsiteDomainsForProducts( */ public function updateProductSEOInformation( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->patch('/v1/Products/UpdateProductSEOInformation', ['json' => $parameters]), ) diff --git a/src/Requests/V10/ProductTemplateRequest.php b/src/Requests/V10/ProductTemplateRequest.php index 19691bb..a4ef7f9 100644 --- a/src/Requests/V10/ProductTemplateRequest.php +++ b/src/Requests/V10/ProductTemplateRequest.php @@ -10,7 +10,7 @@ use Webparking\Logic4Client\Data\V10\ProductTemplateValuesWithTranslation; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\Int32Logic4Response; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfint; class ProductTemplateRequest extends Request { @@ -91,8 +91,6 @@ public function getProductTemplateValuesPerProducts(array $parameters = []): \Ge * @return \Generator * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v2.0. - Artikel template waarden met vertalingen */ public function getProductTemplateValuesWithTranslations(array $parameters = []): \Generator { @@ -113,8 +111,8 @@ public function getProductTemplateValuesWithTranslations(array $parameters = []) */ public function setProductTemplatePropertyValues( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/ProductTemplates/SetProductTemplatePropertyValues', ['json' => $parameters]), ) diff --git a/src/Requests/V10/RelationsRequest.php b/src/Requests/V10/RelationsRequest.php index 6fa8f69..3a7c827 100644 --- a/src/Requests/V10/RelationsRequest.php +++ b/src/Requests/V10/RelationsRequest.php @@ -13,20 +13,20 @@ use Webparking\Logic4Client\Data\V10\DebtorCharacteristic; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\AddressTypeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\BooleanLogic4Response; -use Webparking\Logic4Client\Responses\V10\ContactTypeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\CreditorDiscountTypeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\CreditorThirdPartyExternalIdentiferLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\CustomerThirdPartyExternalIdentiferLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\GenderLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\Int32Logic4Response; -use Webparking\Logic4Client\Responses\V10\RelationStatusLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\RelationTypeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\RepresentativeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\SecondTypeContactGroupLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ThirdPartyExternalIdentifierTypeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\TypeContactGroupLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfAddressType; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfContactType; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfCreditorDiscountType; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfCreditorThirdPartyExternalIdentifer; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfCustomerThirdPartyExternalIdentifer; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfGender; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfRelationStatus; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfRelationType; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfRepresentative; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfSecondTypeContactGroup; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfThirdPartyExternalIdentifierType; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfTypeContactGroup; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfboolean; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfint; class RelationsRequest extends Request { @@ -48,8 +48,8 @@ class RelationsRequest extends Request */ public function addCreditorDiscount( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Relations/AddCreditorDiscount', ['json' => $parameters]), ) @@ -69,6 +69,7 @@ public function addCreditorDiscount( * FirstName?: string|null, * LastName?: string|null, * EmailAddress?: string|null, + * LoginName?: string|null, * PaymentMethodId?: int|null, * PricelistIds?: array, * TelephoneNumber?: string|null, @@ -106,9 +107,9 @@ public function addCreditorDiscount( * * @throws Logic4ApiException */ - public function addCustomer(array $parameters = []): Int32Logic4Response + public function addCustomer(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Relations/AddCustomer', ['json' => $parameters]), ) @@ -146,9 +147,9 @@ public function addCustomer(array $parameters = []): Int32Logic4Response * * @throws Logic4ApiException */ - public function addUpdateAddress(array $parameters = []): Int32Logic4Response + public function addUpdateAddress(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Relations/AddUpdateAddress', ['json' => $parameters]), ) @@ -189,9 +190,9 @@ public function addUpdateAddress(array $parameters = []): Int32Logic4Response * * @throws Logic4ApiException */ - public function addUpdateContact(array $parameters = []): Int32Logic4Response + public function addUpdateContact(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Relations/AddUpdateContact', ['json' => $parameters]), ) @@ -211,8 +212,8 @@ public function addUpdateContact(array $parameters = []): Int32Logic4Response */ public function addUpdateCreditorThirdPartyExternalIdentifier( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Relations/AddUpdateCreditorThirdPartyExternalIdentifier', ['json' => $parameters]), ) @@ -221,6 +222,7 @@ public function addUpdateCreditorThirdPartyExternalIdentifier( /** * Debiteur toevoegen of updaten. + * Gebruik als alternatief de gesplitste functies UpdateCustomer en AddCustomer. * * @param array{ * Id?: int|null, @@ -263,13 +265,10 @@ public function addUpdateCreditorThirdPartyExternalIdentifier( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik een nieuwere versie. - Debiteur toevoegen of updaten. - * Gebruik als alternatief de gesplitste functies UpdateCustomer en AddCustomer. */ - public function addUpdateCustomer(array $parameters = []): Int32Logic4Response + public function addUpdateCustomer(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Relations/AddUpdateCustomer', ['json' => $parameters]), ) @@ -289,8 +288,8 @@ public function addUpdateCustomer(array $parameters = []): Int32Logic4Response */ public function addUpdateCustomerThirdPartyExternalIdentifier( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Relations/AddUpdateCustomerThirdPartyExternalIdentifier', ['json' => $parameters]), ) @@ -310,8 +309,8 @@ public function addUpdateCustomerThirdPartyExternalIdentifier( */ public function deleteCreditorThirdPartyExternalIdentifier( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Relations/DeleteCreditorThirdPartyExternalIdentifier', ['json' => $parameters]), ) @@ -331,8 +330,8 @@ public function deleteCreditorThirdPartyExternalIdentifier( */ public function deleteCustomerThirdPartyExternalIdentifier( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Relations/DeleteCustomerThirdPartyExternalIdentifier', ['json' => $parameters]), ) @@ -357,8 +356,6 @@ public function deleteCustomerThirdPartyExternalIdentifier( * @return \Generator * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Adressen ophalen */ public function getAddresses(array $parameters = []): \Generator { @@ -374,9 +371,9 @@ public function getAddresses(array $parameters = []): \Generator * * @throws Logic4ApiException */ - public function getAddressTypes(): AddressTypeLogic4ResponseList + public function getAddressTypes(): Logic4ResponseListOfAddressType { - return AddressTypeLogic4ResponseList::make( + return Logic4ResponseListOfAddressType::make( $this->buildResponse( $this->getClient()->get('/v1/Relations/GetAddressTypes'), ) @@ -401,8 +398,6 @@ public function getAddressTypes(): AddressTypeLogic4ResponseList * @return \Generator * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Contacten ophalen */ public function getContacts(array $parameters = []): \Generator { @@ -414,10 +409,12 @@ public function getContacts(array $parameters = []): \Generator } /** + * Haal kenmerken met bijbehorende vertegenwoordiger op voor contacten. + * * @param array{ * ContactIds?: array, * DebtorId?: int|null, - * ContactType?: string|null, + * ContactType?: mixed, * LastCharacteristicChangeDateTime?: string|null, * SkipRecords?: int, * TakeRecords?: int, @@ -437,11 +434,13 @@ public function getContactsCharacteristics(array $parameters = []): \Generator } /** + * Contact types ophalen. + * * @throws Logic4ApiException */ - public function getContactTypes(): ContactTypeLogic4ResponseList + public function getContactTypes(): Logic4ResponseListOfContactType { - return ContactTypeLogic4ResponseList::make( + return Logic4ResponseListOfContactType::make( $this->buildResponse( $this->getClient()->get('/v1/Relations/GetContactTypes'), ) @@ -476,8 +475,8 @@ public function getCreditorDiscounts(array $parameters = []): \Generator * @throws Logic4ApiException */ public function getCreditorDiscountTypes( - ): CreditorDiscountTypeLogic4ResponseList { - return CreditorDiscountTypeLogic4ResponseList::make( + ): Logic4ResponseListOfCreditorDiscountType { + return Logic4ResponseListOfCreditorDiscountType::make( $this->buildResponse( $this->getClient()->get('/v1/Relations/GetCreditorDiscountTypes'), ) @@ -500,8 +499,6 @@ public function getCreditorDiscountTypes( * @return \Generator * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Crediteuren ophalen */ public function getCreditors(array $parameters = []): \Generator { @@ -525,8 +522,8 @@ public function getCreditors(array $parameters = []): \Generator */ public function getCreditorThirdPartyExternalIdentifiers( array $parameters = [], - ): CreditorThirdPartyExternalIdentiferLogic4ResponseList { - return CreditorThirdPartyExternalIdentiferLogic4ResponseList::make( + ): Logic4ResponseListOfCreditorThirdPartyExternalIdentifer { + return Logic4ResponseListOfCreditorThirdPartyExternalIdentifer::make( $this->buildResponse( $this->getClient()->post('/v1/Relations/GetCreditorThirdPartyExternalIdentifiers', ['json' => $parameters]), ) @@ -549,8 +546,6 @@ public function getCreditorThirdPartyExternalIdentifiers( * @return \Generator * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Debiteuren ophalen */ public function getCustomers(array $parameters = []): \Generator { @@ -562,6 +557,8 @@ public function getCustomers(array $parameters = []): \Generator } /** + * Haal kenmerken met bijbehorende vertegenwoordiger op voor debiteuren. + * * @param array{ * DebtorIds?: array, * LastCharacteristicChangeDateTime?: string|null, @@ -595,8 +592,8 @@ public function getCustomersCharacteristics(array $parameters = []): \Generator */ public function getCustomerThirdPartyExternalIdentifiers( array $parameters = [], - ): CustomerThirdPartyExternalIdentiferLogic4ResponseList { - return CustomerThirdPartyExternalIdentiferLogic4ResponseList::make( + ): Logic4ResponseListOfCustomerThirdPartyExternalIdentifer { + return Logic4ResponseListOfCustomerThirdPartyExternalIdentifer::make( $this->buildResponse( $this->getClient()->post('/v1/Relations/GetCustomerThirdPartyExternalIdentifiers', ['json' => $parameters]), ) @@ -608,9 +605,9 @@ public function getCustomerThirdPartyExternalIdentifiers( * * @throws Logic4ApiException */ - public function getGenders(): GenderLogic4ResponseList + public function getGenders(): Logic4ResponseListOfGender { - return GenderLogic4ResponseList::make( + return Logic4ResponseListOfGender::make( $this->buildResponse( $this->getClient()->get('/v1/Relations/GetGenders'), ) @@ -622,9 +619,9 @@ public function getGenders(): GenderLogic4ResponseList * * @throws Logic4ApiException */ - public function getRelationStatuses(): RelationStatusLogic4ResponseList + public function getRelationStatuses(): Logic4ResponseListOfRelationStatus { - return RelationStatusLogic4ResponseList::make( + return Logic4ResponseListOfRelationStatus::make( $this->buildResponse( $this->getClient()->get('/v1/Relations/GetRelationStatuses'), ) @@ -636,9 +633,9 @@ public function getRelationStatuses(): RelationStatusLogic4ResponseList * * @throws Logic4ApiException */ - public function getRelationTypes(): RelationTypeLogic4ResponseList + public function getRelationTypes(): Logic4ResponseListOfRelationType { - return RelationTypeLogic4ResponseList::make( + return Logic4ResponseListOfRelationType::make( $this->buildResponse( $this->getClient()->get('/v1/Relations/GetRelationTypes'), ) @@ -649,12 +646,10 @@ public function getRelationTypes(): RelationTypeLogic4ResponseList * Verkrijg alle vertegenwoordigers. * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Vertegenwoordigers ophalen */ - public function getRepresentatives(): RepresentativeLogic4ResponseList + public function getRepresentatives(): Logic4ResponseListOfRepresentative { - return RepresentativeLogic4ResponseList::make( + return Logic4ResponseListOfRepresentative::make( $this->buildResponse( $this->getClient()->get('/v1/Relations/GetRepresentatives'), ) @@ -667,8 +662,8 @@ public function getRepresentatives(): RepresentativeLogic4ResponseList * @throws Logic4ApiException */ public function getSecondContactGroupTypes( - ): SecondTypeContactGroupLogic4ResponseList { - return SecondTypeContactGroupLogic4ResponseList::make( + ): Logic4ResponseListOfSecondTypeContactGroup { + return Logic4ResponseListOfSecondTypeContactGroup::make( $this->buildResponse( $this->getClient()->get('/v1/Relations/GetSecondContactGroupTypes'), ) @@ -681,8 +676,8 @@ public function getSecondContactGroupTypes( * @throws Logic4ApiException */ public function getThirdPartyExternalIdentfierTypes( - ): ThirdPartyExternalIdentifierTypeLogic4ResponseList { - return ThirdPartyExternalIdentifierTypeLogic4ResponseList::make( + ): Logic4ResponseListOfThirdPartyExternalIdentifierType { + return Logic4ResponseListOfThirdPartyExternalIdentifierType::make( $this->buildResponse( $this->getClient()->get('/v1/Relations/GetThirdPartyExternalIdentfierTypes'), ) @@ -694,9 +689,9 @@ public function getThirdPartyExternalIdentfierTypes( * * @throws Logic4ApiException */ - public function getTypeContactGroups(): TypeContactGroupLogic4ResponseList + public function getTypeContactGroups(): Logic4ResponseListOfTypeContactGroup { - return TypeContactGroupLogic4ResponseList::make( + return Logic4ResponseListOfTypeContactGroup::make( $this->buildResponse( $this->getClient()->get('/v1/Relations/GetTypeContactGroups'), ) @@ -722,8 +717,8 @@ public function getTypeContactGroups(): TypeContactGroupLogic4ResponseList */ public function updateCreditorDiscount( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Relations/UpdateCreditorDiscount', ['json' => $parameters]), ) @@ -742,6 +737,7 @@ public function updateCreditorDiscount( * FirstName?: string|null, * LastName?: string|null, * EmailAddress?: string|null, + * LoginName?: string|null, * PaymentMethodId?: int|null, * PricelistIds?: array, * TelephoneNumber?: string|null, @@ -779,9 +775,9 @@ public function updateCreditorDiscount( * * @throws Logic4ApiException */ - public function updateCustomer(array $parameters = []): Int32Logic4Response + public function updateCustomer(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->patch('/v1/Relations/UpdateCustomer', ['json' => $parameters]), ) diff --git a/src/Requests/V10/RoundRequest.php b/src/Requests/V10/RoundRequest.php index 16e657f..2a113d9 100644 --- a/src/Requests/V10/RoundRequest.php +++ b/src/Requests/V10/RoundRequest.php @@ -8,11 +8,11 @@ use Webparking\Logic4Client\Data\V10\GetRoundOrder; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\BooleanLogic4Response; -use Webparking\Logic4Client\Responses\V10\Int32Logic4Response; -use Webparking\Logic4Client\Responses\V10\TypeRoundOrderStatusLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\TypeRoundStatusLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\VehicleLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfTypeRoundOrderStatus; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfTypeRoundStatus; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfVehicle; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfboolean; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfint; class RoundRequest extends Request { @@ -33,9 +33,9 @@ class RoundRequest extends Request * * @throws Logic4ApiException */ - public function addRound(array $parameters = []): Int32Logic4Response + public function addRound(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Round/AddRound', ['json' => $parameters]), ) @@ -59,9 +59,9 @@ public function addRound(array $parameters = []): Int32Logic4Response * * @throws Logic4ApiException */ - public function addRoundOrder(array $parameters = []): Int32Logic4Response + public function addRoundOrder(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Round/AddRoundOrder', ['json' => $parameters]), ) @@ -73,9 +73,9 @@ public function addRoundOrder(array $parameters = []): Int32Logic4Response * * @throws Logic4ApiException */ - public function deleteRound(int $roundId): BooleanLogic4Response + public function deleteRound(int $roundId): Logic4ResponseOfboolean { - return BooleanLogic4Response::make( + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->delete('/v1/Round/DeleteRound', ['query' => ['roundId' => $roundId]]), ) @@ -87,9 +87,9 @@ public function deleteRound(int $roundId): BooleanLogic4Response * * @throws Logic4ApiException */ - public function deleteRoundOrder(int $roundOrderId): BooleanLogic4Response + public function deleteRoundOrder(int $roundOrderId): Logic4ResponseOfboolean { - return BooleanLogic4Response::make( + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->delete('/v1/Round/DeleteRoundOrder', ['query' => ['roundOrderId' => $roundOrderId]]), ) @@ -128,8 +128,8 @@ public function getRoundOrders(array $parameters = []): \Generator * @throws Logic4ApiException */ public function getRoundOrderStatuses( - ): TypeRoundOrderStatusLogic4ResponseList { - return TypeRoundOrderStatusLogic4ResponseList::make( + ): Logic4ResponseListOfTypeRoundOrderStatus { + return Logic4ResponseListOfTypeRoundOrderStatus::make( $this->buildResponse( $this->getClient()->get('/v1/Round/GetRoundOrderStatuses'), ) @@ -170,9 +170,9 @@ public function getRounds(array $parameters = []): \Generator * * @throws Logic4ApiException */ - public function getRoundStatuses(): TypeRoundStatusLogic4ResponseList + public function getRoundStatuses(): Logic4ResponseListOfTypeRoundStatus { - return TypeRoundStatusLogic4ResponseList::make( + return Logic4ResponseListOfTypeRoundStatus::make( $this->buildResponse( $this->getClient()->get('/v1/Round/GetRoundStatuses'), ) @@ -184,9 +184,9 @@ public function getRoundStatuses(): TypeRoundStatusLogic4ResponseList * * @throws Logic4ApiException */ - public function getVehicles(): VehicleLogic4ResponseList + public function getVehicles(): Logic4ResponseListOfVehicle { - return VehicleLogic4ResponseList::make( + return Logic4ResponseListOfVehicle::make( $this->buildResponse( $this->getClient()->get('/v1/Round/GetVehicles'), ) @@ -213,9 +213,9 @@ public function getVehicles(): VehicleLogic4ResponseList * * @throws Logic4ApiException */ - public function updateRound(array $parameters = []): BooleanLogic4Response + public function updateRound(array $parameters = []): Logic4ResponseOfboolean { - return BooleanLogic4Response::make( + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Round/UpdateRound', ['json' => $parameters]), ) @@ -239,8 +239,8 @@ public function updateRound(array $parameters = []): BooleanLogic4Response */ public function updateRoundOrder( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Round/UpdateRoundOrder', ['json' => $parameters]), ) diff --git a/src/Requests/V10/ShipmentRequest.php b/src/Requests/V10/ShipmentRequest.php index a793b27..8ccf2ec 100644 --- a/src/Requests/V10/ShipmentRequest.php +++ b/src/Requests/V10/ShipmentRequest.php @@ -6,9 +6,9 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\BooleanLogic4Response; -use Webparking\Logic4Client\Responses\V10\OrderShipmentLogic4Response; -use Webparking\Logic4Client\Responses\V10\OrderShipmentLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfOrderShipment; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfboolean; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfOrderShipment; class ShipmentRequest extends Request { @@ -27,8 +27,8 @@ class ShipmentRequest extends Request */ public function addShipmentForInvoiceOrOrder( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Shipments/AddShipmentForInvoiceOrOrder', ['json' => $parameters]), ) @@ -37,7 +37,7 @@ public function addShipmentForInvoiceOrOrder( /** * Verzending toevoegen aan een order of factuur. De nieuw aangemaakte verzending wordt teruggegeven als response. - * Indien de optie 'SendEmail' 'True' is word deze shipment opgepakt door T&T verwerk service in de desktop applicatie + * Indien de optie 'SendEmail' 'True' is word deze shipment opgepakt door T&T verwerk service in de desktop applicatie * voor het verzenden van een email. * * @param array{ @@ -53,8 +53,8 @@ public function addShipmentForInvoiceOrOrder( */ public function addShipmentForInvoiceOrOrderWithEmailing( array $parameters = [], - ): OrderShipmentLogic4Response { - return OrderShipmentLogic4Response::make( + ): Logic4ResponseOfOrderShipment { + return Logic4ResponseOfOrderShipment::make( $this->buildResponse( $this->getClient()->post('/v1/Shipments/AddShipmentForInvoiceOrOrderWithEmailing', ['json' => $parameters]), ) @@ -68,8 +68,8 @@ public function addShipmentForInvoiceOrOrderWithEmailing( */ public function deleteShipmentForInvoiceOrOrder( int $id, - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->delete('/v1/Shipments/DeleteShipmentForInvoiceOrOrder', ['query' => ['id' => $id]]), ) @@ -83,8 +83,8 @@ public function deleteShipmentForInvoiceOrOrder( */ public function getShipmentsForInvoiceOrOrder( int $value, - ): OrderShipmentLogic4ResponseList { - return OrderShipmentLogic4ResponseList::make( + ): Logic4ResponseListOfOrderShipment { + return Logic4ResponseListOfOrderShipment::make( $this->buildResponse( $this->getClient()->post('/v1/Shipments/GetShipmentsForInvoiceOrOrder', ['json' => $value]), ) diff --git a/src/Requests/V10/ShipperRequest.php b/src/Requests/V10/ShipperRequest.php index 37b7eb7..5c5153f 100644 --- a/src/Requests/V10/ShipperRequest.php +++ b/src/Requests/V10/ShipperRequest.php @@ -6,9 +6,9 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\DeliveryOptionLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ShipperTypeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ShippingMethodLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfDeliveryOption; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfShipperType; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfShippingMethod; class ShipperRequest extends Request { @@ -25,8 +25,8 @@ class ShipperRequest extends Request */ public function getDeliveryOptions( array $parameters = [], - ): DeliveryOptionLogic4ResponseList { - return DeliveryOptionLogic4ResponseList::make( + ): Logic4ResponseListOfDeliveryOption { + return Logic4ResponseListOfDeliveryOption::make( $this->buildResponse( $this->getClient()->post('/v1/Shippers/GetDeliveryOptions', ['json' => $parameters]), ) @@ -38,9 +38,9 @@ public function getDeliveryOptions( * * @throws Logic4ApiException */ - public function getShipperTypes(): ShipperTypeLogic4ResponseList + public function getShipperTypes(): Logic4ResponseListOfShipperType { - return ShipperTypeLogic4ResponseList::make( + return Logic4ResponseListOfShipperType::make( $this->buildResponse( $this->getClient()->get('/v1/Shippers/GetShipperTypes'), ) @@ -52,9 +52,9 @@ public function getShipperTypes(): ShipperTypeLogic4ResponseList * * @throws Logic4ApiException */ - public function getShippingMethods(): ShippingMethodLogic4ResponseList + public function getShippingMethods(): Logic4ResponseListOfShippingMethod { - return ShippingMethodLogic4ResponseList::make( + return Logic4ResponseListOfShippingMethod::make( $this->buildResponse( $this->getClient()->get('/v1/Shippers/GetShippingMethods'), ) diff --git a/src/Requests/V10/StockRequest.php b/src/Requests/V10/StockRequest.php index 1810f9e..e60672e 100644 --- a/src/Requests/V10/StockRequest.php +++ b/src/Requests/V10/StockRequest.php @@ -7,23 +7,23 @@ use Webparking\Logic4Client\Data\V10\ProductStockSupplierWithActive; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\BooleanLogic4Response; -use Webparking\Logic4Client\Responses\V10\Int32Logic4Response; -use Webparking\Logic4Client\Responses\V10\ProductMinimalStockNumberLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductStockControlHeadLogic4Response; -use Webparking\Logic4Client\Responses\V10\ProductStockControlHeadLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductStockControlRowLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductStockInformationLogic4Response; -use Webparking\Logic4Client\Responses\V10\ProductStockLocationsLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductStockLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductStockMutationLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductStockMutationTypeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductStockSuppliersLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductStockWarehouseWithDefaultPickLocationLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductSupplierNextDeliveryLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\StockLocationForProductLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\WareHouseLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\WarehouseStockLocationLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductMinimalStockNumber; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductStock; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductStockControlHead; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductStockControlRow; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductStockLocations; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductStockMutation; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductStockMutationType; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductStockSuppliers; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductStockWarehouseWithDefaultPickLocation; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductSupplierNextDelivery; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfStockLocationForProduct; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfWareHouse; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfWarehouseStockLocation; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfboolean; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfint; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfProductStockControlHead; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfProductStockInformation; class StockRequest extends Request { @@ -41,13 +41,11 @@ class StockRequest extends Request * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v2.0. - Voorraadmutatie aanmaken */ public function createProductStockMutation( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/CreateProductStockMutation', ['json' => $parameters]), ) @@ -55,6 +53,7 @@ public function createProductStockMutation( } /** + * Verplaats artikelen van een normale voorraadlocatie naar de reserveerlocatie. * Alleen wanneer in een magazijn een reserveerlocatie is gedefinieerd kunnen tot maximaal 100 mutaties worden uitgevoerd. * * @param arraybuildResponse( $this->getClient()->post('/v1/Stock/CreateProductStockMutationToReservationLocation', ['json' => $parameters]), ) @@ -88,13 +87,11 @@ public function createProductStockMutationToReservationLocation( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Externe voorraadstanden actieve leveranciers */ public function getExternalStockForActiveSuppliers( array $parameters = [], - ): ProductStockSuppliersLogic4ResponseList { - return ProductStockSuppliersLogic4ResponseList::make( + ): Logic4ResponseListOfProductStockSuppliers { + return Logic4ResponseListOfProductStockSuppliers::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/GetExternalStockForActiveSuppliers', ['json' => $parameters]), ) @@ -134,8 +131,8 @@ public function getExternalStockForSuppliers(array $parameters = []): \Generator */ public function getMinimalStockNumbersForProducts( array $parameters = [], - ): ProductMinimalStockNumberLogic4ResponseList { - return ProductMinimalStockNumberLogic4ResponseList::make( + ): Logic4ResponseListOfProductMinimalStockNumber { + return Logic4ResponseListOfProductMinimalStockNumber::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/GetMinimalStockNumbersForProducts', ['json' => $parameters]), ) @@ -143,16 +140,14 @@ public function getMinimalStockNumbersForProducts( } /** - * Verkrijg de eerst volgende leverdata van alle actieve leveranciers, vanaf een specifieke datum. + * Verkrijg de eerstvolgende leverdata van alle actieve leveranciers, vanaf een specifieke datum. * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Eerst volgende leverdata van actieve leveranciers */ public function getNextDeliveriesDatesForActiveSuppliers( mixed $value, - ): ProductSupplierNextDeliveryLogic4ResponseList { - return ProductSupplierNextDeliveryLogic4ResponseList::make( + ): Logic4ResponseListOfProductSupplierNextDelivery { + return Logic4ResponseListOfProductSupplierNextDelivery::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/GetNextDeliveriesDatesForActiveSuppliers', ['json' => $value]), ) @@ -171,8 +166,8 @@ public function getNextDeliveriesDatesForActiveSuppliers( */ public function getProductStockLocationsWithName( array $parameters = [], - ): StockLocationForProductLogic4ResponseList { - return StockLocationForProductLogic4ResponseList::make( + ): Logic4ResponseListOfStockLocationForProduct { + return Logic4ResponseListOfStockLocationForProduct::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/GetProductStockLocationsWithName', ['json' => $parameters]), ) @@ -193,13 +188,11 @@ public function getProductStockLocationsWithName( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Haal voorraadmutaties op */ public function getProductStockMutations( array $parameters = [], - ): ProductStockMutationLogic4ResponseList { - return ProductStockMutationLogic4ResponseList::make( + ): Logic4ResponseListOfProductStockMutation { + return Logic4ResponseListOfProductStockMutation::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/GetProductStockMutations', ['json' => $parameters]), ) @@ -210,12 +203,10 @@ public function getProductStockMutations( * Verkrijg voorraadmutatie types. * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Voorraadmutatie types */ public function getProductStockMutationTypes( - ): ProductStockMutationTypeLogic4ResponseList { - return ProductStockMutationTypeLogic4ResponseList::make( + ): Logic4ResponseListOfProductStockMutationType { + return Logic4ResponseListOfProductStockMutationType::make( $this->buildResponse( $this->getClient()->get('/v1/Stock/GetProductStockMutationTypes'), ) @@ -234,8 +225,8 @@ public function getProductStockMutationTypes( */ public function getProductStockWarehouseWithDefaultPickLocation( array $parameters = [], - ): ProductStockWarehouseWithDefaultPickLocationLogic4ResponseList { - return ProductStockWarehouseWithDefaultPickLocationLogic4ResponseList::make( + ): Logic4ResponseListOfProductStockWarehouseWithDefaultPickLocation { + return Logic4ResponseListOfProductStockWarehouseWithDefaultPickLocation::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/GetProductStockWarehouseWithDefaultPickLocation', ['json' => $parameters]), ) @@ -243,14 +234,14 @@ public function getProductStockWarehouseWithDefaultPickLocation( } /** - * Haalt een voorraadcontrole op aan de hand van een Id. + * Haal een voorraadcontrole op aan de hand van een Id. * * @throws Logic4ApiException */ public function getStockControlHead( int $value, - ): ProductStockControlHeadLogic4Response { - return ProductStockControlHeadLogic4Response::make( + ): Logic4ResponseOfProductStockControlHead { + return Logic4ResponseOfProductStockControlHead::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/GetStockControlHead', ['json' => $value]), ) @@ -270,13 +261,11 @@ public function getStockControlHead( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Voorraadcontrole heads ophalen op basis van het ProductStockControlHeadFilter */ public function getStockControlHeads( array $parameters = [], - ): ProductStockControlHeadLogic4ResponseList { - return ProductStockControlHeadLogic4ResponseList::make( + ): Logic4ResponseListOfProductStockControlHead { + return Logic4ResponseListOfProductStockControlHead::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/GetStockControlHeads', ['json' => $parameters]), ) @@ -291,13 +280,11 @@ public function getStockControlHeads( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Voorraadstanden ophalen */ public function getStockForWarehouses( array $parameters = [], - ): ProductStockLogic4ResponseList { - return ProductStockLogic4ResponseList::make( + ): Logic4ResponseListOfProductStock { + return Logic4ResponseListOfProductStock::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/GetStockForWarehouses', ['json' => $parameters]), ) @@ -313,13 +300,11 @@ public function getStockForWarehouses( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v2.0. - Haal actuele voorraad op voor een artikel */ public function getStockInformationForProduct( array $parameters = [], - ): ProductStockInformationLogic4Response { - return ProductStockInformationLogic4Response::make( + ): Logic4ResponseOfProductStockInformation { + return Logic4ResponseOfProductStockInformation::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/GetStockInformationForProduct', ['json' => $parameters]), ) @@ -333,8 +318,8 @@ public function getStockInformationForProduct( */ public function getStockLocationsForProduct( int $value, - ): ProductStockLocationsLogic4ResponseList { - return ProductStockLocationsLogic4ResponseList::make( + ): Logic4ResponseListOfProductStockLocations { + return Logic4ResponseListOfProductStockLocations::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/GetStockLocationsForProduct', ['json' => $value]), ) @@ -352,8 +337,8 @@ public function getStockLocationsForProduct( */ public function getStockLocationsForProducts( array $parameters = [], - ): ProductStockLocationsLogic4ResponseList { - return ProductStockLocationsLogic4ResponseList::make( + ): Logic4ResponseListOfProductStockLocations { + return Logic4ResponseListOfProductStockLocations::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/GetStockLocationsForProducts', ['json' => $parameters]), ) @@ -364,13 +349,11 @@ public function getStockLocationsForProducts( * Verkrijg de producten die op de locatie aanwezig zouden moeten zijn. * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Verkrijg de producten die op de locatie aanwezig zouden moeten zijn */ public function getStockProductsForStockLocation( int $value, - ): ProductStockControlRowLogic4ResponseList { - return ProductStockControlRowLogic4ResponseList::make( + ): Logic4ResponseListOfProductStockControlRow { + return Logic4ResponseListOfProductStockControlRow::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/GetStockProductsForStockLocation', ['json' => $value]), ) @@ -384,8 +367,8 @@ public function getStockProductsForStockLocation( */ public function getWarehousesForAdministration( int $value, - ): WareHouseLogic4ResponseList { - return WareHouseLogic4ResponseList::make( + ): Logic4ResponseListOfWareHouse { + return Logic4ResponseListOfWareHouse::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/GetWarehousesForAdministration', ['json' => $value]), ) @@ -399,8 +382,8 @@ public function getWarehousesForAdministration( */ public function getWarehousesStockLocationsForAdministration( int $value, - ): WarehouseStockLocationLogic4ResponseList { - return WarehouseStockLocationLogic4ResponseList::make( + ): Logic4ResponseListOfWarehouseStockLocation { + return Logic4ResponseListOfWarehouseStockLocation::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/GetWarehousesStockLocationsForAdministration', ['json' => $value]), ) @@ -422,13 +405,11 @@ public function getWarehousesStockLocationsForAdministration( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Maak een voorraadverplaatsing aan */ public function postCreateStockMovement( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/PostCreateStockMovement', ['json' => $parameters]), ) @@ -450,8 +431,8 @@ public function postCreateStockMovement( */ public function setExternalStockForSupplier( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/SetExternalStockForSupplier', ['json' => $parameters]), ) @@ -471,8 +452,8 @@ public function setExternalStockForSupplier( */ public function setNextDeliveriesDatesForActiveSuppliers( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/SetNextDeliveriesDatesForActiveSuppliers', ['json' => $parameters]), ) @@ -489,13 +470,11 @@ public function setNextDeliveriesDatesForActiveSuppliers( * }> $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Standaard picklocatie aanpassen */ public function updateDefaultPickLocations( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/UpdateDefaultPickLocations', ['json' => $parameters]), ) @@ -522,8 +501,8 @@ public function updateDefaultPickLocations( */ public function updateOrCreateStockControlHeads( array $parameters = [], - ): ProductStockControlHeadLogic4Response { - return ProductStockControlHeadLogic4Response::make( + ): Logic4ResponseOfProductStockControlHead { + return Logic4ResponseOfProductStockControlHead::make( $this->buildResponse( $this->getClient()->post('/v1/Stock/UpdateOrCreateStockControlHeads', ['json' => $parameters]), ) diff --git a/src/Requests/V10/TypeRequest.php b/src/Requests/V10/TypeRequest.php index 7e58e79..05a8303 100644 --- a/src/Requests/V10/TypeRequest.php +++ b/src/Requests/V10/TypeRequest.php @@ -6,11 +6,11 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\CountryLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\GlobalizationTypeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\OperatingSystemTypeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductRelationTypeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProvinceLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfCountry; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfGlobalizationType; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfOperatingSystemType; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductRelationType; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProvince; class TypeRequest extends Request { @@ -25,8 +25,8 @@ class TypeRequest extends Request */ public function getCountries( array $parameters = [], - ): CountryLogic4ResponseList { - return CountryLogic4ResponseList::make( + ): Logic4ResponseListOfCountry { + return Logic4ResponseListOfCountry::make( $this->buildResponse( $this->getClient()->post('/v1/Types/GetCountries', ['json' => $parameters]), ) @@ -34,13 +34,13 @@ public function getCountries( } /** - * Verkrijg alle globalisaties. + * Verkrijg alle globalisaties (talen). * * @throws Logic4ApiException */ - public function getGlobalizationTypes(): GlobalizationTypeLogic4ResponseList + public function getGlobalizationTypes(): Logic4ResponseListOfGlobalizationType { - return GlobalizationTypeLogic4ResponseList::make( + return Logic4ResponseListOfGlobalizationType::make( $this->buildResponse( $this->getClient()->get('/v1/Types/GetGlobalizationTypes'), ) @@ -53,8 +53,8 @@ public function getGlobalizationTypes(): GlobalizationTypeLogic4ResponseList * @throws Logic4ApiException */ public function getOperatingSystemTypes( - ): OperatingSystemTypeLogic4ResponseList { - return OperatingSystemTypeLogic4ResponseList::make( + ): Logic4ResponseListOfOperatingSystemType { + return Logic4ResponseListOfOperatingSystemType::make( $this->buildResponse( $this->getClient()->get('/v1/Types/GetOperatingSystemTypes'), ) @@ -62,11 +62,13 @@ public function getOperatingSystemTypes( } /** + * Verkrijg alle product-relatietypes. + * * @throws Logic4ApiException */ public function getProductRelationTypes( - ): ProductRelationTypeLogic4ResponseList { - return ProductRelationTypeLogic4ResponseList::make( + ): Logic4ResponseListOfProductRelationType { + return Logic4ResponseListOfProductRelationType::make( $this->buildResponse( $this->getClient()->get('/v1/Types/GetProductRelationTypes'), ) @@ -85,8 +87,8 @@ public function getProductRelationTypes( */ public function getProvinces( array $parameters = [], - ): ProvinceLogic4ResponseList { - return ProvinceLogic4ResponseList::make( + ): Logic4ResponseListOfProvince { + return Logic4ResponseListOfProvince::make( $this->buildResponse( $this->getClient()->post('/v1/Types/GetProvinces', ['json' => $parameters]), ) diff --git a/src/Requests/V10/UserRequest.php b/src/Requests/V10/UserRequest.php index 0ce3a33..9a6ec9e 100644 --- a/src/Requests/V10/UserRequest.php +++ b/src/Requests/V10/UserRequest.php @@ -6,8 +6,8 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\ApiUserLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\StringLogic4Response; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfApiUser; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfstring; class UserRequest extends Request { @@ -16,9 +16,9 @@ class UserRequest extends Request * * @throws Logic4ApiException */ - public function getAllUsers(): ApiUserLogic4ResponseList + public function getAllUsers(): Logic4ResponseListOfApiUser { - return ApiUserLogic4ResponseList::make( + return Logic4ResponseListOfApiUser::make( $this->buildResponse( $this->getClient()->get('/v1/User/GetAllUsers'), ) @@ -30,9 +30,9 @@ public function getAllUsers(): ApiUserLogic4ResponseList * * @throws Logic4ApiException */ - public function getNotice(): StringLogic4Response + public function getNotice(): Logic4ResponseOfstring { - return StringLogic4Response::make( + return Logic4ResponseOfstring::make( $this->buildResponse( $this->getClient()->get('/v1/User/GetNotice'), ) @@ -44,9 +44,9 @@ public function getNotice(): StringLogic4Response * * @throws Logic4ApiException */ - public function updateNotice(mixed $value): StringLogic4Response + public function updateNotice(mixed $value): Logic4ResponseOfstring { - return StringLogic4Response::make( + return Logic4ResponseOfstring::make( $this->buildResponse( $this->getClient()->post('/v1/User/UpdateNotice', ['json' => $value]), ) diff --git a/src/Requests/V10/WebshopRequest.php b/src/Requests/V10/WebshopRequest.php index 246209b..6ecc433 100644 --- a/src/Requests/V10/WebshopRequest.php +++ b/src/Requests/V10/WebshopRequest.php @@ -7,17 +7,17 @@ use Webparking\Logic4Client\Data\V10\WebshopVisitorBehaviour; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\BooleanLogic4Response; -use Webparking\Logic4Client\Responses\V10\DecimalNullableLogic4Response; -use Webparking\Logic4Client\Responses\V10\PaymentMethodLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductShiftPriceLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ProductV11WebshopUserProductLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\ShippingMethodLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\WebshopOrderlistProductLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\WebshopSearchWordLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\WebshopUserLogic4Response; -use Webparking\Logic4Client\Responses\V10\WebshopUserProductTypeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V10\WebshopUserTypeLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfPaymentMethod; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfProductShiftPrice; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfShippingMethod; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfWebshopOrderlistProduct; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfWebshopSearchWord; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfWebshopUserProductOfProductV11; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfWebshopUserProductType; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfWebshopUserType; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfboolean; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfdecimal; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfWebshopUser; class WebshopRequest extends Request { @@ -26,7 +26,7 @@ class WebshopRequest extends Request * * @param array{ * VisitorCode?: string|null, - * WebshopUserProductListType?: string, + * WebshopUserProductListType?: mixed, * WebshopPricelistId?: int|null, * GetHighestShiftPrice?: bool|null, * CountryIdForSellPrice?: int|null, @@ -41,8 +41,8 @@ class WebshopRequest extends Request */ public function deleteWebshopUserProductList( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Webshop/DeleteWebshopUserProductList', ['json' => $parameters]), ) @@ -56,8 +56,8 @@ public function deleteWebshopUserProductList( */ public function deleteWebshopUserProductOnWebshopUserProductList( int $value, - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1/Webshop/DeleteWebshopUserProductOnWebshopUserProductList', ['json' => $value]), ) @@ -65,12 +65,13 @@ public function deleteWebshopUserProductOnWebshopUserProductList( } /** + * Verkrijg webshopgebruikergedrag o.b.v. diverse filters (zie eindpunt /Webshop/GetWebshopUserProductListTypes voor de beschikbare types). * Wanneer het type "LastViewed" is geselecteerd, houd er dan rekening mee dat alleen de laatste 8 bekeken artikelen worden opgeslagen. * Wanneer een samengesteld artikel tot de collectie behoort, wordt alleen dit moederartikel in de aangegeven hoeveelheid getoond; * de aantallen kindartikelen zijn altijd in verhouding tot 1 moederartikel. * * @param array{ - * WebshopUserProductListType?: string, + * WebshopUserProductListType?: mixed, * WebsiteDomainId?: int|null, * DebtorId?: int|null, * FromCreatedDateTime?: string|null, @@ -107,8 +108,8 @@ public function getVisitorBehaviorForDebtor(array $parameters = []): \Generator */ public function getWebshopCheckOutPaymentMethods( array $parameters = [], - ): PaymentMethodLogic4ResponseList { - return PaymentMethodLogic4ResponseList::make( + ): Logic4ResponseListOfPaymentMethod { + return Logic4ResponseListOfPaymentMethod::make( $this->buildResponse( $this->getClient()->post('/v1/Webshop/GetWebshopCheckOutPaymentMethods', ['json' => $parameters]), ) @@ -137,8 +138,8 @@ public function getWebshopCheckOutPaymentMethods( */ public function getWebshopCheckOutShippingMethods( array $parameters = [], - ): ShippingMethodLogic4ResponseList { - return ShippingMethodLogic4ResponseList::make( + ): Logic4ResponseListOfShippingMethod { + return Logic4ResponseListOfShippingMethod::make( $this->buildResponse( $this->getClient()->post('/v1/Webshop/GetWebshopCheckOutShippingMethods', ['json' => $parameters]), ) @@ -159,8 +160,8 @@ public function getWebshopCheckOutShippingMethods( */ public function getWebshopProductShiftPrices( array $parameters = [], - ): ProductShiftPriceLogic4ResponseList { - return ProductShiftPriceLogic4ResponseList::make( + ): Logic4ResponseListOfProductShiftPrice { + return Logic4ResponseListOfProductShiftPrice::make( $this->buildResponse( $this->getClient()->post('/v1/Webshop/GetWebshopProductShiftPrices', ['json' => $parameters]), ) @@ -179,13 +180,11 @@ public function getWebshopProductShiftPrices( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Webshop zoekresultaten */ public function getWebshopSearchWords( array $parameters = [], - ): WebshopSearchWordLogic4ResponseList { - return WebshopSearchWordLogic4ResponseList::make( + ): Logic4ResponseListOfWebshopSearchWord { + return Logic4ResponseListOfWebshopSearchWord::make( $this->buildResponse( $this->getClient()->post('/v1/Webshop/GetWebshopSearchWords', ['json' => $parameters]), ) @@ -204,8 +203,8 @@ public function getWebshopSearchWords( */ public function getWebshopUser( array $parameters = [], - ): WebshopUserLogic4Response { - return WebshopUserLogic4Response::make( + ): Logic4ResponseOfWebshopUser { + return Logic4ResponseOfWebshopUser::make( $this->buildResponse( $this->getClient()->post('/v1/Webshop/GetWebshopUser', ['json' => $parameters]), ) @@ -224,8 +223,8 @@ public function getWebshopUser( */ public function getWebshopUserAvailableBudget( array $parameters = [], - ): DecimalNullableLogic4Response { - return DecimalNullableLogic4Response::make( + ): Logic4ResponseOfdecimal { + return Logic4ResponseOfdecimal::make( $this->buildResponse( $this->getClient()->post('/v1/Webshop/GetWebshopUserAvailableBudget', ['json' => $parameters]), ) @@ -236,8 +235,8 @@ public function getWebshopUserAvailableBudget( * Verkrijg webshopgebruiker o.b.v. meegestuurde credentials. * * @param array{ - * UserName?: string, - * Password?: string, + * UserName?: string|null, + * Password?: string|null, * WebsiteDomainId?: int|null, * IgnorePasswordCheck?: bool, * } $parameters @@ -246,8 +245,8 @@ public function getWebshopUserAvailableBudget( */ public function getWebshopUserByLogin( array $parameters = [], - ): WebshopUserLogic4Response { - return WebshopUserLogic4Response::make( + ): Logic4ResponseOfWebshopUser { + return Logic4ResponseOfWebshopUser::make( $this->buildResponse( $this->getClient()->post('/v1/Webshop/GetWebshopUserByLogin', ['json' => $parameters]), ) @@ -264,13 +263,11 @@ public function getWebshopUserByLogin( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Bestellijsten */ public function getWebshopUserOrderlist( array $parameters = [], - ): WebshopOrderlistProductLogic4ResponseList { - return WebshopOrderlistProductLogic4ResponseList::make( + ): Logic4ResponseListOfWebshopOrderlistProduct { + return Logic4ResponseListOfWebshopOrderlistProduct::make( $this->buildResponse( $this->getClient()->post('/v1/Webshop/GetWebshopUserOrderlist', ['json' => $parameters]), ) @@ -283,8 +280,8 @@ public function getWebshopUserOrderlist( * @throws Logic4ApiException */ public function getWebshopUserOrderlistProductTypes( - ): WebshopUserProductTypeLogic4ResponseList { - return WebshopUserProductTypeLogic4ResponseList::make( + ): Logic4ResponseListOfWebshopUserProductType { + return Logic4ResponseListOfWebshopUserProductType::make( $this->buildResponse( $this->getClient()->get('/v1/Webshop/GetWebshopUserOrderlistProductTypes'), ) @@ -296,7 +293,7 @@ public function getWebshopUserOrderlistProductTypes( * * @param array{ * VisitorCode?: string|null, - * WebshopUserProductListType?: string, + * WebshopUserProductListType?: mixed, * WebshopPricelistId?: int|null, * GetHighestShiftPrice?: bool|null, * CountryIdForSellPrice?: int|null, @@ -308,13 +305,11 @@ public function getWebshopUserOrderlistProductTypes( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.0 is verouderd. Gebruik versie v1.1. - Verkrijg een WebshopUserProductlijst */ public function getWebshopUserProductList( array $parameters = [], - ): ProductV11WebshopUserProductLogic4ResponseList { - return ProductV11WebshopUserProductLogic4ResponseList::make( + ): Logic4ResponseListOfWebshopUserProductOfProductV11 { + return Logic4ResponseListOfWebshopUserProductOfProductV11::make( $this->buildResponse( $this->getClient()->post('/v1/Webshop/GetWebshopUserProductList', ['json' => $parameters]), ) @@ -327,8 +322,8 @@ public function getWebshopUserProductList( * @throws Logic4ApiException */ public function getWebshopUserProductListTypes( - ): WebshopUserProductTypeLogic4ResponseList { - return WebshopUserProductTypeLogic4ResponseList::make( + ): Logic4ResponseListOfWebshopUserProductType { + return Logic4ResponseListOfWebshopUserProductType::make( $this->buildResponse( $this->getClient()->get('/v1/Webshop/GetWebshopUserProductListTypes'), ) @@ -340,9 +335,9 @@ public function getWebshopUserProductListTypes( * * @throws Logic4ApiException */ - public function getWebShopUserTypes(): WebshopUserTypeLogic4ResponseList + public function getWebShopUserTypes(): Logic4ResponseListOfWebshopUserType { - return WebshopUserTypeLogic4ResponseList::make( + return Logic4ResponseListOfWebshopUserType::make( $this->buildResponse( $this->getClient()->get('/v1/Webshop/GetWebShopUserTypes'), ) @@ -361,8 +356,8 @@ public function getWebShopUserTypes(): WebshopUserTypeLogic4ResponseList */ public function updateQtyWebshopUserProduct( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->put('/v1/Webshop/UpdateQtyWebshopUserProduct', ['json' => $parameters]), ) diff --git a/src/Requests/V10/WebsiteDomainRequest.php b/src/Requests/V10/WebsiteDomainRequest.php index a414ce6..ab15c17 100644 --- a/src/Requests/V10/WebsiteDomainRequest.php +++ b/src/Requests/V10/WebsiteDomainRequest.php @@ -6,8 +6,8 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V10\WebsiteDomainLogic4Response; -use Webparking\Logic4Client\Responses\V10\WebsiteDomainLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfWebsiteDomain; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseOfWebsiteDomain; class WebsiteDomainRequest extends Request { @@ -23,8 +23,8 @@ class WebsiteDomainRequest extends Request */ public function getWebSiteDomain( array $parameters = [], - ): WebsiteDomainLogic4Response { - return WebsiteDomainLogic4Response::make( + ): Logic4ResponseOfWebsiteDomain { + return Logic4ResponseOfWebsiteDomain::make( $this->buildResponse( $this->getClient()->post('/v1/WebsiteDomains/GetWebSiteDomain', ['json' => $parameters]), ) @@ -36,9 +36,9 @@ public function getWebSiteDomain( * * @throws Logic4ApiException */ - public function getWebSiteDomains(): WebsiteDomainLogic4ResponseList + public function getWebSiteDomains(): Logic4ResponseListOfWebsiteDomain { - return WebsiteDomainLogic4ResponseList::make( + return Logic4ResponseListOfWebsiteDomain::make( $this->buildResponse( $this->getClient()->get('/v1/WebsiteDomains/GetWebSiteDomains'), ) diff --git a/src/Requests/V11/BuyOrderDeliveryRequest.php b/src/Requests/V11/BuyOrderDeliveryRequest.php index 1afec34..aa36d40 100644 --- a/src/Requests/V11/BuyOrderDeliveryRequest.php +++ b/src/Requests/V11/BuyOrderDeliveryRequest.php @@ -6,7 +6,7 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V11\BuyOrderDeliveryAndOrderMovementLogic4Response; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseOfBuyOrderDeliveryAndOrderMovement; class BuyOrderDeliveryRequest extends Request { @@ -17,7 +17,7 @@ class BuyOrderDeliveryRequest extends Request * @param array{ * OrderId?: int|null, * ProcessMutationButDoNotCreatePickbon?: bool, - * Status?: string, + * Status?: mixed, * SupplierId?: int|null, * BuyOrderId?: int|null, * Remarks?: string|null, @@ -31,8 +31,8 @@ class BuyOrderDeliveryRequest extends Request */ public function createBuyOrderDeliveryAndOrderMovement( array $parameters = [], - ): BuyOrderDeliveryAndOrderMovementLogic4Response { - return BuyOrderDeliveryAndOrderMovementLogic4Response::make( + ): Logic4ResponseOfBuyOrderDeliveryAndOrderMovement { + return Logic4ResponseOfBuyOrderDeliveryAndOrderMovement::make( $this->buildResponse( $this->getClient()->post('/v1.1/BuyOrderDeliveries/CreateBuyOrderDeliveryAndOrderMovement', ['json' => $parameters]), ) diff --git a/src/Requests/V11/ExplodedViewRequest.php b/src/Requests/V11/ExplodedViewsRequest.php similarity index 96% rename from src/Requests/V11/ExplodedViewRequest.php rename to src/Requests/V11/ExplodedViewsRequest.php index 35bacaa..c245e25 100644 --- a/src/Requests/V11/ExplodedViewRequest.php +++ b/src/Requests/V11/ExplodedViewsRequest.php @@ -8,7 +8,7 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -class ExplodedViewRequest extends Request +class ExplodedViewsRequest extends Request { /** * Verkrijg exploded view o.b.v. het meegestuurde filter. diff --git a/src/Requests/V11/FinancialRequest.php b/src/Requests/V11/FinancialRequest.php index ab0de04..308d972 100644 --- a/src/Requests/V11/FinancialRequest.php +++ b/src/Requests/V11/FinancialRequest.php @@ -6,32 +6,34 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V11\Int32Logic4Response; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseOfint; class FinancialRequest extends Request { /** - * Maak een financiele inkoop dagboekboeking met mutaties aan. + * Maak een financiële inkoop dagboekboeking met mutaties aan. + * Geeft terug het id van de aangemaakte boeking. + * Voor deze aanroep zijn extra rechten vereist. * * @param array{ - * Description?: string, + * Description?: string|null, * FinancialCostCenterId?: int|null, * FreeValue1?: string|null, * FreeValue2?: string|null, * FreeValue3?: string|null, - * Reference?: string, + * Reference?: string|null, * BookingDateTime?: string, * FinancialBookId?: int, * JournalStatusId?: int|null, - * Mutations?: array, + * Mutations?: array, * } $parameters * * @throws Logic4ApiException */ public function addFinancialBuyBookingWithMutations( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1.1/Financial/AddFinancialBuyBookingWithMutations', ['json' => $parameters]), ) @@ -39,27 +41,29 @@ public function addFinancialBuyBookingWithMutations( } /** - * Maak een financiele verkoop dagboekboeking met mutaties aan. + * Maak een financiële verkoop dagboekboeking met mutaties aan. + * Geeft terug het id van de aangemaakte boeking. + * Voor deze aanroep zijn extra rechten vereist. * * @param array{ - * Description?: string, + * Description?: string|null, * FinancialCostCenterId?: int|null, * FreeValue1?: string|null, * FreeValue2?: string|null, * FreeValue3?: string|null, - * Reference?: string, + * Reference?: string|null, * BookingDateTime?: string, * FinancialBookId?: int, * JournalStatusId?: int|null, - * Mutations?: array, + * Mutations?: array, * } $parameters * * @throws Logic4ApiException */ public function addFinancialSaleBookingWithMutations( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1.1/Financial/AddFinancialSaleBookingWithMutations', ['json' => $parameters]), ) diff --git a/src/Requests/V11/OrderRequest.php b/src/Requests/V11/OrderRequest.php index f7001c6..cef8d97 100644 --- a/src/Requests/V11/OrderRequest.php +++ b/src/Requests/V11/OrderRequest.php @@ -9,8 +9,8 @@ use Webparking\Logic4Client\Data\V11\ReturnSolution; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V11\Int32Logic4Response; -use Webparking\Logic4Client\Responses\V11\OrderLogic4ResponseList; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseListOfOrder; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseOfint; class OrderRequest extends Request { @@ -61,12 +61,10 @@ class OrderRequest extends Request * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.1 is verouderd. Gebruik versie v1.3. - Factuur toevoegen of updaten */ - public function addUpdateInvoice(array $parameters = []): Int32Logic4Response + public function addUpdateInvoice(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1.1/Orders/AddUpdateInvoice', ['json' => $parameters]), ) @@ -120,12 +118,10 @@ public function addUpdateInvoice(array $parameters = []): Int32Logic4Response * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.1 is verouderd. Gebruik versie v1.3. - Order toevoegen of updaten */ - public function addUpdateOrder(array $parameters = []): Int32Logic4Response + public function addUpdateOrder(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1.1/Orders/AddUpdateOrder', ['json' => $parameters]), ) @@ -134,7 +130,7 @@ public function addUpdateOrder(array $parameters = []): Int32Logic4Response /** * Voeg een nieuwe orderregel toe of update een bestaande. Om een bestaande te updaten dient het veld 'Id' gevuld te zijn met een bestaand orderregelnummer. - * + *
    * De optie "OrderRowWithProductComposition": {"AddProductCompositionByParentProductToOrder": true} heeft het volgende gedrag. * - Bij een nieuw product worden samenstellingen toegevoegd als het product een samengesteld product is. * - Bij een bestaand product worden samenstellingen toegevoegd mits er nog geen samenstellingen aanwezig zijn, anders komt er een foutmelding terug. @@ -183,9 +179,9 @@ public function addUpdateOrder(array $parameters = []): Int32Logic4Response * * @throws Logic4ApiException */ - public function addUpdateOrderRow(array $parameters = []): Int32Logic4Response + public function addUpdateOrderRow(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1.1/Orders/AddUpdateOrderRow', ['json' => $parameters]), ) @@ -201,7 +197,7 @@ public function addUpdateOrderRow(array $parameters = []): Int32Logic4Response * Totals?: array{ShippingCost?: number, ShippingCostIncl?: number|null}, * OriginalOrderId?: int, * OriginalOrderDate?: string, - * OriginalOrderZipCode?: string, + * OriginalOrderZipCode?: string|null, * ProblemId?: int, * SolutionId?: int, * ReceivedReturnOrderDate?: string|null, @@ -247,9 +243,9 @@ public function addUpdateOrderRow(array $parameters = []): Int32Logic4Response * * @throws Logic4ApiException */ - public function createReturnOrder(array $parameters = []): Int32Logic4Response + public function createReturnOrder(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1.1/Orders/CreateReturnOrder', ['json' => $parameters]), ) @@ -290,12 +286,10 @@ public function createReturnOrder(array $parameters = []): Int32Logic4Response * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.1 is verouderd. Gebruik versie v1.2. - Facturen ophalen */ - public function getInvoices(array $parameters = []): OrderLogic4ResponseList + public function getInvoices(array $parameters = []): Logic4ResponseListOfOrder { - return OrderLogic4ResponseList::make( + return Logic4ResponseListOfOrder::make( $this->buildResponse( $this->getClient()->post('/v1.1/Orders/GetInvoices', ['json' => $parameters]), ) @@ -303,14 +297,13 @@ public function getInvoices(array $parameters = []): OrderLogic4ResponseList } /** - * Verkrijg het nog te betalen bedrag van nog niet uitgeleverde orders. - * + * Verkrijg het nog te betalen bedrag van nog niet uitgeleverde orders.
    * Indien historypoints zijn aangegeven, moet timeframe een van de volgende waarden hebben: ['Day', 'Week', 'Month', 'Quarter', 'Year']. * * @param array{ * SkipRecords?: int, * TakeRecords?: int, - * TimeFrame?: string|null, + * TimeFrame?: mixed, * HistoryPoints?: int|null, * OrderstatusIds?: array, * WebsiteDomainIds?: array, @@ -366,12 +359,10 @@ public function getOpenPaymentOrders(array $parameters = []): \Generator * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.1 is verouderd. Gebruik versie v1.3. - Orders ophalen */ - public function getOrders(array $parameters = []): OrderLogic4ResponseList + public function getOrders(array $parameters = []): Logic4ResponseListOfOrder { - return OrderLogic4ResponseList::make( + return Logic4ResponseListOfOrder::make( $this->buildResponse( $this->getClient()->post('/v1.1/Orders/GetOrders', ['json' => $parameters]), ) @@ -416,13 +407,11 @@ public function getOrders(array $parameters = []): OrderLogic4ResponseList * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.1 is verouderd. Gebruik versie v2.0. - Retourorders ophalen */ public function getReturnOrders( array $parameters = [], - ): OrderLogic4ResponseList { - return OrderLogic4ResponseList::make( + ): Logic4ResponseListOfOrder { + return Logic4ResponseListOfOrder::make( $this->buildResponse( $this->getClient()->post('/v1.1/Orders/GetReturnOrders', ['json' => $parameters]), ) @@ -484,8 +473,8 @@ public function getReturnSolutions(array $parameters = []): \Generator */ public function updateContactAddressForOrderOrInvoice( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1.1/Orders/UpdateContactAddressForOrderOrInvoice', ['json' => $parameters]), ) @@ -505,8 +494,8 @@ public function updateContactAddressForOrderOrInvoice( */ public function updateDeliveryAddressForOrderOrInvoice( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1.1/Orders/UpdateDeliveryAddressForOrderOrInvoice', ['json' => $parameters]), ) @@ -526,8 +515,8 @@ public function updateDeliveryAddressForOrderOrInvoice( */ public function updateInvoiceAddressForOrderOrInvoice( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1.1/Orders/UpdateInvoiceAddressForOrderOrInvoice', ['json' => $parameters]), ) diff --git a/src/Requests/V11/PickbonsRequest.php b/src/Requests/V11/PickbonsRequest.php index 06df93b..e845c3e 100644 --- a/src/Requests/V11/PickbonsRequest.php +++ b/src/Requests/V11/PickbonsRequest.php @@ -7,12 +7,14 @@ use Webparking\Logic4Client\Data\V11\OrderHeadPickbon; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V11\Int32Logic4ResponseList; -use Webparking\Logic4Client\Responses\V11\StringLogic4Response; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseListOfint; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseOfstring; class PickbonsRequest extends Request { /** + * Maak nieuwe pickbon(nen) aan voor een gehele order op het moment dat de 'nog te leveren' regels volledig gepickt kunnen worden. + * * @param array{ * OrderId?: int, * UseNewWorkflow?: bool, @@ -22,8 +24,8 @@ class PickbonsRequest extends Request */ public function createCompletePickbonForOrder( array $parameters = [], - ): Int32Logic4ResponseList { - return Int32Logic4ResponseList::make( + ): Logic4ResponseListOfint { + return Logic4ResponseListOfint::make( $this->buildResponse( $this->getClient()->post('/v1.1/Pickbons/CreateCompletePickbonForOrder', ['json' => $parameters]), ) @@ -65,8 +67,8 @@ public function getOrderHeadPickbons(array $parameters = []): \Generator */ public function postSoftBlockPickbons( array $parameters = [], - ): StringLogic4Response { - return StringLogic4Response::make( + ): Logic4ResponseOfstring { + return Logic4ResponseOfstring::make( $this->buildResponse( $this->getClient()->post('/v1.1/Pickbons/PostSoftBlockPickbons', ['json' => $parameters]), ) @@ -78,7 +80,7 @@ public function postSoftBlockPickbons( * * @param array, + * Corrections?: array, * Mutations?: array, * OrderHeadPickbonId?: int, * InterimLocationId?: int|null, @@ -87,9 +89,10 @@ public function postSoftBlockPickbons( * * @throws Logic4ApiException */ - public function processPickbons(array $parameters = []): StringLogic4Response - { - return StringLogic4Response::make( + public function processPickbons( + array $parameters = [], + ): Logic4ResponseOfstring { + return Logic4ResponseOfstring::make( $this->buildResponse( $this->getClient()->post('/v1.1/Pickbons/ProcessPickbons', ['json' => $parameters]), ) diff --git a/src/Requests/V11/ProductRequest.php b/src/Requests/V11/ProductRequest.php index e054645..f1bb4ff 100644 --- a/src/Requests/V11/ProductRequest.php +++ b/src/Requests/V11/ProductRequest.php @@ -10,30 +10,33 @@ use Webparking\Logic4Client\Data\V11\ProductWithRelatedProducts; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V11\BasicProductDataLogic4ResponseList; -use Webparking\Logic4Client\Responses\V11\BrandLogic4ResponseList; -use Webparking\Logic4Client\Responses\V11\GetProductImageLogic4ResponseList; -use Webparking\Logic4Client\Responses\V11\Int32Logic4Response; -use Webparking\Logic4Client\Responses\V11\Int32Logic4ResponseList; -use Webparking\Logic4Client\Responses\V11\ProductAssemblyRecipeItemLogic4ResponseList; -use Webparking\Logic4Client\Responses\V11\ProductBarcodeLogic4ResponseList; -use Webparking\Logic4Client\Responses\V11\ProductCompositionItemLogic4ResponseList; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseListOfBasicProductData; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseListOfBrand; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseListOfGetProductImage; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseListOfint; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseListOfProductAssemblyRecipeItem; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseListOfProductBarcode; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseListOfProductCompositionItem; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseListOfProductPickLocationBasedOnSystemSettings; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseListOfProductPricelist; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseListOfProductReview; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseListOfProductSEOInformation; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseListOfProductStatus; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseListOfProductSupplier; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseListOfProductUnit; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseOfint; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseOfProductPriceInformation; use Webparking\Logic4Client\Responses\V11\ProductExtraBarcodeType; -use Webparking\Logic4Client\Responses\V11\ProductPickLocationBasedOnSystemSettingsLogic4ResponseList; -use Webparking\Logic4Client\Responses\V11\ProductPriceInformationLogic4Response; -use Webparking\Logic4Client\Responses\V11\ProductPricelistLogic4ResponseList; -use Webparking\Logic4Client\Responses\V11\ProductReviewLogic4ResponseList; -use Webparking\Logic4Client\Responses\V11\ProductSEOInformationLogic4ResponseList; -use Webparking\Logic4Client\Responses\V11\ProductStatusLogic4ResponseList; -use Webparking\Logic4Client\Responses\V11\ProductSupplierLogic4ResponseList; -use Webparking\Logic4Client\Responses\V11\ProductUnitLogic4ResponseList; class ProductRequest extends Request { /** + * Toevoegen van een product. + * Geeft een productId terug als resultaat indien het opslaan goed is verlopen. + * * @param array{ - * ProductCode?: string, - * ProductDescription1?: string, + * ProductCode?: string|null, + * ProductDescription1?: string|null, * ProductDescription2?: string|null, * BrandId?: int, * ProductGroup1?: int, @@ -44,7 +47,7 @@ class ProductRequest extends Request * Suppliers?: array}>, * Barcode1?: string|null, * Barcode2?: string|null, - * ExtraBarcodes?: array, + * ExtraBarcodes?: array, * VendorCode?: string|null, * StatusId?: int, * VisibleOnWebshopFrom?: string|null, @@ -77,13 +80,16 @@ class ProductRequest extends Request * DepthOutsidePackage?: number, * MinStockCount?: int|null, * MaxStockCount?: int|null, + * HidePricesOnWebsite?: bool, + * ShowOfferButtonOnWebsite?: bool, + * HideStartingPricesOnWebsite?: bool, * } $parameters * * @throws Logic4ApiException */ - public function addProduct(array $parameters = []): Int32Logic4Response + public function addProduct(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1.1/Products/AddProduct', ['json' => $parameters]), ) @@ -91,6 +97,7 @@ public function addProduct(array $parameters = []): Int32Logic4Response } /** + * Voeg een afbeelding toe aan het artikel * - Maximale grootte van het bericht is 5MB * - Return waarde is een AfbeeldingId als de opdracht is geslaagd. * @@ -104,9 +111,9 @@ public function addProduct(array $parameters = []): Int32Logic4Response * * @throws Logic4ApiException */ - public function addProductImage(array $parameters = []): Int32Logic4Response + public function addProductImage(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1.1/Products/AddProductImage', ['json' => $parameters]), ) @@ -114,13 +121,15 @@ public function addProductImage(array $parameters = []): Int32Logic4Response } /** + * Verwijder een afbeelding van het artikel. + * * @throws Logic4ApiException */ public function deleteProductImage( int $productid, int $imageid, - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->delete('/v1.1/Products/DeleteProductImage', ['query' => ['productid' => $productid, 'imageid' => $imageid]]), ) @@ -136,8 +145,8 @@ public function deleteProductImage( */ public function getBarcodesForProductIds( array $parameters = [], - ): ProductBarcodeLogic4ResponseList { - return ProductBarcodeLogic4ResponseList::make( + ): Logic4ResponseListOfProductBarcode { + return Logic4ResponseListOfProductBarcode::make( $this->buildResponse( $this->getClient()->post('/v1.1/Products/GetBarcodesForProductIds', ['json' => $parameters]), ) @@ -145,12 +154,12 @@ public function getBarcodesForProductIds( } /** + * Haal artikel barcode types op. + * Deze types worden gebruikt in bijvoorbeeld de UpdateProductAddExtraBarcode functionaliteit. + * * @return array * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.1 is verouderd. Gebruik versie v1.2. - Haal artikel barcode types op. - * Deze types worden gebruikt in bijvoorbeeld de UpdateProductAddExtraBarcode functionaliteit. */ public function getBarcodeTypes(): array { @@ -171,8 +180,8 @@ public function getBarcodeTypes(): array */ public function getBasicProductDataForProducts( array $parameters = [], - ): BasicProductDataLogic4ResponseList { - return BasicProductDataLogic4ResponseList::make( + ): Logic4ResponseListOfBasicProductData { + return Logic4ResponseListOfBasicProductData::make( $this->buildResponse( $this->getClient()->post('/v1.1/Products/GetBasicProductDataForProducts', ['json' => $parameters]), ) @@ -183,12 +192,10 @@ public function getBasicProductDataForProducts( * Haal alle merken op. * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.1 is verouderd. Gebruik versie v1.2. - Merken */ - public function getBrands(): BrandLogic4ResponseList + public function getBrands(): Logic4ResponseListOfBrand { - return BrandLogic4ResponseList::make( + return Logic4ResponseListOfBrand::make( $this->buildResponse( $this->getClient()->get('/v1.1/Products/GetBrands'), ) @@ -202,8 +209,8 @@ public function getBrands(): BrandLogic4ResponseList */ public function getComposedProductComposition( int $value, - ): ProductCompositionItemLogic4ResponseList { - return ProductCompositionItemLogic4ResponseList::make( + ): Logic4ResponseListOfProductCompositionItem { + return Logic4ResponseListOfProductCompositionItem::make( $this->buildResponse( $this->getClient()->post('/v1.1/Products/GetComposedProductComposition', ['json' => $value]), ) @@ -222,8 +229,8 @@ public function getComposedProductComposition( */ public function getPriceInformationForProduct( array $parameters = [], - ): ProductPriceInformationLogic4Response { - return ProductPriceInformationLogic4Response::make( + ): Logic4ResponseOfProductPriceInformation { + return Logic4ResponseOfProductPriceInformation::make( $this->buildResponse( $this->getClient()->post('/v1.1/Products/GetPriceInformationForProduct', ['json' => $parameters]), ) @@ -240,13 +247,11 @@ public function getPriceInformationForProduct( * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.1 is verouderd. Gebruik een nieuwere versie. - Prijslijsten */ public function getPricelists( array $parameters = [], - ): ProductPricelistLogic4ResponseList { - return ProductPricelistLogic4ResponseList::make( + ): Logic4ResponseListOfProductPricelist { + return Logic4ResponseListOfProductPricelist::make( $this->buildResponse( $this->getClient()->post('/v1.1/Products/GetPricelists', ['json' => $parameters]), ) @@ -260,8 +265,8 @@ public function getPricelists( */ public function getProductAssemblyRecipe( int $value, - ): ProductAssemblyRecipeItemLogic4ResponseList { - return ProductAssemblyRecipeItemLogic4ResponseList::make( + ): Logic4ResponseListOfProductAssemblyRecipeItem { + return Logic4ResponseListOfProductAssemblyRecipeItem::make( $this->buildResponse( $this->getClient()->post('/v1.1/Products/GetProductAssemblyRecipe', ['json' => $value]), ) @@ -269,14 +274,14 @@ public function getProductAssemblyRecipe( } /** - * @throws Logic4ApiException + * Haal de afbeeldinginformatie op van een artikel. * - * @deprecated Let op! Versie 1.1 is verouderd. Gebruik versie v2.0. - Haal de afbeeldinginformatie op van een artikel + * @throws Logic4ApiException */ public function getProductImages( int $productid, - ): GetProductImageLogic4ResponseList { - return GetProductImageLogic4ResponseList::make( + ): Logic4ResponseListOfGetProductImage { + return Logic4ResponseListOfGetProductImage::make( $this->buildResponse( $this->getClient()->get('/v1.1/Products/GetProductImages', ['query' => ['productid' => $productid]]), ) @@ -296,8 +301,8 @@ public function getProductImages( */ public function getProductPickStockLocationIds( array $parameters = [], - ): ProductPickLocationBasedOnSystemSettingsLogic4ResponseList { - return ProductPickLocationBasedOnSystemSettingsLogic4ResponseList::make( + ): Logic4ResponseListOfProductPickLocationBasedOnSystemSettings { + return Logic4ResponseListOfProductPickLocationBasedOnSystemSettings::make( $this->buildResponse( $this->getClient()->post('/v1.1/Products/GetProductPickStockLocationIds', ['json' => $parameters]), ) @@ -317,8 +322,8 @@ public function getProductPickStockLocationIds( */ public function getProductReviews( array $parameters = [], - ): ProductReviewLogic4ResponseList { - return ProductReviewLogic4ResponseList::make( + ): Logic4ResponseListOfProductReview { + return Logic4ResponseListOfProductReview::make( $this->buildResponse( $this->getClient()->post('/v1.1/Products/GetProductReviews', ['json' => $parameters]), ) @@ -346,7 +351,7 @@ public function getProductReviews( * WebshopPriceListId?: int|null, * UseDropShipmentAmountsForWebshopPrices?: bool|null, * ProductIds?: array, - * ProductFilterListChoice?: string|null, + * ProductFilterListChoice?: mixed, * ProductHistoryBasedOnInvoices?: bool|null, * WebshopUserOrderlistProductType?: int|null, * ActiveOffers?: bool|null, @@ -358,6 +363,7 @@ public function getProductReviews( * LoadExternalStockActiveSupplier?: bool|null, * SkipRecords?: int|null, * TakeRecords?: int|null, + * FromId?: int|null, * LoadProductGroups?: bool|null, * LoadExtraBarcodes?: bool, * OnlyShowParentProducts?: bool|null, @@ -394,13 +400,11 @@ public function getProducts(array $parameters = []): \Generator * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.1 is verouderd. Gebruik een nieuwere versie. - SEO informatie voor artikel */ public function getProductSEOInformations( array $parameters = [], - ): ProductSEOInformationLogic4ResponseList { - return ProductSEOInformationLogic4ResponseList::make( + ): Logic4ResponseListOfProductSEOInformation { + return Logic4ResponseListOfProductSEOInformation::make( $this->buildResponse( $this->getClient()->post('/v1.1/Products/GetProductSEOInformations', ['json' => $parameters]), ) @@ -424,7 +428,7 @@ public function getProductSEOInformations( * WebshopPriceListId?: int|null, * UseDropShipmentAmountsForWebshopPrices?: bool|null, * ProductIds?: array, - * ProductFilterListChoice?: string|null, + * ProductFilterListChoice?: mixed, * ProductHistoryBasedOnInvoices?: bool|null, * WebshopUserOrderlistProductType?: int|null, * ActiveOffers?: bool|null, @@ -436,6 +440,7 @@ public function getProductSEOInformations( * LoadExternalStockActiveSupplier?: bool|null, * SkipRecords?: int|null, * TakeRecords?: int|null, + * FromId?: int|null, * LoadProductGroups?: bool|null, * LoadExtraBarcodes?: bool, * OnlyShowParentProducts?: bool|null, @@ -453,8 +458,8 @@ public function getProductSEOInformations( */ public function getProductsIds( array $parameters = [], - ): Int32Logic4ResponseList { - return Int32Logic4ResponseList::make( + ): Logic4ResponseListOfint { + return Logic4ResponseListOfint::make( $this->buildResponse( $this->getClient()->post('/v1.1/Products/GetProductsIds', ['json' => $parameters]), ) @@ -482,6 +487,8 @@ public function getProductVariantBalkChildren(array $parameters = []): \Generato } /** + * Haal gerelateerde artikelen op. + * * @param array{ * ProductIds?: array, * RelatedTypeId?: int|null, @@ -507,9 +514,9 @@ public function getRelatedProducts(array $parameters = []): \Generator * * @throws Logic4ApiException */ - public function getStatuses(): ProductStatusLogic4ResponseList + public function getStatuses(): Logic4ResponseListOfProductStatus { - return ProductStatusLogic4ResponseList::make( + return Logic4ResponseListOfProductStatus::make( $this->buildResponse( $this->getClient()->get('/v1.1/Products/GetStatuses'), ) @@ -517,14 +524,14 @@ public function getStatuses(): ProductStatusLogic4ResponseList } /** - * Verkrijg alle leveranciers van een product. + * Verkrijg alle leveranciers van één product. * * @throws Logic4ApiException */ public function getSuppliersForProduct( int $value, - ): ProductSupplierLogic4ResponseList { - return ProductSupplierLogic4ResponseList::make( + ): Logic4ResponseListOfProductSupplier { + return Logic4ResponseListOfProductSupplier::make( $this->buildResponse( $this->getClient()->post('/v1.1/Products/GetSuppliersForProduct', ['json' => $value]), ) @@ -558,9 +565,9 @@ public function getSuppliersForProducts(array $parameters = []): \Generator * * @throws Logic4ApiException */ - public function getUnits(): ProductUnitLogic4ResponseList + public function getUnits(): Logic4ResponseListOfProductUnit { - return ProductUnitLogic4ResponseList::make( + return Logic4ResponseListOfProductUnit::make( $this->buildResponse( $this->getClient()->get('/v1.1/Products/GetUnits'), ) @@ -568,6 +575,9 @@ public function getUnits(): ProductUnitLogic4ResponseList } /** + * Verwijder een leverancier voor een artikel. + * Geeft een productId terug als resultaat indien het verwijderen goed is verlopen. + * * @param array{ * SupplierId?: int, * ProductId?: int, @@ -577,8 +587,8 @@ public function getUnits(): ProductUnitLogic4ResponseList */ public function removeProductSupplier( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->delete('/v1.1/Products/RemoveProductSupplier', ['json' => $parameters]), ) @@ -586,6 +596,8 @@ public function removeProductSupplier( } /** + * Maak een leverancier voor een artikel actief. + * Geeft een productId terug als resultaat indien het opslaan goed is verlopen. * Voor deze aanroep zijn extra rechten vereist. * * @param array{ @@ -597,8 +609,8 @@ public function removeProductSupplier( */ public function setActiveProductSupplier( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1.1/Products/SetActiveProductSupplier', ['json' => $parameters]), ) @@ -606,6 +618,9 @@ public function setActiveProductSupplier( } /** + * Updaten van een product. + * Geeft een productId terug als resultaat indien het opslaan goed is verlopen. + * * @param array{ * ProductId?: int, * ProductDescription1?: string|null, @@ -648,13 +663,20 @@ public function setActiveProductSupplier( * MinStockCount?: int|null, * MaxStockCount?: int|null, * TemplateId?: int|null, + * HidePricesOnWebsite?: bool, + * ShowOfferButtonOnWebsite?: bool, + * HideStartingPricesOnWebsite?: bool, + * OfferStartDate?: string|null, + * OfferEndDate?: string|null, + * OfferFromPrice?: number|null, + * OfferToPrice?: number|null, * } $parameters * * @throws Logic4ApiException */ - public function updateProduct(array $parameters = []): Int32Logic4Response + public function updateProduct(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->patch('/v1.1/Products/UpdateProduct', ['json' => $parameters]), ) @@ -662,10 +684,13 @@ public function updateProduct(array $parameters = []): Int32Logic4Response } /** + * Voeg een barcode toe aan een artikel + * Geeft een productId terug als resultaat indien het opslaan goed is verlopen. + * * @param array{ * ProductId?: int, * TypeId?: int|null, - * Barcode?: string, + * Barcode?: string|null, * Quantity?: int, * UnitId?: int|null, * } $parameters @@ -674,8 +699,8 @@ public function updateProduct(array $parameters = []): Int32Logic4Response */ public function updateProductAddExtraBarcode( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1.1/Products/UpdateProductAddExtraBarcode', ['json' => $parameters]), ) @@ -683,6 +708,7 @@ public function updateProductAddExtraBarcode( } /** + * Update een afbeelding van het artikel * - Maximale grootte van het bericht is 5MB * - Return waarde is een AfbeeldingId als de opdracht is geslaagd. * @@ -698,8 +724,8 @@ public function updateProductAddExtraBarcode( */ public function updateProductImage( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->put('/v1.1/Products/UpdateProductImage', ['json' => $parameters]), ) @@ -707,6 +733,7 @@ public function updateProductImage( } /** + * Updaten van de artikel hoofdgroep en merk. * Voor deze aanroep zijn extra rechten vereist. * * @param array{ @@ -719,8 +746,8 @@ public function updateProductImage( */ public function updateProductMainGroupAndBrand( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->patch('/v1.1/Products/UpdateProductMainGroupAndBrand', ['json' => $parameters]), ) @@ -728,6 +755,9 @@ public function updateProductMainGroupAndBrand( } /** + * Updaten van de artikel staffel prijzen. + * Geeft een productId terug als resultaat indien het opslaan goed is verlopen. + * Niet aangeleverde staffels zullen automatisch worden verwijderd. * Voor deze aanroep zijn extra rechten vereist. * * @param array{ @@ -739,8 +769,8 @@ public function updateProductMainGroupAndBrand( */ public function updateProductPrices( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1.1/Products/UpdateProductPrices', ['json' => $parameters]), ) @@ -748,17 +778,20 @@ public function updateProductPrices( } /** + * Verwijder een barcode van een artikel + * Geeft een productId terug als resultaat indien het opslaan goed is verlopen. + * * @param array{ * ProductId?: int, - * Barcode?: string, + * Barcode?: string|null, * } $parameters * * @throws Logic4ApiException */ public function updateProductRemoveExtraBarcode( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1.1/Products/UpdateProductRemoveExtraBarcode', ['json' => $parameters]), ) @@ -766,18 +799,17 @@ public function updateProductRemoveExtraBarcode( } /** - * Een SEO informatie record word op basis van een combinatie van ProductId, GlobalizationId en WebsiteDomainId geselecteerd. + * Verander de SEO informatie voor een product op basis van taal en webshopdomein. + * Een SEO informatie record wordt op basis van een combinatie van ProductId, GlobalizationId en WebsiteDomainId geselecteerd. * WebsiteDomainId mag null zijn, dan geldt de gegeven SEO informatie voor alle webhopdomeinen. - * - * Als een record niet bestaat wordt deze aangemaakt. Lege records worden automatisch verwijdert. + *
    + * Als een record niet bestaat wordt deze aangemaakt. Lege records worden automatisch verwijderd. * Niet-lege records moeten ten minste een Title of Description hebben. - * - * - * Bij het meegeven van een lege string of 'null' voor informatie velden, wordt bestaande informatie leeg gehaald. + *
    + * Bij het meegeven van een lege string of 'null' voor informatievelden, wordt bestaande informatie leeg gehaald. * Velden die niet in de request staan worden niet gewijzigd. - * - * - * Als een product geen SEO informatie heeft voor een bepaalde taal en webshopdomein vindt er een fallback plaats op de basis informatie van het artikel. + *
    + * Als een product geen SEO informatie heeft voor een bepaalde taal en webshopdomein vindt er een fallback plaats op de basisinformatie van het artikel. * * @param array{ * WebsiteDomainId?: int|null, @@ -794,8 +826,8 @@ public function updateProductRemoveExtraBarcode( */ public function updateProductSEOInformation( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->patch('/v1.1/Products/UpdateProductSEOInformation', ['json' => $parameters]), ) @@ -803,6 +835,9 @@ public function updateProductSEOInformation( } /** + * Updaten van de artikel leverancier. + * Geeft een productId terug als resultaat indien het opslaan goed is verlopen. + * * @param array{ * Supplier_ProductCode?: string|null, * ProductName?: string|null, @@ -820,8 +855,8 @@ public function updateProductSEOInformation( */ public function updateProductSupplier( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1.1/Products/UpdateProductSupplier', ['json' => $parameters]), ) @@ -829,6 +864,8 @@ public function updateProductSupplier( } /** + * Update de prijzen van de leverancier. Geeft een productId terug als resultaat. + * * @param array{ * ProductId?: int, * SupplierId?: int, @@ -839,8 +876,8 @@ public function updateProductSupplier( */ public function updateProductSupplierProductPrice( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1.1/Products/UpdateProductSupplierProductPrice', ['json' => $parameters]), ) diff --git a/src/Requests/V11/RelationsRequest.php b/src/Requests/V11/RelationsRequest.php index c1405ee..e2ee84d 100644 --- a/src/Requests/V11/RelationsRequest.php +++ b/src/Requests/V11/RelationsRequest.php @@ -79,6 +79,7 @@ public function getContacts(array $parameters = []): \Generator * SkipRecords?: int, * TakeRecords?: int, * ChangedAfter?: string|null, + * LoginName?: string|null, * Id?: int|null, * PhoneNumber?: string|null, * WebsiteDomainId?: int|null, @@ -106,6 +107,7 @@ public function getCreditors(array $parameters = []): \Generator * SkipRecords?: int, * TakeRecords?: int, * ChangedAfter?: string|null, + * LoginName?: string|null, * Id?: int|null, * PhoneNumber?: string|null, * WebsiteDomainId?: int|null, diff --git a/src/Requests/V11/StockRequest.php b/src/Requests/V11/StockRequest.php index d7fd6b9..b8da142 100644 --- a/src/Requests/V11/StockRequest.php +++ b/src/Requests/V11/StockRequest.php @@ -12,8 +12,8 @@ use Webparking\Logic4Client\Data\V11\ProductSupplierNextDelivery; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V11\BooleanLogic4Response; -use Webparking\Logic4Client\Responses\V11\ProductStockMutationTypeV11Logic4ResponseList; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseListOfProductStockMutationTypeV11; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseOfboolean; class StockRequest extends Request { @@ -41,7 +41,7 @@ public function getExternalStockForActiveSuppliers(array $parameters = []): \Gen } /** - * Verkrijg de eerst volgende leverdata van alle actieve leveranciers, vanaf een specifieke datum. + * Verkrijg de eerstvolgende leverdata van alle actieve leveranciers, vanaf een specifieke datum. * * @param array{ * NextDeliveryDate?: string, @@ -63,7 +63,7 @@ public function getNextDeliveriesDatesForActiveSuppliers(array $parameters = []) } /** - * Haal voorraadmutaties op. Maximaal 10000 records per keer kunnen worden opgehaald. + * Haal voorraadmutaties op. Maximaal 10.000 records per keer kunnen worden opgehaald. * * @param array{ * SkipRecords?: int, @@ -97,8 +97,8 @@ public function getProductStockMutations(array $parameters = []): \Generator * @throws Logic4ApiException */ public function getProductStockMutationTypes( - ): ProductStockMutationTypeV11Logic4ResponseList { - return ProductStockMutationTypeV11Logic4ResponseList::make( + ): Logic4ResponseListOfProductStockMutationTypeV11 { + return Logic4ResponseListOfProductStockMutationTypeV11::make( $this->buildResponse( $this->getClient()->get('/v1.1/Stock/GetProductStockMutationTypes'), ) @@ -194,8 +194,8 @@ public function getStockProductsForStockLocation(array $parameters = []): \Gener */ public function postCreateStockMovement( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1.1/Stock/PostCreateStockMovement', ['json' => $parameters]), ) @@ -218,8 +218,8 @@ public function postCreateStockMovement( */ public function setExternalStockForSupplier( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1.1/Stock/SetExternalStockForSupplier', ['json' => $parameters]), ) @@ -239,8 +239,8 @@ public function setExternalStockForSupplier( */ public function updateDefaultPickLocations( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1.1/Stock/UpdateDefaultPickLocations', ['json' => $parameters]), ) diff --git a/src/Requests/V11/WebshopRequest.php b/src/Requests/V11/WebshopRequest.php index a0223ca..329a8bd 100644 --- a/src/Requests/V11/WebshopRequest.php +++ b/src/Requests/V11/WebshopRequest.php @@ -8,8 +8,8 @@ use Webparking\Logic4Client\Data\V11\WebshopSearchWord; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V11\BooleanLogic4Response; -use Webparking\Logic4Client\Responses\V11\ProductV12WebshopUserProductLogic4ResponseList; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseListOfWebshopUserProductOfProductV12; +use Webparking\Logic4Client\Responses\V11\Logic4ResponseOfboolean; class WebshopRequest extends Request { @@ -21,7 +21,7 @@ class WebshopRequest extends Request * DateTimeAdded?: string, * ComposedProductParentId?: int|null, * WebshopUserId?: int|null, - * ProductInformation?: array{SubUnit_ParentId?: int|null, ProductId?: int, ProductCode?: string|null, ProductName1?: string|null, ProductName2?: string|null, ProductInfo?: string|null, StatusId?: int, Statusname?: string|null, BrandId?: int, Brandname?: string|null, Imagename1?: string|null, ImageUrl1?: string|null, Imagename2?: string|null, ImageUrl2?: string|null, Imagename3?: string|null, ImageUrl3?: string|null, Unit?: string|null, UnitId?: int, MinSaleAmount?: int, MinSaleAmountWebshop?: int|null, MinSaleBuyAmountDropShipment?: int|null, SaleCountIncrement?: int|null, SaleCountIncrementWebshop?: int|null, SaleCountIncrementDropShipment?: int|null, MinBuyAmount?: int|null, VatPercent?: number, VatCodeId?: int|null, SellPriceGross?: number, Weight?: number, Volume?: number, Offer?: array{StartDate?: string|null, EndDate?: string|null, FromPrice?: number|null, ToPrice?: number|null, OfferGroupId?: int|null, ProductId?: int}, SellPriceAdvice?: number|null, BuyPrice?: number, ProductGroupId1?: int, ProductGroupId2?: int|null, ProductGroupId3?: int|null, ProductGroupId4?: int|null, BuyCountIncrement?: int|null, SellPriceLowestForWebshop?: number|null, ExcludePriceFromPricelistCalculations?: bool, AdditionalBuyPriceAmount?: number|null, AdditionalBuyPricePercentage?: number|null, IsComposedProduct?: bool|null, IsAssemblyProduct?: bool, ComposedProductSetChildSellPricesToZero?: bool, ComposedProductSetSellPriceToZero?: bool|null, FreeStock?: number, ExternalStockActiveSupplier?: int|null, CreditorDiscountGroupId?: int|null, DateTimeLastChanged?: string, DateTimeAdded?: string, BarCode1?: string|null, FreeValues?: array, Sorting?: int|null, NextDelivery?: string|null, Descriptions?: array, ShiftPrices?: array, ProductGroups?: array}>, Barcode2?: string|null, BarcodeExtraList?: array, SystemBarcode?: string|null, ProductGroup1ProductGroupTypeId?: int, WareHouses?: array, MinimalStock?: int|null, PCSinInsidePackage?: int, PCSinOutsidePackage?: int, ProductType1?: array{Id?: int, Value?: string|null}, ProductType2?: array{Id?: int, Value?: string|null}, ProductType3?: array{Id?: int, Value?: string|null}, ProductType4?: array{Id?: int, Value?: string|null}, ProductType5?: array{Id?: int, Value?: string|null}, StandardAmount?: number|null, VendorCode?: string|null, ProductTemplateId?: int|null, ProductTemplateName?: string|null, HasVariants?: bool, VariantParentProductId?: int|null, Tags?: array, DefaultPickLocation?: int|null, DefaultBulkLocation?: int|null}, + * ProductInformation?: array{SubUnit_ParentId?: int|null, ProductId?: int, ProductCode?: string|null, ProductName1?: string|null, ProductName2?: string|null, ProductInfo?: string|null, StatusId?: int, Statusname?: string|null, BrandId?: int, Brandname?: string|null, Imagename1?: string|null, ImageUrl1?: string|null, Imagename2?: string|null, ImageUrl2?: string|null, Imagename3?: string|null, ImageUrl3?: string|null, Unit?: string|null, UnitId?: int, MinSaleAmount?: int, MinSaleAmountWebshop?: int|null, MinSaleBuyAmountDropShipment?: int|null, SaleCountIncrement?: int|null, SaleCountIncrementWebshop?: int|null, SaleCountIncrementDropShipment?: int|null, MinBuyAmount?: int|null, VatPercent?: number, VatCodeId?: int|null, SellPriceGross?: number, Weight?: number, Volume?: number, Offer?: array{StartDate?: string|null, EndDate?: string|null, FromPrice?: number|null, ToPrice?: number|null, OfferGroupId?: int|null, ProductId?: int}, SellPriceAdvice?: number|null, BuyPrice?: number, ProductGroupId1?: int, ProductGroupId2?: int|null, ProductGroupId3?: int|null, ProductGroupId4?: int|null, BuyCountIncrement?: int|null, SellPriceLowestForWebshop?: number|null, ExcludePriceFromPricelistCalculations?: bool, AdditionalBuyPriceAmount?: number|null, AdditionalBuyPricePercentage?: number|null, IsComposedProduct?: bool|null, IsAssemblyProduct?: bool, ComposedProductSetChildSellPricesToZero?: bool, ComposedProductSetSellPriceToZero?: bool|null, FreeStock?: number, ExternalStockActiveSupplier?: int|null, CreditorDiscountGroupId?: int|null, DateTimeLastChanged?: string, DateTimeAdded?: string, BarCode1?: string|null, FreeValues?: array, Sorting?: int|null, NextDelivery?: string|null, Descriptions?: array, ShiftPrices?: array, ProductGroups?: array}>, Barcode2?: string|null, BarcodeExtraList?: array, SystemBarcode?: string|null, ProductGroup1ProductGroupTypeId?: int, WareHouses?: array, MinimalStock?: int|null, PCSinInsidePackage?: int, PCSinOutsidePackage?: int, ProductType1?: array{Id?: int, Value?: string|null}, ProductType2?: array{Id?: int, Value?: string|null}, ProductType3?: array{Id?: int, Value?: string|null}, ProductType4?: array{Id?: int, Value?: string|null}, ProductType5?: array{Id?: int, Value?: string|null}, StandardAmount?: number|null, VendorCode?: string|null, ProductTemplateId?: int|null, ProductTemplateName?: string|null, HasVariants?: bool, VariantParentProductId?: int|null, Tags?: array, DefaultPickLocation?: int|null, DefaultBulkLocation?: int|null, HidePricesOnWebsite?: bool, ShowOfferButtonOnWebsite?: bool, HideStartingPricesOnWebsite?: bool}, * ProductId?: int, * QtyDec?: number|null, * Commission?: string|null, @@ -34,13 +34,11 @@ class WebshopRequest extends Request * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.1 is verouderd. Gebruik versie v1.3. - WebshopUserProduct toevoegen aan WebshopUserProductlijst */ public function addWebshopUserProductToWebshopUserProductList( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1.1/Webshop/AddWebshopUserProductToWebshopUserProductList', ['json' => $parameters]), ) @@ -102,7 +100,7 @@ public function getWebshopUserOrderlist(array $parameters = []): \Generator * * @param array{ * VisitorCode?: string|null, - * WebshopUserProductListType?: string, + * WebshopUserProductListType?: mixed, * WebshopPricelistId?: int|null, * GetHighestShiftPrice?: bool|null, * CountryIdForSellPrice?: int|null, @@ -117,8 +115,8 @@ public function getWebshopUserOrderlist(array $parameters = []): \Generator */ public function getWebshopUserProductList( array $parameters = [], - ): ProductV12WebshopUserProductLogic4ResponseList { - return ProductV12WebshopUserProductLogic4ResponseList::make( + ): Logic4ResponseListOfWebshopUserProductOfProductV12 { + return Logic4ResponseListOfWebshopUserProductOfProductV12::make( $this->buildResponse( $this->getClient()->post('/v1.1/Webshop/GetWebshopUserProductList', ['json' => $parameters]), ) diff --git a/src/Requests/V12/OrderRequest.php b/src/Requests/V12/OrderRequest.php index 771a6c8..46a7b88 100644 --- a/src/Requests/V12/OrderRequest.php +++ b/src/Requests/V12/OrderRequest.php @@ -7,7 +7,7 @@ use Webparking\Logic4Client\Data\V12\Order; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V12\Int32Logic4Response; +use Webparking\Logic4Client\Responses\V12\Logic4ResponseOfint; class OrderRequest extends Request { @@ -59,12 +59,10 @@ class OrderRequest extends Request * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.2 is verouderd. Gebruik versie v1.3. - Order toevoegen of updaten */ - public function addUpdateOrder(array $parameters = []): Int32Logic4Response + public function addUpdateOrder(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1.2/Orders/AddUpdateOrder', ['json' => $parameters]), ) diff --git a/src/Requests/V12/ProductRequest.php b/src/Requests/V12/ProductRequest.php index 51c06f9..51181f4 100644 --- a/src/Requests/V12/ProductRequest.php +++ b/src/Requests/V12/ProductRequest.php @@ -9,16 +9,19 @@ use Webparking\Logic4Client\Data\V12\ProductV11; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V12\ProductExtraBarcodeTypeLogic4ResponseList; +use Webparking\Logic4Client\Responses\V12\Logic4ResponseListOfProductExtraBarcodeType; class ProductRequest extends Request { /** + * Haal artikel barcode types op. + * Deze types worden gebruikt in bijvoorbeeld de UpdateProductAddExtraBarcode functionaliteit. + * * @throws Logic4ApiException */ - public function getBarcodeTypes(): ProductExtraBarcodeTypeLogic4ResponseList + public function getBarcodeTypes(): Logic4ResponseListOfProductExtraBarcodeType { - return ProductExtraBarcodeTypeLogic4ResponseList::make( + return Logic4ResponseListOfProductExtraBarcodeType::make( $this->buildResponse( $this->getClient()->get('/v1.2/Products/GetBarcodeTypes'), ) @@ -67,7 +70,7 @@ public function getBrands(array $parameters = []): \Generator * WebshopPriceListId?: int|null, * UseDropShipmentAmountsForWebshopPrices?: bool|null, * ProductIds?: array, - * ProductFilterListChoice?: string|null, + * ProductFilterListChoice?: mixed, * ProductHistoryBasedOnInvoices?: bool|null, * WebshopUserOrderlistProductType?: int|null, * ActiveOffers?: bool|null, @@ -79,6 +82,7 @@ public function getBrands(array $parameters = []): \Generator * LoadExternalStockActiveSupplier?: bool|null, * SkipRecords?: int|null, * TakeRecords?: int|null, + * FromId?: int|null, * LoadProductGroups?: bool|null, * LoadExtraBarcodes?: bool, * OnlyShowParentProducts?: bool|null, diff --git a/src/Requests/V12/WebshopRequest.php b/src/Requests/V12/WebshopRequest.php index aa7ba83..e2a2cb5 100644 --- a/src/Requests/V12/WebshopRequest.php +++ b/src/Requests/V12/WebshopRequest.php @@ -6,7 +6,7 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V12\BooleanLogic4Response; +use Webparking\Logic4Client\Responses\V12\Logic4ResponseOfboolean; class WebshopRequest extends Request { @@ -18,7 +18,7 @@ class WebshopRequest extends Request * DateTimeAdded?: string, * ComposedProductParentId?: int|null, * WebshopUserId?: int|null, - * ProductInformation?: array{ProductId?: int, ProductCode?: string|null, ProductName1?: string|null, ProductName2?: string|null, ProductInfo?: string|null, StatusId?: int, Statusname?: string|null, BrandId?: int, Brandname?: string|null, Imagename1?: string|null, ImageUrl1?: string|null, Imagename2?: string|null, ImageUrl2?: string|null, Imagename3?: string|null, ImageUrl3?: string|null, Unit?: string|null, UnitId?: int, MinSaleAmount?: int, MinSaleAmountWebshop?: int|null, MinSaleBuyAmountDropShipment?: int|null, SaleCountIncrement?: int|null, SaleCountIncrementWebshop?: int|null, SaleCountIncrementDropShipment?: int|null, MinBuyAmount?: int|null, VatPercent?: number, VatCodeId?: int|null, SellPriceGross?: number, Weight?: number, Volume?: number, Offer?: array{StartDate?: string|null, EndDate?: string|null, FromPrice?: number|null, ToPrice?: number|null, OfferGroupId?: int|null, ProductId?: int}, SellPriceAdvice?: number|null, BuyPrice?: number, ProductGroupId1?: int, ProductGroupId2?: int|null, ProductGroupId3?: int|null, ProductGroupId4?: int|null, BuyCountIncrement?: int|null, SellPriceLowestForWebshop?: number|null, ExcludePriceFromPricelistCalculations?: bool, AdditionalBuyPriceAmount?: number|null, AdditionalBuyPricePercentage?: number|null, IsComposedProduct?: bool|null, IsAssemblyProduct?: bool, ComposedProductSetChildSellPricesToZero?: bool, ComposedProductSetSellPriceToZero?: bool|null, FreeStock?: number, ExternalStockActiveSupplier?: int|null, CreditorDiscountGroupId?: int|null, DateTimeLastChanged?: string, DateTimeAdded?: string, BarCode1?: string|null, FreeValues?: array, Sorting?: int|null, NextDelivery?: string|null, Descriptions?: array, ShiftPrices?: array, ProductGroups?: array}>, Barcode2?: string|null, BarcodeExtraList?: array, SystemBarcode?: string|null, ProductGroup1ProductGroupTypeId?: int, WareHouses?: array, MinimalStock?: int|null, PCSinInsidePackage?: int, PCSinOutsidePackage?: int, ProductType1?: array{Id?: int, Value?: string|null}, ProductType2?: array{Id?: int, Value?: string|null}, ProductType3?: array{Id?: int, Value?: string|null}, ProductType4?: array{Id?: int, Value?: string|null}, ProductType5?: array{Id?: int, Value?: string|null}, StandardAmount?: number|null, VendorCode?: string|null, ProductTemplateId?: int|null, ProductTemplateName?: string|null, HasVariants?: bool, VariantParentProductId?: int|null, Tags?: array, DefaultPickLocation?: int|null, DefaultBulkLocation?: int|null}, + * ProductInformation?: array{ProductId?: int, ProductCode?: string|null, ProductName1?: string|null, ProductName2?: string|null, ProductInfo?: string|null, StatusId?: int, Statusname?: string|null, BrandId?: int, Brandname?: string|null, Imagename1?: string|null, ImageUrl1?: string|null, Imagename2?: string|null, ImageUrl2?: string|null, Imagename3?: string|null, ImageUrl3?: string|null, Unit?: string|null, UnitId?: int, MinSaleAmount?: int, MinSaleAmountWebshop?: int|null, MinSaleBuyAmountDropShipment?: int|null, SaleCountIncrement?: int|null, SaleCountIncrementWebshop?: int|null, SaleCountIncrementDropShipment?: int|null, MinBuyAmount?: int|null, VatPercent?: number, VatCodeId?: int|null, SellPriceGross?: number, Weight?: number, Volume?: number, Offer?: array{StartDate?: string|null, EndDate?: string|null, FromPrice?: number|null, ToPrice?: number|null, OfferGroupId?: int|null, ProductId?: int}, SellPriceAdvice?: number|null, BuyPrice?: number, ProductGroupId1?: int, ProductGroupId2?: int|null, ProductGroupId3?: int|null, ProductGroupId4?: int|null, BuyCountIncrement?: int|null, SellPriceLowestForWebshop?: number|null, ExcludePriceFromPricelistCalculations?: bool, AdditionalBuyPriceAmount?: number|null, AdditionalBuyPricePercentage?: number|null, IsComposedProduct?: bool|null, IsAssemblyProduct?: bool, ComposedProductSetChildSellPricesToZero?: bool, ComposedProductSetSellPriceToZero?: bool|null, FreeStock?: number, ExternalStockActiveSupplier?: int|null, CreditorDiscountGroupId?: int|null, DateTimeLastChanged?: string, DateTimeAdded?: string, BarCode1?: string|null, FreeValues?: array, Sorting?: int|null, NextDelivery?: string|null, Descriptions?: array, ShiftPrices?: array, ProductGroups?: array}>, Barcode2?: string|null, BarcodeExtraList?: array, SystemBarcode?: string|null, ProductGroup1ProductGroupTypeId?: int, WareHouses?: array, MinimalStock?: int|null, PCSinInsidePackage?: int, PCSinOutsidePackage?: int, ProductType1?: array{Id?: int, Value?: string|null}, ProductType2?: array{Id?: int, Value?: string|null}, ProductType3?: array{Id?: int, Value?: string|null}, ProductType4?: array{Id?: int, Value?: string|null}, ProductType5?: array{Id?: int, Value?: string|null}, StandardAmount?: number|null, VendorCode?: string|null, ProductTemplateId?: int|null, ProductTemplateName?: string|null, HasVariants?: bool, VariantParentProductId?: int|null, Tags?: array, DefaultPickLocation?: int|null, DefaultBulkLocation?: int|null, HidePricesOnWebsite?: bool, ShowOfferButtonOnWebsite?: bool, HideStartingPricesOnWebsite?: bool}, * ProductId?: int, * QtyDec?: number|null, * Commission?: string|null, @@ -31,13 +31,11 @@ class WebshopRequest extends Request * } $parameters * * @throws Logic4ApiException - * - * @deprecated Let op! Versie 1.2 is verouderd. Gebruik versie v1.3. - WebshopUserProduct toevoegen aan WebshopUserProductlijst */ public function addWebshopUserProductToWebshopUserProductList( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1.2/Webshop/AddWebshopUserProductToWebshopUserProductList', ['json' => $parameters]), ) diff --git a/src/Requests/V13/OrderRequest.php b/src/Requests/V13/OrderRequest.php index 52ee8e8..2da3c34 100644 --- a/src/Requests/V13/OrderRequest.php +++ b/src/Requests/V13/OrderRequest.php @@ -7,7 +7,7 @@ use Webparking\Logic4Client\Data\V13\Order; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V13\Int32Logic4Response; +use Webparking\Logic4Client\Responses\V13\Logic4ResponseOfint; class OrderRequest extends Request { @@ -59,9 +59,9 @@ class OrderRequest extends Request * * @throws Logic4ApiException */ - public function addUpdateInvoice(array $parameters = []): Int32Logic4Response + public function addUpdateInvoice(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1.3/Orders/AddUpdateInvoice', ['json' => $parameters]), ) @@ -118,9 +118,9 @@ public function addUpdateInvoice(array $parameters = []): Int32Logic4Response * * @throws Logic4ApiException */ - public function addUpdateOrder(array $parameters = []): Int32Logic4Response + public function addUpdateOrder(array $parameters = []): Logic4ResponseOfint { - return Int32Logic4Response::make( + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v1.3/Orders/AddUpdateOrder', ['json' => $parameters]), ) diff --git a/src/Requests/V13/ProductRequest.php b/src/Requests/V13/ProductRequest.php index 49b380e..ca2070e 100644 --- a/src/Requests/V13/ProductRequest.php +++ b/src/Requests/V13/ProductRequest.php @@ -32,7 +32,7 @@ class ProductRequest extends Request * WebshopPriceListId?: int|null, * UseDropShipmentAmountsForWebshopPrices?: bool|null, * ProductIds?: array, - * ProductFilterListChoice?: string|null, + * ProductFilterListChoice?: mixed, * ProductHistoryBasedOnInvoices?: bool|null, * WebshopUserOrderlistProductType?: int|null, * ActiveOffers?: bool|null, @@ -44,6 +44,7 @@ class ProductRequest extends Request * LoadExternalStockActiveSupplier?: bool|null, * SkipRecords?: int|null, * TakeRecords?: int|null, + * FromId?: int|null, * LoadProductGroups?: bool|null, * LoadExtraBarcodes?: bool, * OnlyShowParentProducts?: bool|null, diff --git a/src/Requests/V13/WebshopRequest.php b/src/Requests/V13/WebshopRequest.php index 1129893..c5f2dbf 100644 --- a/src/Requests/V13/WebshopRequest.php +++ b/src/Requests/V13/WebshopRequest.php @@ -6,7 +6,7 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V13\BooleanLogic4Response; +use Webparking\Logic4Client\Responses\V13\Logic4ResponseOfboolean; class WebshopRequest extends Request { @@ -29,8 +29,8 @@ class WebshopRequest extends Request */ public function addWebshopUserProductToWebshopUserProductList( array $parameters = [], - ): BooleanLogic4Response { - return BooleanLogic4Response::make( + ): Logic4ResponseOfboolean { + return Logic4ResponseOfboolean::make( $this->buildResponse( $this->getClient()->post('/v1.3/Webshop/AddWebshopUserProductToWebshopUserProductList', ['json' => $parameters]), ) diff --git a/src/Requests/V14/ProductRequest.php b/src/Requests/V14/ProductRequest.php index f227a55..f9aaef2 100644 --- a/src/Requests/V14/ProductRequest.php +++ b/src/Requests/V14/ProductRequest.php @@ -12,7 +12,7 @@ class ProductRequest extends Request { /** * Verkrijg artikelen o.b.v. het meegestuurde filter. Het aantal op te vragen artikelen is gelimiteerd tot 10000. - * + *
    * Vanaf v1.4 is de werking van BuyPrice gewijzigd. Dit veld bevat nu de inkoopprijs exclusief toeslagen. * In voorgaande versies was dit veld inclusief toeslagen. Deze waarde is nu verplaatst naar het nieuwe veld CostPrice. * @@ -34,7 +34,7 @@ class ProductRequest extends Request * WebshopPriceListId?: int|null, * UseDropShipmentAmountsForWebshopPrices?: bool|null, * ProductIds?: array, - * ProductFilterListChoice?: string|null, + * ProductFilterListChoice?: mixed, * ProductHistoryBasedOnInvoices?: bool|null, * WebshopUserOrderlistProductType?: int|null, * ActiveOffers?: bool|null, @@ -46,6 +46,7 @@ class ProductRequest extends Request * LoadExternalStockActiveSupplier?: bool|null, * SkipRecords?: int|null, * TakeRecords?: int|null, + * FromId?: int|null, * LoadProductGroups?: bool|null, * LoadExtraBarcodes?: bool, * OnlyShowParentProducts?: bool|null, diff --git a/src/Requests/V20/DeliveryRequest.php b/src/Requests/V20/DeliveryRequest.php index 5464791..7ac7a2d 100644 --- a/src/Requests/V20/DeliveryRequest.php +++ b/src/Requests/V20/DeliveryRequest.php @@ -11,6 +11,8 @@ class DeliveryRequest extends Request { /** + * Zoeken op verkooporder uitleveringen. + * * @param array{ * DateTimeFrom?: string|null, * DateTimeTo?: string|null, diff --git a/src/Requests/V20/ProductRequest.php b/src/Requests/V20/ProductRequest.php index 701b25d..7ac6a28 100644 --- a/src/Requests/V20/ProductRequest.php +++ b/src/Requests/V20/ProductRequest.php @@ -7,8 +7,8 @@ use Webparking\Logic4Client\Data\V20\ProductSEOInformation; use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V20\ProductDimensionsLogic4ResponseList; -use Webparking\Logic4Client\Responses\V20\ProductImageV2Logic4ResponseList; +use Webparking\Logic4Client\Responses\V20\Logic4ResponseListOfProductDimensions; +use Webparking\Logic4Client\Responses\V20\Logic4ResponseListOfProductImageV2; class ProductRequest extends Request { @@ -23,8 +23,8 @@ class ProductRequest extends Request */ public function getProductDimensions( array $parameters = [], - ): ProductDimensionsLogic4ResponseList { - return ProductDimensionsLogic4ResponseList::make( + ): Logic4ResponseListOfProductDimensions { + return Logic4ResponseListOfProductDimensions::make( $this->buildResponse( $this->getClient()->post('/v2/Products/GetProductDimensions', ['json' => $parameters]), ) @@ -32,6 +32,8 @@ public function getProductDimensions( } /** + * Ontvang de afbeeldingsinformatie van maximaal 1000 artikelen. + * * @param array{ * ProductIds?: array, * } $parameters @@ -40,8 +42,8 @@ public function getProductDimensions( */ public function getProductImages( array $parameters = [], - ): ProductImageV2Logic4ResponseList { - return ProductImageV2Logic4ResponseList::make( + ): Logic4ResponseListOfProductImageV2 { + return Logic4ResponseListOfProductImageV2::make( $this->buildResponse( $this->getClient()->post('/v2/Products/GetProductImages', ['json' => $parameters]), ) @@ -49,6 +51,8 @@ public function getProductImages( } /** + * Het verkrijgen van informatie is maximaal 1.000 producten. + * * @param array{ * SkipRecords?: int, * TakeRecords?: int, diff --git a/src/Requests/V20/ProductTemplateRequest.php b/src/Requests/V20/ProductTemplateRequest.php index adc0949..ff2b396 100644 --- a/src/Requests/V20/ProductTemplateRequest.php +++ b/src/Requests/V20/ProductTemplateRequest.php @@ -6,7 +6,7 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V20\ProductTemplatesWithTranslationLogic4Response; +use Webparking\Logic4Client\Responses\V20\Logic4ResponseOfProductTemplatesWithTranslation; class ProductTemplateRequest extends Request { @@ -22,8 +22,8 @@ class ProductTemplateRequest extends Request */ public function getProductTemplateValuesWithTranslations( array $parameters = [], - ): ProductTemplatesWithTranslationLogic4Response { - return ProductTemplatesWithTranslationLogic4Response::make( + ): Logic4ResponseOfProductTemplatesWithTranslation { + return Logic4ResponseOfProductTemplatesWithTranslation::make( $this->buildResponse( $this->getClient()->post('/v2/ProductTemplates/GetProductTemplateValuesWithTranslations', ['json' => $parameters]), ) diff --git a/src/Requests/V20/StockRequest.php b/src/Requests/V20/StockRequest.php index 4658d8e..cf51746 100644 --- a/src/Requests/V20/StockRequest.php +++ b/src/Requests/V20/StockRequest.php @@ -6,8 +6,8 @@ use Webparking\Logic4Client\Exceptions\Logic4ApiException; use Webparking\Logic4Client\Request; -use Webparking\Logic4Client\Responses\V20\Int32Logic4Response; -use Webparking\Logic4Client\Responses\V20\ProductStockInformationV2Logic4ResponseList; +use Webparking\Logic4Client\Responses\V20\Logic4ResponseListOfProductStockInformationV2; +use Webparking\Logic4Client\Responses\V20\Logic4ResponseOfint; class StockRequest extends Request { @@ -28,8 +28,8 @@ class StockRequest extends Request */ public function createProductStockMutation( array $parameters = [], - ): Int32Logic4Response { - return Int32Logic4Response::make( + ): Logic4ResponseOfint { + return Logic4ResponseOfint::make( $this->buildResponse( $this->getClient()->post('/v2/Stock/CreateProductStockMutation', ['json' => $parameters]), ) @@ -48,8 +48,8 @@ public function createProductStockMutation( */ public function getStockInformationForProduct( array $parameters = [], - ): ProductStockInformationV2Logic4ResponseList { - return ProductStockInformationV2Logic4ResponseList::make( + ): Logic4ResponseListOfProductStockInformationV2 { + return Logic4ResponseListOfProductStockInformationV2::make( $this->buildResponse( $this->getClient()->post('/v2/Stock/GetStockInformationForProduct', ['json' => $parameters]), ) diff --git a/src/Requests/V30/AppointmentsRequest.php b/src/Requests/V30/AppointmentsRequest.php new file mode 100644 index 0000000..1bcbb8d --- /dev/null +++ b/src/Requests/V30/AppointmentsRequest.php @@ -0,0 +1,64 @@ + + * + * @throws Logic4ApiException + */ + public function getAgendas(array $parameters = []): array + { + return array_map( + static fn (array $data) => Agenda::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Appointments/GetAgendas', ['json' => $parameters]), + ), + ); + } + + /** + * @param array{ + * Subject?: string|null, + * AppointmentIds?: array, + * HasITS?: bool|null, + * ITS_Id?: int|null, + * DebtorId?: int|null, + * CreditorId?: int|null, + * ContactId?: int|null, + * AgendaId?: int|null, + * TaskForUserId?: int|null, + * StartDateTimeFrom?: string|null, + * StartDateTimeUntil?: string|null, + * SkipRecords?: int, + * TakeRecords?: int, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getAppointments(array $parameters = []): array + { + return array_map( + static fn (array $data) => Appointment::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Appointments/GetAppointments', ['json' => $parameters]), + ), + ); + } +} diff --git a/src/Requests/V30/BackOfficeRequest.php b/src/Requests/V30/BackOfficeRequest.php new file mode 100644 index 0000000..bc5eb0d --- /dev/null +++ b/src/Requests/V30/BackOfficeRequest.php @@ -0,0 +1,41 @@ +buildResponse( + $this->getClient()->get('/v3/Backoffice/GetDatabaseConfiguration'), + ) + ); + } + + /** + * Maak een nieuwe taak aan. + * + * @param array{ + * Type?: mixed, + * SerializedJson?: string|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function postCreateBackofficeAction(array $parameters = []): void + { + $this->getClient()->post('/v3/Backoffice/PostCreateBackofficeAction', ['json' => $parameters]); + } +} diff --git a/src/Requests/V30/BundlesRequest.php b/src/Requests/V30/BundlesRequest.php new file mode 100644 index 0000000..e7dde24 --- /dev/null +++ b/src/Requests/V30/BundlesRequest.php @@ -0,0 +1,77 @@ + + * + * @throws Logic4ApiException + */ + public function getBundleDiscounts(): array + { + return array_map( + static fn (array $data) => BundleDiscount::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Bundles/GetBundleDiscounts'), + ), + ); + } + + /** + * Het is verplicht gebruik te maken van ParentProductIds en/of TakeRecords in het filter. + * + * @param array{ + * ParentProductIds?: array, + * SkipRecords?: int, + * TakeRecords?: int, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getBundles(array $parameters = []): array + { + return array_map( + static fn (array $data) => BundleGroupsForParent::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Bundles/GetBundles', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg bundles waarvan een product een kind is. + * + * @param array{ + * ChildProductId?: int, + * SkipRecords?: int, + * TakeRecords?: int, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getBundlesForChild(array $parameters = []): array + { + return array_map( + static fn (array $data) => BundleGroupForChild::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Bundles/GetBundlesForChild', ['json' => $parameters]), + ), + ); + } +} diff --git a/src/Requests/V30/BuyOrderDeliveryRequest.php b/src/Requests/V30/BuyOrderDeliveryRequest.php new file mode 100644 index 0000000..ea51de4 --- /dev/null +++ b/src/Requests/V30/BuyOrderDeliveryRequest.php @@ -0,0 +1,150 @@ +, + * PickingListNumber?: string|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function createBuyOrderDelivery(array $parameters = []): string + { + return $this->buildResponse( + $this->getClient()->post('/v3/BuyOrderDeliveries/CreateBuyOrderDelivery', ['json' => $parameters]), + ); + } + + /** + * Maak een nieuwe inkooplevering aan, o.b.v. deze inkooplevering wordt automatisch een uitlevering aangemaakt. + * Let op: de verkooporder kan enkel uitgeleverd worden als de betreffende inkooporderregel een OrderRowId heeft. + * + * @param array{ + * OrderId?: int|null, + * ProcessMutationButDoNotCreatePickbon?: bool, + * Status?: mixed, + * SupplierId?: int|null, + * BuyOrderId?: int|null, + * Remarks?: string|null, + * Description?: string|null, + * BranchId?: int|null, + * Rows?: array, + * PickingListNumber?: string|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function createBuyOrderDeliveryAndOrderMovement( + array $parameters = [], + ): BuyOrderDeliveryAndOrderMovement { + return BuyOrderDeliveryAndOrderMovement::make( + $this->buildResponse( + $this->getClient()->post('/v3/BuyOrderDeliveries/CreateBuyOrderDeliveryAndOrderMovement', ['json' => $parameters]), + ) + ); + } + + /** + * Verkrijg alle beschikbare inkoopleveringen, het aantal op te vragen inkoopleveringen is gelimiteerd tot 1000. + * + * @param array{ + * CreationDateFrom?: string|null, + * BuyOrderDeliveryId?: int|null, + * BuyOrderId?: int|null, + * BranchId?: int|null, + * SupplierId?: int|null, + * StatusId?: int|null, + * TypeId?: int|null, + * Skip?: int|null, + * Take?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getBuyOrderDeliveries(array $parameters = []): array + { + return array_map( + static fn (array $data) => BuyOrderDeliveryRead::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/BuyOrderDeliveries/GetBuyOrderDeliveries', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg alle beschikbare inkooplevering statussen. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getBuyOrderDeliveryStatusses(): array + { + return array_map( + static fn (array $data) => BuyOrderDeliveryStatusValue::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/BuyOrderDeliveries/GetBuyOrderDeliveryStatusses'), + ), + ); + } + + /** + * Verkrijg alle beschikbare inkooplevering types. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getBuyOrderDeliveryTypes(): array + { + return array_map( + static fn (array $data) => BuyOrderDeliveryTypeValue::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/BuyOrderDeliveries/GetBuyOrderDeliveryTypes'), + ), + ); + } + + /** + * Wijzig de inkooplevering. + * Enkel statusId 3 of 5 zijn toegestaan. + * + * @param array{ + * Id?: int, + * Description?: string|null, + * PickingListNr?: string|null, + * Remarks?: string|null, + * StatusId?: int|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateBuyOrderDelivery(array $parameters = []): void + { + $this->getClient()->patch('/v3/BuyOrderDeliveries/UpdateBuyOrderDelivery', ['json' => $parameters]); + } +} diff --git a/src/Requests/V30/BuyOrderRequest.php b/src/Requests/V30/BuyOrderRequest.php new file mode 100644 index 0000000..dd23b3a --- /dev/null +++ b/src/Requests/V30/BuyOrderRequest.php @@ -0,0 +1,217 @@ +getClient()->post('/v3/BuyOrders/AddBuyOrderRow', ['json' => $parameters]); + } + + /** + * Maak een nieuwe inkooporder. + * + * @param array{ + * CreditorId?: int, + * DatabaseAdministrationId?: int, + * CreatedAt?: string, + * BuyOrderRows?: array, + * Remarks?: string|null, + * BranchId?: int|null, + * OrderId?: int|null, + * FreeValue1?: string|null, + * FreeValue2?: string|null, + * FreeValue3?: string|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function createBuyOrder(array $parameters = []): BuyOrderBaseInfo + { + return BuyOrderBaseInfo::make( + $this->buildResponse( + $this->getClient()->post('/v3/BuyOrders/CreateBuyOrder', ['json' => $parameters]), + ) + ); + } + + /** + * Verkrijg de inkooporder regels voor een bepaalde inkooporder die al besteld zijn bij de leverancier. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getBuyOrderRows(int $value): array + { + return array_map( + static fn (array $data) => BuyOrderRow::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/BuyOrders/GetBuyOrderRows', ['json' => $value]), + ), + ); + } + + /** + * Haal inkoopordersregels op o.b.v. het meegestuurde filter. + * Let op: het kan zijn dat niet alle inkoopregels van een bepaalde order worden opgehaald, doordat de uitvoer wordt gelimiteerd via de Skip- en TakeRecords. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * ProductId?: int|null, + * ProductCode?: string|null, + * BuyOrderStatusId?: int|null, + * IsDropShipment?: bool|null, + * OrderId?: int|null, + * BuyOrderId?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getBuyOrderRowsByFilter(array $parameters = []): array + { + return array_map( + static fn (array $data) => BuyOrderRow::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/BuyOrders/GetBuyOrderRowsByFilter', ['json' => $parameters]), + ), + ); + } + + /** + * Haal per artikel openstaande inkoopordersregels op o.b.v. het meegestuurde filter. + * + * @param array{ + * ProductIds?: array, + * Dropshipment?: bool|null, + * MinimumDeliveryDate?: string|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function getBuyOrderRowsPerProduct(array $parameters = []): object + { + return $this->buildResponse( + $this->getClient()->post('/v3/BuyOrders/GetBuyOrderRowsPerProduct', ['json' => $parameters]), + ); + } + + /** + * Haal inkooporders op o.b.v. het meegestuurde filter. De hoeveelheid inkooporders wordt gelimiteerd aan de hand van opgegeven SkipRecords en TakeRecords. + * TakeRecords wordt gelimiteerd op 10.000. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * DateTimeChangedFrom?: string|null, + * DateTimeChangedTo?: string|null, + * BranchId?: int|null, + * BuyOrderIsClosed?: bool|null, + * SupplierId?: int|null, + * BuyOrderId?: int|null, + * BuyOrderIdFrom?: int|null, + * Remarks?: string|null, + * BuyOrderDateFrom?: string|null, + * BuyOrderDateTo?: string|null, + * FreeValue1?: string|null, + * FreeValue2?: string|null, + * FreeValue3?: string|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getBuyOrders(array $parameters = []): array + { + return array_map( + static fn (array $data) => BuyOrderGetInfo::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/BuyOrders/GetBuyOrders', ['json' => $parameters]), + ), + ); + } + + /** + * Wijzig een bestaande inkooporder. + * + * @param array{ + * Id?: int|null, + * CreditorId?: int, + * Remarks?: string|null, + * BranchId?: int|null, + * BuyOrderClosed?: bool, + * CreatedAt?: string, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function updateBuyOrder(array $parameters = []): array + { + return array_map( + static fn (array $data) => BuyOrderBaseInfo::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/BuyOrders/UpdateBuyOrder', ['json' => $parameters]), + ), + ); + } + + /** + * Update een bestaande inkooporderregel. + * + * @param array{ + * BuyOrderRowId?: int, + * OrderId?: int|null, + * ProductCode?: string|null, + * ProductId?: int|null, + * Price?: number, + * Description?: string|null, + * ProductDesc2?: string|null, + * ExpectedDeliveryDate?: string|null, + * QtyToOrder?: number, + * OrderedOnDateByDistributor?: string|null, + * OrderRowId?: int|null, + * InternalNote?: string|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateBuyOrderRow(array $parameters = []): void + { + $this->getClient()->patch('/v3/BuyOrders/UpdateBuyOrderRow', ['json' => $parameters]); + } +} diff --git a/src/Requests/V30/CRMRequest.php b/src/Requests/V30/CRMRequest.php new file mode 100644 index 0000000..ed76348 --- /dev/null +++ b/src/Requests/V30/CRMRequest.php @@ -0,0 +1,174 @@ +, + * CreatedByUserIds?: array, + * CarriedOutByUserId?: int|null, + * StartDateFrom?: string|null, + * StartDateTo?: string|null, + * Name?: string|null, + * TypeId?: int|null, + * CrmProjectStatusId?: int|null, + * CrmProjectTypeId?: int|null, + * CrmProjectName?: string|null, + * ShowOnlyOpenActivities?: bool|null, + * UserIdForRights?: int|null, + * CarriedOutByUserIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getCRMActivities(array $parameters = []): array + { + return array_map( + static fn (array $data) => CRMActivity::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/CRM/GetCRMActivities', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg alle beschikbare CRM activiteit statussen. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getCRMActivityStatusses(): array + { + return array_map( + static fn (array $data) => CRMActivityStatus::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/CRM/GetCRMActivityStatusses'), + ), + ); + } + + /** + * Verkrijg alle beschikbare CRM activiteit types. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getCRMActivityTypes(): array + { + return array_map( + static fn (array $data) => CRMActivityType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/CRM/GetCRMActivityTypes'), + ), + ); + } + + /** + * Verkrijg CRM projecten o.b.v. het meegestuurde filter en de opgegeven gebruiker. + *
    + * Let op: Vanaf V3 is het verplicht TakeRecords mee te sturen, met een maximum van 10.000. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * CrmProjectId?: int|null, + * StartDate?: string|null, + * EndDate?: string|null, + * StatusIds?: array, + * ResponsibleUserIds?: array, + * Name?: string|null, + * TypeId?: int|null, + * UserIdForRights?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getCRMProjects(array $parameters = []): array + { + return array_map( + static fn (array $data) => CRMProject::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/CRM/GetCRMProjects', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg alle beschikbare CRM projectstatussen. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getCRMProjectStatusses(): array + { + return array_map( + static fn (array $data) => CRMProjectStatus::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/CRM/GetCRMProjectStatusses'), + ), + ); + } + + /** + * Verkrijg alle beschikbare CRM projecttypes. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getCRMProjectTypes(): array + { + return array_map( + static fn (array $data) => CRMProjectType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/CRM/GetCRMProjectTypes'), + ), + ); + } + + /** + * Verkrijg alle beschikbare CRM projecttypes 2. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getCRMProjectTypes2(): array + { + return array_map( + static fn (array $data) => CRMProjectType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/CRM/GetCRMProjectTypes2'), + ), + ); + } +} diff --git a/src/Requests/V30/CompanyRequest.php b/src/Requests/V30/CompanyRequest.php new file mode 100644 index 0000000..fd350cf --- /dev/null +++ b/src/Requests/V30/CompanyRequest.php @@ -0,0 +1,107 @@ + + * + * @throws Logic4ApiException + */ + public function getAdministrationsForUser(): array + { + return array_map( + static fn (array $data) => Administration::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Company/GetAdministrationsForUser'), + ), + ); + } + + /** + * Verkrijg alle filialen. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getBranches(): array + { + return array_map( + static fn (array $data) => Branch::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Company/GetBranches'), + ), + ); + } + + /** + * Verkrijg bedrijfsgegevens voor de opgegeven administratie. + * + * @throws Logic4ApiException + */ + public function getCompanyInformation(): CompanyInformation + { + return CompanyInformation::make( + $this->buildResponse( + $this->getClient()->get('/v3/Company/GetCompanyInformation'), + ) + ); + } + + /** + * Verkrijg algemene bedrijfsgegevens. + * + * @throws Logic4ApiException + */ + public function getCompanyValues(): CompanyValues + { + return CompanyValues::make( + $this->buildResponse( + $this->getClient()->get('/v3/Company/GetCompanyValues'), + ) + ); + } + + /** + * Haal de algemene notitie van het bedrijf op. + * + * @throws Logic4ApiException + */ + public function getNotice(): string + { + return $this->buildResponse( + $this->getClient()->get('/v3/Company/GetNotice'), + ); + } + + /** + * Haal alle statussen van de gekoppelde gebruikers op. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getUserStatuses(): array + { + return array_map( + static fn (array $data) => Userstatus::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Company/GetUserStatuses'), + ), + ); + } +} diff --git a/src/Requests/V30/DeliveryRequest.php b/src/Requests/V30/DeliveryRequest.php new file mode 100644 index 0000000..ad541f0 --- /dev/null +++ b/src/Requests/V30/DeliveryRequest.php @@ -0,0 +1,65 @@ +, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function createDeliveryForOrderRows(array $parameters = []): array + { + return array_map( + static fn (array $data) => SalesOrderDeliveryRow::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Delivery/CreateDeliveryForOrderRows', ['json' => $parameters]), + ), + ); + } + + /** + * Zoeken op verkooporder uitleveringen. + * + * @param array{ + * DateTimeFrom?: string|null, + * DateTimeTo?: string|null, + * OrderId?: int|null, + * DebtorId?: int|null, + * ShippingMethodId?: int|null, + * OrderStatusId?: int|null, + * BranchId?: int|null, + * WebsiteDomainId?: int|null, + * SkipRecords?: int, + * TakeRecords?: int, + * ShowAPIMovements?: bool, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getDeliveries(array $parameters = []): array + { + return array_map( + static fn (array $data) => SalesOrderDelivery::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Delivery/GetDeliveries', ['json' => $parameters]), + ), + ); + } +} diff --git a/src/Requests/V30/EmailRequest.php b/src/Requests/V30/EmailRequest.php new file mode 100644 index 0000000..878e2c4 --- /dev/null +++ b/src/Requests/V30/EmailRequest.php @@ -0,0 +1,312 @@ + $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function addEmailAttachments(array $parameters = []): array + { + return array_map( + static fn (array $data) => EmailAttachment::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Email/AddEmailAttachments', ['json' => $parameters]), + ), + ); + } + + /** + * Maak een nieuwe emailbox aan, bij een onderliggende emailbox worden de rechten overgenomen van de bovenliggende emailbox. + * Als het om een submap van de inbox gaat worden deze rechten overgenomen. + * + * @param array{ + * Id?: int, + * Name?: string|null, + * ParentId?: int|null, + * UserCanRead?: bool, + * UserCanDelete?: bool, + * SortId?: int, + * NewMessages?: int, + * HasEmails?: bool, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addEmailBox(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Email/AddEmailBox', ['json' => $parameters]), + ); + } + + /** + * Voeg een nieuwe email toe in de conceptenmap van de gebruiker. + * + * @param array{ + * Id?: int, + * Subject?: string|null, + * EmailBody?: string|null, + * IsHTMLBody?: bool, + * BoxId?: int, + * DateTimeSend?: string, + * IsInbound?: bool, + * IsRead?: bool, + * IsReplyedOn?: string|null, + * IsForwardedOn?: string|null, + * Status?: array{Id?: int, Name?: string|null, Color?: int}, + * ToEmailAddresses?: array, + * FromEmailAddress?: array{Name?: string|null, Email?: string|null}, + * CCEmailAddresses?: array, + * BCCEmailAddresses?: array, + * HasAttachment?: bool, + * PreviousEmailId?: int|null, + * CanDelete?: bool|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addEmailMessage(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Email/AddEmailMessage', ['json' => $parameters]), + ); + } + + /** + * Verwijder een emailbijlage o.b.v. email-attachment Id. + * + * @throws Logic4ApiException + */ + public function deleteEmailAttachment(int $id): void + { + $this->getClient()->delete('/v3/Email/DeleteEmailAttachment', ['query' => ['id' => $id]]); + } + + /** + * Verwijder een emailbox, let op dit kan alleen als er geen emails of onderliggende emailboxen aan gekoppeld zijn. + * + * @throws Logic4ApiException + */ + public function deleteEmailBox(int $id): void + { + $this->getClient()->delete('/v3/Email/DeleteEmailBox', ['query' => ['id' => $id]]); + } + + /** + * Verwijder een email. + * + * @throws Logic4ApiException + */ + public function deleteEmailMessage(int $id): void + { + $this->getClient()->delete('/v3/Email/DeleteEmailMessage', ['query' => ['id' => $id]]); + } + + /** + * Update minimale gegevens van een email. + * + * @param array{ + * EmailIds?: array, + * EmailBoxId?: int|null, + * EmailStatusId?: int|null, + * IsRead?: bool|null, + * Action?: mixed, + * } $parameters + * + * @throws Logic4ApiException + */ + public function emailMessagesAction(array $parameters = []): void + { + $this->getClient()->post('/v3/Email/EmailMessagesAction', ['json' => $parameters]); + } + + /** + * Verkrijg emailbijlagen van een emailmessage. + * + * @param array{ + * EmailMessageId?: int, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getEmailAttachments(array $parameters = []): array + { + return array_map( + static fn (array $data) => EmailAttachment::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Email/GetEmailAttachments', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg emailboxen o.b.v. meegestuurde user Id. + * + * @param array{ + * ParentId?: int|null, + * ShowOnlyTopLevelEmailboxes?: bool|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getEmailBoxes(array $parameters = []): array + { + return array_map( + static fn (array $data) => EmailBox::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Email/GetEmailBoxes', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg emailmessages o.b.v. het meegestuurde filter. + * + * @param array{ + * EmailId?: int|null, + * EmailboxId?: int|null, + * IncludedSubEmailboxes?: bool|null, + * StartDate?: string|null, + * EndDate?: string|null, + * OnlyWithAttachment?: bool|null, + * StatusId?: int|null, + * IsInbound?: bool|null, + * SearchText1?: string|null, + * SearchText1Type?: string|null, + * SearchText2?: string|null, + * SearchText2Type?: string|null, + * SearchText2Switch?: string|null, + * SearchText3?: string|null, + * SearchText3Type?: string|null, + * SearchText3Switch?: string|null, + * GetEmailMessageBody?: bool|null, + * SkipRecords?: int|null, + * TakeRecords?: int|null, + * OrderByNewestFirst?: bool, + * LoadRights?: bool, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getEmailMessages(array $parameters = []): array + { + return array_map( + static fn (array $data) => EmailMessage::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Email/GetEmailMessages', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg emailberichten statussen. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getEmailMessageStatuses(): array + { + return array_map( + static fn (array $data) => EmailMessageStatus::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Email/GetEmailMessageStatuses'), + ), + ); + } + + /** + * Verkrijg een emailuser o.b.v. meegestuurde user Id. + * + * @throws Logic4ApiException + */ + public function getEmailUser(): EmailUser + { + return EmailUser::make( + $this->buildResponse( + $this->getClient()->get('/v3/Email/GetEmailUser'), + ) + ); + } + + /** + * Verkrijg email-snelkeuzes. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getUsedEmailAddresses(): array + { + return array_map( + static fn (array $data) => EmailAddress::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Email/GetUsedEmailAddresses'), + ), + ); + } + + /** + * Update een bestaande email. + * + * @param array{ + * Id?: int, + * Subject?: string|null, + * EmailBody?: string|null, + * IsHTMLBody?: bool, + * BoxId?: int, + * DateTimeSend?: string, + * IsInbound?: bool, + * IsRead?: bool, + * IsReplyedOn?: string|null, + * IsForwardedOn?: string|null, + * Status?: array{Id?: int, Name?: string|null, Color?: int}, + * ToEmailAddresses?: array, + * FromEmailAddress?: array{Name?: string|null, Email?: string|null}, + * CCEmailAddresses?: array, + * BCCEmailAddresses?: array, + * HasAttachment?: bool, + * PreviousEmailId?: int|null, + * CanDelete?: bool|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateEmailMessage(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->put('/v3/Email/UpdateEmailMessage', ['json' => $parameters]), + ); + } +} diff --git a/src/Requests/V30/ExplodedViewsRequest.php b/src/Requests/V30/ExplodedViewsRequest.php new file mode 100644 index 0000000..e9626cb --- /dev/null +++ b/src/Requests/V30/ExplodedViewsRequest.php @@ -0,0 +1,39 @@ +, + * ProductGroupIds?: array, + * ProductIds?: array, + * GlobalisationIds?: array, + * WebsiteDomainId?: int|null, + * SkipRecords?: int, + * TakeRecords?: int, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getExplodedViews(array $parameters = []): array + { + return array_map( + static fn (array $data) => ExplodedView::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/ExplodedViews/GetExplodedViews', ['json' => $parameters]), + ), + ); + } +} diff --git a/src/Requests/V30/FinancialRequest.php b/src/Requests/V30/FinancialRequest.php new file mode 100644 index 0000000..ef38a76 --- /dev/null +++ b/src/Requests/V30/FinancialRequest.php @@ -0,0 +1,391 @@ +, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addFinancialBuyBookingWithMutations(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Financial/AddFinancialBuyBookingWithMutations', ['json' => $parameters]), + ); + } + + /** + * Maak een financiële memoriaal dagboekboeking met mutaties aan. + * Geeft terug het id van de aangemaakte boeking. + * Voor deze aanroep zijn extra rechten vereist. + * + * @param array{ + * FreeValue1?: string|null, + * FreeValue2?: string|null, + * FreeValue3?: string|null, + * Reference?: string|null, + * BookingDateTime?: string, + * FinancialBookId?: int, + * JournalStatusId?: int|null, + * Mutations?: array, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addFinancialGeneralBookingWithMutations(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Financial/AddFinancialGeneralBookingWithMutations', ['json' => $parameters]), + ); + } + + /** + * Maak een financiële verkoop dagboekboeking met mutaties aan. + * Geeft terug het id van de aangemaakte boeking. + * Voor deze aanroep zijn extra rechten vereist. + * + * @param array{ + * Description?: string|null, + * FinancialCostCenterId?: int|null, + * FreeValue1?: string|null, + * FreeValue2?: string|null, + * FreeValue3?: string|null, + * Reference?: string|null, + * BookingDateTime?: string, + * FinancialBookId?: int, + * JournalStatusId?: int|null, + * Mutations?: array, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addFinancialSaleBookingWithMutations(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Financial/AddFinancialSaleBookingWithMutations', ['json' => $parameters]), + ); + } + + /** + * Verkrijg boeking status types. + * Voor deze aanroep zijn extra rechten vereist. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getBookingStatusTypes(): array + { + return array_map( + static fn (array $data) => TypeFinancialBookingStatus::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Financial/GetBookingStatusTypes'), + ), + ); + } + + /** + * Financieel dagboekboeking met mutaties verkrijgen o.b.v. het aangeleverde filter. + * Levert alleen boekingen uit verkoop, inkoop of memoriale dagboeken. + * Voor deze aanroep zijn extra rechten vereist. + * + * @param array{ + * BookingId?: int|null, + * FinancialBookId?: int|null, + * BookingDateTimeFrom?: string|null, + * BookingDateTimeTo?: string|null, + * SkipRecords?: int, + * TakeRecords?: int, + * Reference?: string|null, + * UserId?: int|null, + * BookingNumberByUser?: int|null, + * Description?: string|null, + * DebtorId?: int|null, + * CreditorId?: int|null, + * StatusId?: int|null, + * FreeValue1?: string|null, + * FreeValue2?: string|null, + * FreeValue3?: string|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getFinancialBookingsWithMutations(array $parameters = []): array + { + return array_map( + static fn (array $data) => FinancialBookBooking::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Financial/GetFinancialBookingsWithMutations', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg de beschikbare financiële dagboeken o.b.v. het aangeleverde filter. + * + * @param array{ + * LedgerId?: int|null, + * FinancialBookType?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getFinancialBooks(array $parameters = []): array + { + return array_map( + static fn (array $data) => FinancialBook::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Financial/GetFinancialBooks', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg de financiële journalen o.b.v. het aangeleverde filter. + * Voor deze aanroep zijn extra rechten vereist. + * + * @param array{ + * LedgerCode?: int|null, + * DateTimeFrom?: string|null, + * DateTimeTo?: string|null, + * SkipRecords?: int, + * TakeRecords?: int, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getFinancialJournals(array $parameters = []): array + { + return array_map( + static fn (array $data) => FinancialJournal::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Financial/GetFinancialJournals', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg alle mogelijke statussen van financiële journalen. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getFinancialJournalStatuses(): array + { + return array_map( + static fn (array $data) => FinancialJournalStatus::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Financial/GetFinancialJournalStatuses'), + ), + ); + } + + /** + * Verkrijg de beschikbare grootboek categorieën. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getLedgerColumnTypes(): array + { + return array_map( + static fn (array $data) => TypeLedgerColumn::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Financial/GetLedgerColumnTypes'), + ), + ); + } + + /** + * Verkrijg alle grootboeken. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getLedgers(): array + { + return array_map( + static fn (array $data) => Ledger::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Financial/GetLedgers'), + ), + ); + } + + /** + * Verkrijg alle betaalmethodes. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getPaymentMethods(): array + { + return array_map( + static fn (array $data) => PaymentMethod::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Financial/GetPaymentMethods'), + ), + ); + } + + /** + * Verkrijg type Kosten Centra. + * Voor deze aanroep zijn extra rechten vereist. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getTypeCostCenters(): array + { + return array_map( + static fn (array $data) => TypeCostCenter::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Financial/GetTypeCostCenters'), + ), + ); + } + + /** + * Verkrijg type Entiteit Codes. + * Voor deze aanroep zijn extra rechten vereist. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getTypeEntityCodes(): array + { + return array_map( + static fn (array $data) => TypeEntityCode::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Financial/GetTypeEntityCodes'), + ), + ); + } + + /** + * Verkrijg type Transactie Codes. + * Voor deze aanroep zijn extra rechten vereist. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getTypeTransactionCodes(): array + { + return array_map( + static fn (array $data) => TypeTransactionCode::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Financial/GetTypeTransactionCodes'), + ), + ); + } + + /** + * Verkrijg alle BTW codes. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getVatCodes(): array + { + return array_map( + static fn (array $data) => VatCode::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Financial/GetVatCodes'), + ), + ); + } + + /** + * Importeer UBL factuur naar het inkoopboek. + *
    + * Indien het veld CreditorID wordt meegegeven in de request, wordt de betreffende crediteur direct gekoppeld aan de nieuwe inkoopboeking. + * Wanneer het veld CreditorID leeg wordt gelaten, probeert het systeem automatisch een crediteur te matchen. Dit gebeurt op basis van een aantal regels. + *
    + * Eerst worden er crediteuren gematched op basis van het KvK-nummer en het btw-nummer. + * Alléén als dit geen resultaat levert, probeert het systeem te matchen op bedrijfsnaam, postcode en stadsnaam (alleen velden die in de UBL gevuld zijn worden gebruikt.) + * Nadat er gematched is wordt er een crediteur gekozen of gecreëerd afhankelijk van het volgende: + *
    + *
      . + * + * @param array{ + * Xml?: string|null, + * BookId?: int, + * StatusId?: int, + * UserId?: int|null, + * CreditorId?: int|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function postUblInvoiceToBuyBooking(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Financial/PostUblInvoiceToBuyBooking', ['json' => $parameters]), + ); + } + + /** + * Wijzig de status van een financiële boeking. + * Geeft terug het id van de gewijzigde boeking. + * Voor deze aanroep zijn extra rechten vereist. + * + * @param array{ + * BookingId?: int, + * StatusId?: int, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateFinancialBookingStatus(array $parameters = []): void + { + $this->getClient()->patch('/v3/Financial/UpdateFinancialBookingStatus', ['json' => $parameters]); + } +} diff --git a/src/Requests/V30/ITSRequest.php b/src/Requests/V30/ITSRequest.php new file mode 100644 index 0000000..1be61ea --- /dev/null +++ b/src/Requests/V30/ITSRequest.php @@ -0,0 +1,193 @@ + + * + * @throws Logic4ApiException + */ + public function getFreeValues1(): array + { + return array_map( + static fn (array $data) => ITSFreeValue::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/ITS/GetFreeValues1'), + ), + ); + } + + /** + * @return array + * + * @throws Logic4ApiException + */ + public function getFreeValues2(): array + { + return array_map( + static fn (array $data) => ITSFreeValue::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/ITS/GetFreeValues2'), + ), + ); + } + + /** + * @return array + * + * @throws Logic4ApiException + */ + public function getFreeValues3(): array + { + return array_map( + static fn (array $data) => ITSFreeValue::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/ITS/GetFreeValues3'), + ), + ); + } + + /** + * @return array + * + * @throws Logic4ApiException + */ + public function getIssueGroups(): array + { + return array_map( + static fn (array $data) => ITSIssueGroup::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/ITS/GetIssueGroups'), + ), + ); + } + + /** + * @return array + * + * @throws Logic4ApiException + */ + public function getIssueLevels(): array + { + return array_map( + static fn (array $data) => ITSIssueLevel::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/ITS/GetIssueLevels'), + ), + ); + } + + /** + * Verkrijg ITS issues o.b.v. het meegestuurde filter en de opgegeven gebruiker. + * + * @param array{ + * Id?: int|null, + * StartDate?: string|null, + * EndDate?: string|null, + * LastModifiedSince?: string|null, + * DebtorId?: int|null, + * CreditorId?: int|null, + * InvoiceId?: int|null, + * StatusId?: int|null, + * ResponsibleUserId?: int|null, + * IssueMustBeCompletedTo?: string|null, + * IssueMustBeCompletedFrom?: string|null, + * TypeId?: int|null, + * GroupId?: int|null, + * ProjectId?: int|null, + * OrderId?: int|null, + * SkipRecords?: int|null, + * TakeRecords?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getIssues(array $parameters = []): array + { + return array_map( + static fn (array $data) => ITSIssue::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/ITS/GetIssues', ['json' => $parameters]), + ), + ); + } + + /** + * @return array + * + * @throws Logic4ApiException + */ + public function getIssueStatusses(): array + { + return array_map( + static fn (array $data) => ITSIssueStatus::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/ITS/GetIssueStatusses'), + ), + ); + } + + /** + * @return array + * + * @throws Logic4ApiException + */ + public function getIssueTypes(): array + { + return array_map( + static fn (array $data) => ITSIssueType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/ITS/GetIssueTypes'), + ), + ); + } + + /** + * Verkrijg ITS projecten o.b.v. het meegestuurde filter en de opgegeven gebruiker. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProjects(): array + { + return array_map( + static fn (array $data) => ITSProject::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/ITS/GetProjects'), + ), + ); + } + + /** + * @return array + * + * @throws Logic4ApiException + */ + public function getTaskPriorities(): array + { + return array_map( + static fn (array $data) => ITSTaskPriority::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/ITS/GetTaskPriorities'), + ), + ); + } +} diff --git a/src/Requests/V30/ManagementRequest.php b/src/Requests/V30/ManagementRequest.php new file mode 100644 index 0000000..79d9e63 --- /dev/null +++ b/src/Requests/V30/ManagementRequest.php @@ -0,0 +1,368 @@ +, + * IncludingCurrentPeriod?: bool, + * ExcludeDebtorIds?: array, + * WebSiteDomainsIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProductCollectionSalesInformation(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductSalesInformation::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Management/GetProductCollectionSalesInformation', ['json' => $parameters]), + ), + ); + } + + /** + * Omzet van een bepaalde periode (Facturen/open orders/abonnementen). + * + * @param array{ + * TimeFrame?: mixed, + * IncludingCurrentPeriod?: bool, + * HistoryPoints?: int, + * IncludeOffers?: bool|null, + * IncludeOpenOrders?: bool|null, + * IncludeOrders?: bool|null, + * IncludeSubscriptions?: bool|null, + * IncludeInvoices?: bool|null, + * Year?: int|null, + * WebSiteDomainsIds?: array, + * TypeContactGroupsIds?: array, + * ExcludingDebtors?: array, + * OnlyForExcludingDebtors?: bool, + * NotLinkedToWebsiteDomain?: bool, + * EmployeeIds?: array, + * BranchIds?: array, + * ProductGroupsIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getReportingGetSalesHistory(array $parameters = []): array + { + return array_map( + static fn (array $data) => ValuevsBudget::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Management/GetReportingGetSalesHistory', ['json' => $parameters]), + ), + ); + } + + /** + * Omzet o.b.v. order/factuur regels voor een bepaalde periode. + * + * @param array{ + * TimeFrame?: mixed, + * IncludingCurrentPeriod?: bool, + * HistoryPoints?: int, + * IncludeOffers?: bool|null, + * IncludeOpenOrders?: bool|null, + * IncludeOrders?: bool|null, + * IncludeSubscriptions?: bool|null, + * IncludeInvoices?: bool|null, + * Year?: int|null, + * WebSiteDomainsIds?: array, + * TypeContactGroupsIds?: array, + * ExcludingDebtors?: array, + * OnlyForExcludingDebtors?: bool, + * NotLinkedToWebsiteDomain?: bool, + * EmployeeIds?: array, + * BranchIds?: array, + * ProductGroupsIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getReportingGetSalesHistoryForOrderRows(array $parameters = []): array + { + return array_map( + static fn (array $data) => ValuevsBudget::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Management/GetReportingGetSalesHistoryForOrderRows', ['json' => $parameters]), + ), + ); + } + + /** + * Omzet van een bepaalde periode per type contact groep (Facturen/open orders/abonnementen). + * + * @param array{ + * TimeFrame?: mixed, + * IncludingCurrentPeriod?: bool, + * HistoryPoints?: int, + * IncludeOffers?: bool|null, + * IncludeOpenOrders?: bool|null, + * IncludeOrders?: bool|null, + * IncludeSubscriptions?: bool|null, + * IncludeInvoices?: bool|null, + * Year?: int|null, + * WebSiteDomainsIds?: array, + * TypeContactGroupsIds?: array, + * ExcludingDebtors?: array, + * OnlyForExcludingDebtors?: bool, + * NotLinkedToWebsiteDomain?: bool, + * EmployeeIds?: array, + * BranchIds?: array, + * ProductGroupsIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getReportingGetSalesHistoryForTypeContactGroups(array $parameters = []): array + { + return array_map( + static fn (array $data) => ValuevsBudget::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Management/GetReportingGetSalesHistoryForTypeContactGroups', ['json' => $parameters]), + ), + ); + } + + /** + * Grootboek omzet en budgetten. + * + * @param array{ + * LedgerCodes?: array, + * GetOnlyMutationTotal?: bool, + * CreditCorrection?: bool, + * LedgerColumnTypeIds?: array, + * TimeFrame?: mixed, + * IncludingCurrentPeriod?: bool, + * HistoryPoints?: int, + * IncludeOffers?: bool|null, + * IncludeOpenOrders?: bool|null, + * IncludeOrders?: bool|null, + * IncludeSubscriptions?: bool|null, + * IncludeInvoices?: bool|null, + * Year?: int|null, + * WebSiteDomainsIds?: array, + * TypeContactGroupsIds?: array, + * ExcludingDebtors?: array, + * OnlyForExcludingDebtors?: bool, + * NotLinkedToWebsiteDomain?: bool, + * EmployeeIds?: array, + * BranchIds?: array, + * ProductGroupsIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getReportingLedgerHistoryAndBudget(array $parameters = []): array + { + return array_map( + static fn (array $data) => ValuevsBudget::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Management/GetReportingLedgerHistoryAndBudget', ['json' => $parameters]), + ), + ); + } + + /** + * Omzet van huidige jaar o.b.v. facturen (Let op! er wordt geen rekening gehouden met de geschiedenispunten). + * + * @param array{ + * TimeFrame?: mixed, + * IncludingCurrentPeriod?: bool, + * HistoryPoints?: int, + * IncludeOffers?: bool|null, + * IncludeOpenOrders?: bool|null, + * IncludeOrders?: bool|null, + * IncludeSubscriptions?: bool|null, + * IncludeInvoices?: bool|null, + * Year?: int|null, + * WebSiteDomainsIds?: array, + * TypeContactGroupsIds?: array, + * ExcludingDebtors?: array, + * OnlyForExcludingDebtors?: bool, + * NotLinkedToWebsiteDomain?: bool, + * EmployeeIds?: array, + * BranchIds?: array, + * ProductGroupsIds?: array, + * } $parameters + * + * @throws Logic4ApiException + */ + public function getSalesTotalIncludingOrdersAndRepeating(array $parameters = []): float + { + return $this->buildResponse( + $this->getClient()->post('/v3/Management/GetSalesTotalIncludingOrdersAndRepeating', ['json' => $parameters]), + ); + } + + /** + * Top 10 filialen (dag/week/maand/kwartaal/jaar). + * + * @param array{ + * TimeFrame?: mixed, + * IncludingCurrentPeriod?: bool, + * ExcludeDebtorIds?: array, + * WebSiteDomainsIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getTop10Branches(array $parameters = []): array + { + return array_map( + static fn (array $data) => Top10Item::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Management/GetTop10Branches', ['json' => $parameters]), + ), + ); + } + + /** + * Top 10 klanten (dag/week/maand/kwartaal/jaar). + * + * @param array{ + * TimeFrame?: mixed, + * IncludingCurrentPeriod?: bool, + * ExcludeDebtorIds?: array, + * WebSiteDomainsIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getTop10Debtors(array $parameters = []): array + { + return array_map( + static fn (array $data) => Top10Item::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Management/GetTop10Debtors', ['json' => $parameters]), + ), + ); + } + + /** + * Top 10 productgroepen (dag/week/maand/kwartaal/jaar). + * + * @param array{ + * TimeFrame?: mixed, + * IncludingCurrentPeriod?: bool, + * ExcludeDebtorIds?: array, + * WebSiteDomainsIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getTop10Productgroups(array $parameters = []): array + { + return array_map( + static fn (array $data) => Top10Item::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Management/GetTop10Productgroups', ['json' => $parameters]), + ), + ); + } + + /** + * Top 10 artikelen (dag/week/maand/kwartaal/jaar). + * + * @param array{ + * TimeFrame?: mixed, + * IncludingCurrentPeriod?: bool, + * ExcludeDebtorIds?: array, + * WebSiteDomainsIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getTop10Products(array $parameters = []): array + { + return array_map( + static fn (array $data) => Top10Item::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Management/GetTop10Products', ['json' => $parameters]), + ), + ); + } + + /** + * Top 10 provincies (dag/week/maand/kwartaal/jaar). + * + * @param array{ + * TimeFrame?: mixed, + * IncludingCurrentPeriod?: bool, + * ExcludeDebtorIds?: array, + * WebSiteDomainsIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getTop10Provinces(array $parameters = []): array + { + return array_map( + static fn (array $data) => Top10Item::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Management/GetTop10Provinces', ['json' => $parameters]), + ), + ); + } + + /** + * Top 10 medewerkers (dag/week/maand/kwartaal/jaar). + * + * @param array{ + * TimeFrame?: mixed, + * IncludingCurrentPeriod?: bool, + * ExcludeDebtorIds?: array, + * WebSiteDomainsIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getTop10Users(array $parameters = []): array + { + return array_map( + static fn (array $data) => Top10Item::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Management/GetTop10Users', ['json' => $parameters]), + ), + ); + } +} diff --git a/src/Requests/V30/MarketingRequest.php b/src/Requests/V30/MarketingRequest.php new file mode 100644 index 0000000..92bc927 --- /dev/null +++ b/src/Requests/V30/MarketingRequest.php @@ -0,0 +1,34 @@ + + * + * @throws Logic4ApiException + */ + public function getSubscribers(array $parameters = []): array + { + return array_map( + static fn (array $data) => Subscriber::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Marketing/GetSubscribers', ['json' => $parameters]), + ), + ); + } +} diff --git a/src/Requests/V30/OrderRequest.php b/src/Requests/V30/OrderRequest.php new file mode 100644 index 0000000..7815000 --- /dev/null +++ b/src/Requests/V30/OrderRequest.php @@ -0,0 +1,960 @@ + + * Vanaf versie 3 wordt een aanroep afgewezen als er een orderregel in zit dat niet bestaat. + *
      + * Geeft de hoeveelheid geupdate regels, exclusief regels die al het gegeven serienummer hadden. + * + * @param array{ + * SerialNumberTypeId?: int, + * OrderRowSerialNumbers?: array, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addOrderRowSerialNumbers(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Orders/AddOrderRowSerialNumbers', ['json' => $parameters]), + ); + } + + /** + * Voeg een betaling toe aan een order of factuur. + * + * @param array{ + * OrderId?: int|null, + * InvoiceId?: int|null, + * AmountIncl?: number, + * Description?: string|null, + * BookingId?: int, + * MatchingLedgerId?: int, + * DateTime?: string|null, + * LedgerCode?: int|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addPayment(array $parameters = []): void + { + $this->getClient()->post('/v3/Orders/AddPayment', ['json' => $parameters]); + } + + /** + * Wijzig of maak een nieuwe factuur aan, het is alleen mogelijk om stamgegevens van een factuur te updaten (status, NAW, betaal/verzendmethode). + * Factuurregels kunnen slechts eenmalig bij het aanmaken van de factuur gevuld worden. + * Bij het succesvol aanmaken/updaten wordt het (nieuwe) factuurnummer in de response gevuld. + * + * @param array{ + * Totals?: array{ShippingCost?: number, ShippingCostIncl?: number|null}, + * DebtorId?: int|null, + * CustomerThirdPartyExternalIdentifer?: array{DebtorId?: int|null, TypeId?: int|null, Value?: string|null}, + * Id?: int|null, + * PaymentMethod?: array{Id?: int, Description?: string|null, MaxAmount?: number|null, SelectKey?: string|null}, + * ShippingMethod?: array{Id?: int, Name?: string|null, ExportCode?: string|null}, + * CheckForOrderCostAndPaymentRegulation?: bool, + * OrderStatus?: array{Id?: int, Value?: string|null}, + * OrderRows?: array, + * AcceptTermsAndConditions?: bool, + * DeliveryAddress?: array{TelephoneNumber?: string|null, Email?: string|null, Street2?: string|null, HouseNumber2?: string|null, HouseNumberAddition2?: string|null, Id?: int|null, ProvinceId?: int|null, ContactName?: string|null, CompanyName?: string|null, PostalCode?: string|null, City?: string|null, CountryCode?: string|null, Street?: string|null, HouseNumber?: string|null, HouseNumberAddition?: string|null}, + * InvoiceAddress?: array{Id?: int|null, ProvinceId?: int|null, ContactName?: string|null, CompanyName?: string|null, PostalCode?: string|null, City?: string|null, CountryCode?: string|null, Street?: string|null, HouseNumber?: string|null, HouseNumberAddition?: string|null}, + * CreationDate?: string, + * Description?: string|null, + * Reference?: string|null, + * BranchId?: int|null, + * UserId?: int|null, + * WebsiteDomainId?: int|null, + * DeliveryOptionId?: int|null, + * DeliveryDate?: string|null, + * OrderShipmentFreeValues?: array{ShipperTypeId?: int, Freevalue1?: string|null, Freevalue2?: string|null, Freevalue3?: string|null, Freevalue4?: string|null, Freevalue5?: string|null}, + * Notes?: string|null, + * FreeValue1?: string|null, + * FreeValue2?: string|null, + * FreeValue3?: string|null, + * FreeValue4?: string|null, + * FreeValue5?: string|null, + * FreeValue6?: string|null, + * FreeValue7?: string|null, + * FreeValue8?: string|null, + * OrderType1Id?: int|null, + * OrderType2Id?: int|null, + * OrderType3Id?: int|null, + * OrderType4Id?: int|null, + * OrderType5Id?: int|null, + * OrderType6Id?: int|null, + * OrderType7Id?: int|null, + * OrderType8Id?: int|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addUpdateInvoice(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Orders/AddUpdateInvoice', ['json' => $parameters]), + ); + } + + /** + * Wijzig of maak een nieuwe order aan, het is alleen mogelijk om stamgegevens van een order te updaten (status, NAW, betaal/verzendmethode). + * Orderregels kunnen slechts eenmalig bij het aanmaken van de order gevuld worden. + * Bij het succesvol aanmaken/updaten wordt het (nieuwe) ordernummer in de response gevuld. + * Met v1.2 of hoger kan het Id van het afleveradres gebruikt worden om het afleveradres te bepalen. + * Met v1.3 of hoger wordt emballage meegenomen met de order. + * + * @param array{ + * Totals?: array{ShippingCost?: number, ShippingCostIncl?: number|null}, + * DebtorId?: int|null, + * CustomerThirdPartyExternalIdentifer?: array{DebtorId?: int|null, TypeId?: int|null, Value?: string|null}, + * Id?: int|null, + * PaymentMethod?: array{Id?: int, Description?: string|null, MaxAmount?: number|null, SelectKey?: string|null}, + * ShippingMethod?: array{Id?: int, Name?: string|null, ExportCode?: string|null}, + * CheckForOrderCostAndPaymentRegulation?: bool, + * OrderStatus?: array{Id?: int, Value?: string|null}, + * OrderRows?: array, + * AcceptTermsAndConditions?: bool, + * DeliveryAddress?: array{TelephoneNumber?: string|null, Email?: string|null, Street2?: string|null, HouseNumber2?: string|null, HouseNumberAddition2?: string|null, Id?: int|null, ProvinceId?: int|null, ContactName?: string|null, CompanyName?: string|null, PostalCode?: string|null, City?: string|null, CountryCode?: string|null, Street?: string|null, HouseNumber?: string|null, HouseNumberAddition?: string|null}, + * InvoiceAddress?: array{Id?: int|null, ProvinceId?: int|null, ContactName?: string|null, CompanyName?: string|null, PostalCode?: string|null, City?: string|null, CountryCode?: string|null, Street?: string|null, HouseNumber?: string|null, HouseNumberAddition?: string|null}, + * CreationDate?: string, + * Description?: string|null, + * Reference?: string|null, + * BranchId?: int|null, + * UserId?: int|null, + * WebsiteDomainId?: int|null, + * DeliveryOptionId?: int|null, + * DeliveryDate?: string|null, + * OrderShipmentFreeValues?: array{ShipperTypeId?: int, Freevalue1?: string|null, Freevalue2?: string|null, Freevalue3?: string|null, Freevalue4?: string|null, Freevalue5?: string|null}, + * Notes?: string|null, + * FreeValue1?: string|null, + * FreeValue2?: string|null, + * FreeValue3?: string|null, + * FreeValue4?: string|null, + * FreeValue5?: string|null, + * FreeValue6?: string|null, + * FreeValue7?: string|null, + * FreeValue8?: string|null, + * OrderType1Id?: int|null, + * OrderType2Id?: int|null, + * OrderType3Id?: int|null, + * OrderType4Id?: int|null, + * OrderType5Id?: int|null, + * OrderType6Id?: int|null, + * OrderType7Id?: int|null, + * OrderType8Id?: int|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addUpdateOrder(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Orders/AddUpdateOrder', ['json' => $parameters]), + ); + } + + /** + * Voeg een nieuwe orderregel toe of update een bestaande. Om een bestaande te updaten dient het veld 'Id' gevuld te zijn met een bestaand orderregelnummer. + *
      + * De optie "OrderRowWithProductComposition": {"AddProductCompositionByParentProductToOrder": true} heeft het volgende gedrag. + * - Bij een nieuw product worden samenstellingen toegevoegd als het product een samengesteld product is. + * - Bij een bestaand product worden samenstellingen toegevoegd mits er nog geen samenstellingen aanwezig zijn, anders komt er een foutmelding terug. + * + * De optie "ForceAddProductComposition" zorgt ervoor dat samenstellingen altijd worden toegevoegd, ongeacht of er reeds samenstellingen bestaan voor deze orderregel. + * + * @param array{ + * OrderRowWithProductComposition?: array{AddProductCompositionByParentProductToOrder?: bool, ForceAddProductComposition?: bool, UseSystemPricesForProductCompositionProducts?: bool}, + * InclPrice?: number|null, + * GrossInclPrice?: number|null, + * Id?: int|null, + * Description?: string|null, + * Description2?: string|null, + * ProductId?: int|null, + * Qty?: number, + * BuyPrice?: number|null, + * GrossPrice?: number|null, + * NettPrice?: number|null, + * QtyDeliverd?: number, + * QtyDeliverd_NotInvoiced?: number, + * ProductCode?: string|null, + * ProductBarcode1?: string|null, + * VATPercentage?: number|null, + * Notes?: string|null, + * DebtorId?: int, + * OrderId?: int|null, + * WarehouseId?: int|null, + * Commission?: string|null, + * DeliveryOptionId?: int|null, + * VatCodeId?: int|null, + * VatCodeIdOverrule?: int|null, + * FreeValue1?: string|null, + * FreeValue2?: string|null, + * FreeValue3?: string|null, + * FreeValue4?: string|null, + * FreeValue5?: string|null, + * ExpectedNextDelivery?: string|null, + * ExternalValue?: array{TypeId?: int, Value?: string|null}, + * AgreedDeliveryDate?: string|null, + * Type1Id?: int|null, + * Type2Id?: int|null, + * Type3Id?: int|null, + * Type4Id?: int|null, + * Type5Id?: int|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addUpdateOrderRow(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Orders/AddUpdateOrderRow', ['json' => $parameters]), + ); + } + + /** + * Maak en verwerk een factuur o.b.v. te factureren regels op een order. + * Geef als argument de Id van de order. + * + * @throws Logic4ApiException + */ + public function createAndProcessInvoiceForOrder(int $value): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Orders/CreateAndProcessInvoiceForOrder', ['json' => $value]), + ); + } + + /** + * Een nieuwe retouropdracht aanmaken, het is alleen mogelijk om een retouropdracht aan te maken voor een bestaande order. + * Alle details van de retouropdracht (OriginalOrderId, ProblemId, SolutionId, ReceivedReturnOrderDate) moeten geldig zijn. + * Specificeer een negatieve waarde voor Qty in elke orderregel. Bij het succesvol aanmaken bevat de response het nummer van de retourorder. + * + * @param array{ + * Totals?: array{ShippingCost?: number, ShippingCostIncl?: number|null}, + * OriginalOrderId?: int, + * OriginalOrderDate?: string, + * OriginalOrderZipCode?: string|null, + * ProblemId?: int, + * SolutionId?: int, + * ReceivedReturnOrderDate?: string|null, + * ApprovedReturnOrderDate?: string|null, + * DebtorId?: int|null, + * CustomerThirdPartyExternalIdentifer?: array{DebtorId?: int|null, TypeId?: int|null, Value?: string|null}, + * Id?: int|null, + * PaymentMethod?: array{Id?: int, Description?: string|null, MaxAmount?: number|null, SelectKey?: string|null}, + * ShippingMethod?: array{Id?: int, Name?: string|null, ExportCode?: string|null}, + * CheckForOrderCostAndPaymentRegulation?: bool, + * OrderStatus?: array{Id?: int, Value?: string|null}, + * OrderRows?: array, + * AcceptTermsAndConditions?: bool, + * DeliveryAddress?: array{TelephoneNumber?: string|null, Email?: string|null, Street2?: string|null, HouseNumber2?: string|null, HouseNumberAddition2?: string|null, Id?: int|null, ProvinceId?: int|null, ContactName?: string|null, CompanyName?: string|null, PostalCode?: string|null, City?: string|null, CountryCode?: string|null, Street?: string|null, HouseNumber?: string|null, HouseNumberAddition?: string|null}, + * InvoiceAddress?: array{Id?: int|null, ProvinceId?: int|null, ContactName?: string|null, CompanyName?: string|null, PostalCode?: string|null, City?: string|null, CountryCode?: string|null, Street?: string|null, HouseNumber?: string|null, HouseNumberAddition?: string|null}, + * CreationDate?: string, + * Description?: string|null, + * Reference?: string|null, + * BranchId?: int|null, + * UserId?: int|null, + * WebsiteDomainId?: int|null, + * DeliveryOptionId?: int|null, + * DeliveryDate?: string|null, + * OrderShipmentFreeValues?: array{ShipperTypeId?: int, Freevalue1?: string|null, Freevalue2?: string|null, Freevalue3?: string|null, Freevalue4?: string|null, Freevalue5?: string|null}, + * Notes?: string|null, + * FreeValue1?: string|null, + * FreeValue2?: string|null, + * FreeValue3?: string|null, + * FreeValue4?: string|null, + * FreeValue5?: string|null, + * FreeValue6?: string|null, + * FreeValue7?: string|null, + * FreeValue8?: string|null, + * OrderType1Id?: int|null, + * OrderType2Id?: int|null, + * OrderType3Id?: int|null, + * OrderType4Id?: int|null, + * OrderType5Id?: int|null, + * OrderType6Id?: int|null, + * OrderType7Id?: int|null, + * OrderType8Id?: int|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function createReturnOrder(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Orders/CreateReturnOrder', ['json' => $parameters]), + ); + } + + /** + * Verkrijg acties die hebben plaatsgevonden i.m.v. het assembleren van artikelen. + * + * @param array{ + * StartDateTime?: string|null, + * EndDateTime?: string|null, + * OrderId?: int|null, + * TypeId?: int|null, + * UserId?: int|null, + * Description?: string|null, + * SkipRecords?: int, + * TakeRecords?: int, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getAssemblyActions(array $parameters = []): array + { + return array_map( + static fn (array $data) => AssemblyAction::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Orders/GetAssemblyActions', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg alle assemblage actietypes. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getAssemblyActionsTypes(): array + { + return array_map( + static fn (array $data) => OrderActionType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Orders/GetAssemblyActionsTypes'), + ), + ); + } + + /** + * Verkrijg factuurregels o.b.v. het meegestuurde filter. + *
      + * Levert maximaal 10.000 regels. + *
      + * Vanaf versie 3 is het veld TakeRecords verplicht. + * + * @param array{ + * OrderId?: int|null, + * BrandName?: string|null, + * LoadNextDeliveryDate?: bool, + * ChangedAfter?: string|null, + * TakeRecords?: int|null, + * FromId?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getInvoiceRows(array $parameters = []): array + { + return array_map( + static fn (array $data) => OrderRowV11::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Orders/GetInvoiceRows', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg facturen o.b.v. het meegestuurde filter. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * ChangedAfter?: string|null, + * Id?: int|null, + * DebtorId?: int|null, + * CreationDateFrom?: string|null, + * CreationDateTo?: string|null, + * Barcode1?: string|null, + * ProductCode?: string|null, + * Delivery_Address?: string|null, + * Delivery_PostalCode?: string|null, + * Delivery_City?: string|null, + * Delivery_ContactName?: string|null, + * Delivery_CompanyName?: string|null, + * Delivery_Email?: string|null, + * Invoice_Address?: string|null, + * Invoice_PostalCode?: string|null, + * Invoice_City?: string|null, + * Invoice_ContactName?: string|null, + * Invoice_CompanyName?: string|null, + * Invoice_Email?: string|null, + * LastActionFrom?: string|null, + * LastActionTo?: string|null, + * Reference?: string|null, + * LoadPayments?: bool, + * StatusId?: int|null, + * Type1Id?: int|null, + * Type2Id?: int|null, + * Type3Id?: int|null, + * WebsiteDomainIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getInvoices(array $parameters = []): array + { + return array_map( + static fn (array $data) => Order::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Orders/GetInvoices', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg offerteregels o.b.v. het meegestuurde filter. + *
      + * Levert maximaal 10.000 regels. + *
      + * Gebruik van het veld TakeRecords is verplicht. + * + * @param array{ + * OrderId?: int|null, + * BrandName?: string|null, + * LoadNextDeliveryDate?: bool, + * ChangedAfter?: string|null, + * TakeRecords?: int|null, + * FromId?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getOfferRows(array $parameters = []): array + { + return array_map( + static fn (array $data) => OrderRowV11::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Orders/GetOfferRows', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg het nog te betalen bedrag van openstaande facturen. + * + * @param array{ + * DebtorId?: int|null, + * DateFrom?: string|null, + * DateTo?: string|null, + * DaysPastDueDate?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getOpenPaymentInvoices(array $parameters = []): array + { + return array_map( + static fn (array $data) => InvoiceOpenPayment::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Orders/GetOpenPaymentInvoices', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg het nog te betalen bedrag van nog niet uitgeleverde orders.
      + * Indien historypoints zijn aangegeven, moet timeframe een van de volgende waarden hebben: ['Day', 'Week', 'Month', 'Quarter', 'Year']. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * TimeFrame?: mixed, + * HistoryPoints?: int|null, + * OrderstatusIds?: array, + * WebsiteDomainIds?: array, + * NotLinkedToWebsiteDomain?: bool, + * EmployeeIds?: array, + * BranchIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getOpenPaymentOrders(array $parameters = []): array + { + return array_map( + static fn (array $data) => OrderOpenPayment::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Orders/GetOpenPaymentOrders', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg het nog te betalen bedrag van nog niet uitgeleverde orders in totalen. + * + * @param array{ + * TimeFrame?: mixed, + * HistoryPoints?: int|null, + * OrderstatusIds?: array, + * WebsiteDomainIds?: array, + * NotLinkedToWebsiteDomain?: bool, + * EmployeeIds?: array, + * BranchIds?: array, + * } $parameters + * + * @throws Logic4ApiException + */ + public function getOpenPaymentOrdersTotals( + array $parameters = [], + ): OrderOpenPayment { + return OrderOpenPayment::make( + $this->buildResponse( + $this->getClient()->post('/v3/Orders/GetOpenPaymentOrdersTotals', ['json' => $parameters]), + ) + ); + } + + /** + * Verkrijg acties die hebben plaatsgevonden op een order bv. het wijzigen van een betaalmethode. + * + * @param array{ + * StartDateTime?: string|null, + * EndDateTime?: string|null, + * OrderId?: int|null, + * TypeId?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getOrderActions(array $parameters = []): array + { + return array_map( + static fn (array $data) => OrderAction::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Orders/GetOrderActions', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg alle order actietypes. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getOrderActionsTypes(): array + { + return array_map( + static fn (array $data) => OrderActionType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Orders/GetOrderActionsTypes'), + ), + ); + } + + /** + * Verkrijg order Id's o.b.v. het meegestuurde filter. + * + * @param array{ + * OnlyCompleteForDelivery?: bool|null, + * OnlyWithCompletePayment?: bool|null, + * OrderStatus?: int|null, + * Warehouses?: array, + * MustHaveQtyToDeliverNowAboveZero?: bool|null, + * HasPickbon?: bool|null, + * OnlyGetOrderIdsToCreatePickbonNow?: bool, + * ChangedAfter?: string|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getOrderIds(array $parameters = []): array + { + return $this->buildResponse( + $this->getClient()->post('/v3/Orders/GetOrderIds', ['json' => $parameters]), + ); + } + + /** + * Verkrijg ordersregels o.b.v. het meegestuurde filter. + *
      + * Levert maximaal 10.000 regels. + *
      + * Vanaf versie 3 is het veld TakeRecords verplicht. + * + * @param array{ + * OrderId?: int|null, + * BrandName?: string|null, + * LoadNextDeliveryDate?: bool, + * ChangedAfter?: string|null, + * TakeRecords?: int|null, + * FromId?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getOrderRows(array $parameters = []): array + { + return array_map( + static fn (array $data) => OrderRowV11::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Orders/GetOrderRows', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg orders o.b.v. het meegestuurde filter. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * ChangedAfter?: string|null, + * Id?: int|null, + * DebtorId?: int|null, + * CreationDateFrom?: string|null, + * CreationDateTo?: string|null, + * Barcode1?: string|null, + * ProductCode?: string|null, + * Delivery_Address?: string|null, + * Delivery_PostalCode?: string|null, + * Delivery_City?: string|null, + * Delivery_ContactName?: string|null, + * Delivery_CompanyName?: string|null, + * Delivery_Email?: string|null, + * Invoice_Address?: string|null, + * Invoice_PostalCode?: string|null, + * Invoice_City?: string|null, + * Invoice_ContactName?: string|null, + * Invoice_CompanyName?: string|null, + * Invoice_Email?: string|null, + * LastActionFrom?: string|null, + * LastActionTo?: string|null, + * Reference?: string|null, + * LoadPayments?: bool, + * StatusId?: int|null, + * Type1Id?: int|null, + * Type2Id?: int|null, + * Type3Id?: int|null, + * WebsiteDomainIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getOrders(array $parameters = []): array + { + return array_map( + static fn (array $data) => Order::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Orders/GetOrders', ['json' => $parameters]), + ), + ); + } + + /** + * Haal alle orderstatussen op. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getOrderStatuses(): array + { + return array_map( + static fn (array $data) => OrderStatus::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Orders/GetOrderStatuses'), + ), + ); + } + + /** + * Verkrijg alle order retourcategorieën. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getReturnCategories(): array + { + return array_map( + static fn (array $data) => ReturnCategory::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Orders/GetReturnCategories'), + ), + ); + } + + /** + * Verkrijg retourorders o.b.v. het meegestuurde filter. + * + * @param array{ + * ReceivedReturnOrderDateFrom?: string|null, + * ReceivedReturnOrderDateTo?: string|null, + * SkipRecords?: int, + * TakeRecords?: int, + * SolutionId?: int|null, + * ProblemId?: int|null, + * CategoryId?: int|null, + * BelongsToOrderId?: int|null, + * Id?: int|null, + * DebtorId?: int|null, + * CreationDateFrom?: string|null, + * CreationDateTo?: string|null, + * Barcode1?: string|null, + * ProductCode?: string|null, + * Delivery_Address?: string|null, + * Delivery_PostalCode?: string|null, + * Delivery_City?: string|null, + * Delivery_ContactName?: string|null, + * Delivery_CompanyName?: string|null, + * Delivery_Email?: string|null, + * Invoice_Address?: string|null, + * Invoice_PostalCode?: string|null, + * Invoice_City?: string|null, + * Invoice_ContactName?: string|null, + * Invoice_CompanyName?: string|null, + * Invoice_Email?: string|null, + * LastActionFrom?: string|null, + * LastActionTo?: string|null, + * Reference?: string|null, + * LoadPayments?: bool, + * StatusId?: int|null, + * Type1Id?: int|null, + * Type2Id?: int|null, + * Type3Id?: int|null, + * WebsiteDomainIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getReturnOrders(array $parameters = []): array + { + return array_map( + static fn (array $data) => ReturnOrderV2::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Orders/GetReturnOrders', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg retourproblemen o.b.v. het filter. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getReturnProblems(array $parameters = []): array + { + return array_map( + static fn (array $data) => ReturnProblemV11::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Orders/GetReturnProblems', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg order retouroplossingen o.b.v. het filter. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getReturnSolutions(array $parameters = []): array + { + return array_map( + static fn (array $data) => ReturnSolution::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Orders/GetReturnSolutions', ['json' => $parameters]), + ), + ); + } + + /** + * @return array + * + * @throws Logic4ApiException + */ + public function getSerialnumberTypes(): array + { + return array_map( + static fn (array $data) => Order::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Orders/GetSerialnumberTypes'), + ), + ); + } + + /** + * Maakt een factuur aan, werkt voorraadmutaties bij, maakt financiële boekingen voor kosten en omzet aan, + * zet het bedrag van de order naar de de factuur en zet de factuur op gesloten. + * Geef als argument de Id van de factuur. + * + * @return array + * + * @throws Logic4ApiException + */ + public function processInvoice(int $value): array + { + return $this->buildResponse( + $this->getClient()->post('/v3/Orders/ProcessInvoice', ['json' => $value]), + ); + } + + /** + * Email wordt standaard niet verstuurd als de debiteur of de betaalmethode facturen via email uit heeft staan. + *
      + * Geeft het ID van de verzonden email, of 0 als er geen email is verzonden. + *
      + * Voor deze aanroep zijn extra rechten vereist. + * + * @param array{ + * InvoiceId?: int, + * IgnoreDebtorElectronicInvoicePreference?: bool, + * IgnorePaymentTypeElectronicInvoicePreference?: bool, + * } $parameters + * + * @throws Logic4ApiException + */ + public function sendEmailForInvoice(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Orders/SendEmailForInvoice', ['json' => $parameters]), + ); + } + + /** + * Voorzie orderregels met een afgesproken afleverdatum. + * + * @param array $parameters + * + * @throws Logic4ApiException + */ + public function updateAgreedDeliveryDatesForOrderRows(array $parameters = []): void + { + $this->getClient()->post('/v3/Orders/UpdateAgreedDeliveryDatesForOrderRows', ['json' => $parameters]); + } + + /** + * Wijzig het contactadres van een order of factuur o.b.v. de meegestuurde gegevens. + * + * @param array{ + * OrderId?: int|null, + * InvoiceId?: int|null, + * ContactAddress?: array{Id?: int|null, ProvinceId?: int|null, ContactName?: string|null, CompanyName?: string|null, PostalCode?: string|null, City?: string|null, CountryCode?: string|null, Street?: string|null, HouseNumber?: string|null, HouseNumberAddition?: string|null}, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateContactAddressForOrderOrInvoice(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Orders/UpdateContactAddressForOrderOrInvoice', ['json' => $parameters]), + ); + } + + /** + * Wijzig het afleveradres van een order of factuur o.b.v. de meegestuurde gegevens. + * + * @param array{ + * OrderId?: int|null, + * InvoiceId?: int|null, + * DeliveryAddress?: array{TelephoneNumber?: string|null, Email?: string|null, Street2?: string|null, HouseNumber2?: string|null, HouseNumberAddition2?: string|null, Id?: int|null, ProvinceId?: int|null, ContactName?: string|null, CompanyName?: string|null, PostalCode?: string|null, City?: string|null, CountryCode?: string|null, Street?: string|null, HouseNumber?: string|null, HouseNumberAddition?: string|null}, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateDeliveryAddressForOrderOrInvoice(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Orders/UpdateDeliveryAddressForOrderOrInvoice', ['json' => $parameters]), + ); + } + + /** + * Wijzig het factuuradres van een order of factuur o.b.v. de meegestuurde gegevens. + * + * @param array{ + * OrderId?: int|null, + * InvoiceId?: int|null, + * InvoiceAddress?: array{Id?: int|null, ProvinceId?: int|null, ContactName?: string|null, CompanyName?: string|null, PostalCode?: string|null, City?: string|null, CountryCode?: string|null, Street?: string|null, HouseNumber?: string|null, HouseNumberAddition?: string|null}, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateInvoiceAddressForOrderOrInvoice(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Orders/UpdateInvoiceAddressForOrderOrInvoice', ['json' => $parameters]), + ); + } + + /** + * Update de status van een order. + * + * @param array{ + * StatusId?: int, + * OrderId?: int, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateOrderStatus(array $parameters = []): void + { + $this->getClient()->post('/v3/Orders/UpdateOrderStatus', ['json' => $parameters]); + } +} diff --git a/src/Requests/V30/PickbonsRequest.php b/src/Requests/V30/PickbonsRequest.php new file mode 100644 index 0000000..c30432e --- /dev/null +++ b/src/Requests/V30/PickbonsRequest.php @@ -0,0 +1,158 @@ + + * + * @throws Logic4ApiException + */ + public function createCompletePickbonForOrder(array $parameters = []): array + { + return $this->buildResponse( + $this->getClient()->post('/v3/Pickbons/CreateCompletePickbonForOrder', ['json' => $parameters]), + ); + } + + /** + * Maak nieuwe pickbon(nen) aan voor de nu te picken leveren orderregels. + * + * @return array + * + * @throws Logic4ApiException + */ + public function createPickbonForOrder(int $value): array + { + return $this->buildResponse( + $this->getClient()->post('/v3/Pickbons/CreatePickbonForOrder', ['json' => $value]), + ); + } + + /** + * Controleer of de pickbon soft-blocked is en zo ja, door wie en wanneer? + * + * @throws Logic4ApiException + */ + public function getIsPickbonSoftBlocked(int $value): PickbonSoftBlocked + { + return PickbonSoftBlocked::make( + $this->buildResponse( + $this->getClient()->post('/v3/Pickbons/GetIsPickbonSoftBlocked', ['json' => $value]), + ) + ); + } + + /** + * Verkrijg simpele pickbon rijen op basis van pickbonnen. + * + * @param array $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getOrderHeadPickbonRows(array $parameters = []): array + { + return array_map( + static fn (array $data) => OrderHeadPickbonRow::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Pickbons/GetOrderHeadPickbonRows', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg pickbonnen op basis van het meegegeven filter. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * OnlyUnprocessedItems?: bool, + * OrderCreatedFrom?: string|null, + * WarehouseZoneId?: int|null, + * WarehouseId?: int|null, + * PickBonId?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getOrderHeadPickbons(array $parameters = []): array + { + return array_map( + static fn (array $data) => OrderHeadPickbon::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Pickbons/GetOrderHeadPickbons', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg alle magazijnzones. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getWarehouseZones(): array + { + return array_map( + static fn (array $data) => WarehouseZone::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Pickbons/GetWarehouseZones'), + ), + ); + } + + /** + * Soft-block pickbonnen. + * + * @param array $parameters + * + * @throws Logic4ApiException + */ + public function postSoftBlockPickbons(array $parameters = []): void + { + $this->getClient()->post('/v3/Pickbons/PostSoftBlockPickbons', ['json' => $parameters]); + } + + /** + * Verwerk pickbonnen. + * + * @param array, + * Mutations?: array, + * OrderHeadPickbonId?: int, + * InterimLocationId?: int|null, + * Remarks?: string|null, + * }> $parameters + * + * @throws Logic4ApiException + */ + public function processPickbons(array $parameters = []): string + { + return $this->buildResponse( + $this->getClient()->post('/v3/Pickbons/ProcessPickbons', ['json' => $parameters]), + ); + } +} diff --git a/src/Requests/V30/PriceListsRequest.php b/src/Requests/V30/PriceListsRequest.php new file mode 100644 index 0000000..145bfcb --- /dev/null +++ b/src/Requests/V30/PriceListsRequest.php @@ -0,0 +1,52 @@ + + * + * @throws Logic4ApiException + */ + public function getPricelists(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductPricelist::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/PriceLists/GetPricelists', ['json' => $parameters]), + ), + ); + } + + /** + * Contractprijzen bijwerken binnen de prijslijst. + * + * @param array{ + * PriceListId?: int, + * ProductStaggeredPrices?: array}>, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updatePriceListForProducts(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->put('/v3/PriceLists/UpdatePriceListForProducts', ['json' => $parameters]), + ); + } +} diff --git a/src/Requests/V30/ProductGroupsRequest.php b/src/Requests/V30/ProductGroupsRequest.php new file mode 100644 index 0000000..40b41a5 --- /dev/null +++ b/src/Requests/V30/ProductGroupsRequest.php @@ -0,0 +1,96 @@ + + * + * @throws Logic4ApiException + */ + public function getProductGroups(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductGroup::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/ProductGroups/GetProductGroups', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg alle artikelgroep types. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProductGroupTypes(): array + { + return array_map( + static fn (array $data) => ProductGroupType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/ProductGroups/GetProductGroupTypes'), + ), + ); + } + + /** + * Wijzig artikelgroep SEO informatie. + * Een SEO informatie record word op basis van een combinatie van ProductGroupId, GlobalizationId en WebsiteDomainId geselecteerd. + * WebsiteDomainId mag null zijn, dan geldt de gegeven SEO informatie voor alle webhopdomeinen. + *
      + * Als een record niet bestaat wordt deze aangemaakt.Lege records worden automatisch verwijdert. + * Niet-lege records moeten ten minste een Title of Description hebben. + *
      + * Bij het meegeven van een lege string of 'null' voor informatie velden, wordt bestaande informatie leeg gehaald. + * Velden die niet in de request staan worden niet gewijzigd. + *
      + * Als een product geen SEO informatie heeft voor een bepaalde taal en webshopdomein + * vindt er een fallback plaats op de basis informatie van de artikelgroep. + * + * @param array{ + * Product_GroupId?: int, + * GlobalisationId?: int, + * WebsiteDomainId?: int|null, + * H1Tag?: string|null, + * Keywords?: string|null, + * Name?: string|null, + * ProductGroupInfo?: string|null, + * Value?: string|null, + * MetaDescription?: string|null, + * ShortName?: string|null, + * USPDescription?: string|null, + * GlobalisationCode?: string|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateProductGroupSEOInformation(array $parameters = []): void + { + $this->getClient()->patch('/v3/ProductGroups/UpdateProductGroupSEOInformation', ['json' => $parameters]); + } +} diff --git a/src/Requests/V30/ProductRequest.php b/src/Requests/V30/ProductRequest.php new file mode 100644 index 0000000..9253eed --- /dev/null +++ b/src/Requests/V30/ProductRequest.php @@ -0,0 +1,1084 @@ +}>, + * Barcode1?: string|null, + * Barcode2?: string|null, + * ExtraBarcodes?: array, + * VendorCode?: string|null, + * StatusId?: int, + * VisibleOnWebshopFrom?: string|null, + * ExpirationDateOnWebshop?: string|null, + * WarrantyMonths?: int|null, + * SortId?: int|null, + * InternalNote?: string|null, + * ProductInfo?: string|null, + * Tags?: string|null, + * USPDescription?: string|null, + * MetaDescription?: string|null, + * SellPriceAdviceEx?: number|null, + * FreeValue1?: string|null, + * FreeValue2?: string|null, + * FreeValue3?: string|null, + * FreeValue4?: string|null, + * FreeValue5?: string|null, + * ProductPrices?: array, + * WeightSingleProduct?: number, + * HeightSingleProduct?: number, + * WidthSingleProduct?: number, + * DepthSingleProduct?: number, + * WeightInsidePackage?: number, + * HeightInsidePackage?: number, + * WidthInsidePackage?: number, + * DepthInsidePackage?: number, + * WeightOutsidePackage?: number, + * HeightOutsidePackage?: number, + * WidthOutsidePackage?: number, + * DepthOutsidePackage?: number, + * MinStockCount?: int|null, + * MaxStockCount?: int|null, + * HidePricesOnWebsite?: bool, + * ShowOfferButtonOnWebsite?: bool, + * HideStartingPricesOnWebsite?: bool, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addProduct(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Products/AddProduct', ['json' => $parameters]), + ); + } + + /** + * Voeg een afbeelding toe aan het artikel + * - Maximale grootte van het bericht is 5MB + * - Return waarde is een AfbeeldingId als de opdracht is geslaagd. + * + * @param array{ + * ImageBase64String?: string|null, + * ProductId?: int, + * ImageName?: string|null, + * ImageId?: int|null, + * SortId?: int|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addProductImage(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Products/AddProductImage', ['json' => $parameters]), + ); + } + + /** + * Koppel gerelateerde artikelen aan artikelen. + * Als een product al gekoppeld is en opnieuw wordt gekoppeld, worden de vrije velden overschreven. + * Wanneer deze vrije velden niet worden meegegeven in een nieuw request, worden de bestaande waarden verwijderd. + * + * @param array $parameters + * + * @throws Logic4ApiException + */ + public function addRelatedProducts(array $parameters = []): void + { + $this->getClient()->post('/v3/Products/AddRelatedProducts', ['json' => $parameters]); + } + + /** + * Koppelen van een website aan een product, max 1000 producten per request. + * Als een webshopdomein al reeds gekoppeld is, dan wordt deze overgeslagen. + * + * @param array{ + * ProductIds?: array, + * WebsiteDomainId?: int, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addWebsiteDomainForProducts(array $parameters = []): void + { + $this->getClient()->post('/v3/Products/AddWebsiteDomainForProducts', ['json' => $parameters]); + } + + /** @throws Logic4ApiException */ + public function deleteProductImage(int $productid, int $imageid): void + { + $this->getClient()->delete('/v3/Products/DeleteProductImage', ['query' => ['productid' => $productid, 'imageid' => $imageid]]); + } + + /** + * Ontkoppel gerelateerde artikelen. + * Ontkoppelt een specifiek gerelateerd artikel. Geef hierbij het RelatedTypeId op om aan te geven welk type koppeling verwijderd moet worden, + * aangezien een artikel zowel als ‘Gerelateerd’ als ‘Accessoire’ gekoppeld kan zijn. + * Wanneer RelatedTypeId niet wordt meegegeven in het request, worden alle koppelingen(ongeacht het type) voor het betreffende gerelateerde artikel ontkoppeld. + * + * @param array $parameters + * + * @throws Logic4ApiException + */ + public function deleteRelatedProducts(array $parameters = []): void + { + $this->getClient()->delete('/v3/Products/DeleteRelatedProducts', ['json' => $parameters]); + } + + /** + * Verwijder een website dat gekoppeld zit aan een product, max 1000 producten per request. + * Enkel gevonden records worden verwijderd, er vindt geen controle plaats op ProductId en/of WebsiteDomainId. + * Id's die niet gevonden worden, worden overgeslagen. + * + * @param array{ + * ProductIds?: array, + * WebsiteDomainId?: int, + * } $parameters + * + * @throws Logic4ApiException + */ + public function deleteWebsiteDomainForProducts(array $parameters = []): void + { + $this->getClient()->delete('/v3/Products/DeleteWebsiteDomainForProducts', ['json' => $parameters]); + } + + /** + * Verkrijg barcodes met aantallen o.b.v. een filter met artikel Id's. + * + * @param array $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getBarcodesForProductIds(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductBarcode::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetBarcodesForProductIds', ['json' => $parameters]), + ), + ); + } + + /** + * Haal artikel barcode types op. + * Deze types worden gebruikt in bijvoorbeeld de UpdateProductAddExtraBarcode functionaliteit. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getBarcodeTypes(): array + { + return array_map( + static fn (array $data) => ProductExtraBarcodeType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Products/GetBarcodeTypes'), + ), + ); + } + + /** + * Verkrijg basisinformatie van artikelen op basis van artikel Id's. + * + * @param array $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getBasicProductDataForProducts(array $parameters = []): array + { + return array_map( + static fn (array $data) => BasicProductData::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetBasicProductDataForProducts', ['json' => $parameters]), + ), + ); + } + + /** + * Haal merken op o.b.v. het filter. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getBrands(array $parameters = []): array + { + return array_map( + static fn (array $data) => Brand::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetBrands', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg de inhoud van een samengesteld artikel. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getComposedProductComposition(int $value): array + { + return array_map( + static fn (array $data) => ProductCompositionItem::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetComposedProductComposition', ['json' => $value]), + ), + ); + } + + /** + * Haal emballagetypen op. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getPackageMaterialDepositTypes(): array + { + return array_map( + static fn (array $data) => PackingMaterialDepositType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Products/GetPackageMaterialDepositTypes'), + ), + ); + } + + /** + * Verkrijg actuele prijzen voor een specifieke debiteur. + * + * @param array{ + * ProductCode?: string|null, + * DebtorId?: int|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function getPriceInformationForProduct( + array $parameters = [], + ): ProductPriceInformation { + return ProductPriceInformation::make( + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetPriceInformationForProduct', ['json' => $parameters]), + ) + ); + } + + /** + * Verkrijg een standaard assemblagerecept voor een artikel. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProductAssemblyRecipe(int $value): array + { + return array_map( + static fn (array $data) => ProductAssemblyRecipeItem::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetProductAssemblyRecipe', ['json' => $value]), + ), + ); + } + + /** + * Verkrijg productcodes o.b.v. leverancier productcodes (maximaal 10.000). + * + * @param array{ + * SupplierId?: int, + * SupplierCodes?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProductCodesBySupplierProductCodes(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductCodeWithSupplierCode::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetProductCodesBySupplierProductCodes', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg de afmetingen van meerdere artikelen. + * + * @param array{ + * ProductIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProductDimensions(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductDimensions::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetProductDimensions', ['json' => $parameters]), + ), + ); + } + + /** + * Ontvang de afbeeldingsinformatie van maximaal 1000 artikelen. + * + * @param array{ + * ProductIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProductImages(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductImageV2::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetProductImages', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg product afbeeldingen, videos en documenten. + * + * @param array{ + * ProductIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProductMedia(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductMediaFileDto::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetProductMedia', ['json' => $parameters]), + ), + ); + } + + /** + * Haal ID's op van voorraadlocaties voor een bepaald product in een bepaald magazijn. + * + * @param array{ + * ProductIds?: array, + * WarehouseId?: int|null, + * SystemDefaultPickLocation?: bool, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProductPickStockLocationIds(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductPickLocationBasedOnSystemSettings::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetProductPickStockLocationIds', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg geschreven reviews op basis van het opgestuurde filter. + * + * @param array{ + * WebsiteDomainId?: int|null, + * DateTimeCreatedFrom?: string|null, + * DateTimeCreatedTo?: string|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProductReviews(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductReview::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetProductReviews', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg artikelen o.b.v. het meegestuurde filter. Het aantal op te vragen artikelen is gelimiteerd tot 10000. + *
      + * Vanaf v1.4 is de werking van BuyPrice gewijzigd. Dit veld bevat nu de inkoopprijs exclusief toeslagen. + * In voorgaande versies was dit veld inclusief toeslagen. Deze waarde is nu verplaatst naar het nieuwe veld CostPrice. + * + * @param array{ + * DateTimeChangedFrom?: string|null, + * DateTimeChangedTo?: string|null, + * LoadFreeValuesTypes?: bool, + * BrandIds?: array, + * IsVisibleInLogic4?: bool|null, + * IsVisibleOnWebShop?: bool|null, + * AllShowOnWebsite?: bool|null, + * ProductGroupId?: int|null, + * UseChildProductGroups?: bool|null, + * ProductCode?: string|null, + * Barcode?: string|null, + * Barcodes?: array, + * DebtorId?: int|null, + * WebshopUserId?: int|null, + * WebshopPriceListId?: int|null, + * UseDropShipmentAmountsForWebshopPrices?: bool|null, + * ProductIds?: array, + * ProductFilterListChoice?: mixed, + * ProductHistoryBasedOnInvoices?: bool|null, + * WebshopUserOrderlistProductType?: int|null, + * ActiveOffers?: bool|null, + * OfferGroupId?: int|null, + * FastSearchText?: string|null, + * GetHighestShiftPrice?: bool|null, + * CountryIdForSellPrice?: int|null, + * BranchIdForSellPrice?: int|null, + * LoadExternalStockActiveSupplier?: bool|null, + * SkipRecords?: int|null, + * TakeRecords?: int|null, + * FromId?: int|null, + * LoadProductGroups?: bool|null, + * LoadExtraBarcodes?: bool, + * OnlyShowParentProducts?: bool|null, + * GlobalisationId?: int|null, + * WebsiteDomainId?: int|null, + * WareHouseId?: int|null, + * UseECommerceProductGroups?: bool, + * UseECommerceProductGroupsToLoadProductGroups?: bool, + * LoadStockForWarehouses?: bool, + * LoadAllWebshopGroupsLinkedToProduct?: bool, + * LoadProductTypes?: bool, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProducts(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductV14::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetProducts', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg SEO informatie voor 1 of meerdere artikelen (maximaal 1.000). + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * ProductIds?: array, + * WebsiteDomainId?: int|null, + * GlobalizationId?: int|null, + * ProductId?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProductsSEOInformation(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductSEOInformation::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetProductsSEOInformation', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg de verzendinformatie van een product. + * + * @param array{ + * ProductId?: int, + * } $parameters + * + * @throws Logic4ApiException + */ + public function getProductShippingInformation( + array $parameters = [], + ): ProductShippingInformation { + return ProductShippingInformation::make( + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetProductShippingInformation', ['json' => $parameters]), + ) + ); + } + + /** + * Verkrijg artikel Id's o.b.v. het meegestuurde filter. + * + * @param array{ + * IsVisibleInLogic4?: bool|null, + * IsVisibleOnWebShop?: bool|null, + * AllShowOnWebsite?: bool|null, + * ProductGroupId?: int|null, + * UseChildProductGroups?: bool|null, + * ProductCode?: string|null, + * Barcode?: string|null, + * Barcodes?: array, + * DebtorId?: int|null, + * WebshopUserId?: int|null, + * WebshopPriceListId?: int|null, + * UseDropShipmentAmountsForWebshopPrices?: bool|null, + * ProductIds?: array, + * ProductFilterListChoice?: mixed, + * ProductHistoryBasedOnInvoices?: bool|null, + * WebshopUserOrderlistProductType?: int|null, + * ActiveOffers?: bool|null, + * OfferGroupId?: int|null, + * FastSearchText?: string|null, + * GetHighestShiftPrice?: bool|null, + * CountryIdForSellPrice?: int|null, + * BranchIdForSellPrice?: int|null, + * LoadExternalStockActiveSupplier?: bool|null, + * SkipRecords?: int|null, + * TakeRecords?: int|null, + * FromId?: int|null, + * LoadProductGroups?: bool|null, + * LoadExtraBarcodes?: bool, + * OnlyShowParentProducts?: bool|null, + * GlobalisationId?: int|null, + * WebsiteDomainId?: int|null, + * WareHouseId?: int|null, + * UseECommerceProductGroups?: bool, + * UseECommerceProductGroupsToLoadProductGroups?: bool, + * LoadStockForWarehouses?: bool, + * LoadAllWebshopGroupsLinkedToProduct?: bool, + * LoadProductTypes?: bool, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProductsIds(array $parameters = []): array + { + return $this->buildResponse( + $this->getClient()->post('/v3/Products/GetProductsIds', ['json' => $parameters]), + ); + } + + /** + * @param array{ + * ProductIds?: array, + * Skip?: int|null, + * Take?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProductVariantBalkChildren(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductVariantBalkChildrenGroup::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetProductVariantBalkChildren', ['json' => $parameters]), + ), + ); + } + + /** + * Haal gerelateerde artikelen op. + * + * @param array{ + * ProductIds?: array, + * RelatedProductIds?: array, + * RelatedTypeId?: int|null, + * Skip?: int|null, + * Take?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getRelatedProducts(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductWithRelatedProductsV3::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetRelatedProducts', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg alle productstatussen. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getStatuses(): array + { + return array_map( + static fn (array $data) => ProductStatus::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Products/GetStatuses'), + ), + ); + } + + /** + * Verkrijg alle leveranciers van één product. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getSuppliersForProduct(int $value): array + { + return array_map( + static fn (array $data) => ProductSupplier::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetSuppliersForProduct', ['json' => $value]), + ), + ); + } + + /** + * Verkrijg alle leveranciers van één of meerdere producten op basis van ProductId's (max. 1000). Of gebruik 'TakeRecords' (max. 10.000). + * Vanaf v1.2 worden velden met de waarde null niet teruggegeven. + * + * @param array{ + * ProductIds?: array, + * SkipRecords?: int, + * TakeRecords?: int, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getSuppliersForProducts(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductSupplier::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetSuppliersForProducts', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg alle eenheden. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getUnits(): array + { + return array_map( + static fn (array $data) => ProductUnit::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Products/GetUnits'), + ), + ); + } + + /** + * Haal artikel variantbalk categorie gegevens op, waaronder de mogelijke waarden en vertalingen. + * + * @param array{ + * VariantBalkCategoryIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getVariantbalkCategories(array $parameters = []): array + { + return array_map( + static fn (array $data) => VariantBalkCategory::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetVariantbalkCategories', ['json' => $parameters]), + ), + ); + } + + /** + * Haal artikel variantbalk gegevens op, waaronder de mogelijke waarden, vertalingen en de categorieën. + * Voor nieuwe vertalingen kan het maximaal 10 minuten duren voordat deze terugkomen in de resultaten. + * + * @param array{ + * VariantBalkIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getVariantbalks(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductVariantBalk::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetVariantbalks', ['json' => $parameters]), + ), + ); + } + + /** + * Het ophalen van gekoppelde webshops per product, max. 1000 producten per request. + * + * @param array{ + * ProductIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getWebsiteDomainsForProducts(array $parameters = []): array + { + return array_map( + static fn (array $data) => WebsiteDomainsForProduct::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Products/GetWebsiteDomainsForProducts', ['json' => $parameters]), + ), + ); + } + + /** + * Verwijder een leverancier voor een artikel. + * Geeft een productId terug als resultaat indien het verwijderen goed is verlopen. + * + * @param array{ + * SupplierId?: int, + * ProductId?: int, + * } $parameters + * + * @throws Logic4ApiException + */ + public function removeProductSupplier(array $parameters = []): void + { + $this->getClient()->delete('/v3/Products/RemoveProductSupplier', ['json' => $parameters]); + } + + /** + * Maak een leverancier voor een artikel actief. + * Geeft een productId terug als resultaat indien het opslaan goed is verlopen. + * Voor deze aanroep zijn extra rechten vereist. + * + * @param array{ + * SupplierId?: int, + * ProductId?: int, + * } $parameters + * + * @throws Logic4ApiException + */ + public function setActiveProductSupplier(array $parameters = []): void + { + $this->getClient()->post('/v3/Products/SetActiveProductSupplier', ['json' => $parameters]); + } + + /** + * Updaten van een product. + * Geeft een productId terug als resultaat indien het opslaan goed is verlopen. + * + * @param array{ + * ProductId?: int, + * ProductDescription1?: string|null, + * ProductDescription2?: string|null, + * ProductGroup2?: int|null, + * ProductGroup3?: int|null, + * ProductGroup4?: int|null, + * UnitId?: int|null, + * Barcode1?: string|null, + * Barcode2?: string|null, + * VendorCode?: string|null, + * StatusId?: int|null, + * VisibleOnWebshopFrom?: string|null, + * ExpirationDateOnWebshop?: string|null, + * WarrantyMonths?: int|null, + * SortId?: int|null, + * InternalNote?: string|null, + * ProductInfo?: string|null, + * Tags?: string|null, + * USPDescription?: string|null, + * MetaDescription?: string|null, + * SellPriceAdviceEx?: number|null, + * FreeValue1?: string|null, + * FreeValue2?: string|null, + * FreeValue3?: string|null, + * FreeValue4?: string|null, + * FreeValue5?: string|null, + * WeightSingleProduct?: number|null, + * HeightSingleProduct?: number|null, + * WidthSingleProduct?: number|null, + * DepthSingleProduct?: number|null, + * WeightInsidePackage?: number|null, + * HeightInsidePackage?: number|null, + * WidthInsidePackage?: number|null, + * DepthInsidePackage?: number|null, + * WeightOutsidePackage?: number|null, + * HeightOutsidePackage?: number|null, + * WidthOutsidePackage?: number|null, + * DepthOutsidePackage?: number|null, + * MinStockCount?: int|null, + * MaxStockCount?: int|null, + * TemplateId?: int|null, + * HidePricesOnWebsite?: bool, + * ShowOfferButtonOnWebsite?: bool, + * HideStartingPricesOnWebsite?: bool, + * OfferStartDate?: string|null, + * OfferEndDate?: string|null, + * OfferFromPrice?: number|null, + * OfferToPrice?: number|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateProduct(array $parameters = []): void + { + $this->getClient()->patch('/v3/Products/UpdateProduct', ['json' => $parameters]); + } + + /** + * Voeg een barcode toe aan een artikel + * Geeft een productId terug als resultaat indien het opslaan goed is verlopen. + * + * @param array{ + * ProductId?: int, + * TypeId?: int|null, + * Barcode?: string|null, + * Quantity?: int, + * UnitId?: int|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateProductAddExtraBarcode(array $parameters = []): void + { + $this->getClient()->post('/v3/Products/UpdateProductAddExtraBarcode', ['json' => $parameters]); + } + + /** + * Update een afbeelding van het artikel + * - Maximale grootte van het bericht is 5MB + * - Return waarde is een AfbeeldingId als de opdracht is geslaagd. + * + * @param array{ + * ImageBase64String?: string|null, + * ProductId?: int, + * ImageName?: string|null, + * ImageId?: int, + * SortId?: int|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateProductImage(array $parameters = []): void + { + $this->getClient()->put('/v3/Products/UpdateProductImage', ['json' => $parameters]); + } + + /** + * Updaten van de artikel hoofdgroep en merk. + * Voor deze aanroep zijn extra rechten vereist. + * + * @param array{ + * ProductGroup1Id?: int, + * BrandId?: int, + * ProductId?: int, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateProductMainGroupAndBrand(array $parameters = []): void + { + $this->getClient()->patch('/v3/Products/UpdateProductMainGroupAndBrand', ['json' => $parameters]); + } + + /** + * Updaten van de artikel staffel prijzen. + * Geeft een productId terug als resultaat indien het opslaan goed is verlopen. + * Niet aangeleverde staffels zullen automatisch worden verwijderd. + * Voor deze aanroep zijn extra rechten vereist. + * + * @param array{ + * ProductPrices?: array, + * ProductId?: int, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateProductPrices(array $parameters = []): void + { + $this->getClient()->post('/v3/Products/UpdateProductPrices', ['json' => $parameters]); + } + + /** + * Verwijder een barcode van een artikel + * Geeft een productId terug als resultaat indien het opslaan goed is verlopen. + * + * @param array{ + * ProductId?: int, + * Barcode?: string|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateProductRemoveExtraBarcode(array $parameters = []): void + { + $this->getClient()->post('/v3/Products/UpdateProductRemoveExtraBarcode', ['json' => $parameters]); + } + + /** + * Verander de SEO informatie voor een product op basis van taal en webshopdomein. + * Een SEO informatie record wordt op basis van een combinatie van ProductId, GlobalizationId en WebsiteDomainId geselecteerd. + * WebsiteDomainId mag null zijn, dan geldt de gegeven SEO informatie voor alle webhopdomeinen. + *
      + * Als een record niet bestaat wordt deze aangemaakt. Lege records worden automatisch verwijderd. + * Niet-lege records moeten ten minste een Title of Description hebben. + *
      + * Bij het meegeven van een lege string of 'null' voor informatievelden, wordt bestaande informatie leeg gehaald. + * Velden die niet in de request staan worden niet gewijzigd. + *
      + * Als een product geen SEO informatie heeft voor een bepaalde taal en webshopdomein vindt er een fallback plaats op de basisinformatie van het artikel. + * + * @param array{ + * WebsiteDomainId?: int|null, + * GlobalizationId?: int, + * ProductId?: int, + * Title?: string|null, + * Description?: string|null, + * USP?: string|null, + * MetaName?: string|null, + * MetaDescription?: string|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateProductSEOInformation(array $parameters = []): void + { + $this->getClient()->patch('/v3/Products/UpdateProductSEOInformation', ['json' => $parameters]); + } + + /** + * Updaten van de artikel leverancier. + * Geeft een productId terug als resultaat indien het opslaan goed is verlopen. + * + * @param array{ + * Supplier_ProductCode?: string|null, + * ProductName?: string|null, + * ProductCountIncrement?: int|null, + * ShippingTime?: int|null, + * MinOrderQuantity?: int|null, + * RepackagingQty?: int|null, + * RepackagingUnitId?: int|null, + * InternalNote?: string|null, + * SupplierId?: int, + * ProductId?: int, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateProductSupplier(array $parameters = []): void + { + $this->getClient()->post('/v3/Products/UpdateProductSupplier', ['json' => $parameters]); + } + + /** + * Update de prijzen van de leverancier. Geeft een productId terug als resultaat. + * + * @param array{ + * ProductId?: int, + * SupplierId?: int, + * ProductPrices?: array, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateProductSupplierProductPrice(array $parameters = []): void + { + $this->getClient()->post('/v3/Products/UpdateProductSupplierProductPrice', ['json' => $parameters]); + } +} diff --git a/src/Requests/V30/ProductTemplateRequest.php b/src/Requests/V30/ProductTemplateRequest.php new file mode 100644 index 0000000..f36c491 --- /dev/null +++ b/src/Requests/V30/ProductTemplateRequest.php @@ -0,0 +1,117 @@ + + * + * @throws Logic4ApiException + */ + public function getProductTemplateProperties(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductTemplateProperty::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/ProductTemplates/GetProductTemplateProperties', ['json' => $parameters]), + ), + ); + } + + /** + * Haal meerdere artikel templates op. + * + * @param array{ + * TemplateId?: int|null, + * TemplatePropertyId?: int|null, + * Skip?: int|null, + * Take?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProductTemplates(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductTemplate::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/ProductTemplates/GetProductTemplates', ['json' => $parameters]), + ), + ); + } + + /** + * @param array{ + * ProductIds?: array, + * VisibleOnWebsite?: bool|null, + * Skip?: int|null, + * Take?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProductTemplateValuesPerProducts(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductTemplateProductValue::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/ProductTemplates/GetProductTemplateValuesPerProducts', ['json' => $parameters]), + ), + ); + } + + /** + * @param array{ + * ProductIds?: array, + * VisibleOnWebsite?: bool|null, + * Skip?: int|null, + * Take?: int|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function getProductTemplateValuesWithTranslations( + array $parameters = [], + ): ProductTemplatesWithTranslation { + return ProductTemplatesWithTranslation::make( + $this->buildResponse( + $this->getClient()->post('/v3/ProductTemplates/GetProductTemplateValuesWithTranslations', ['json' => $parameters]), + ) + ); + } + + /** + * @param array{ + * TemplatePropertyId?: int, + * PropertyValuesPerProduct?: array}>, + * } $parameters + * + * @throws Logic4ApiException + */ + public function setProductTemplatePropertyValues(array $parameters = []): void + { + $this->getClient()->post('/v3/ProductTemplates/SetProductTemplatePropertyValues', ['json' => $parameters]); + } +} diff --git a/src/Requests/V30/RelationsRequest.php b/src/Requests/V30/RelationsRequest.php new file mode 100644 index 0000000..797afc5 --- /dev/null +++ b/src/Requests/V30/RelationsRequest.php @@ -0,0 +1,805 @@ +buildResponse( + $this->getClient()->post('/v3/Relations/AddCreditorDiscount', ['json' => $parameters]), + ); + } + + /** + * Debiteur toevoegen. Mogelijke fouten (status en type): + * - 400 `tag:api.logic4.nl:2025-08-16:InvalidRequest` + * - Algemene validatiefout. + * - 400 `tag:api.logic4.nl:2026-02-03:InvalidVatFormat` + * - Het BTW-nummer heeft een ongeldig formaat en de VIES BTW-nummer validatieservice is niet aangeroepen. + * - 400 `tag:api.logic4.nl:2026-02-03:InvalidVatNumber` + * - De VIES BTW-nummer validatieservice geeft 'ongeldig BTW-nummer'. + * - 424 `tag:api.logic4.nl:2026-02-03:ViesNotAvailable` + * - De VIES BTW-nummer validatieservice is niet bereikbaar. + * + * @param array{ + * Id?: int|null, + * ValidateVat?: bool, + * IsoCode?: string|null, + * CountryCode?: string|null, + * CountryId?: int, + * CompanyName?: string|null, + * FirstName?: string|null, + * LastName?: string|null, + * EmailAddress?: string|null, + * LoginName?: string|null, + * PaymentMethodId?: int|null, + * PricelistIds?: array, + * TelephoneNumber?: string|null, + * MobileNumber?: string|null, + * Faxnumber?: string|null, + * ChamberOfCommerceCode?: string|null, + * Website?: string|null, + * Discount?: number|null, + * StandardReportIdForPickingList?: int|null, + * StandardReportIdForSalesOrderDelivery?: int|null, + * City?: string|null, + * Zipcode?: string|null, + * Street?: string|null, + * HouseNumber?: string|null, + * HouseNumberAddition?: string|null, + * VatNumber?: string|null, + * DontPrintPaperInvoiceForDebtor?: bool, + * ReceiveInvoiceElectronically?: bool, + * ElectronicInvoiceAttachmentType?: int|null, + * StandardInvoiceLayoutReportId?: int|null, + * Preposition?: string|null, + * CreditLimit?: number|null, + * ShippingMethodId?: int|null, + * GlobalisationId?: int|null, + * VatCodeId?: int|null, + * StatusId?: int|null, + * RepresentativeId?: int|null, + * RelationTypeId?: int|null, + * GenderId?: int|null, + * StandardPackagingSlipLayoutReportId?: int|null, + * FreeValue1?: string|null, + * FreeValue2?: string|null, + * FreeValue3?: string|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addCustomer(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Relations/AddCustomer', ['json' => $parameters]), + ); + } + + /** + * Adres toevoegen of updaten. + * + * @param array{ + * Type?: array{Id?: int, Name?: string|null}, + * Province?: array{Id?: int, Name?: string|null}, + * Email?: string|null, + * ContactName?: string|null, + * CompanyName?: string|null, + * Address1?: string|null, + * Address2?: string|null, + * Id?: int|null, + * DebtorId?: int|null, + * CreditorId?: int|null, + * IsMainContact?: bool, + * IsHidden?: bool|null, + * OwnContactNumber?: string|null, + * CountryCode?: string|null, + * IsoCode?: string|null, + * City?: string|null, + * Zipcode?: string|null, + * Street?: string|null, + * HouseNumber?: string|null, + * HouseNumberAddition?: string|null, + * TelephoneNumber?: string|null, + * CountryId?: int, + * ZoneId?: int, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addUpdateAddress(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Relations/AddUpdateAddress', ['json' => $parameters]), + ); + } + + /** + * Contactpersoon toevoegen of updaten. + * + * @param array{ + * EmailAddress?: string|null, + * FirstName?: string|null, + * Function?: string|null, + * Gender?: array{Id?: int, Name?: string|null}, + * Initials?: string|null, + * InsertionName?: string|null, + * LastName?: string|null, + * MobileNumber?: string|null, + * CreatedDateTime?: string|null, + * ChangedDateTime?: string|null, + * Id?: int|null, + * DebtorId?: int|null, + * CreditorId?: int|null, + * IsMainContact?: bool, + * IsHidden?: bool|null, + * OwnContactNumber?: string|null, + * CountryCode?: string|null, + * IsoCode?: string|null, + * City?: string|null, + * Zipcode?: string|null, + * Street?: string|null, + * HouseNumber?: string|null, + * HouseNumberAddition?: string|null, + * TelephoneNumber?: string|null, + * CountryId?: int, + * ZoneId?: int, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addUpdateContact(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Relations/AddUpdateContact', ['json' => $parameters]), + ); + } + + /** + * Crediteur externe identifier toevoegen of updaten. + * + * @param array{ + * CreditorId?: int, + * TypeId?: int, + * Value?: string|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addUpdateCreditorThirdPartyExternalIdentifier(array $parameters = []): void + { + $this->getClient()->post('/v3/Relations/AddUpdateCreditorThirdPartyExternalIdentifier', ['json' => $parameters]); + } + + /** + * Debiteur externe identifier toevoegen of updaten. + * + * @param array{ + * DebtorId?: int, + * TypeId?: int, + * Value?: string|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addUpdateCustomerThirdPartyExternalIdentifier(array $parameters = []): void + { + $this->getClient()->post('/v3/Relations/AddUpdateCustomerThirdPartyExternalIdentifier', ['json' => $parameters]); + } + + /** + * Voeg één of meer websitedomein Id's toe aan een debiteur. Geeft aantal toegevoegde Id's terug. + * + * @param array{ + * DebtorId?: int, + * WebsiteDomainIds?: array, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addWebsiteDomains(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Relations/AddWebsiteDomains', ['json' => $parameters]), + ); + } + + /** + * Verwijder een crediteur derde partij externe identifier. + * + * @param array{ + * CreditorId?: int|null, + * TypeId?: int|null, + * Value?: string|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function deleteCreditorThirdPartyExternalIdentifier(array $parameters = []): void + { + $this->getClient()->post('/v3/Relations/DeleteCreditorThirdPartyExternalIdentifier', ['json' => $parameters]); + } + + /** + * Verwijder een debiteur derde partij externe identifier. + * + * @param array{ + * DebtorId?: int|null, + * TypeId?: int|null, + * Value?: string|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function deleteCustomerThirdPartyExternalIdentifier(array $parameters = []): void + { + $this->getClient()->post('/v3/Relations/DeleteCustomerThirdPartyExternalIdentifier', ['json' => $parameters]); + } + + /** + * Verwijder één of meer websitedomein Id's van een debiteur. Geeft aantal verwijderde Id's terug. + * + * @param array{ + * DebtorId?: int, + * WebsiteDomainIds?: array, + * } $parameters + * + * @throws Logic4ApiException + */ + public function deleteWebsiteDomains(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Relations/DeleteWebsiteDomains', ['json' => $parameters]), + ); + } + + /** + * Verkrijg adressen o.b.v. het meegestuurde filter. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * ChangedAfter?: string|null, + * Id?: int|null, + * AddressTypeId?: int|null, + * PhoneNumber?: string|null, + * DebtorId?: int|null, + * CreditorId?: int|null, + * ExcludeHiddenContacts?: bool, + * OwnContactNumber?: string|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getAddresses(array $parameters = []): array + { + return array_map( + static fn (array $data) => CustomerAddress::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Relations/GetAddresses', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg alle adrestypes. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getAddressTypes(): array + { + return array_map( + static fn (array $data) => AddressType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Relations/GetAddressTypes'), + ), + ); + } + + /** + * Verkrijg contacten o.b.v. het meegestuurde filter. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * ChangedAfter?: string|null, + * Id?: int|null, + * AddressTypeId?: int|null, + * PhoneNumber?: string|null, + * DebtorId?: int|null, + * CreditorId?: int|null, + * ExcludeHiddenContacts?: bool, + * OwnContactNumber?: string|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getContacts(array $parameters = []): array + { + return array_map( + static fn (array $data) => CustomerContact::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Relations/GetContacts', ['json' => $parameters]), + ), + ); + } + + /** + * Haal kenmerken met bijbehorende vertegenwoordiger op voor contacten. + * + * @param array{ + * ContactIds?: array, + * DebtorId?: int|null, + * ContactType?: mixed, + * LastCharacteristicChangeDateTime?: string|null, + * SkipRecords?: int, + * TakeRecords?: int, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getContactsCharacteristics(array $parameters = []): array + { + return array_map( + static fn (array $data) => ContactCharacteristic::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Relations/GetContactsCharacteristics', ['json' => $parameters]), + ), + ); + } + + /** + * Contact types ophalen. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getContactTypes(): array + { + return array_map( + static fn (array $data) => ContactType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Relations/GetContactTypes'), + ), + ); + } + + /** + * Crediteur discounts ophalen (maximaal 1000). + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * Ids?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getCreditorDiscounts(array $parameters = []): array + { + return array_map( + static fn (array $data) => CreditorDiscount::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Relations/GetCreditorDiscounts', ['json' => $parameters]), + ), + ); + } + + /** + * Crediteur discount types ophalen. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getCreditorDiscountTypes(): array + { + return array_map( + static fn (array $data) => CreditorDiscountType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Relations/GetCreditorDiscountTypes'), + ), + ); + } + + /** + * Verkrijg crediteuren o.b.v. het meegestuurde filter. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * ChangedAfter?: string|null, + * LoginName?: string|null, + * Id?: int|null, + * PhoneNumber?: string|null, + * WebsiteDomainId?: int|null, + * EmailAddress?: string|null, + * EmailAddressIsExact?: bool, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getCreditors(array $parameters = []): array + { + return array_map( + static fn (array $data) => Creditor::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Relations/GetCreditors', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg crediteur externe identifiers o.b.v. het meegestuurde filter. + * + * @param array{ + * CreditorId?: int|null, + * TypeId?: int|null, + * Value?: string|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getCreditorThirdPartyExternalIdentifiers(array $parameters = []): array + { + return array_map( + static fn (array $data) => CreditorThirdPartyExternalIdentifer::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Relations/GetCreditorThirdPartyExternalIdentifiers', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg debiteuren o.b.v. het meegestuurde filter. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * ChangedAfter?: string|null, + * LoginName?: string|null, + * Id?: int|null, + * PhoneNumber?: string|null, + * WebsiteDomainId?: int|null, + * EmailAddress?: string|null, + * EmailAddressIsExact?: bool, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getCustomers(array $parameters = []): array + { + return array_map( + static fn (array $data) => Customer::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Relations/GetCustomers', ['json' => $parameters]), + ), + ); + } + + /** + * Haal kenmerken met bijbehorende vertegenwoordiger op voor debiteuren. + * + * @param array{ + * DebtorIds?: array, + * LastCharacteristicChangeDateTime?: string|null, + * SkipRecords?: int, + * TakeRecords?: int, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getCustomersCharacteristics(array $parameters = []): array + { + return array_map( + static fn (array $data) => DebtorCharacteristic::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Relations/GetCustomersCharacteristics', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg debiteur externe identifiers o.b.v. het meegestuurde filter. + * + * @param array{ + * DebtorId?: int|null, + * TypeId?: int|null, + * Value?: string|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getCustomerThirdPartyExternalIdentifiers(array $parameters = []): array + { + return array_map( + static fn (array $data) => CustomerThirdPartyExternalIdentifer::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Relations/GetCustomerThirdPartyExternalIdentifiers', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg alle geslachttypes. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getGenders(): array + { + return array_map( + static fn (array $data) => Gender::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Relations/GetGenders'), + ), + ); + } + + /** + * Verkrijg alle relatiestatussen. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getRelationStatuses(): array + { + return array_map( + static fn (array $data) => RelationStatus::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Relations/GetRelationStatuses'), + ), + ); + } + + /** + * Verkrijg alle relatietypes. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getRelationTypes(): array + { + return array_map( + static fn (array $data) => RelationType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Relations/GetRelationTypes'), + ), + ); + } + + /** + * Verkrijg alle vertegenwoordigers. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getRepresentatives(array $parameters = []): array + { + return array_map( + static fn (array $data) => Representative::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Relations/GetRepresentatives', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg alle typen tweede relatiecontacten. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getSecondContactGroupTypes(): array + { + return array_map( + static fn (array $data) => SecondTypeContactGroup::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Relations/GetSecondContactGroupTypes'), + ), + ); + } + + /** + * Verkrijg alle externe identifiertypes. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getThirdPartyExternalIdentfierTypes(): array + { + return array_map( + static fn (array $data) => ThirdPartyExternalIdentifierType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Relations/GetThirdPartyExternalIdentfierTypes'), + ), + ); + } + + /** + * Verkrijg alle relatiegroepen. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getTypeContactGroups(): array + { + return array_map( + static fn (array $data) => TypeContactGroup::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Relations/GetTypeContactGroups'), + ), + ); + } + + /** + * Verkrijg websitedomein Id's van een debiteur o.b.v. het meegestuurde filter. + * + * @param array{ + * DebtorId?: int, + * } $parameters + * + * @throws Logic4ApiException + */ + public function getWebsiteDomains( + array $parameters = [], + ): DebtorWebsiteDomainsList { + return DebtorWebsiteDomainsList::make( + $this->buildResponse( + $this->getClient()->post('/v3/Relations/GetWebsiteDomains', ['json' => $parameters]), + ) + ); + } + + /** + * Crediteur discount updaten. Retourneert true indien succesvol. + * + * @param array{ + * Id?: int, + * TypeId?: int, + * CreditorId?: int, + * BrandId?: int, + * DateFrom?: string|null, + * DateTo?: string|null, + * Percentage?: number|null, + * Amount?: number|null, + * Remarks?: string|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateCreditorDiscount(array $parameters = []): void + { + $this->getClient()->post('/v3/Relations/UpdateCreditorDiscount', ['json' => $parameters]); + } + + /** + * Waarden van een bestaande debiteur updaten. + * + * @param array{ + * Id?: int, + * IsoCode?: string|null, + * CountryCode?: string|null, + * CountryId?: int, + * CompanyName?: string|null, + * FirstName?: string|null, + * LastName?: string|null, + * EmailAddress?: string|null, + * LoginName?: string|null, + * PaymentMethodId?: int|null, + * PricelistIds?: array, + * TelephoneNumber?: string|null, + * MobileNumber?: string|null, + * Faxnumber?: string|null, + * ChamberOfCommerceCode?: string|null, + * Website?: string|null, + * Discount?: number|null, + * StandardReportIdForPickingList?: int|null, + * StandardReportIdForSalesOrderDelivery?: int|null, + * City?: string|null, + * Zipcode?: string|null, + * Street?: string|null, + * HouseNumber?: string|null, + * HouseNumberAddition?: string|null, + * VatNumber?: string|null, + * DontPrintPaperInvoiceForDebtor?: bool, + * ReceiveInvoiceElectronically?: bool, + * ElectronicInvoiceAttachmentType?: int|null, + * StandardInvoiceLayoutReportId?: int|null, + * Preposition?: string|null, + * CreditLimit?: number|null, + * ShippingMethodId?: int|null, + * GlobalisationId?: int|null, + * VatCodeId?: int|null, + * StatusId?: int|null, + * RepresentativeId?: int|null, + * RelationTypeId?: int|null, + * GenderId?: int|null, + * StandardPackagingSlipLayoutReportId?: int|null, + * FreeValue1?: string|null, + * FreeValue2?: string|null, + * FreeValue3?: string|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateCustomer(array $parameters = []): void + { + $this->getClient()->patch('/v3/Relations/UpdateCustomer', ['json' => $parameters]); + } +} diff --git a/src/Requests/V30/RoundRequest.php b/src/Requests/V30/RoundRequest.php new file mode 100644 index 0000000..4264505 --- /dev/null +++ b/src/Requests/V30/RoundRequest.php @@ -0,0 +1,237 @@ +buildResponse( + $this->getClient()->post('/v3/Round/AddRound', ['json' => $parameters]), + ); + } + + /** + * Een rit bestaat uit regels die gekoppeld zijn aan verkooporders of aan ITS opdrachten. + * Hiermee kan je één regel toevoegen aan een rit. + * Het voertuig bepaalt of je Orders, of ITS of beide mag toevoegen. + * + * @param array{ + * OrderId?: int|null, + * ITSIssueId?: int|null, + * RoundId?: int, + * Remarks?: string|null, + * StatusId?: int, + * Sorting?: int, + * EstimatedArrivalDateTime?: string|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addRoundOrder(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Round/AddRoundOrder', ['json' => $parameters]), + ); + } + + /** + * Verwijder een rit. De response geeft 'true' terug als de actie is geslaagd. + * + * @throws Logic4ApiException + */ + public function deleteRound(int $roundId): void + { + $this->getClient()->delete('/v3/Round/DeleteRound', ['query' => ['roundId' => $roundId]]); + } + + /** + * Verwijder één rit regel. Hierbij wordt ook de status historie van deze regel verwijderd. + * + * @throws Logic4ApiException + */ + public function deleteRoundOrder(int $roundOrderId): void + { + $this->getClient()->delete('/v3/Round/DeleteRoundOrder', ['query' => ['roundOrderId' => $roundOrderId]]); + } + + /** + * Haal rit regels op voor een bepaalde rit. Het is verplicht om een rit Id op te geven. + * Het maximaal aantal regels dat wordt teruggegeven is 1000. + * Om meer regels op te halen dien je gebruik te maken van de skip/take filtering. + * + * @param array{ + * SkipRecords?: int|null, + * TakeRecords?: int|null, + * RoundId?: int, + * StatusId?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getRoundOrders(array $parameters = []): array + { + return array_map( + static fn (array $data) => GetRoundOrder::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Round/GetRoundOrders', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg een collectie van statussen die gebruikt worden voor orders in ritten. + * Bijv. "Wacht op goedkeuring". + * + * @return array + * + * @throws Logic4ApiException + */ + public function getRoundOrderStatuses(): array + { + return array_map( + static fn (array $data) => TypeRoundOrderStatus::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Round/GetRoundOrderStatuses'), + ), + ); + } + + /** + * Verkrijg een collectie van ritten (maximaal 1000 records). + * + * @param array{ + * SkipRecords?: int|null, + * TakeRecords?: int|null, + * DateTimeCreatedFrom?: string|null, + * DateTimeCreatedTo?: string|null, + * TypeId?: int|null, + * StatusId?: int|null, + * VehicleId?: int|null, + * ItsIds?: array, + * OrderIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getRounds(array $parameters = []): array + { + return array_map( + static fn (array $data) => GetRound::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Round/GetRounds', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg een collectie van statussen die gebruikt worden voor ritten. + * Bijv. "80% gevuld". + * + * @return array + * + * @throws Logic4ApiException + */ + public function getRoundStatuses(): array + { + return array_map( + static fn (array $data) => TypeRoundStatus::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Round/GetRoundStatuses'), + ), + ); + } + + /** + * Verkrijg een collectie van voertuigen die ingezet kunnen worden bij ritten. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getVehicles(): array + { + return array_map( + static fn (array $data) => Vehicle::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Round/GetVehicles'), + ), + ); + } + + /** + * Update gegevens van een rit. + * Wanneer de operatie succesvol is zal het response "True" zijn. + * Let op, je moet het gehele object vullen. Lege waardes worden ook overgenomen. + * + * @param array{ + * Id?: int, + * TypeId?: int, + * Description?: string|null, + * Memo?: string|null, + * DateTimePlanned?: string|null, + * VehicleId?: int|null, + * DriverId?: int|null, + * CoDriverId?: int|null, + * StatusId?: int, + * HideInSystem?: bool, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateRound(array $parameters = []): void + { + $this->getClient()->post('/v3/Round/UpdateRound', ['json' => $parameters]); + } + + /** + * Update de gegevens van een rit regel. + * Wanneer de operatie succesvol is zal het response "True" zijn. + * Let op, je moet het gehele object vullen. Lege waardes worden ook overgenomen. + * + * @param array{ + * Id?: int, + * Remarks?: string|null, + * StatusId?: int, + * Sorting?: int, + * EstimatedArrivalDateTime?: string|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateRoundOrder(array $parameters = []): void + { + $this->getClient()->post('/v3/Round/UpdateRoundOrder', ['json' => $parameters]); + } +} diff --git a/src/Requests/V30/ShipmentRequest.php b/src/Requests/V30/ShipmentRequest.php new file mode 100644 index 0000000..c4778cf --- /dev/null +++ b/src/Requests/V30/ShipmentRequest.php @@ -0,0 +1,81 @@ +buildResponse( + $this->getClient()->post('/v3/Shipments/AddShipmentForDelivery', ['json' => $parameters]), + ); + } + + /** + * Verzending toevoegen aan een order of factuur. De nieuw aangemaakte verzending wordt teruggegeven als response. + * + * @param array{ + * DateTimeAdded?: string|null, + * SendEmail?: bool|null, + * OrderId?: int, + * ShipperId?: int, + * Barcode?: string|null, + * TrackTraceUrl?: string|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function addShipmentForInvoiceOrOrder(array $parameters = []): int + { + return $this->buildResponse( + $this->getClient()->post('/v3/Shipments/AddShipmentForInvoiceOrOrder', ['json' => $parameters]), + ); + } + + /** + * Verzending verwijderen voor een order of factuur, specificeer met het ID van de verzending. De verzending moet bestaan. + * + * @throws Logic4ApiException + */ + public function deleteShipmentForInvoiceOrOrder(int $id): void + { + $this->getClient()->delete('/v3/Shipments/DeleteShipmentForInvoiceOrOrder', ['query' => ['id' => $id]]); + } + + /** + * Verzendingen van een order of factuur ophalen voor het opgestuurde nummer. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getShipmentsForInvoiceOrOrder(int $value): array + { + return array_map( + static fn (array $data) => OrderShipment::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Shipments/GetShipmentsForInvoiceOrOrder', ['json' => $value]), + ), + ); + } +} diff --git a/src/Requests/V30/ShipperRequest.php b/src/Requests/V30/ShipperRequest.php new file mode 100644 index 0000000..2bed991 --- /dev/null +++ b/src/Requests/V30/ShipperRequest.php @@ -0,0 +1,71 @@ + + * + * @throws Logic4ApiException + */ + public function getDeliveryOptions(array $parameters = []): array + { + return array_map( + static fn (array $data) => DeliveryOption::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Shippers/GetDeliveryOptions', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg alle verzendmethode types. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getShipperTypes(): array + { + return array_map( + static fn (array $data) => ShipperType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Shippers/GetShipperTypes'), + ), + ); + } + + /** + * Verkrijg alle verzendmethodes. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getShippingMethods(): array + { + return array_map( + static fn (array $data) => ShippingMethod::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Shippers/GetShippingMethods'), + ), + ); + } +} diff --git a/src/Requests/V30/StockRequest.php b/src/Requests/V30/StockRequest.php new file mode 100644 index 0000000..f58eedf --- /dev/null +++ b/src/Requests/V30/StockRequest.php @@ -0,0 +1,538 @@ + + * + * @throws Logic4ApiException + */ + public function createProductStockMutation(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductStockMutationTypeV11::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Stock/CreateProductStockMutation', ['json' => $parameters]), + ), + ); + } + + /** + * Verplaats artikelen van een normale voorraadlocatie naar de reserveerlocatie. + * Alleen wanneer in een magazijn een reserveerlocatie is gedefinieerd kunnen tot maximaal 100 mutaties worden uitgevoerd. + * + * @param array $parameters + * + * @throws Logic4ApiException + */ + public function createProductStockMutationToReservationLocation(array $parameters = []): void + { + $this->getClient()->post('/v3/Stock/CreateProductStockMutationToReservationLocation', ['json' => $parameters]); + } + + /** + * Ophalen van externe voorraadstanden voor actieve leveranciers. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * ProductStockFrom?: int|null, + * DateTimeLastUpdateSince?: string|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getExternalStockForActiveSuppliers(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductStockSuppliers::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Stock/GetExternalStockForActiveSuppliers', ['json' => $parameters]), + ), + ); + } + + /** + * Ophalen van externe voorraadstanden voor actieve en niet-actieve leveranciers. + * + * @param array{ + * SupplierId?: int|null, + * Active?: bool|null, + * ProductIds?: array, + * SkipRecords?: int, + * TakeRecords?: int, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getExternalStockForSuppliers(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductStockSupplierWithActive::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Stock/GetExternalStockForSuppliers', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg minimale voorraad aantallen voor meerdere artikelen. + * + * @param array $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getMinimalStockNumbersForProducts(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductMinimalStockNumber::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Stock/GetMinimalStockNumbersForProducts', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg de eerstvolgende leverdata van alle actieve leveranciers, vanaf een specifieke datum. + * + * @param array{ + * NextDeliveryDate?: string, + * SkipRecords?: int, + * TakeRecords?: int, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getNextDeliveriesDatesForActiveSuppliers(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductSupplierNextDelivery::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Stock/GetNextDeliveriesDatesForActiveSuppliers', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg de huidige voorraadlocaties van het product op basis van het filter. + * + * @param array{ + * ProductsWithWarehouse?: array, + * ShowNegativeLocations?: bool, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProductStockLocationsWithName(array $parameters = []): array + { + return array_map( + static fn (array $data) => StockLocationForProduct::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Stock/GetProductStockLocationsWithName', ['json' => $parameters]), + ), + ); + } + + /** + * Haal voorraadmutaties op. Maximaal 10.000 records per keer kunnen worden opgehaald. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * PickbonIds?: array, + * DateFrom?: string|null, + * DateTo?: string|null, + * BuyOrderId?: int|null, + * StocklocationId?: int|null, + * ITSIssueId?: int|null, + * ProductCode?: string|null, + * WareHouseId?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProductStockMutations(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductStockMutation::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Stock/GetProductStockMutations', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg voorraadmutatie types. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProductStockMutationTypes(): array + { + return array_map( + static fn (array $data) => ProductStockMutationTypeV11::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Stock/GetProductStockMutationTypes'), + ), + ); + } + + /** + * Haal voor alle magazijnen van een of meer producten de minimale voorraadgrens, maximale voorraadgrens, + * notitie en standaard picklocatie op. + * + * @param array{ + * ProductIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProductStockWarehouseWithDefaultPickLocation(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductStockWarehouseWithDefaultPickLocation::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Stock/GetProductStockWarehouseWithDefaultPickLocation', ['json' => $parameters]), + ), + ); + } + + /** + * Haal een voorraadcontrole op aan de hand van een Id. + * + * @throws Logic4ApiException + */ + public function getStockControlHead(int $value): ProductStockControlHead + { + return ProductStockControlHead::make( + $this->buildResponse( + $this->getClient()->post('/v3/Stock/GetStockControlHead', ['json' => $value]), + ) + ); + } + + /** + * Voorraadcontrole heads ophalen op basis van het ProductStockControlHeadFilter. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * StockLocationId?: int|null, + * UserId?: int|null, + * CreatedDateFrom?: string|null, + * CreatedDateTo?: string|null, + * IsProcessed?: bool|null, + * ProductStockControlHeadId?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getStockControlHeads(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductStockControlHead::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Stock/GetStockControlHeads', ['json' => $parameters]), + ), + ); + } + + /** + * Ophalen van voorraadstanden voor specifieke magazijnen. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * WareHouseId?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getStockForWarehouses(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductStock::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Stock/GetStockForWarehouses', ['json' => $parameters]), + ), + ); + } + + /** + * Haal actuele voorraad op voor een artikel. + * + * @param array{ + * ProductCode?: string|null, + * ProductIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getStockInformationForProduct(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductStockInformationV2::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Stock/GetStockInformationForProduct', ['json' => $parameters]), + ), + ); + } + + /** + * Haal voorraadlocaties op van een product. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getStockLocationsForProduct(int $value): array + { + return array_map( + static fn (array $data) => ProductStockLocations::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Stock/GetStockLocationsForProduct', ['json' => $value]), + ), + ); + } + + /** + * Haal voorraadlocaties op van meerdere producten. + * + * @param array{ + * ProductIds?: array, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getStockLocationsForProducts(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductStockLocations::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Stock/GetStockLocationsForProducts', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg de producten die op de locatie aanwezig zouden moeten zijn. + * + * @param array{ + * LocationId?: int, + * SkipRecords?: int, + * TakeRecords?: int, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getStockProductsForStockLocation(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductStockControlRow::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Stock/GetStockProductsForStockLocation', ['json' => $parameters]), + ), + ); + } + + /** + * Haal alle magazijnen op voor een administratie. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getWarehousesForAdministration(int $value): array + { + return array_map( + static fn (array $data) => WareHouse::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Stock/GetWarehousesForAdministration', ['json' => $value]), + ), + ); + } + + /** + * Haal alle locaties op die bij een administratie behoren. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getWarehousesStockLocationsForAdministration(int $value): array + { + return array_map( + static fn (array $data) => WarehouseStockLocation::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Stock/GetWarehousesStockLocationsForAdministration', ['json' => $value]), + ), + ); + } + + /** + * Maak een voorraadverplaatsing aan. + * Return True wanneer gelukt, anders foutmelding. + * + * @param array{ + * Items?: array, + * FromStockLocationId?: int|null, + * FromWarehouseId?: int|null, + * ToStockLocationId?: int, + * Notes?: string|null, + * Name?: string|null, + * DatabaseAdministrationId?: int, + * } $parameters + * + * @throws Logic4ApiException + */ + public function postCreateStockMovement(array $parameters = []): void + { + $this->getClient()->post('/v3/Stock/PostCreateStockMovement', ['json' => $parameters]); + } + + /** + * Wijzig externe voorraadstand van een leverancier. + * + * @param array{ + * SupplierProductCode?: string|null, + * ProductId?: int|null, + * ProductCode?: string|null, + * SupplierId?: int|null, + * Quantity?: int|null, + * ProductNextDelivery?: string|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function setExternalStockForSupplier(array $parameters = []): void + { + $this->getClient()->post('/v3/Stock/SetExternalStockForSupplier', ['json' => $parameters]); + } + + /** + * Voeg eerstvolgende leverdata van leveranciers toe voor één of meer artikelen (max 100 per request). + * + * @param array $parameters + * + * @throws Logic4ApiException + */ + public function setNextDeliveriesDatesForActiveSuppliers(array $parameters = []): void + { + $this->getClient()->post('/v3/Stock/SetNextDeliveriesDatesForActiveSuppliers', ['json' => $parameters]); + } + + /** + * Verander de standaard picklocatie van artikelen naar een andere voorraad locatie. + * + * @param array $parameters + * + * @throws Logic4ApiException + */ + public function updateDefaultPickLocations(array $parameters = []): void + { + $this->getClient()->post('/v3/Stock/UpdateDefaultPickLocations', ['json' => $parameters]); + } + + /** + * Voeg een nieuwe voorraadcontrole toe of update de meegegeven head met de bijbehorende rijen als het Id van _head is meegegeven. + * + * @param array{ + * CreatedDate?: string, + * Id?: int|null, + * LocationName?: string|null, + * LocationId?: int, + * ProcessDate?: string|null, + * Username?: string|null, + * UserId?: int|null, + * Rows?: array}>, + * EventLog?: string|null, + * WarehouseStockControlEmailTemplateId?: int|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateOrCreateStockControlHeads( + array $parameters = [], + ): ProductStockControlHead { + return ProductStockControlHead::make( + $this->buildResponse( + $this->getClient()->post('/v3/Stock/UpdateOrCreateStockControlHeads', ['json' => $parameters]), + ) + ); + } +} diff --git a/src/Requests/V30/TypeRequest.php b/src/Requests/V30/TypeRequest.php new file mode 100644 index 0000000..a65e329 --- /dev/null +++ b/src/Requests/V30/TypeRequest.php @@ -0,0 +1,110 @@ + + * + * @throws Logic4ApiException + */ + public function getCountries(array $parameters = []): array + { + return array_map( + static fn (array $data) => Country::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Types/GetCountries', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg alle globalisaties (talen). + * + * @return array + * + * @throws Logic4ApiException + */ + public function getGlobalizationTypes(): array + { + return array_map( + static fn (array $data) => GlobalizationType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Types/GetGlobalizationTypes'), + ), + ); + } + + /** + * Verkrijg alle operating system types. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getOperatingSystemTypes(): array + { + return array_map( + static fn (array $data) => OperatingSystemType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Types/GetOperatingSystemTypes'), + ), + ); + } + + /** + * Verkrijg alle product-relatietypes. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProductRelationTypes(): array + { + return array_map( + static fn (array $data) => ProductRelationType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Types/GetProductRelationTypes'), + ), + ); + } + + /** + * Verkrijg alle provincies o.b.v. het opgestuurde filter. + * + * @param array{ + * CountryId?: int|null, + * ISOcode?: string|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getProvinces(array $parameters = []): array + { + return array_map( + static fn (array $data) => Province::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Types/GetProvinces', ['json' => $parameters]), + ), + ); + } +} diff --git a/src/Requests/V30/UserRequest.php b/src/Requests/V30/UserRequest.php new file mode 100644 index 0000000..a87dc4f --- /dev/null +++ b/src/Requests/V30/UserRequest.php @@ -0,0 +1,51 @@ + + * + * @throws Logic4ApiException + */ + public function getAllUsers(): array + { + return array_map( + static fn (array $data) => ApiUser::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/User/GetAllUsers'), + ), + ); + } + + /** + * Notitie van de meegestuurde gebruiker. + * + * @throws Logic4ApiException + */ + public function getNotice(): string + { + return $this->buildResponse( + $this->getClient()->get('/v3/User/GetNotice'), + ); + } + + /** + * Update de notitie van gebruiker. + * + * @throws Logic4ApiException + */ + public function updateNotice(mixed $value): void + { + $this->getClient()->post('/v3/User/UpdateNotice', ['json' => $value]); + } +} diff --git a/src/Requests/V30/WebshopRequest.php b/src/Requests/V30/WebshopRequest.php new file mode 100644 index 0000000..d6e64d0 --- /dev/null +++ b/src/Requests/V30/WebshopRequest.php @@ -0,0 +1,370 @@ +buildResponse( + $this->getClient()->post('/v3/Webshop/AddWebshopUserProductToWebshopUserProductList', ['json' => $parameters]), + ); + } + + /** + * Verwijder een WebshopUserProduct op een WebshopUserProductlijst. + * + * @throws Logic4ApiException + */ + public function deleteWebshopUserProductOnWebshopUserProductList(int $value): void + { + $this->getClient()->post('/v3/Webshop/DeleteWebshopUserProductOnWebshopUserProductList', ['json' => $value]); + } + + /** + * Wanneer het type "LastViewed" is geselecteerd, houd er dan rekening mee dat alleen de laatste 8 bekeken artikelen worden opgeslagen. + * Wanneer een samengesteld artikel tot de collectie behoort, wordt alleen dit moederartikel in de aangegeven hoeveelheid getoond; + * de aantallen kindartikelen zijn altijd in verhouding tot 1 moederartikel. + * + * @param array{ + * WebshopUserProductListType?: mixed, + * WebsiteDomainId?: int|null, + * DebtorId?: int|null, + * FromCreatedDateTime?: string|null, + * FromLastModifiedDateTime?: string|null, + * SkipRecords?: int, + * TakeRecords?: int, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getVisitorBehaviorForDebtor(array $parameters = []): array + { + return array_map( + static fn (array $data) => WebshopVisitorBehaviour::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Webshop/GetVisitorBehaviorForDebtor', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg de betaalmethodes van een WebshopUser. + * + * @param array{ + * DebtorId?: int, + * ShippingMethodId?: int, + * ShowOnlySelectedPaymentMethodDebtor?: bool|null, + * TotalPrice?: number, + * ShowOnlyAfterPayments?: bool|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getWebshopCheckOutPaymentMethods(array $parameters = []): array + { + return array_map( + static fn (array $data) => PaymentMethod::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Webshop/GetWebshopCheckOutPaymentMethods', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg de aflevermethodes van een WebshopUser. + * + * @param array{ + * IsPureInclShop?: bool, + * TotalPriceIncl?: number|null, + * DebtorId?: int, + * CountryId?: int, + * PostalCode?: string|null, + * Weight?: number, + * TotalPrice?: number, + * Volume?: number, + * ShowOnlySelectedShippingMethodDebtor?: bool|null, + * ShowOnlyShippingMethodsWithPaymentCondition?: bool|null, + * ShowOnlyShippingMethodsWithPaymentConditionWithAfterPayments?: bool|null, + * AddEmptyPackageWeightToWeight?: bool|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getWebshopCheckOutShippingMethods(array $parameters = []): array + { + return array_map( + static fn (array $data) => ShippingMethod::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Webshop/GetWebshopCheckOutShippingMethods', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg productprijzen o.b.v. webshopprijslijst/debiteur. + * + * @param array{ + * DebtorId?: int, + * WebshopPriceListId?: int|null, + * ProductId?: int, + * MinSaleAmount?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getWebshopProductShiftPrices(array $parameters = []): array + { + return array_map( + static fn (array $data) => ProductShiftPrice::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Webshop/GetWebshopProductShiftPrices', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg zoekresultaten van een webshop o.b.v. meegestuurde filter. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * SearchTerm?: string|null, + * DateFrom?: string|null, + * DateTo?: string|null, + * GlobilizationId?: int|null, + * DomainId?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getWebshopSearchWords(array $parameters = []): array + { + return array_map( + static fn (array $data) => WebshopSearchWord::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Webshop/GetWebshopSearchWords', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg webshopgebruiker o.b.v. webshopgebruikersnummer of debiteurnummer. + * + * @param array{ + * DebtorId?: int|null, + * WebshopUserId?: int|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function getWebshopUser(array $parameters = []): WebshopUser + { + return WebshopUser::make( + $this->buildResponse( + $this->getClient()->post('/v3/Webshop/GetWebshopUser', ['json' => $parameters]), + ) + ); + } + + /** + * Verkrijg het nog te besteden bedrag voor een webshopgebruiker van een jaarbudget. + * + * @param array{ + * WebshopUserId?: int, + * IgnoreOrderstatusIds?: array, + * } $parameters + * + * @throws Logic4ApiException + */ + public function getWebshopUserAvailableBudget(array $parameters = []): float + { + return $this->buildResponse( + $this->getClient()->post('/v3/Webshop/GetWebshopUserAvailableBudget', ['json' => $parameters]), + ); + } + + /** + * Verkrijg webshopgebruiker o.b.v. meegestuurde credentials. + * + * @param array{ + * UserName?: string|null, + * Password?: string|null, + * WebsiteDomainId?: int|null, + * IgnorePasswordCheck?: bool, + * } $parameters + * + * @throws Logic4ApiException + */ + public function getWebshopUserByLogin(array $parameters = []): WebshopUser + { + return WebshopUser::make( + $this->buildResponse( + $this->getClient()->post('/v3/Webshop/GetWebshopUserByLogin', ['json' => $parameters]), + ) + ); + } + + /** + * Verkrijg een bestellijst o.b.v. webshopgebruikersnummer of debiteurnummer voor de producttypes zie eindpunt /Webshop/GetWebshopUserOrderlistProductTypes. + * + * @param array{ + * SkipRecords?: int, + * TakeRecords?: int, + * WebshopUserProductListType?: int|null, + * DebtorId?: int|null, + * WebshopUserId?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getWebshopUserOrderlist(array $parameters = []): array + { + return array_map( + static fn (array $data) => WebshopOrderlistProduct::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Webshop/GetWebshopUserOrderlist', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg de bestellijstproducttypes. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getWebshopUserOrderlistProductTypes(): array + { + return array_map( + static fn (array $data) => WebshopUserProductType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Webshop/GetWebshopUserOrderlistProductTypes'), + ), + ); + } + + /** + * Verkrijg een WebshopUserProductlijst (Zie eindpunt /Webshop/GetWebshopUserProductListTypes voor de types) o.b.v. webshopgebruikersnummer of debiteurnummer. + * + * @param array{ + * VisitorCode?: string|null, + * WebshopUserProductListType?: mixed, + * WebshopPricelistId?: int|null, + * GetHighestShiftPrice?: bool|null, + * CountryIdForSellPrice?: int|null, + * BranchIdForSellPrice?: int|null, + * WebsiteDomainId?: int|null, + * DebtorWebshopProductTypeId?: int|null, + * DebtorId?: int|null, + * WebshopUserId?: int|null, + * } $parameters + * + * @return array + * + * @throws Logic4ApiException + */ + public function getWebshopUserProductList(array $parameters = []): array + { + return array_map( + static fn (array $data) => WebshopUserProductOfProductV12::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/Webshop/GetWebshopUserProductList', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg de type WebshopUserProductlijsten. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getWebshopUserProductListTypes(): array + { + return array_map( + static fn (array $data) => WebshopUserProductType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Webshop/GetWebshopUserProductListTypes'), + ), + ); + } + + /** + * Type webshopgebruikers. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getWebShopUserTypes(): array + { + return array_map( + static fn (array $data) => WebshopUserType::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/Webshop/GetWebShopUserTypes'), + ), + ); + } + + /** + * Update het aantal van een WebshopUserProduct op een WebshopUserProductlijst. + * + * @param array{ + * WebshopUserProductId?: int, + * Qty?: int|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function updateQtyWebshopUserProduct(array $parameters = []): void + { + $this->getClient()->put('/v3/Webshop/UpdateQtyWebshopUserProduct', ['json' => $parameters]); + } +} diff --git a/src/Requests/V30/WebsiteDomainRequest.php b/src/Requests/V30/WebsiteDomainRequest.php new file mode 100644 index 0000000..a2be7ef --- /dev/null +++ b/src/Requests/V30/WebsiteDomainRequest.php @@ -0,0 +1,76 @@ + + * + * @throws Logic4ApiException + */ + public function getAliases(array $parameters = []): array + { + return array_map( + static fn (array $data) => WebsiteAlias::make($data), + $this->buildResponse( + $this->getClient()->post('/v3/WebsiteDomains/GetAliases', ['json' => $parameters]), + ), + ); + } + + /** + * Verkrijg een websitedomein o.b.v. het meegestuurde filter. + * + * @param array{ + * Url?: string|null, + * IsStandardDomain?: bool|null, + * } $parameters + * + * @throws Logic4ApiException + */ + public function getWebSiteDomain(array $parameters = []): WebsiteDomain + { + return WebsiteDomain::make( + $this->buildResponse( + $this->getClient()->post('/v3/WebsiteDomains/GetWebSiteDomain', ['json' => $parameters]), + ) + ); + } + + /** + * Verkrijg alle websitedomeinen. + * + * @return array + * + * @throws Logic4ApiException + */ + public function getWebSiteDomains(): array + { + return array_map( + static fn (array $data) => WebsiteDomain::make($data), + $this->buildResponse( + $this->getClient()->get('/v3/WebsiteDomains/GetWebSiteDomains'), + ), + ); + } +} diff --git a/src/Responses/V10/DecimalNullableLogic4Response.php b/src/Responses/V10/DecimalNullableLogic4Response.php deleted file mode 100644 index 5946581..0000000 --- a/src/Responses/V10/DecimalNullableLogic4Response.php +++ /dev/null @@ -1,24 +0,0 @@ - $validationMessages */ - public function __construct( - public ?float $value, - public array $validationMessages, - ) { - } - - /** @param array $data */ - public static function make(array $data): self - { - return new self( - value: $data['Value'] ?? null, - validationMessages: $data['ValidationMessages'] ?? [], - ); - } -} diff --git a/src/Responses/V10/AddressTypeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfAddressType.php similarity index 95% rename from src/Responses/V10/AddressTypeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfAddressType.php index 0c1fd02..52e1b69 100644 --- a/src/Responses/V10/AddressTypeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfAddressType.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class AddressTypeLogic4ResponseList +class Logic4ResponseListOfAddressType { /** * @param array<\Webparking\Logic4Client\Data\V10\AddressType> $records diff --git a/src/Responses/V10/AdministrationLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfAdministration.php similarity index 95% rename from src/Responses/V10/AdministrationLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfAdministration.php index efbdba5..6a10441 100644 --- a/src/Responses/V10/AdministrationLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfAdministration.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class AdministrationLogic4ResponseList +class Logic4ResponseListOfAdministration { /** * @param array<\Webparking\Logic4Client\Data\V10\Administration> $records diff --git a/src/Responses/V10/ApiUserLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfApiUser.php similarity index 95% rename from src/Responses/V10/ApiUserLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfApiUser.php index 6eef9f6..c86f82f 100644 --- a/src/Responses/V10/ApiUserLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfApiUser.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ApiUserLogic4ResponseList +class Logic4ResponseListOfApiUser { /** * @param array<\Webparking\Logic4Client\Data\V10\ApiUser> $records diff --git a/src/Responses/V10/BasicProductDataLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfBasicProductData.php similarity index 95% rename from src/Responses/V10/BasicProductDataLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfBasicProductData.php index 6e8f3b8..3a7b400 100644 --- a/src/Responses/V10/BasicProductDataLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfBasicProductData.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class BasicProductDataLogic4ResponseList +class Logic4ResponseListOfBasicProductData { /** * @param array<\Webparking\Logic4Client\Data\V10\BasicProductData> $records diff --git a/src/Responses/V10/BranchLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfBranch.php similarity index 96% rename from src/Responses/V10/BranchLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfBranch.php index d1b1363..6054748 100644 --- a/src/Responses/V10/BranchLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfBranch.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class BranchLogic4ResponseList +class Logic4ResponseListOfBranch { /** * @param array<\Webparking\Logic4Client\Data\V10\Branch> $records diff --git a/src/Responses/V10/BrandLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfBrand.php similarity index 96% rename from src/Responses/V10/BrandLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfBrand.php index b869bb8..37e3722 100644 --- a/src/Responses/V10/BrandLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfBrand.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class BrandLogic4ResponseList +class Logic4ResponseListOfBrand { /** * @param array<\Webparking\Logic4Client\Data\V10\Brand> $records diff --git a/src/Responses/V10/BuyOrderBaseInfoLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfBuyOrderBaseInfo.php similarity index 95% rename from src/Responses/V10/BuyOrderBaseInfoLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfBuyOrderBaseInfo.php index 091102a..d044269 100644 --- a/src/Responses/V10/BuyOrderBaseInfoLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfBuyOrderBaseInfo.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class BuyOrderBaseInfoLogic4ResponseList +class Logic4ResponseListOfBuyOrderBaseInfo { /** * @param array<\Webparking\Logic4Client\Data\V10\BuyOrderBaseInfo> $records diff --git a/src/Responses/V10/BuyOrderDeliveryStatusValueLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfBuyOrderDeliveryStatusValue.php similarity index 94% rename from src/Responses/V10/BuyOrderDeliveryStatusValueLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfBuyOrderDeliveryStatusValue.php index b7b0156..1f74bc7 100644 --- a/src/Responses/V10/BuyOrderDeliveryStatusValueLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfBuyOrderDeliveryStatusValue.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class BuyOrderDeliveryStatusValueLogic4ResponseList +class Logic4ResponseListOfBuyOrderDeliveryStatusValue { /** * @param array<\Webparking\Logic4Client\Data\V10\BuyOrderDeliveryStatusValue> $records diff --git a/src/Responses/V10/BuyOrderDeliveryTypeValueLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfBuyOrderDeliveryTypeValue.php similarity index 94% rename from src/Responses/V10/BuyOrderDeliveryTypeValueLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfBuyOrderDeliveryTypeValue.php index c41ab7f..e92e53d 100644 --- a/src/Responses/V10/BuyOrderDeliveryTypeValueLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfBuyOrderDeliveryTypeValue.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class BuyOrderDeliveryTypeValueLogic4ResponseList +class Logic4ResponseListOfBuyOrderDeliveryTypeValue { /** * @param array<\Webparking\Logic4Client\Data\V10\BuyOrderDeliveryTypeValue> $records diff --git a/src/Responses/V10/BuyOrderRowLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfBuyOrderRow.php similarity index 95% rename from src/Responses/V10/BuyOrderRowLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfBuyOrderRow.php index 068c39a..4e887d4 100644 --- a/src/Responses/V10/BuyOrderRowLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfBuyOrderRow.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class BuyOrderRowLogic4ResponseList +class Logic4ResponseListOfBuyOrderRow { /** * @param array<\Webparking\Logic4Client\Data\V10\BuyOrderRow> $records diff --git a/src/Responses/V10/CRMActivityLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfCRMActivity.php similarity index 95% rename from src/Responses/V10/CRMActivityLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfCRMActivity.php index e3abc8c..e182f92 100644 --- a/src/Responses/V10/CRMActivityLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfCRMActivity.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class CRMActivityLogic4ResponseList +class Logic4ResponseListOfCRMActivity { /** * @param array<\Webparking\Logic4Client\Data\V10\CRMActivity> $records diff --git a/src/Responses/V10/CRMActivityStatusLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfCRMActivityStatus.php similarity index 95% rename from src/Responses/V10/CRMActivityStatusLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfCRMActivityStatus.php index 75c0172..4f5029e 100644 --- a/src/Responses/V10/CRMActivityStatusLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfCRMActivityStatus.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class CRMActivityStatusLogic4ResponseList +class Logic4ResponseListOfCRMActivityStatus { /** * @param array<\Webparking\Logic4Client\Data\V10\CRMActivityStatus> $records diff --git a/src/Responses/V10/CRMActivityTypeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfCRMActivityType.php similarity index 95% rename from src/Responses/V10/CRMActivityTypeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfCRMActivityType.php index cf432ba..a5ebbb0 100644 --- a/src/Responses/V10/CRMActivityTypeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfCRMActivityType.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class CRMActivityTypeLogic4ResponseList +class Logic4ResponseListOfCRMActivityType { /** * @param array<\Webparking\Logic4Client\Data\V10\CRMActivityType> $records diff --git a/src/Responses/V10/CRMProjectLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfCRMProject.php similarity index 95% rename from src/Responses/V10/CRMProjectLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfCRMProject.php index b3a93fa..2195a50 100644 --- a/src/Responses/V10/CRMProjectLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfCRMProject.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class CRMProjectLogic4ResponseList +class Logic4ResponseListOfCRMProject { /** * @param array<\Webparking\Logic4Client\Data\V10\CRMProject> $records diff --git a/src/Responses/V10/CRMProjectStatusLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfCRMProjectStatus.php similarity index 95% rename from src/Responses/V10/CRMProjectStatusLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfCRMProjectStatus.php index 51bb0dd..22436db 100644 --- a/src/Responses/V10/CRMProjectStatusLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfCRMProjectStatus.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class CRMProjectStatusLogic4ResponseList +class Logic4ResponseListOfCRMProjectStatus { /** * @param array<\Webparking\Logic4Client\Data\V10\CRMProjectStatus> $records diff --git a/src/Responses/V10/CRMProjectTypeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfCRMProjectType.php similarity index 95% rename from src/Responses/V10/CRMProjectTypeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfCRMProjectType.php index 9b59d37..e66370f 100644 --- a/src/Responses/V10/CRMProjectTypeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfCRMProjectType.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class CRMProjectTypeLogic4ResponseList +class Logic4ResponseListOfCRMProjectType { /** * @param array<\Webparking\Logic4Client\Data\V10\CRMProjectType> $records diff --git a/src/Responses/V10/ContactTypeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfContactType.php similarity index 95% rename from src/Responses/V10/ContactTypeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfContactType.php index a1f90ac..b211a91 100644 --- a/src/Responses/V10/ContactTypeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfContactType.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ContactTypeLogic4ResponseList +class Logic4ResponseListOfContactType { /** * @param array<\Webparking\Logic4Client\Data\V10\ContactType> $records diff --git a/src/Responses/V10/CountryLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfCountry.php similarity index 95% rename from src/Responses/V10/CountryLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfCountry.php index 9e30595..51f02c5 100644 --- a/src/Responses/V10/CountryLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfCountry.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class CountryLogic4ResponseList +class Logic4ResponseListOfCountry { /** * @param array<\Webparking\Logic4Client\Data\V10\Country> $records diff --git a/src/Responses/V10/CreditorDiscountTypeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfCreditorDiscountType.php similarity index 94% rename from src/Responses/V10/CreditorDiscountTypeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfCreditorDiscountType.php index 4680e12..99674d3 100644 --- a/src/Responses/V10/CreditorDiscountTypeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfCreditorDiscountType.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class CreditorDiscountTypeLogic4ResponseList +class Logic4ResponseListOfCreditorDiscountType { /** * @param array<\Webparking\Logic4Client\Data\V10\CreditorDiscountType> $records diff --git a/src/Responses/V10/CreditorThirdPartyExternalIdentiferLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfCreditorThirdPartyExternalIdentifer.php similarity index 93% rename from src/Responses/V10/CreditorThirdPartyExternalIdentiferLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfCreditorThirdPartyExternalIdentifer.php index 287a7da..9700cd8 100644 --- a/src/Responses/V10/CreditorThirdPartyExternalIdentiferLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfCreditorThirdPartyExternalIdentifer.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class CreditorThirdPartyExternalIdentiferLogic4ResponseList +class Logic4ResponseListOfCreditorThirdPartyExternalIdentifer { /** * @param array<\Webparking\Logic4Client\Data\V10\CreditorThirdPartyExternalIdentifer> $records diff --git a/src/Responses/V10/CustomerThirdPartyExternalIdentiferLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfCustomerThirdPartyExternalIdentifer.php similarity index 93% rename from src/Responses/V10/CustomerThirdPartyExternalIdentiferLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfCustomerThirdPartyExternalIdentifer.php index 9a85c7c..83541ba 100644 --- a/src/Responses/V10/CustomerThirdPartyExternalIdentiferLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfCustomerThirdPartyExternalIdentifer.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class CustomerThirdPartyExternalIdentiferLogic4ResponseList +class Logic4ResponseListOfCustomerThirdPartyExternalIdentifer { /** * @param array<\Webparking\Logic4Client\Data\V10\CustomerThirdPartyExternalIdentifer> $records diff --git a/src/Responses/V10/DeliveryOptionLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfDeliveryOption.php similarity index 95% rename from src/Responses/V10/DeliveryOptionLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfDeliveryOption.php index f3509a5..c84f3a1 100644 --- a/src/Responses/V10/DeliveryOptionLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfDeliveryOption.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class DeliveryOptionLogic4ResponseList +class Logic4ResponseListOfDeliveryOption { /** * @param array<\Webparking\Logic4Client\Data\V10\DeliveryOption> $records diff --git a/src/Responses/V10/EmailAddressLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfEmailAddress.php similarity index 95% rename from src/Responses/V10/EmailAddressLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfEmailAddress.php index efdf1d5..873ea28 100644 --- a/src/Responses/V10/EmailAddressLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfEmailAddress.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class EmailAddressLogic4ResponseList +class Logic4ResponseListOfEmailAddress { /** * @param array<\Webparking\Logic4Client\Data\V10\EmailAddress> $records diff --git a/src/Responses/V10/EmailAttachmentLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfEmailAttachment.php similarity index 95% rename from src/Responses/V10/EmailAttachmentLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfEmailAttachment.php index 4298ab0..ab68317 100644 --- a/src/Responses/V10/EmailAttachmentLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfEmailAttachment.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class EmailAttachmentLogic4ResponseList +class Logic4ResponseListOfEmailAttachment { /** * @param array<\Webparking\Logic4Client\Data\V10\EmailAttachment> $records diff --git a/src/Responses/V10/EmailBoxLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfEmailBox.php similarity index 95% rename from src/Responses/V10/EmailBoxLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfEmailBox.php index f95e860..452e21c 100644 --- a/src/Responses/V10/EmailBoxLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfEmailBox.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class EmailBoxLogic4ResponseList +class Logic4ResponseListOfEmailBox { /** * @param array<\Webparking\Logic4Client\Data\V10\EmailBox> $records diff --git a/src/Responses/V10/EmailMessageStatusLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfEmailMessageStatus.php similarity index 94% rename from src/Responses/V10/EmailMessageStatusLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfEmailMessageStatus.php index afff011..ed4cf09 100644 --- a/src/Responses/V10/EmailMessageStatusLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfEmailMessageStatus.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class EmailMessageStatusLogic4ResponseList +class Logic4ResponseListOfEmailMessageStatus { /** * @param array<\Webparking\Logic4Client\Data\V10\EmailMessageStatus> $records diff --git a/src/Responses/V10/FinancialBookLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfFinancialBook.php similarity index 95% rename from src/Responses/V10/FinancialBookLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfFinancialBook.php index ec4ba54..d27d350 100644 --- a/src/Responses/V10/FinancialBookLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfFinancialBook.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class FinancialBookLogic4ResponseList +class Logic4ResponseListOfFinancialBook { /** * @param array<\Webparking\Logic4Client\Data\V10\FinancialBook> $records diff --git a/src/Responses/V10/FinancialJournalStatusLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfFinancialJournalStatus.php similarity index 94% rename from src/Responses/V10/FinancialJournalStatusLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfFinancialJournalStatus.php index f926b50..cacece5 100644 --- a/src/Responses/V10/FinancialJournalStatusLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfFinancialJournalStatus.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class FinancialJournalStatusLogic4ResponseList +class Logic4ResponseListOfFinancialJournalStatus { /** * @param array<\Webparking\Logic4Client\Data\V10\FinancialJournalStatus> $records diff --git a/src/Responses/V10/GenderLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfGender.php similarity index 96% rename from src/Responses/V10/GenderLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfGender.php index 19b3c10..7285cca 100644 --- a/src/Responses/V10/GenderLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfGender.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class GenderLogic4ResponseList +class Logic4ResponseListOfGender { /** * @param array<\Webparking\Logic4Client\Data\V10\Gender> $records diff --git a/src/Responses/V10/GlobalizationTypeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfGlobalizationType.php similarity index 95% rename from src/Responses/V10/GlobalizationTypeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfGlobalizationType.php index c2f0809..e233ea7 100644 --- a/src/Responses/V10/GlobalizationTypeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfGlobalizationType.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class GlobalizationTypeLogic4ResponseList +class Logic4ResponseListOfGlobalizationType { /** * @param array<\Webparking\Logic4Client\Data\V10\GlobalizationType> $records diff --git a/src/Responses/V10/ITSFreeValueLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfITSFreeValue.php similarity index 95% rename from src/Responses/V10/ITSFreeValueLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfITSFreeValue.php index ac12917..24148fb 100644 --- a/src/Responses/V10/ITSFreeValueLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfITSFreeValue.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ITSFreeValueLogic4ResponseList +class Logic4ResponseListOfITSFreeValue { /** * @param array<\Webparking\Logic4Client\Data\V10\ITSFreeValue> $records diff --git a/src/Responses/V10/ITSIssueGroupLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfITSIssueGroup.php similarity index 95% rename from src/Responses/V10/ITSIssueGroupLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfITSIssueGroup.php index a0a6d1e..b6425fb 100644 --- a/src/Responses/V10/ITSIssueGroupLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfITSIssueGroup.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ITSIssueGroupLogic4ResponseList +class Logic4ResponseListOfITSIssueGroup { /** * @param array<\Webparking\Logic4Client\Data\V10\ITSIssueGroup> $records diff --git a/src/Responses/V10/ITSIssueLevelLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfITSIssueLevel.php similarity index 95% rename from src/Responses/V10/ITSIssueLevelLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfITSIssueLevel.php index aca8783..8cd6b06 100644 --- a/src/Responses/V10/ITSIssueLevelLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfITSIssueLevel.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ITSIssueLevelLogic4ResponseList +class Logic4ResponseListOfITSIssueLevel { /** * @param array<\Webparking\Logic4Client\Data\V10\ITSIssueLevel> $records diff --git a/src/Responses/V10/ITSIssueStatusLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfITSIssueStatus.php similarity index 95% rename from src/Responses/V10/ITSIssueStatusLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfITSIssueStatus.php index 4e1fdbe..7fca92d 100644 --- a/src/Responses/V10/ITSIssueStatusLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfITSIssueStatus.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ITSIssueStatusLogic4ResponseList +class Logic4ResponseListOfITSIssueStatus { /** * @param array<\Webparking\Logic4Client\Data\V10\ITSIssueStatus> $records diff --git a/src/Responses/V10/ITSIssueTypeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfITSIssueType.php similarity index 95% rename from src/Responses/V10/ITSIssueTypeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfITSIssueType.php index b996684..251387a 100644 --- a/src/Responses/V10/ITSIssueTypeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfITSIssueType.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ITSIssueTypeLogic4ResponseList +class Logic4ResponseListOfITSIssueType { /** * @param array<\Webparking\Logic4Client\Data\V10\ITSIssueType> $records diff --git a/src/Responses/V10/ITSProjectLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfITSProject.php similarity index 95% rename from src/Responses/V10/ITSProjectLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfITSProject.php index ed7f253..3efd8fc 100644 --- a/src/Responses/V10/ITSProjectLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfITSProject.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ITSProjectLogic4ResponseList +class Logic4ResponseListOfITSProject { /** * @param array<\Webparking\Logic4Client\Data\V10\ITSProject> $records diff --git a/src/Responses/V10/ITSTaskPriorityLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfITSTaskPriority.php similarity index 95% rename from src/Responses/V10/ITSTaskPriorityLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfITSTaskPriority.php index 270520a..cd0fa6d 100644 --- a/src/Responses/V10/ITSTaskPriorityLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfITSTaskPriority.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ITSTaskPriorityLogic4ResponseList +class Logic4ResponseListOfITSTaskPriority { /** * @param array<\Webparking\Logic4Client\Data\V10\ITSTaskPriority> $records diff --git a/src/Responses/V10/InvoiceOpenPaymentLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfInvoiceOpenPayment.php similarity index 94% rename from src/Responses/V10/InvoiceOpenPaymentLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfInvoiceOpenPayment.php index 100d7e6..28f0500 100644 --- a/src/Responses/V10/InvoiceOpenPaymentLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfInvoiceOpenPayment.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class InvoiceOpenPaymentLogic4ResponseList +class Logic4ResponseListOfInvoiceOpenPayment { /** * @param array<\Webparking\Logic4Client\Data\V10\InvoiceOpenPayment> $records diff --git a/src/Responses/V10/LedgerLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfLedger.php similarity index 96% rename from src/Responses/V10/LedgerLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfLedger.php index 167e270..638911c 100644 --- a/src/Responses/V10/LedgerLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfLedger.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class LedgerLogic4ResponseList +class Logic4ResponseListOfLedger { /** * @param array<\Webparking\Logic4Client\Data\V10\Ledger> $records diff --git a/src/Responses/V10/OperatingSystemTypeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfOperatingSystemType.php similarity index 94% rename from src/Responses/V10/OperatingSystemTypeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfOperatingSystemType.php index d534620..1626bd4 100644 --- a/src/Responses/V10/OperatingSystemTypeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfOperatingSystemType.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class OperatingSystemTypeLogic4ResponseList +class Logic4ResponseListOfOperatingSystemType { /** * @param array<\Webparking\Logic4Client\Data\V10\OperatingSystemType> $records diff --git a/src/Responses/V10/OrderLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfOrder.php similarity index 96% rename from src/Responses/V10/OrderLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfOrder.php index f1abebf..435ac18 100644 --- a/src/Responses/V10/OrderLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfOrder.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class OrderLogic4ResponseList +class Logic4ResponseListOfOrder { /** * @param array<\Webparking\Logic4Client\Data\V10\Order> $records diff --git a/src/Responses/V10/OrderActionLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfOrderAction.php similarity index 95% rename from src/Responses/V10/OrderActionLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfOrderAction.php index 1a83e2a..d0ecbe8 100644 --- a/src/Responses/V10/OrderActionLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfOrderAction.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class OrderActionLogic4ResponseList +class Logic4ResponseListOfOrderAction { /** * @param array<\Webparking\Logic4Client\Data\V10\OrderAction> $records diff --git a/src/Responses/V10/OrderActionTypeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfOrderActionType.php similarity index 95% rename from src/Responses/V10/OrderActionTypeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfOrderActionType.php index 596171a..e57ca49 100644 --- a/src/Responses/V10/OrderActionTypeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfOrderActionType.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class OrderActionTypeLogic4ResponseList +class Logic4ResponseListOfOrderActionType { /** * @param array<\Webparking\Logic4Client\Data\V10\OrderActionType> $records diff --git a/src/Responses/V10/OrderHeadPickbonLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfOrderHeadPickbon.php similarity index 95% rename from src/Responses/V10/OrderHeadPickbonLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfOrderHeadPickbon.php index 5046193..3882bcb 100644 --- a/src/Responses/V10/OrderHeadPickbonLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfOrderHeadPickbon.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class OrderHeadPickbonLogic4ResponseList +class Logic4ResponseListOfOrderHeadPickbon { /** * @param array<\Webparking\Logic4Client\Data\V10\OrderHeadPickbon> $records diff --git a/src/Responses/V10/OrderHeadPickbonRowLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfOrderHeadPickbonRow.php similarity index 94% rename from src/Responses/V10/OrderHeadPickbonRowLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfOrderHeadPickbonRow.php index 3f9212c..c7c0add 100644 --- a/src/Responses/V10/OrderHeadPickbonRowLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfOrderHeadPickbonRow.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class OrderHeadPickbonRowLogic4ResponseList +class Logic4ResponseListOfOrderHeadPickbonRow { /** * @param array<\Webparking\Logic4Client\Data\V10\OrderHeadPickbonRow> $records diff --git a/src/Responses/V10/OrderOpenPaymentLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfOrderOpenPayment.php similarity index 95% rename from src/Responses/V10/OrderOpenPaymentLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfOrderOpenPayment.php index 635ab85..db569d6 100644 --- a/src/Responses/V10/OrderOpenPaymentLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfOrderOpenPayment.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class OrderOpenPaymentLogic4ResponseList +class Logic4ResponseListOfOrderOpenPayment { /** * @param array<\Webparking\Logic4Client\Data\V10\OrderOpenPayment> $records diff --git a/src/Responses/V10/OrderRowV11Logic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfOrderRowV11.php similarity index 95% rename from src/Responses/V10/OrderRowV11Logic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfOrderRowV11.php index 0011147..1c611d6 100644 --- a/src/Responses/V10/OrderRowV11Logic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfOrderRowV11.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class OrderRowV11Logic4ResponseList +class Logic4ResponseListOfOrderRowV11 { /** * @param array<\Webparking\Logic4Client\Data\V10\OrderRowV11> $records diff --git a/src/Responses/V10/OrderShipmentLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfOrderShipment.php similarity index 95% rename from src/Responses/V10/OrderShipmentLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfOrderShipment.php index 7264560..286f3d4 100644 --- a/src/Responses/V10/OrderShipmentLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfOrderShipment.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class OrderShipmentLogic4ResponseList +class Logic4ResponseListOfOrderShipment { /** * @param array<\Webparking\Logic4Client\Data\V10\OrderShipment> $records diff --git a/src/Responses/V10/OrderStatusLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfOrderStatus.php similarity index 95% rename from src/Responses/V10/OrderStatusLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfOrderStatus.php index fbd6944..e0cab1d 100644 --- a/src/Responses/V10/OrderStatusLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfOrderStatus.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class OrderStatusLogic4ResponseList +class Logic4ResponseListOfOrderStatus { /** * @param array<\Webparking\Logic4Client\Data\V10\OrderStatus> $records diff --git a/src/Responses/V10/PackingMaterialDepositTypeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfPackingMaterialDepositType.php similarity index 94% rename from src/Responses/V10/PackingMaterialDepositTypeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfPackingMaterialDepositType.php index 838b7fb..71cd641 100644 --- a/src/Responses/V10/PackingMaterialDepositTypeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfPackingMaterialDepositType.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class PackingMaterialDepositTypeLogic4ResponseList +class Logic4ResponseListOfPackingMaterialDepositType { /** * @param array<\Webparking\Logic4Client\Data\V10\PackingMaterialDepositType> $records diff --git a/src/Responses/V10/PaymentMethodLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfPaymentMethod.php similarity index 95% rename from src/Responses/V10/PaymentMethodLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfPaymentMethod.php index d6446a1..b175113 100644 --- a/src/Responses/V10/PaymentMethodLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfPaymentMethod.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class PaymentMethodLogic4ResponseList +class Logic4ResponseListOfPaymentMethod { /** * @param array<\Webparking\Logic4Client\Data\V10\PaymentMethod> $records diff --git a/src/Responses/V10/PickbonSoftBlockedLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfPickbonSoftBlocked.php similarity index 94% rename from src/Responses/V10/PickbonSoftBlockedLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfPickbonSoftBlocked.php index 7f26aa8..db54089 100644 --- a/src/Responses/V10/PickbonSoftBlockedLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfPickbonSoftBlocked.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class PickbonSoftBlockedLogic4ResponseList +class Logic4ResponseListOfPickbonSoftBlocked { /** * @param array<\Webparking\Logic4Client\Data\V10\PickbonSoftBlocked> $records diff --git a/src/Responses/V10/ProductAssemblyRecipeItemLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductAssemblyRecipeItem.php similarity index 94% rename from src/Responses/V10/ProductAssemblyRecipeItemLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductAssemblyRecipeItem.php index 72eab10..88dda22 100644 --- a/src/Responses/V10/ProductAssemblyRecipeItemLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductAssemblyRecipeItem.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductAssemblyRecipeItemLogic4ResponseList +class Logic4ResponseListOfProductAssemblyRecipeItem { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductAssemblyRecipeItem> $records diff --git a/src/Responses/V10/ProductBarcodeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductBarcode.php similarity index 95% rename from src/Responses/V10/ProductBarcodeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductBarcode.php index d51b501..f8e1ef9 100644 --- a/src/Responses/V10/ProductBarcodeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductBarcode.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductBarcodeLogic4ResponseList +class Logic4ResponseListOfProductBarcode { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductBarcode> $records diff --git a/src/Responses/V10/ProductCodeWithSupplierCodeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductCodeWithSupplierCode.php similarity index 94% rename from src/Responses/V10/ProductCodeWithSupplierCodeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductCodeWithSupplierCode.php index 44b472c..74926f4 100644 --- a/src/Responses/V10/ProductCodeWithSupplierCodeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductCodeWithSupplierCode.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductCodeWithSupplierCodeLogic4ResponseList +class Logic4ResponseListOfProductCodeWithSupplierCode { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductCodeWithSupplierCode> $records diff --git a/src/Responses/V10/ProductCompositionItemLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductCompositionItem.php similarity index 94% rename from src/Responses/V10/ProductCompositionItemLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductCompositionItem.php index d25f97a..8e2e08a 100644 --- a/src/Responses/V10/ProductCompositionItemLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductCompositionItem.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductCompositionItemLogic4ResponseList +class Logic4ResponseListOfProductCompositionItem { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductCompositionItem> $records diff --git a/src/Responses/V10/ProductGroupLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductGroup.php similarity index 95% rename from src/Responses/V10/ProductGroupLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductGroup.php index 6f1bf96..de1079b 100644 --- a/src/Responses/V10/ProductGroupLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductGroup.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductGroupLogic4ResponseList +class Logic4ResponseListOfProductGroup { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductGroup> $records diff --git a/src/Responses/V10/ProductGroupTypeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductGroupType.php similarity index 95% rename from src/Responses/V10/ProductGroupTypeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductGroupType.php index 064f71c..c846ec9 100644 --- a/src/Responses/V10/ProductGroupTypeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductGroupType.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductGroupTypeLogic4ResponseList +class Logic4ResponseListOfProductGroupType { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductGroupType> $records diff --git a/src/Responses/V10/ProductMinimalStockNumberLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductMinimalStockNumber.php similarity index 94% rename from src/Responses/V10/ProductMinimalStockNumberLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductMinimalStockNumber.php index 9e9e0d1..4bdedc1 100644 --- a/src/Responses/V10/ProductMinimalStockNumberLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductMinimalStockNumber.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductMinimalStockNumberLogic4ResponseList +class Logic4ResponseListOfProductMinimalStockNumber { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductMinimalStockNumber> $records diff --git a/src/Responses/V10/ProductPickLocationBasedOnSystemSettingsLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductPickLocationBasedOnSystemSettings.php similarity index 93% rename from src/Responses/V10/ProductPickLocationBasedOnSystemSettingsLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductPickLocationBasedOnSystemSettings.php index 6cdc56f..b43c238 100644 --- a/src/Responses/V10/ProductPickLocationBasedOnSystemSettingsLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductPickLocationBasedOnSystemSettings.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductPickLocationBasedOnSystemSettingsLogic4ResponseList +class Logic4ResponseListOfProductPickLocationBasedOnSystemSettings { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductPickLocationBasedOnSystemSettings> $records diff --git a/src/Responses/V10/ProductPricelistLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductPricelist.php similarity index 95% rename from src/Responses/V10/ProductPricelistLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductPricelist.php index a7e4595..89fa5a5 100644 --- a/src/Responses/V10/ProductPricelistLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductPricelist.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductPricelistLogic4ResponseList +class Logic4ResponseListOfProductPricelist { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductPricelist> $records diff --git a/src/Responses/V10/ProductRelationTypeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductRelationType.php similarity index 94% rename from src/Responses/V10/ProductRelationTypeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductRelationType.php index c0197ff..65e971f 100644 --- a/src/Responses/V10/ProductRelationTypeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductRelationType.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductRelationTypeLogic4ResponseList +class Logic4ResponseListOfProductRelationType { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductRelationType> $records diff --git a/src/Responses/V10/ProductReviewLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductReview.php similarity index 95% rename from src/Responses/V10/ProductReviewLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductReview.php index 178dc2a..7f384bd 100644 --- a/src/Responses/V10/ProductReviewLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductReview.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductReviewLogic4ResponseList +class Logic4ResponseListOfProductReview { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductReview> $records diff --git a/src/Responses/V10/ProductSalesInformationLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductSalesInformation.php similarity index 94% rename from src/Responses/V10/ProductSalesInformationLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductSalesInformation.php index d4c6af1..4e3f695 100644 --- a/src/Responses/V10/ProductSalesInformationLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductSalesInformation.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductSalesInformationLogic4ResponseList +class Logic4ResponseListOfProductSalesInformation { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductSalesInformation> $records diff --git a/src/Responses/V10/ProductShiftPriceLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductShiftPrice.php similarity index 95% rename from src/Responses/V10/ProductShiftPriceLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductShiftPrice.php index d934c06..fd6624b 100644 --- a/src/Responses/V10/ProductShiftPriceLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductShiftPrice.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductShiftPriceLogic4ResponseList +class Logic4ResponseListOfProductShiftPrice { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductShiftPrice> $records diff --git a/src/Responses/V10/ProductStatusLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductStatus.php similarity index 95% rename from src/Responses/V10/ProductStatusLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductStatus.php index 3fbb7af..771d545 100644 --- a/src/Responses/V10/ProductStatusLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductStatus.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductStatusLogic4ResponseList +class Logic4ResponseListOfProductStatus { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductStatus> $records diff --git a/src/Responses/V10/ProductStockLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductStock.php similarity index 95% rename from src/Responses/V10/ProductStockLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductStock.php index 4539a5e..8c5c1b0 100644 --- a/src/Responses/V10/ProductStockLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductStock.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductStockLogic4ResponseList +class Logic4ResponseListOfProductStock { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductStock> $records diff --git a/src/Responses/V10/ProductStockControlHeadLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductStockControlHead.php similarity index 94% rename from src/Responses/V10/ProductStockControlHeadLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductStockControlHead.php index 2da21ad..c93ff13 100644 --- a/src/Responses/V10/ProductStockControlHeadLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductStockControlHead.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductStockControlHeadLogic4ResponseList +class Logic4ResponseListOfProductStockControlHead { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductStockControlHead> $records diff --git a/src/Responses/V10/ProductStockControlRowLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductStockControlRow.php similarity index 94% rename from src/Responses/V10/ProductStockControlRowLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductStockControlRow.php index 45b1019..a0c7370 100644 --- a/src/Responses/V10/ProductStockControlRowLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductStockControlRow.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductStockControlRowLogic4ResponseList +class Logic4ResponseListOfProductStockControlRow { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductStockControlRow> $records diff --git a/src/Responses/V10/ProductStockLocationsLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductStockLocations.php similarity index 94% rename from src/Responses/V10/ProductStockLocationsLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductStockLocations.php index aa62014..80a3ab3 100644 --- a/src/Responses/V10/ProductStockLocationsLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductStockLocations.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductStockLocationsLogic4ResponseList +class Logic4ResponseListOfProductStockLocations { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductStockLocations> $records diff --git a/src/Responses/V10/ProductStockMutationLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductStockMutation.php similarity index 94% rename from src/Responses/V10/ProductStockMutationLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductStockMutation.php index 042ff92..612d97e 100644 --- a/src/Responses/V10/ProductStockMutationLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductStockMutation.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductStockMutationLogic4ResponseList +class Logic4ResponseListOfProductStockMutation { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductStockMutation> $records diff --git a/src/Responses/V10/ProductStockMutationTypeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductStockMutationType.php similarity index 94% rename from src/Responses/V10/ProductStockMutationTypeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductStockMutationType.php index 61062aa..3f7e4c3 100644 --- a/src/Responses/V10/ProductStockMutationTypeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductStockMutationType.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductStockMutationTypeLogic4ResponseList +class Logic4ResponseListOfProductStockMutationType { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductStockMutationType> $records diff --git a/src/Responses/V10/ProductStockSuppliersLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductStockSuppliers.php similarity index 94% rename from src/Responses/V10/ProductStockSuppliersLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductStockSuppliers.php index 9c77899..f3297b0 100644 --- a/src/Responses/V10/ProductStockSuppliersLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductStockSuppliers.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductStockSuppliersLogic4ResponseList +class Logic4ResponseListOfProductStockSuppliers { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductStockSuppliers> $records diff --git a/src/Responses/V10/ProductStockWarehouseWithDefaultPickLocationLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductStockWarehouseWithDefaultPickLocation.php similarity index 92% rename from src/Responses/V10/ProductStockWarehouseWithDefaultPickLocationLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductStockWarehouseWithDefaultPickLocation.php index f9f3da6..2f78aab 100644 --- a/src/Responses/V10/ProductStockWarehouseWithDefaultPickLocationLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductStockWarehouseWithDefaultPickLocation.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductStockWarehouseWithDefaultPickLocationLogic4ResponseList +class Logic4ResponseListOfProductStockWarehouseWithDefaultPickLocation { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductStockWarehouseWithDefaultPickLocation> $records diff --git a/src/Responses/V10/ProductSupplierLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductSupplier.php similarity index 95% rename from src/Responses/V10/ProductSupplierLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductSupplier.php index 5ed4d6c..2b32e4b 100644 --- a/src/Responses/V10/ProductSupplierLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductSupplier.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductSupplierLogic4ResponseList +class Logic4ResponseListOfProductSupplier { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductSupplier> $records diff --git a/src/Responses/V10/ProductSupplierNextDeliveryLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductSupplierNextDelivery.php similarity index 94% rename from src/Responses/V10/ProductSupplierNextDeliveryLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductSupplierNextDelivery.php index a23ec85..b91e252 100644 --- a/src/Responses/V10/ProductSupplierNextDeliveryLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductSupplierNextDelivery.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductSupplierNextDeliveryLogic4ResponseList +class Logic4ResponseListOfProductSupplierNextDelivery { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductSupplierNextDelivery> $records diff --git a/src/Responses/V10/ProductUnitLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductUnit.php similarity index 95% rename from src/Responses/V10/ProductUnitLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductUnit.php index 9e4d2df..033bbf9 100644 --- a/src/Responses/V10/ProductUnitLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductUnit.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductUnitLogic4ResponseList +class Logic4ResponseListOfProductUnit { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductUnit> $records diff --git a/src/Responses/V10/ProductVariantBalkLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProductVariantBalk.php similarity index 94% rename from src/Responses/V10/ProductVariantBalkLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProductVariantBalk.php index 14adf94..cc8a2d6 100644 --- a/src/Responses/V10/ProductVariantBalkLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProductVariantBalk.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductVariantBalkLogic4ResponseList +class Logic4ResponseListOfProductVariantBalk { /** * @param array<\Webparking\Logic4Client\Data\V10\ProductVariantBalk> $records diff --git a/src/Responses/V10/ProvinceLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfProvince.php similarity index 95% rename from src/Responses/V10/ProvinceLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfProvince.php index 60f5448..473e647 100644 --- a/src/Responses/V10/ProvinceLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfProvince.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProvinceLogic4ResponseList +class Logic4ResponseListOfProvince { /** * @param array<\Webparking\Logic4Client\Data\V10\Province> $records diff --git a/src/Responses/V10/RelationStatusLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfRelationStatus.php similarity index 95% rename from src/Responses/V10/RelationStatusLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfRelationStatus.php index 070478f..12f9147 100644 --- a/src/Responses/V10/RelationStatusLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfRelationStatus.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class RelationStatusLogic4ResponseList +class Logic4ResponseListOfRelationStatus { /** * @param array<\Webparking\Logic4Client\Data\V10\RelationStatus> $records diff --git a/src/Responses/V10/RelationTypeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfRelationType.php similarity index 95% rename from src/Responses/V10/RelationTypeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfRelationType.php index 99b93bb..f2dbe54 100644 --- a/src/Responses/V10/RelationTypeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfRelationType.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class RelationTypeLogic4ResponseList +class Logic4ResponseListOfRelationType { /** * @param array<\Webparking\Logic4Client\Data\V10\RelationType> $records diff --git a/src/Responses/V10/RepresentativeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfRepresentative.php similarity index 95% rename from src/Responses/V10/RepresentativeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfRepresentative.php index 9d80ebd..187c932 100644 --- a/src/Responses/V10/RepresentativeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfRepresentative.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class RepresentativeLogic4ResponseList +class Logic4ResponseListOfRepresentative { /** * @param array<\Webparking\Logic4Client\Data\V10\Representative> $records diff --git a/src/Responses/V10/ReturnCategoryLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfReturnCategory.php similarity index 95% rename from src/Responses/V10/ReturnCategoryLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfReturnCategory.php index 1d9a25b..668f513 100644 --- a/src/Responses/V10/ReturnCategoryLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfReturnCategory.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ReturnCategoryLogic4ResponseList +class Logic4ResponseListOfReturnCategory { /** * @param array<\Webparking\Logic4Client\Data\V10\ReturnCategory> $records diff --git a/src/Responses/V10/ReturnProblemLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfReturnProblem.php similarity index 95% rename from src/Responses/V10/ReturnProblemLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfReturnProblem.php index 6c503b9..2cd1a20 100644 --- a/src/Responses/V10/ReturnProblemLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfReturnProblem.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ReturnProblemLogic4ResponseList +class Logic4ResponseListOfReturnProblem { /** * @param array<\Webparking\Logic4Client\Data\V10\ReturnProblem> $records diff --git a/src/Responses/V10/ReturnSolutionLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfReturnSolution.php similarity index 95% rename from src/Responses/V10/ReturnSolutionLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfReturnSolution.php index b65f399..d8de86a 100644 --- a/src/Responses/V10/ReturnSolutionLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfReturnSolution.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ReturnSolutionLogic4ResponseList +class Logic4ResponseListOfReturnSolution { /** * @param array<\Webparking\Logic4Client\Data\V10\ReturnSolution> $records diff --git a/src/Responses/V10/SalesOrderDeliveryRowLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfSalesOrderDeliveryRow.php similarity index 94% rename from src/Responses/V10/SalesOrderDeliveryRowLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfSalesOrderDeliveryRow.php index 2251e6c..e3835ab 100644 --- a/src/Responses/V10/SalesOrderDeliveryRowLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfSalesOrderDeliveryRow.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class SalesOrderDeliveryRowLogic4ResponseList +class Logic4ResponseListOfSalesOrderDeliveryRow { /** * @param array<\Webparking\Logic4Client\Data\V10\SalesOrderDeliveryRow> $records diff --git a/src/Responses/V10/SecondTypeContactGroupLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfSecondTypeContactGroup.php similarity index 94% rename from src/Responses/V10/SecondTypeContactGroupLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfSecondTypeContactGroup.php index 36b4cfc..8b9ee73 100644 --- a/src/Responses/V10/SecondTypeContactGroupLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfSecondTypeContactGroup.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class SecondTypeContactGroupLogic4ResponseList +class Logic4ResponseListOfSecondTypeContactGroup { /** * @param array<\Webparking\Logic4Client\Data\V10\SecondTypeContactGroup> $records diff --git a/src/Responses/V10/ShipperTypeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfShipperType.php similarity index 95% rename from src/Responses/V10/ShipperTypeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfShipperType.php index a4108c4..a167de3 100644 --- a/src/Responses/V10/ShipperTypeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfShipperType.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ShipperTypeLogic4ResponseList +class Logic4ResponseListOfShipperType { /** * @param array<\Webparking\Logic4Client\Data\V10\ShipperType> $records diff --git a/src/Responses/V10/ShippingMethodLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfShippingMethod.php similarity index 95% rename from src/Responses/V10/ShippingMethodLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfShippingMethod.php index 421854a..e1c3de3 100644 --- a/src/Responses/V10/ShippingMethodLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfShippingMethod.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ShippingMethodLogic4ResponseList +class Logic4ResponseListOfShippingMethod { /** * @param array<\Webparking\Logic4Client\Data\V10\ShippingMethod> $records diff --git a/src/Responses/V10/StockLocationForProductLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfStockLocationForProduct.php similarity index 94% rename from src/Responses/V10/StockLocationForProductLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfStockLocationForProduct.php index 6ad21d4..0bede8f 100644 --- a/src/Responses/V10/StockLocationForProductLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfStockLocationForProduct.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class StockLocationForProductLogic4ResponseList +class Logic4ResponseListOfStockLocationForProduct { /** * @param array<\Webparking\Logic4Client\Data\V10\StockLocationForProduct> $records diff --git a/src/Responses/V10/SubscriberLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfSubscriber.php similarity index 95% rename from src/Responses/V10/SubscriberLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfSubscriber.php index ae1d631..3129feb 100644 --- a/src/Responses/V10/SubscriberLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfSubscriber.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class SubscriberLogic4ResponseList +class Logic4ResponseListOfSubscriber { /** * @param array<\Webparking\Logic4Client\Data\V10\Subscriber> $records diff --git a/src/Responses/V10/ThirdPartyExternalIdentifierTypeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfThirdPartyExternalIdentifierType.php similarity index 93% rename from src/Responses/V10/ThirdPartyExternalIdentifierTypeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfThirdPartyExternalIdentifierType.php index 645d880..aa3415b 100644 --- a/src/Responses/V10/ThirdPartyExternalIdentifierTypeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfThirdPartyExternalIdentifierType.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ThirdPartyExternalIdentifierTypeLogic4ResponseList +class Logic4ResponseListOfThirdPartyExternalIdentifierType { /** * @param array<\Webparking\Logic4Client\Data\V10\ThirdPartyExternalIdentifierType> $records diff --git a/src/Responses/V10/Top10ItemLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfTop10Item.php similarity index 95% rename from src/Responses/V10/Top10ItemLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfTop10Item.php index bb218d8..59ccf05 100644 --- a/src/Responses/V10/Top10ItemLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfTop10Item.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class Top10ItemLogic4ResponseList +class Logic4ResponseListOfTop10Item { /** * @param array<\Webparking\Logic4Client\Data\V10\Top10Item> $records diff --git a/src/Responses/V10/TypeContactGroupLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfTypeContactGroup.php similarity index 95% rename from src/Responses/V10/TypeContactGroupLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfTypeContactGroup.php index c7c0553..f49c962 100644 --- a/src/Responses/V10/TypeContactGroupLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfTypeContactGroup.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class TypeContactGroupLogic4ResponseList +class Logic4ResponseListOfTypeContactGroup { /** * @param array<\Webparking\Logic4Client\Data\V10\TypeContactGroup> $records diff --git a/src/Responses/V10/TypeCostCenterLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfTypeCostCenter.php similarity index 95% rename from src/Responses/V10/TypeCostCenterLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfTypeCostCenter.php index 07a3e13..64e9abc 100644 --- a/src/Responses/V10/TypeCostCenterLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfTypeCostCenter.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class TypeCostCenterLogic4ResponseList +class Logic4ResponseListOfTypeCostCenter { /** * @param array<\Webparking\Logic4Client\Data\V10\TypeCostCenter> $records diff --git a/src/Responses/V10/TypeEntityCodeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfTypeEntityCode.php similarity index 95% rename from src/Responses/V10/TypeEntityCodeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfTypeEntityCode.php index b19607d..d232a7f 100644 --- a/src/Responses/V10/TypeEntityCodeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfTypeEntityCode.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class TypeEntityCodeLogic4ResponseList +class Logic4ResponseListOfTypeEntityCode { /** * @param array<\Webparking\Logic4Client\Data\V10\TypeEntityCode> $records diff --git a/src/Responses/V10/TypeFinancialBookingStatusLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfTypeFinancialBookingStatus.php similarity index 94% rename from src/Responses/V10/TypeFinancialBookingStatusLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfTypeFinancialBookingStatus.php index f212a5d..6ad8a61 100644 --- a/src/Responses/V10/TypeFinancialBookingStatusLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfTypeFinancialBookingStatus.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class TypeFinancialBookingStatusLogic4ResponseList +class Logic4ResponseListOfTypeFinancialBookingStatus { /** * @param array<\Webparking\Logic4Client\Data\V10\TypeFinancialBookingStatus> $records diff --git a/src/Responses/V10/TypeLedgerColumnLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfTypeLedgerColumn.php similarity index 95% rename from src/Responses/V10/TypeLedgerColumnLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfTypeLedgerColumn.php index 81c9f61..1623690 100644 --- a/src/Responses/V10/TypeLedgerColumnLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfTypeLedgerColumn.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class TypeLedgerColumnLogic4ResponseList +class Logic4ResponseListOfTypeLedgerColumn { /** * @param array<\Webparking\Logic4Client\Data\V10\TypeLedgerColumn> $records diff --git a/src/Responses/V10/TypeRoundOrderStatusLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfTypeRoundOrderStatus.php similarity index 94% rename from src/Responses/V10/TypeRoundOrderStatusLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfTypeRoundOrderStatus.php index 706b008..6243502 100644 --- a/src/Responses/V10/TypeRoundOrderStatusLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfTypeRoundOrderStatus.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class TypeRoundOrderStatusLogic4ResponseList +class Logic4ResponseListOfTypeRoundOrderStatus { /** * @param array<\Webparking\Logic4Client\Data\V10\TypeRoundOrderStatus> $records diff --git a/src/Responses/V10/TypeRoundStatusLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfTypeRoundStatus.php similarity index 95% rename from src/Responses/V10/TypeRoundStatusLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfTypeRoundStatus.php index 46fb9c3..e98ce4f 100644 --- a/src/Responses/V10/TypeRoundStatusLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfTypeRoundStatus.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class TypeRoundStatusLogic4ResponseList +class Logic4ResponseListOfTypeRoundStatus { /** * @param array<\Webparking\Logic4Client\Data\V10\TypeRoundStatus> $records diff --git a/src/Responses/V10/TypeTransactionCodeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfTypeTransactionCode.php similarity index 94% rename from src/Responses/V10/TypeTransactionCodeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfTypeTransactionCode.php index 0e2e26a..6d7ca9a 100644 --- a/src/Responses/V10/TypeTransactionCodeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfTypeTransactionCode.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class TypeTransactionCodeLogic4ResponseList +class Logic4ResponseListOfTypeTransactionCode { /** * @param array<\Webparking\Logic4Client\Data\V10\TypeTransactionCode> $records diff --git a/src/Responses/V10/UserstatusLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfUserstatus.php similarity index 95% rename from src/Responses/V10/UserstatusLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfUserstatus.php index bd7032b..2486742 100644 --- a/src/Responses/V10/UserstatusLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfUserstatus.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class UserstatusLogic4ResponseList +class Logic4ResponseListOfUserstatus { /** * @param array<\Webparking\Logic4Client\Data\V10\Userstatus> $records diff --git a/src/Responses/V10/ValuevsBudgetLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfValuevsBudget.php similarity index 95% rename from src/Responses/V10/ValuevsBudgetLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfValuevsBudget.php index 0451d23..ed36a12 100644 --- a/src/Responses/V10/ValuevsBudgetLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfValuevsBudget.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ValuevsBudgetLogic4ResponseList +class Logic4ResponseListOfValuevsBudget { /** * @param array<\Webparking\Logic4Client\Data\V10\ValuevsBudget> $records diff --git a/src/Responses/V10/VariantBalkCategoryLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfVariantBalkCategory.php similarity index 94% rename from src/Responses/V10/VariantBalkCategoryLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfVariantBalkCategory.php index 49f9ad0..880b4d0 100644 --- a/src/Responses/V10/VariantBalkCategoryLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfVariantBalkCategory.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class VariantBalkCategoryLogic4ResponseList +class Logic4ResponseListOfVariantBalkCategory { /** * @param array<\Webparking\Logic4Client\Data\V10\VariantBalkCategory> $records diff --git a/src/Responses/V10/VatCodeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfVatCode.php similarity index 95% rename from src/Responses/V10/VatCodeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfVatCode.php index 8415dfb..b5b69f0 100644 --- a/src/Responses/V10/VatCodeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfVatCode.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class VatCodeLogic4ResponseList +class Logic4ResponseListOfVatCode { /** * @param array<\Webparking\Logic4Client\Data\V10\VatCode> $records diff --git a/src/Responses/V10/VehicleLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfVehicle.php similarity index 95% rename from src/Responses/V10/VehicleLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfVehicle.php index 591c1bd..2f4413a 100644 --- a/src/Responses/V10/VehicleLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfVehicle.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class VehicleLogic4ResponseList +class Logic4ResponseListOfVehicle { /** * @param array<\Webparking\Logic4Client\Data\V10\Vehicle> $records diff --git a/src/Responses/V10/WareHouseLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfWareHouse.php similarity index 95% rename from src/Responses/V10/WareHouseLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfWareHouse.php index af87807..0789cd4 100644 --- a/src/Responses/V10/WareHouseLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfWareHouse.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class WareHouseLogic4ResponseList +class Logic4ResponseListOfWareHouse { /** * @param array<\Webparking\Logic4Client\Data\V10\WareHouse> $records diff --git a/src/Responses/V10/WarehouseStockLocationLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfWarehouseStockLocation.php similarity index 94% rename from src/Responses/V10/WarehouseStockLocationLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfWarehouseStockLocation.php index 5fa2550..d3e9cbb 100644 --- a/src/Responses/V10/WarehouseStockLocationLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfWarehouseStockLocation.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class WarehouseStockLocationLogic4ResponseList +class Logic4ResponseListOfWarehouseStockLocation { /** * @param array<\Webparking\Logic4Client\Data\V10\WarehouseStockLocation> $records diff --git a/src/Responses/V10/WarehouseZoneLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfWarehouseZone.php similarity index 95% rename from src/Responses/V10/WarehouseZoneLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfWarehouseZone.php index 456ae36..e43581f 100644 --- a/src/Responses/V10/WarehouseZoneLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfWarehouseZone.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class WarehouseZoneLogic4ResponseList +class Logic4ResponseListOfWarehouseZone { /** * @param array<\Webparking\Logic4Client\Data\V10\WarehouseZone> $records diff --git a/src/Responses/V10/WebshopOrderlistProductLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfWebshopOrderlistProduct.php similarity index 94% rename from src/Responses/V10/WebshopOrderlistProductLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfWebshopOrderlistProduct.php index 87a8e0b..72fc1f8 100644 --- a/src/Responses/V10/WebshopOrderlistProductLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfWebshopOrderlistProduct.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class WebshopOrderlistProductLogic4ResponseList +class Logic4ResponseListOfWebshopOrderlistProduct { /** * @param array<\Webparking\Logic4Client\Data\V10\WebshopOrderlistProduct> $records diff --git a/src/Responses/V10/WebshopSearchWordLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfWebshopSearchWord.php similarity index 95% rename from src/Responses/V10/WebshopSearchWordLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfWebshopSearchWord.php index 055b027..e163e23 100644 --- a/src/Responses/V10/WebshopSearchWordLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfWebshopSearchWord.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class WebshopSearchWordLogic4ResponseList +class Logic4ResponseListOfWebshopSearchWord { /** * @param array<\Webparking\Logic4Client\Data\V10\WebshopSearchWord> $records diff --git a/src/Responses/V10/Logic4ResponseListOfWebshopUserProductOfProductV11.php b/src/Responses/V10/Logic4ResponseListOfWebshopUserProductOfProductV11.php new file mode 100644 index 0000000..0b738a8 --- /dev/null +++ b/src/Responses/V10/Logic4ResponseListOfWebshopUserProductOfProductV11.php @@ -0,0 +1,29 @@ + $records + * @param array $validationMessages + */ + public function __construct( + public array $records, + public int $recordsCounter, + public array $validationMessages, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + records: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V10\WebshopUserProductOfProductV11::make($item), $data['Records'] ?? []), + recordsCounter: $data['RecordsCounter'] ?? 0, + validationMessages: $data['ValidationMessages'] ?? [], + ); + } +} diff --git a/src/Responses/V10/WebshopUserProductTypeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfWebshopUserProductType.php similarity index 94% rename from src/Responses/V10/WebshopUserProductTypeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfWebshopUserProductType.php index 8bb756b..913701b 100644 --- a/src/Responses/V10/WebshopUserProductTypeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfWebshopUserProductType.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class WebshopUserProductTypeLogic4ResponseList +class Logic4ResponseListOfWebshopUserProductType { /** * @param array<\Webparking\Logic4Client\Data\V10\WebshopUserProductType> $records diff --git a/src/Responses/V10/WebshopUserTypeLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfWebshopUserType.php similarity index 95% rename from src/Responses/V10/WebshopUserTypeLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfWebshopUserType.php index 991be9d..4d542f7 100644 --- a/src/Responses/V10/WebshopUserTypeLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfWebshopUserType.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class WebshopUserTypeLogic4ResponseList +class Logic4ResponseListOfWebshopUserType { /** * @param array<\Webparking\Logic4Client\Data\V10\WebshopUserType> $records diff --git a/src/Responses/V10/WebsiteDomainLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfWebsiteDomain.php similarity index 95% rename from src/Responses/V10/WebsiteDomainLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfWebsiteDomain.php index 6e32cf0..54fedd3 100644 --- a/src/Responses/V10/WebsiteDomainLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfWebsiteDomain.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class WebsiteDomainLogic4ResponseList +class Logic4ResponseListOfWebsiteDomain { /** * @param array<\Webparking\Logic4Client\Data\V10\WebsiteDomain> $records diff --git a/src/Responses/V10/WebsiteDomainsForProductLogic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfWebsiteDomainsForProduct.php similarity index 94% rename from src/Responses/V10/WebsiteDomainsForProductLogic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfWebsiteDomainsForProduct.php index 01e11d7..18937f8 100644 --- a/src/Responses/V10/WebsiteDomainsForProductLogic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfWebsiteDomainsForProduct.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class WebsiteDomainsForProductLogic4ResponseList +class Logic4ResponseListOfWebsiteDomainsForProduct { /** * @param array<\Webparking\Logic4Client\Data\V10\WebsiteDomainsForProduct> $records diff --git a/src/Responses/V10/Int32Logic4ResponseList.php b/src/Responses/V10/Logic4ResponseListOfint.php similarity index 95% rename from src/Responses/V10/Int32Logic4ResponseList.php rename to src/Responses/V10/Logic4ResponseListOfint.php index ca04420..278e5c1 100644 --- a/src/Responses/V10/Int32Logic4ResponseList.php +++ b/src/Responses/V10/Logic4ResponseListOfint.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class Int32Logic4ResponseList +class Logic4ResponseListOfint { /** * @param array $records diff --git a/src/Responses/V10/BuyOrderBaseInfoLogic4Response.php b/src/Responses/V10/Logic4ResponseOfBuyOrderBaseInfo.php similarity index 94% rename from src/Responses/V10/BuyOrderBaseInfoLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfBuyOrderBaseInfo.php index cb1c357..953b881 100644 --- a/src/Responses/V10/BuyOrderBaseInfoLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfBuyOrderBaseInfo.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class BuyOrderBaseInfoLogic4Response +class Logic4ResponseOfBuyOrderBaseInfo { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/BuyOrderDeliveryAndOrderMovementLogic4Response.php b/src/Responses/V10/Logic4ResponseOfBuyOrderDeliveryAndOrderMovement.php similarity index 92% rename from src/Responses/V10/BuyOrderDeliveryAndOrderMovementLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfBuyOrderDeliveryAndOrderMovement.php index 05e68fa..0921cf3 100644 --- a/src/Responses/V10/BuyOrderDeliveryAndOrderMovementLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfBuyOrderDeliveryAndOrderMovement.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class BuyOrderDeliveryAndOrderMovementLogic4Response +class Logic4ResponseOfBuyOrderDeliveryAndOrderMovement { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/CompanyInformationLogic4Response.php b/src/Responses/V10/Logic4ResponseOfCompanyInformation.php similarity index 93% rename from src/Responses/V10/CompanyInformationLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfCompanyInformation.php index 916e7d6..f31fa79 100644 --- a/src/Responses/V10/CompanyInformationLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfCompanyInformation.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class CompanyInformationLogic4Response +class Logic4ResponseOfCompanyInformation { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/CompanyValuesLogic4Response.php b/src/Responses/V10/Logic4ResponseOfCompanyValues.php similarity index 94% rename from src/Responses/V10/CompanyValuesLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfCompanyValues.php index fac70dd..0eb14f0 100644 --- a/src/Responses/V10/CompanyValuesLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfCompanyValues.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class CompanyValuesLogic4Response +class Logic4ResponseOfCompanyValues { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/DatabaseConfigurationLogic4Response.php b/src/Responses/V10/Logic4ResponseOfDatabaseConfiguration.php similarity index 93% rename from src/Responses/V10/DatabaseConfigurationLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfDatabaseConfiguration.php index 116a66b..01070ad 100644 --- a/src/Responses/V10/DatabaseConfigurationLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfDatabaseConfiguration.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class DatabaseConfigurationLogic4Response +class Logic4ResponseOfDatabaseConfiguration { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/Int32ProductBuyOrderDeliveryRowListDictionaryLogic4Response.php b/src/Responses/V10/Logic4ResponseOfDictionaryOfintAndListOfProductBuyOrderDeliveryRow.php similarity index 87% rename from src/Responses/V10/Int32ProductBuyOrderDeliveryRowListDictionaryLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfDictionaryOfintAndListOfProductBuyOrderDeliveryRow.php index 131a327..1c70974 100644 --- a/src/Responses/V10/Int32ProductBuyOrderDeliveryRowListDictionaryLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfDictionaryOfintAndListOfProductBuyOrderDeliveryRow.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class Int32ProductBuyOrderDeliveryRowListDictionaryLogic4Response +class Logic4ResponseOfDictionaryOfintAndListOfProductBuyOrderDeliveryRow { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/EmailUserLogic4Response.php b/src/Responses/V10/Logic4ResponseOfEmailUser.php similarity index 95% rename from src/Responses/V10/EmailUserLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfEmailUser.php index f9e3217..dc072f4 100644 --- a/src/Responses/V10/EmailUserLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfEmailUser.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class EmailUserLogic4Response +class Logic4ResponseOfEmailUser { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/HRMTimeRegistrationRowListLogic4Response.php b/src/Responses/V10/Logic4ResponseOfListOfHRMTimeRegistrationRow.php similarity index 93% rename from src/Responses/V10/HRMTimeRegistrationRowListLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfListOfHRMTimeRegistrationRow.php index 8c04260..086796a 100644 --- a/src/Responses/V10/HRMTimeRegistrationRowListLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfListOfHRMTimeRegistrationRow.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class HRMTimeRegistrationRowListLogic4Response +class Logic4ResponseOfListOfHRMTimeRegistrationRow { /** * @param array<\Webparking\Logic4Client\Data\V10\HRMTimeRegistrationRow> $value diff --git a/src/Responses/V10/OrderOpenPaymentLogic4Response.php b/src/Responses/V10/Logic4ResponseOfOrderOpenPayment.php similarity index 94% rename from src/Responses/V10/OrderOpenPaymentLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfOrderOpenPayment.php index d2cf8b2..d3efcf7 100644 --- a/src/Responses/V10/OrderOpenPaymentLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfOrderOpenPayment.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class OrderOpenPaymentLogic4Response +class Logic4ResponseOfOrderOpenPayment { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/OrderShipmentLogic4Response.php b/src/Responses/V10/Logic4ResponseOfOrderShipment.php similarity index 94% rename from src/Responses/V10/OrderShipmentLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfOrderShipment.php index 33f343e..7252a5a 100644 --- a/src/Responses/V10/OrderShipmentLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfOrderShipment.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class OrderShipmentLogic4Response +class Logic4ResponseOfOrderShipment { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/PickbonSoftBlockedLogic4Response.php b/src/Responses/V10/Logic4ResponseOfPickbonSoftBlocked.php similarity index 93% rename from src/Responses/V10/PickbonSoftBlockedLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfPickbonSoftBlocked.php index 522d155..c406b36 100644 --- a/src/Responses/V10/PickbonSoftBlockedLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfPickbonSoftBlocked.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class PickbonSoftBlockedLogic4Response +class Logic4ResponseOfPickbonSoftBlocked { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/ProductDimensionsLogic4Response.php b/src/Responses/V10/Logic4ResponseOfProductDimensions.php similarity index 94% rename from src/Responses/V10/ProductDimensionsLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfProductDimensions.php index 76c7b8d..382da8a 100644 --- a/src/Responses/V10/ProductDimensionsLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfProductDimensions.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductDimensionsLogic4Response +class Logic4ResponseOfProductDimensions { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/ProductPriceInformationLogic4Response.php b/src/Responses/V10/Logic4ResponseOfProductPriceInformation.php similarity index 93% rename from src/Responses/V10/ProductPriceInformationLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfProductPriceInformation.php index 21f8518..33c188f 100644 --- a/src/Responses/V10/ProductPriceInformationLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfProductPriceInformation.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductPriceInformationLogic4Response +class Logic4ResponseOfProductPriceInformation { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/ProductShippingInformationLogic4Response.php b/src/Responses/V10/Logic4ResponseOfProductShippingInformation.php similarity index 93% rename from src/Responses/V10/ProductShippingInformationLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfProductShippingInformation.php index 9a20e4d..6dc23a7 100644 --- a/src/Responses/V10/ProductShippingInformationLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfProductShippingInformation.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductShippingInformationLogic4Response +class Logic4ResponseOfProductShippingInformation { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/ProductStockControlHeadLogic4Response.php b/src/Responses/V10/Logic4ResponseOfProductStockControlHead.php similarity index 93% rename from src/Responses/V10/ProductStockControlHeadLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfProductStockControlHead.php index c592f01..a559a17 100644 --- a/src/Responses/V10/ProductStockControlHeadLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfProductStockControlHead.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductStockControlHeadLogic4Response +class Logic4ResponseOfProductStockControlHead { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/ProductStockInformationLogic4Response.php b/src/Responses/V10/Logic4ResponseOfProductStockInformation.php similarity index 93% rename from src/Responses/V10/ProductStockInformationLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfProductStockInformation.php index d90227b..230b3c1 100644 --- a/src/Responses/V10/ProductStockInformationLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfProductStockInformation.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class ProductStockInformationLogic4Response +class Logic4ResponseOfProductStockInformation { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/WebshopUserLogic4Response.php b/src/Responses/V10/Logic4ResponseOfWebshopUser.php similarity index 94% rename from src/Responses/V10/WebshopUserLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfWebshopUser.php index 649dfbd..2906bc6 100644 --- a/src/Responses/V10/WebshopUserLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfWebshopUser.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class WebshopUserLogic4Response +class Logic4ResponseOfWebshopUser { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/WebsiteDomainLogic4Response.php b/src/Responses/V10/Logic4ResponseOfWebsiteDomain.php similarity index 94% rename from src/Responses/V10/WebsiteDomainLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfWebsiteDomain.php index 2bbd805..de0786b 100644 --- a/src/Responses/V10/WebsiteDomainLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfWebsiteDomain.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class WebsiteDomainLogic4Response +class Logic4ResponseOfWebsiteDomain { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/BooleanLogic4Response.php b/src/Responses/V10/Logic4ResponseOfboolean.php similarity index 94% rename from src/Responses/V10/BooleanLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfboolean.php index a983e40..d213164 100644 --- a/src/Responses/V10/BooleanLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfboolean.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class BooleanLogic4Response +class Logic4ResponseOfboolean { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/DecimalLogic4Response.php b/src/Responses/V10/Logic4ResponseOfdecimal.php similarity index 94% rename from src/Responses/V10/DecimalLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfdecimal.php index 5a7d173..6123b0f 100644 --- a/src/Responses/V10/DecimalLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfdecimal.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class DecimalLogic4Response +class Logic4ResponseOfdecimal { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/Int32Logic4Response.php b/src/Responses/V10/Logic4ResponseOfint.php similarity index 95% rename from src/Responses/V10/Int32Logic4Response.php rename to src/Responses/V10/Logic4ResponseOfint.php index 34c5e65..ee80f6a 100644 --- a/src/Responses/V10/Int32Logic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfint.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class Int32Logic4Response +class Logic4ResponseOfint { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/StringLogic4Response.php b/src/Responses/V10/Logic4ResponseOfstring.php similarity index 94% rename from src/Responses/V10/StringLogic4Response.php rename to src/Responses/V10/Logic4ResponseOfstring.php index 0edb0bd..cf9ac17 100644 --- a/src/Responses/V10/StringLogic4Response.php +++ b/src/Responses/V10/Logic4ResponseOfstring.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V10; -class StringLogic4Response +class Logic4ResponseOfstring { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V10/ProductV11WebshopUserProductLogic4ResponseList.php b/src/Responses/V10/ProductV11WebshopUserProductLogic4ResponseList.php deleted file mode 100644 index 4464e63..0000000 --- a/src/Responses/V10/ProductV11WebshopUserProductLogic4ResponseList.php +++ /dev/null @@ -1,29 +0,0 @@ - $records - * @param array $validationMessages - */ - public function __construct( - public array $records, - public int $recordsCounter, - public array $validationMessages, - ) { - } - - /** @param array $data */ - public static function make(array $data): self - { - return new self( - records: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V10\ProductV11WebshopUserProduct::make($item), $data['Records'] ?? []), - recordsCounter: $data['RecordsCounter'] ?? 0, - validationMessages: $data['ValidationMessages'] ?? [], - ); - } -} diff --git a/src/Responses/V11/BasicProductDataLogic4ResponseList.php b/src/Responses/V11/Logic4ResponseListOfBasicProductData.php similarity index 95% rename from src/Responses/V11/BasicProductDataLogic4ResponseList.php rename to src/Responses/V11/Logic4ResponseListOfBasicProductData.php index 7573ee3..2f6ffda 100644 --- a/src/Responses/V11/BasicProductDataLogic4ResponseList.php +++ b/src/Responses/V11/Logic4ResponseListOfBasicProductData.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class BasicProductDataLogic4ResponseList +class Logic4ResponseListOfBasicProductData { /** * @param array<\Webparking\Logic4Client\Data\V11\BasicProductData> $records diff --git a/src/Responses/V11/BrandLogic4ResponseList.php b/src/Responses/V11/Logic4ResponseListOfBrand.php similarity index 96% rename from src/Responses/V11/BrandLogic4ResponseList.php rename to src/Responses/V11/Logic4ResponseListOfBrand.php index e0afae1..cd8e724 100644 --- a/src/Responses/V11/BrandLogic4ResponseList.php +++ b/src/Responses/V11/Logic4ResponseListOfBrand.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class BrandLogic4ResponseList +class Logic4ResponseListOfBrand { /** * @param array<\Webparking\Logic4Client\Data\V11\Brand> $records diff --git a/src/Responses/V11/GetProductImageLogic4ResponseList.php b/src/Responses/V11/Logic4ResponseListOfGetProductImage.php similarity index 95% rename from src/Responses/V11/GetProductImageLogic4ResponseList.php rename to src/Responses/V11/Logic4ResponseListOfGetProductImage.php index 18a3001..ffbf71d 100644 --- a/src/Responses/V11/GetProductImageLogic4ResponseList.php +++ b/src/Responses/V11/Logic4ResponseListOfGetProductImage.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class GetProductImageLogic4ResponseList +class Logic4ResponseListOfGetProductImage { /** * @param array<\Webparking\Logic4Client\Data\V11\GetProductImage> $records diff --git a/src/Responses/V11/OrderLogic4ResponseList.php b/src/Responses/V11/Logic4ResponseListOfOrder.php similarity index 96% rename from src/Responses/V11/OrderLogic4ResponseList.php rename to src/Responses/V11/Logic4ResponseListOfOrder.php index f196d8c..1a7db65 100644 --- a/src/Responses/V11/OrderLogic4ResponseList.php +++ b/src/Responses/V11/Logic4ResponseListOfOrder.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class OrderLogic4ResponseList +class Logic4ResponseListOfOrder { /** * @param array<\Webparking\Logic4Client\Data\V11\Order> $records diff --git a/src/Responses/V11/ProductAssemblyRecipeItemLogic4ResponseList.php b/src/Responses/V11/Logic4ResponseListOfProductAssemblyRecipeItem.php similarity index 94% rename from src/Responses/V11/ProductAssemblyRecipeItemLogic4ResponseList.php rename to src/Responses/V11/Logic4ResponseListOfProductAssemblyRecipeItem.php index 10cc447..cb939f8 100644 --- a/src/Responses/V11/ProductAssemblyRecipeItemLogic4ResponseList.php +++ b/src/Responses/V11/Logic4ResponseListOfProductAssemblyRecipeItem.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class ProductAssemblyRecipeItemLogic4ResponseList +class Logic4ResponseListOfProductAssemblyRecipeItem { /** * @param array<\Webparking\Logic4Client\Data\V11\ProductAssemblyRecipeItem> $records diff --git a/src/Responses/V11/ProductBarcodeLogic4ResponseList.php b/src/Responses/V11/Logic4ResponseListOfProductBarcode.php similarity index 95% rename from src/Responses/V11/ProductBarcodeLogic4ResponseList.php rename to src/Responses/V11/Logic4ResponseListOfProductBarcode.php index 53e03e8..436085f 100644 --- a/src/Responses/V11/ProductBarcodeLogic4ResponseList.php +++ b/src/Responses/V11/Logic4ResponseListOfProductBarcode.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class ProductBarcodeLogic4ResponseList +class Logic4ResponseListOfProductBarcode { /** * @param array<\Webparking\Logic4Client\Data\V11\ProductBarcode> $records diff --git a/src/Responses/V11/ProductCompositionItemLogic4ResponseList.php b/src/Responses/V11/Logic4ResponseListOfProductCompositionItem.php similarity index 94% rename from src/Responses/V11/ProductCompositionItemLogic4ResponseList.php rename to src/Responses/V11/Logic4ResponseListOfProductCompositionItem.php index d8cebec..c211486 100644 --- a/src/Responses/V11/ProductCompositionItemLogic4ResponseList.php +++ b/src/Responses/V11/Logic4ResponseListOfProductCompositionItem.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class ProductCompositionItemLogic4ResponseList +class Logic4ResponseListOfProductCompositionItem { /** * @param array<\Webparking\Logic4Client\Data\V11\ProductCompositionItem> $records diff --git a/src/Responses/V11/ProductPickLocationBasedOnSystemSettingsLogic4ResponseList.php b/src/Responses/V11/Logic4ResponseListOfProductPickLocationBasedOnSystemSettings.php similarity index 93% rename from src/Responses/V11/ProductPickLocationBasedOnSystemSettingsLogic4ResponseList.php rename to src/Responses/V11/Logic4ResponseListOfProductPickLocationBasedOnSystemSettings.php index b1be95e..d6b951d 100644 --- a/src/Responses/V11/ProductPickLocationBasedOnSystemSettingsLogic4ResponseList.php +++ b/src/Responses/V11/Logic4ResponseListOfProductPickLocationBasedOnSystemSettings.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class ProductPickLocationBasedOnSystemSettingsLogic4ResponseList +class Logic4ResponseListOfProductPickLocationBasedOnSystemSettings { /** * @param array<\Webparking\Logic4Client\Data\V11\ProductPickLocationBasedOnSystemSettings> $records diff --git a/src/Responses/V11/ProductPricelistLogic4ResponseList.php b/src/Responses/V11/Logic4ResponseListOfProductPricelist.php similarity index 95% rename from src/Responses/V11/ProductPricelistLogic4ResponseList.php rename to src/Responses/V11/Logic4ResponseListOfProductPricelist.php index d8375b5..a5e2fd7 100644 --- a/src/Responses/V11/ProductPricelistLogic4ResponseList.php +++ b/src/Responses/V11/Logic4ResponseListOfProductPricelist.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class ProductPricelistLogic4ResponseList +class Logic4ResponseListOfProductPricelist { /** * @param array<\Webparking\Logic4Client\Data\V11\ProductPricelist> $records diff --git a/src/Responses/V11/ProductReviewLogic4ResponseList.php b/src/Responses/V11/Logic4ResponseListOfProductReview.php similarity index 95% rename from src/Responses/V11/ProductReviewLogic4ResponseList.php rename to src/Responses/V11/Logic4ResponseListOfProductReview.php index 05b47d3..e395344 100644 --- a/src/Responses/V11/ProductReviewLogic4ResponseList.php +++ b/src/Responses/V11/Logic4ResponseListOfProductReview.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class ProductReviewLogic4ResponseList +class Logic4ResponseListOfProductReview { /** * @param array<\Webparking\Logic4Client\Data\V11\ProductReview> $records diff --git a/src/Responses/V11/ProductSEOInformationLogic4ResponseList.php b/src/Responses/V11/Logic4ResponseListOfProductSEOInformation.php similarity index 94% rename from src/Responses/V11/ProductSEOInformationLogic4ResponseList.php rename to src/Responses/V11/Logic4ResponseListOfProductSEOInformation.php index 4bb1e87..d460d51 100644 --- a/src/Responses/V11/ProductSEOInformationLogic4ResponseList.php +++ b/src/Responses/V11/Logic4ResponseListOfProductSEOInformation.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class ProductSEOInformationLogic4ResponseList +class Logic4ResponseListOfProductSEOInformation { /** * @param array<\Webparking\Logic4Client\Data\V11\ProductSEOInformation> $records diff --git a/src/Responses/V11/ProductStatusLogic4ResponseList.php b/src/Responses/V11/Logic4ResponseListOfProductStatus.php similarity index 95% rename from src/Responses/V11/ProductStatusLogic4ResponseList.php rename to src/Responses/V11/Logic4ResponseListOfProductStatus.php index b0e39de..31381f5 100644 --- a/src/Responses/V11/ProductStatusLogic4ResponseList.php +++ b/src/Responses/V11/Logic4ResponseListOfProductStatus.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class ProductStatusLogic4ResponseList +class Logic4ResponseListOfProductStatus { /** * @param array<\Webparking\Logic4Client\Data\V11\ProductStatus> $records diff --git a/src/Responses/V11/ProductStockMutationTypeV11Logic4ResponseList.php b/src/Responses/V11/Logic4ResponseListOfProductStockMutationTypeV11.php similarity index 94% rename from src/Responses/V11/ProductStockMutationTypeV11Logic4ResponseList.php rename to src/Responses/V11/Logic4ResponseListOfProductStockMutationTypeV11.php index c0ac287..e23b3e5 100644 --- a/src/Responses/V11/ProductStockMutationTypeV11Logic4ResponseList.php +++ b/src/Responses/V11/Logic4ResponseListOfProductStockMutationTypeV11.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class ProductStockMutationTypeV11Logic4ResponseList +class Logic4ResponseListOfProductStockMutationTypeV11 { /** * @param array<\Webparking\Logic4Client\Data\V11\ProductStockMutationTypeV11> $records diff --git a/src/Responses/V11/ProductSupplierLogic4ResponseList.php b/src/Responses/V11/Logic4ResponseListOfProductSupplier.php similarity index 95% rename from src/Responses/V11/ProductSupplierLogic4ResponseList.php rename to src/Responses/V11/Logic4ResponseListOfProductSupplier.php index 6b35d8d..b7fb458 100644 --- a/src/Responses/V11/ProductSupplierLogic4ResponseList.php +++ b/src/Responses/V11/Logic4ResponseListOfProductSupplier.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class ProductSupplierLogic4ResponseList +class Logic4ResponseListOfProductSupplier { /** * @param array<\Webparking\Logic4Client\Data\V11\ProductSupplier> $records diff --git a/src/Responses/V11/ProductUnitLogic4ResponseList.php b/src/Responses/V11/Logic4ResponseListOfProductUnit.php similarity index 95% rename from src/Responses/V11/ProductUnitLogic4ResponseList.php rename to src/Responses/V11/Logic4ResponseListOfProductUnit.php index c044507..d8bf1de 100644 --- a/src/Responses/V11/ProductUnitLogic4ResponseList.php +++ b/src/Responses/V11/Logic4ResponseListOfProductUnit.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class ProductUnitLogic4ResponseList +class Logic4ResponseListOfProductUnit { /** * @param array<\Webparking\Logic4Client\Data\V11\ProductUnit> $records diff --git a/src/Responses/V11/Logic4ResponseListOfWebshopUserProductOfProductV12.php b/src/Responses/V11/Logic4ResponseListOfWebshopUserProductOfProductV12.php new file mode 100644 index 0000000..b1a9c86 --- /dev/null +++ b/src/Responses/V11/Logic4ResponseListOfWebshopUserProductOfProductV12.php @@ -0,0 +1,29 @@ + $records + * @param array $validationMessages + */ + public function __construct( + public array $records, + public int $recordsCounter, + public array $validationMessages, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + records: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V11\WebshopUserProductOfProductV12::make($item), $data['Records'] ?? []), + recordsCounter: $data['RecordsCounter'] ?? 0, + validationMessages: $data['ValidationMessages'] ?? [], + ); + } +} diff --git a/src/Responses/V11/Int32Logic4ResponseList.php b/src/Responses/V11/Logic4ResponseListOfint.php similarity index 95% rename from src/Responses/V11/Int32Logic4ResponseList.php rename to src/Responses/V11/Logic4ResponseListOfint.php index 8347c68..25aec01 100644 --- a/src/Responses/V11/Int32Logic4ResponseList.php +++ b/src/Responses/V11/Logic4ResponseListOfint.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class Int32Logic4ResponseList +class Logic4ResponseListOfint { /** * @param array $records diff --git a/src/Responses/V11/BuyOrderDeliveryAndOrderMovementLogic4Response.php b/src/Responses/V11/Logic4ResponseOfBuyOrderDeliveryAndOrderMovement.php similarity index 92% rename from src/Responses/V11/BuyOrderDeliveryAndOrderMovementLogic4Response.php rename to src/Responses/V11/Logic4ResponseOfBuyOrderDeliveryAndOrderMovement.php index a9230ec..13e750e 100644 --- a/src/Responses/V11/BuyOrderDeliveryAndOrderMovementLogic4Response.php +++ b/src/Responses/V11/Logic4ResponseOfBuyOrderDeliveryAndOrderMovement.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class BuyOrderDeliveryAndOrderMovementLogic4Response +class Logic4ResponseOfBuyOrderDeliveryAndOrderMovement { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V11/ProductPriceInformationLogic4Response.php b/src/Responses/V11/Logic4ResponseOfProductPriceInformation.php similarity index 93% rename from src/Responses/V11/ProductPriceInformationLogic4Response.php rename to src/Responses/V11/Logic4ResponseOfProductPriceInformation.php index 9720722..641b8c8 100644 --- a/src/Responses/V11/ProductPriceInformationLogic4Response.php +++ b/src/Responses/V11/Logic4ResponseOfProductPriceInformation.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class ProductPriceInformationLogic4Response +class Logic4ResponseOfProductPriceInformation { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V11/BooleanLogic4Response.php b/src/Responses/V11/Logic4ResponseOfboolean.php similarity index 94% rename from src/Responses/V11/BooleanLogic4Response.php rename to src/Responses/V11/Logic4ResponseOfboolean.php index 78dd3a8..ee3fbc0 100644 --- a/src/Responses/V11/BooleanLogic4Response.php +++ b/src/Responses/V11/Logic4ResponseOfboolean.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class BooleanLogic4Response +class Logic4ResponseOfboolean { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V11/Int32Logic4Response.php b/src/Responses/V11/Logic4ResponseOfint.php similarity index 95% rename from src/Responses/V11/Int32Logic4Response.php rename to src/Responses/V11/Logic4ResponseOfint.php index 151f213..6bd2f5a 100644 --- a/src/Responses/V11/Int32Logic4Response.php +++ b/src/Responses/V11/Logic4ResponseOfint.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class Int32Logic4Response +class Logic4ResponseOfint { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V11/StringLogic4Response.php b/src/Responses/V11/Logic4ResponseOfstring.php similarity index 94% rename from src/Responses/V11/StringLogic4Response.php rename to src/Responses/V11/Logic4ResponseOfstring.php index 4c558c0..afc3c4b 100644 --- a/src/Responses/V11/StringLogic4Response.php +++ b/src/Responses/V11/Logic4ResponseOfstring.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V11; -class StringLogic4Response +class Logic4ResponseOfstring { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V11/ProductV12WebshopUserProductLogic4ResponseList.php b/src/Responses/V11/ProductV12WebshopUserProductLogic4ResponseList.php deleted file mode 100644 index 0e3a72a..0000000 --- a/src/Responses/V11/ProductV12WebshopUserProductLogic4ResponseList.php +++ /dev/null @@ -1,29 +0,0 @@ - $records - * @param array $validationMessages - */ - public function __construct( - public array $records, - public int $recordsCounter, - public array $validationMessages, - ) { - } - - /** @param array $data */ - public static function make(array $data): self - { - return new self( - records: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V11\ProductV12WebshopUserProduct::make($item), $data['Records'] ?? []), - recordsCounter: $data['RecordsCounter'] ?? 0, - validationMessages: $data['ValidationMessages'] ?? [], - ); - } -} diff --git a/src/Responses/V12/ProductExtraBarcodeTypeLogic4ResponseList.php b/src/Responses/V12/Logic4ResponseListOfProductExtraBarcodeType.php similarity index 94% rename from src/Responses/V12/ProductExtraBarcodeTypeLogic4ResponseList.php rename to src/Responses/V12/Logic4ResponseListOfProductExtraBarcodeType.php index 925f7a8..0b81046 100644 --- a/src/Responses/V12/ProductExtraBarcodeTypeLogic4ResponseList.php +++ b/src/Responses/V12/Logic4ResponseListOfProductExtraBarcodeType.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V12; -class ProductExtraBarcodeTypeLogic4ResponseList +class Logic4ResponseListOfProductExtraBarcodeType { /** * @param array<\Webparking\Logic4Client\Data\V12\ProductExtraBarcodeType> $records diff --git a/src/Responses/V12/BooleanLogic4Response.php b/src/Responses/V12/Logic4ResponseOfboolean.php similarity index 94% rename from src/Responses/V12/BooleanLogic4Response.php rename to src/Responses/V12/Logic4ResponseOfboolean.php index 41bbac2..ffa70a8 100644 --- a/src/Responses/V12/BooleanLogic4Response.php +++ b/src/Responses/V12/Logic4ResponseOfboolean.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V12; -class BooleanLogic4Response +class Logic4ResponseOfboolean { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V12/Int32Logic4Response.php b/src/Responses/V12/Logic4ResponseOfint.php similarity index 95% rename from src/Responses/V12/Int32Logic4Response.php rename to src/Responses/V12/Logic4ResponseOfint.php index 12dc89a..c7e3c5e 100644 --- a/src/Responses/V12/Int32Logic4Response.php +++ b/src/Responses/V12/Logic4ResponseOfint.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V12; -class Int32Logic4Response +class Logic4ResponseOfint { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V13/BooleanLogic4Response.php b/src/Responses/V13/Logic4ResponseOfboolean.php similarity index 94% rename from src/Responses/V13/BooleanLogic4Response.php rename to src/Responses/V13/Logic4ResponseOfboolean.php index 791aa56..4dffcb8 100644 --- a/src/Responses/V13/BooleanLogic4Response.php +++ b/src/Responses/V13/Logic4ResponseOfboolean.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V13; -class BooleanLogic4Response +class Logic4ResponseOfboolean { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V13/Int32Logic4Response.php b/src/Responses/V13/Logic4ResponseOfint.php similarity index 95% rename from src/Responses/V13/Int32Logic4Response.php rename to src/Responses/V13/Logic4ResponseOfint.php index fe1d966..721aafe 100644 --- a/src/Responses/V13/Int32Logic4Response.php +++ b/src/Responses/V13/Logic4ResponseOfint.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V13; -class Int32Logic4Response +class Logic4ResponseOfint { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V20/ProductDimensionsLogic4ResponseList.php b/src/Responses/V20/Logic4ResponseListOfProductDimensions.php similarity index 95% rename from src/Responses/V20/ProductDimensionsLogic4ResponseList.php rename to src/Responses/V20/Logic4ResponseListOfProductDimensions.php index ee6d305..51be556 100644 --- a/src/Responses/V20/ProductDimensionsLogic4ResponseList.php +++ b/src/Responses/V20/Logic4ResponseListOfProductDimensions.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V20; -class ProductDimensionsLogic4ResponseList +class Logic4ResponseListOfProductDimensions { /** * @param array<\Webparking\Logic4Client\Data\V20\ProductDimensions> $records diff --git a/src/Responses/V20/ProductImageV2Logic4ResponseList.php b/src/Responses/V20/Logic4ResponseListOfProductImageV2.php similarity index 95% rename from src/Responses/V20/ProductImageV2Logic4ResponseList.php rename to src/Responses/V20/Logic4ResponseListOfProductImageV2.php index 09acb29..3fccd28 100644 --- a/src/Responses/V20/ProductImageV2Logic4ResponseList.php +++ b/src/Responses/V20/Logic4ResponseListOfProductImageV2.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V20; -class ProductImageV2Logic4ResponseList +class Logic4ResponseListOfProductImageV2 { /** * @param array<\Webparking\Logic4Client\Data\V20\ProductImageV2> $records diff --git a/src/Responses/V20/ProductStockInformationV2Logic4ResponseList.php b/src/Responses/V20/Logic4ResponseListOfProductStockInformationV2.php similarity index 94% rename from src/Responses/V20/ProductStockInformationV2Logic4ResponseList.php rename to src/Responses/V20/Logic4ResponseListOfProductStockInformationV2.php index e79963f..6b690fa 100644 --- a/src/Responses/V20/ProductStockInformationV2Logic4ResponseList.php +++ b/src/Responses/V20/Logic4ResponseListOfProductStockInformationV2.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V20; -class ProductStockInformationV2Logic4ResponseList +class Logic4ResponseListOfProductStockInformationV2 { /** * @param array<\Webparking\Logic4Client\Data\V20\ProductStockInformationV2> $records diff --git a/src/Responses/V20/ProductTemplatesWithTranslationLogic4Response.php b/src/Responses/V20/Logic4ResponseOfProductTemplatesWithTranslation.php similarity index 92% rename from src/Responses/V20/ProductTemplatesWithTranslationLogic4Response.php rename to src/Responses/V20/Logic4ResponseOfProductTemplatesWithTranslation.php index fa59074..de4330a 100644 --- a/src/Responses/V20/ProductTemplatesWithTranslationLogic4Response.php +++ b/src/Responses/V20/Logic4ResponseOfProductTemplatesWithTranslation.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V20; -class ProductTemplatesWithTranslationLogic4Response +class Logic4ResponseOfProductTemplatesWithTranslation { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V20/Int32Logic4Response.php b/src/Responses/V20/Logic4ResponseOfint.php similarity index 95% rename from src/Responses/V20/Int32Logic4Response.php rename to src/Responses/V20/Logic4ResponseOfint.php index 8af3954..6753dbf 100644 --- a/src/Responses/V20/Int32Logic4Response.php +++ b/src/Responses/V20/Logic4ResponseOfint.php @@ -4,7 +4,7 @@ namespace Webparking\Logic4Client\Responses\V20; -class Int32Logic4Response +class Logic4ResponseOfint { /** @param array $validationMessages */ public function __construct( diff --git a/src/Responses/V30/AddressType.php b/src/Responses/V30/AddressType.php new file mode 100644 index 0000000..e754a0d --- /dev/null +++ b/src/Responses/V30/AddressType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/Administration.php b/src/Responses/V30/Administration.php new file mode 100644 index 0000000..7ccadcf --- /dev/null +++ b/src/Responses/V30/Administration.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Responses/V30/Agenda.php b/src/Responses/V30/Agenda.php new file mode 100644 index 0000000..6e3b883 --- /dev/null +++ b/src/Responses/V30/Agenda.php @@ -0,0 +1,33 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + visible: $data['Visible'] ?? false, + sortId: $data['SortId'] ?? 0, + syncWithGoogle: $data['SyncWithGoogle'] ?? false, + googleUsername: $data['GoogleUsername'] ?? null, + googleLastSyncDateTime: isset($data['GoogleLastSyncDateTime']) ? \Carbon\Carbon::parse($data['GoogleLastSyncDateTime']) : null, + ); + } +} diff --git a/src/Responses/V30/ApiUser.php b/src/Responses/V30/ApiUser.php new file mode 100644 index 0000000..06d2457 --- /dev/null +++ b/src/Responses/V30/ApiUser.php @@ -0,0 +1,27 @@ + $data */ + public static function make(array $data): self + { + return new self( + fullName: $data['FullName'] ?? null, + userId: $data['UserId'] ?? 0, + username: $data['Username'] ?? null, + employeeNumber: $data['EmployeeNumber'] ?? null, + ); + } +} diff --git a/src/Responses/V30/Appointment.php b/src/Responses/V30/Appointment.php new file mode 100644 index 0000000..fea1365 --- /dev/null +++ b/src/Responses/V30/Appointment.php @@ -0,0 +1,51 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + debtorId: $data['DebtorId'] ?? null, + creditorId: $data['CreditorId'] ?? null, + contactId: $data['ContactId'] ?? null, + startDateTime: isset($data['StartDateTime']) ? \Carbon\Carbon::parse($data['StartDateTime']) : null, + endDateTime: isset($data['EndDateTime']) ? \Carbon\Carbon::parse($data['EndDateTime']) : null, + allDayEvent: $data['AllDayEvent'] ?? false, + location: $data['Location'] ?? null, + agendaId: $data['AgendaId'] ?? 0, + taskForUserId: $data['TaskForUserId'] ?? null, + ITSIssueId: $data['ITS_IssueId'] ?? null, + orderId: $data['OrderId'] ?? null, + CRMProjectId: $data['CRM_ProjectId'] ?? null, + plannedDeliveryId: $data['PlannedDeliveryId'] ?? null, + subject: $data['Subject'] ?? null, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Responses/V30/AssemblyAction.php b/src/Responses/V30/AssemblyAction.php new file mode 100644 index 0000000..71e45db --- /dev/null +++ b/src/Responses/V30/AssemblyAction.php @@ -0,0 +1,39 @@ + $data */ + public static function make(array $data): self + { + return new self( + dateTime: isset($data['DateTime']) ? \Carbon\Carbon::parse($data['DateTime']) : null, + orderId: $data['OrderId'] ?? null, + orderRowId: $data['OrderRowId'] ?? null, + userId: $data['UserId'] ?? 0, + productCode: $data['ProductCode'] ?? null, + amount: $data['Amount'] ?? null, + stockLocationId: $data['StockLocationId'] ?? null, + description: $data['Description'] ?? null, + typeId: $data['TypeId'] ?? 0, + typeDescription: $data['TypeDescription'] ?? null, + ); + } +} diff --git a/src/Responses/V30/BasicProductData.php b/src/Responses/V30/BasicProductData.php new file mode 100644 index 0000000..f752be0 --- /dev/null +++ b/src/Responses/V30/BasicProductData.php @@ -0,0 +1,37 @@ + $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + vendorCode: $data['VendorCode'] ?? null, + productCode: $data['ProductCode'] ?? null, + description1: $data['Description1'] ?? null, + description2: $data['Description2'] ?? null, + pictureName: $data['PictureName'] ?? null, + domain: $data['Domain'] ?? null, + defaultPickStockLocationId: $data['DefaultPickStockLocationId'] ?? null, + statusName: $data['StatusName'] ?? null, + ); + } +} diff --git a/src/Responses/V30/Branch.php b/src/Responses/V30/Branch.php new file mode 100644 index 0000000..fd8cc9f --- /dev/null +++ b/src/Responses/V30/Branch.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/Brand.php b/src/Responses/V30/Brand.php new file mode 100644 index 0000000..0aa2e47 --- /dev/null +++ b/src/Responses/V30/Brand.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + visibleOnWebsite: $data['VisibleOnWebsite'] ?? false, + ); + } +} diff --git a/src/Responses/V30/BundleDiscount.php b/src/Responses/V30/BundleDiscount.php new file mode 100644 index 0000000..0df2561 --- /dev/null +++ b/src/Responses/V30/BundleDiscount.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + productCount: $data['ProductCount'] ?? 0, + discountPercent: $data['DiscountPercent'] ?? 0.0, + ); + } +} diff --git a/src/Responses/V30/BundleGroupForChild.php b/src/Responses/V30/BundleGroupForChild.php new file mode 100644 index 0000000..87b9f7e --- /dev/null +++ b/src/Responses/V30/BundleGroupForChild.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + bundleGroupId: $data['BundleGroupId'] ?? 0, + parentProductId: $data['ParentProductId'] ?? 0, + ); + } +} diff --git a/src/Responses/V30/BundleGroupsForParent.php b/src/Responses/V30/BundleGroupsForParent.php new file mode 100644 index 0000000..fc1b5b4 --- /dev/null +++ b/src/Responses/V30/BundleGroupsForParent.php @@ -0,0 +1,24 @@ + $bundleGroups */ + public function __construct( + public int $parentProductId, + public ?array $bundleGroups, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + parentProductId: $data['ParentProductId'] ?? 0, + bundleGroups: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\BundleGroup::make($item), $data['BundleGroups'] ?? []), + ); + } +} diff --git a/src/Responses/V30/BuyOrderBaseInfo.php b/src/Responses/V30/BuyOrderBaseInfo.php new file mode 100644 index 0000000..4ed3249 --- /dev/null +++ b/src/Responses/V30/BuyOrderBaseInfo.php @@ -0,0 +1,45 @@ + $data */ + public static function make(array $data): self + { + return new self( + amountOfRows: $data['AmountOfRows'] ?? 0, + branchId: $data['BranchId'] ?? null, + buyOrderClosed: $data['BuyOrderClosed'] ?? false, + createdAt: isset($data['CreatedAt']) ? \Carbon\Carbon::parse($data['CreatedAt']) : null, + creditorCompanyName: $data['CreditorCompanyName'] ?? null, + creditorId: $data['CreditorId'] ?? 0, + databaseAdministrationId: $data['DatabaseAdministrationId'] ?? 0, + id: $data['Id'] ?? 0, + orderId: $data['OrderId'] ?? null, + remarks: $data['Remarks'] ?? null, + freeValue1: $data['FreeValue1'] ?? null, + freeValue2: $data['FreeValue2'] ?? null, + freeValue3: $data['FreeValue3'] ?? null, + ); + } +} diff --git a/src/Responses/V30/BuyOrderDeliveryAndOrderMovement.php b/src/Responses/V30/BuyOrderDeliveryAndOrderMovement.php new file mode 100644 index 0000000..2163cc0 --- /dev/null +++ b/src/Responses/V30/BuyOrderDeliveryAndOrderMovement.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + buyOrderDeliveryId: $data['BuyOrderDeliveryId'] ?? 0, + orderMovementId: $data['OrderMovementId'] ?? 0, + ); + } +} diff --git a/src/Responses/V30/BuyOrderDeliveryRead.php b/src/Responses/V30/BuyOrderDeliveryRead.php new file mode 100644 index 0000000..de46b25 --- /dev/null +++ b/src/Responses/V30/BuyOrderDeliveryRead.php @@ -0,0 +1,44 @@ + $rows */ + public function __construct( + public int $buyOrderDeliveryId, + public ?\Carbon\Carbon $dateTimeCreated, + public ?\Carbon\Carbon $dateTimeProcessed, + public int $statusId, + public int $typeId, + public ?int $supplierId, + public ?int $buyOrderId, + public ?string $remarks, + public ?string $description, + public ?int $branchId, + public ?array $rows, + public ?string $pickingListNumber, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + buyOrderDeliveryId: $data['BuyOrderDeliveryId'] ?? 0, + dateTimeCreated: isset($data['DateTimeCreated']) ? \Carbon\Carbon::parse($data['DateTimeCreated']) : null, + dateTimeProcessed: isset($data['DateTimeProcessed']) ? \Carbon\Carbon::parse($data['DateTimeProcessed']) : null, + statusId: $data['StatusId'] ?? 0, + typeId: $data['TypeId'] ?? 0, + supplierId: $data['SupplierId'] ?? null, + buyOrderId: $data['BuyOrderId'] ?? null, + remarks: $data['Remarks'] ?? null, + description: $data['Description'] ?? null, + branchId: $data['BranchId'] ?? null, + rows: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\BuyOrderDeliveryRowRead::make($item), $data['Rows'] ?? []), + pickingListNumber: $data['PickingListNumber'] ?? null, + ); + } +} diff --git a/src/Responses/V30/BuyOrderDeliveryStatusValue.php b/src/Responses/V30/BuyOrderDeliveryStatusValue.php new file mode 100644 index 0000000..d05f999 --- /dev/null +++ b/src/Responses/V30/BuyOrderDeliveryStatusValue.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/BuyOrderDeliveryTypeValue.php b/src/Responses/V30/BuyOrderDeliveryTypeValue.php new file mode 100644 index 0000000..4ea7747 --- /dev/null +++ b/src/Responses/V30/BuyOrderDeliveryTypeValue.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/BuyOrderGetInfo.php b/src/Responses/V30/BuyOrderGetInfo.php new file mode 100644 index 0000000..54ec843 --- /dev/null +++ b/src/Responses/V30/BuyOrderGetInfo.php @@ -0,0 +1,47 @@ + $data */ + public static function make(array $data): self + { + return new self( + lastChangedAt: isset($data['LastChangedAt']) ? \Carbon\Carbon::parse($data['LastChangedAt']) : null, + amountOfRows: $data['AmountOfRows'] ?? 0, + branchId: $data['BranchId'] ?? null, + buyOrderClosed: $data['BuyOrderClosed'] ?? false, + createdAt: isset($data['CreatedAt']) ? \Carbon\Carbon::parse($data['CreatedAt']) : null, + creditorCompanyName: $data['CreditorCompanyName'] ?? null, + creditorId: $data['CreditorId'] ?? 0, + databaseAdministrationId: $data['DatabaseAdministrationId'] ?? 0, + id: $data['Id'] ?? 0, + orderId: $data['OrderId'] ?? null, + remarks: $data['Remarks'] ?? null, + freeValue1: $data['FreeValue1'] ?? null, + freeValue2: $data['FreeValue2'] ?? null, + freeValue3: $data['FreeValue3'] ?? null, + ); + } +} diff --git a/src/Responses/V30/BuyOrderRow.php b/src/Responses/V30/BuyOrderRow.php new file mode 100644 index 0000000..a02d289 --- /dev/null +++ b/src/Responses/V30/BuyOrderRow.php @@ -0,0 +1,59 @@ + $data */ + public static function make(array $data): self + { + return new self( + buyOrderRowId: $data['BuyOrderRowId'] ?? 0, + buyOrderId: $data['BuyOrderId'] ?? 0, + debtorName: $data['DebtorName'] ?? null, + qtyToDeliver: $data['QtyToDeliver'] ?? 0.0, + creditorProductCode: $data['CreditorProductCode'] ?? null, + productDesc1: $data['ProductDesc1'] ?? null, + standardAmountQTY: $data['StandardAmountQTY'] ?? null, + standardAmountQTYUnitId: $data['StandardAmountQTYUnitId'] ?? null, + repackingQty: $data['RepackingQty'] ?? null, + orderId: $data['OrderId'] ?? null, + productCode: $data['ProductCode'] ?? null, + productId: $data['ProductId'] ?? null, + price: $data['Price'] ?? 0.0, + description: $data['Description'] ?? null, + productDesc2: $data['ProductDesc2'] ?? null, + expectedDeliveryDate: isset($data['ExpectedDeliveryDate']) ? \Carbon\Carbon::parse($data['ExpectedDeliveryDate']) : null, + qtyToOrder: $data['QtyToOrder'] ?? 0.0, + orderedOnDateByDistributor: isset($data['OrderedOnDateByDistributor']) ? \Carbon\Carbon::parse($data['OrderedOnDateByDistributor']) : null, + orderRowId: $data['OrderRowId'] ?? null, + internalNote: $data['InternalNote'] ?? null, + ); + } +} diff --git a/src/Responses/V30/CRMActivity.php b/src/Responses/V30/CRMActivity.php new file mode 100644 index 0000000..0e68ccb --- /dev/null +++ b/src/Responses/V30/CRMActivity.php @@ -0,0 +1,53 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['id'] ?? 0, + name: $data['Name'] ?? null, + createdOnDateTime: isset($data['CreatedOnDateTime']) ? \Carbon\Carbon::parse($data['CreatedOnDateTime']) : null, + dateTimeStart: isset($data['DateTimeStart']) ? \Carbon\Carbon::parse($data['DateTimeStart']) : null, + dateTimeEnd: isset($data['DateTimeEnd']) ? \Carbon\Carbon::parse($data['DateTimeEnd']) : null, + createdByUserId: $data['CreatedByUserId'] ?? 0, + notes: $data['Notes'] ?? null, + status: isset($data['Status']) ? \Webparking\Logic4Client\Data\V30\CRMActivityStatus::make($data['Status']) : null, + type: isset($data['Type']) ? \Webparking\Logic4Client\Data\V30\CRMActivityType::make($data['Type']) : null, + completedOnDateTime: isset($data['CompletedOnDateTime']) ? \Carbon\Carbon::parse($data['CompletedOnDateTime']) : null, + CRMProjectId: $data['CRMProjectId'] ?? 0, + CRMProjectName: $data['CRMProjectName'] ?? null, + debtorContactId: $data['DebtorContactId'] ?? null, + debtorContactFullName: $data['DebtorContactFullName'] ?? null, + debtorId: $data['DebtorId'] ?? null, + carriedOutByUserId: $data['CarriedOutByUserId'] ?? null, + carriedOutByUserName: $data['CarriedOutByUserName'] ?? null, + ); + } +} diff --git a/src/Responses/V30/CRMActivityStatus.php b/src/Responses/V30/CRMActivityStatus.php new file mode 100644 index 0000000..fe35b0d --- /dev/null +++ b/src/Responses/V30/CRMActivityStatus.php @@ -0,0 +1,27 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + sorting: $data['Sorting'] ?? 0, + isCompleted: $data['IsCompleted'] ?? false, + ); + } +} diff --git a/src/Responses/V30/CRMActivityType.php b/src/Responses/V30/CRMActivityType.php new file mode 100644 index 0000000..5e9235e --- /dev/null +++ b/src/Responses/V30/CRMActivityType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Responses/V30/CRMProject.php b/src/Responses/V30/CRMProject.php new file mode 100644 index 0000000..af3f87a --- /dev/null +++ b/src/Responses/V30/CRMProject.php @@ -0,0 +1,43 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['id'] ?? 0, + name: $data['Name'] ?? null, + createdOnDateTime: isset($data['CreatedOnDateTime']) ? \Carbon\Carbon::parse($data['CreatedOnDateTime']) : null, + dateTimeStart: isset($data['DateTimeStart']) ? \Carbon\Carbon::parse($data['DateTimeStart']) : null, + dateTimeEnd: isset($data['DateTimeEnd']) ? \Carbon\Carbon::parse($data['DateTimeEnd']) : null, + createdByUserId: $data['CreatedByUserId'] ?? 0, + shortDescription: $data['ShortDescription'] ?? null, + status: isset($data['Status']) ? \Webparking\Logic4Client\Data\V30\CRMProjectStatus::make($data['Status']) : null, + type: isset($data['Type']) ? \Webparking\Logic4Client\Data\V30\CRMProjectType::make($data['Type']) : null, + responsibleByUserId: $data['ResponsibleByUserId'] ?? null, + responsibleByUserName: $data['ResponsibleByUserName'] ?? null, + projectValue: $data['ProjectValue'] ?? null, + ); + } +} diff --git a/src/Responses/V30/CRMProjectStatus.php b/src/Responses/V30/CRMProjectStatus.php new file mode 100644 index 0000000..42482c1 --- /dev/null +++ b/src/Responses/V30/CRMProjectStatus.php @@ -0,0 +1,27 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + sorting: $data['Sorting'] ?? 0, + isCompleted: $data['IsCompleted'] ?? false, + ); + } +} diff --git a/src/Responses/V30/CRMProjectType.php b/src/Responses/V30/CRMProjectType.php new file mode 100644 index 0000000..4a1b49e --- /dev/null +++ b/src/Responses/V30/CRMProjectType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Responses/V30/CompanyInformation.php b/src/Responses/V30/CompanyInformation.php new file mode 100644 index 0000000..31b3af7 --- /dev/null +++ b/src/Responses/V30/CompanyInformation.php @@ -0,0 +1,43 @@ + $data */ + public static function make(array $data): self + { + return new self( + name: $data['Name'] ?? null, + address: $data['Address'] ?? null, + houseNumber: $data['HouseNumber'] ?? null, + zipcode: $data['Zipcode'] ?? null, + city: $data['City'] ?? null, + province: $data['Province'] ?? null, + country: $data['Country'] ?? null, + email: $data['Email'] ?? null, + telephone: $data['Telephone'] ?? null, + vatnumber: $data['Vatnumber'] ?? null, + kvknumber: $data['Kvknumber'] ?? null, + bankaccount: $data['Bankaccount'] ?? null, + ); + } +} diff --git a/src/Responses/V30/CompanyValues.php b/src/Responses/V30/CompanyValues.php new file mode 100644 index 0000000..4cf96d9 --- /dev/null +++ b/src/Responses/V30/CompanyValues.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + useMultipleAdministrations: $data['UseMultipleAdministrations'] ?? false, + isMultiChannel: $data['IsMultiChannel'] ?? false, + branchSpecificInventoryAndBuyorderSystem: $data['BranchSpecificInventoryAndBuyorderSystem'] ?? false, + ); + } +} diff --git a/src/Responses/V30/ContactCharacteristic.php b/src/Responses/V30/ContactCharacteristic.php new file mode 100644 index 0000000..7825c78 --- /dev/null +++ b/src/Responses/V30/ContactCharacteristic.php @@ -0,0 +1,27 @@ + $data */ + public static function make(array $data): self + { + return new self( + contactId: $data['ContactId'] ?? 0, + debtorId: $data['DebtorId'] ?? null, + contactType: isset($data['ContactType']) ? \Webparking\Logic4Client\Data\V30\ContactTypeEnum::make($data['ContactType']) : null, + relationCharacteristic: $data['RelationCharacteristic'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ContactType.php b/src/Responses/V30/ContactType.php new file mode 100644 index 0000000..522a508 --- /dev/null +++ b/src/Responses/V30/ContactType.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Responses/V30/Country.php b/src/Responses/V30/Country.php new file mode 100644 index 0000000..023d154 --- /dev/null +++ b/src/Responses/V30/Country.php @@ -0,0 +1,28 @@ + $names */ + public function __construct( + public int $id, + public int $zoneId, + public ?array $names, + public ?string $isoCode, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + zoneId: $data['ZoneId'] ?? 0, + names: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\Translation::make($item), $data['Names'] ?? []), + isoCode: $data['IsoCode'] ?? null, + ); + } +} diff --git a/src/Responses/V30/Creditor.php b/src/Responses/V30/Creditor.php new file mode 100644 index 0000000..7b867c9 --- /dev/null +++ b/src/Responses/V30/Creditor.php @@ -0,0 +1,61 @@ + $data */ + public static function make(array $data): self + { + return new self( + address1: $data['Address1'] ?? null, + address2: $data['Address2'] ?? null, + address3: $data['Address3'] ?? null, + city: $data['City'] ?? null, + companyName: $data['CompanyName'] ?? null, + countryId: $data['CountryId'] ?? 0, + emailAddress: $data['EmailAddress'] ?? null, + faxnumber: $data['Faxnumber'] ?? null, + firstName: $data['FirstName'] ?? null, + id: $data['Id'] ?? 0, + kvkNumber: $data['KvkNumber'] ?? null, + lastName: $data['LastName'] ?? null, + mobileNumber: $data['MobileNumber'] ?? null, + notes: $data['Notes'] ?? null, + paymentCondition: isset($data['PaymentCondition']) ? \Webparking\Logic4Client\Data\V30\PaymentConditionDto::make($data['PaymentCondition']) : null, + postalCode: $data['PostalCode'] ?? null, + provinceId: $data['ProvinceId'] ?? null, + supplierGLN: $data['SupplierGLN'] ?? null, + creditorType: isset($data['CreditorType']) ? \Webparking\Logic4Client\Data\V30\CreditorTypeDto::make($data['CreditorType']) : null, + telephoneNumber: $data['TelephoneNumber'] ?? null, + vatNumber: $data['VatNumber'] ?? null, + ); + } +} diff --git a/src/Responses/V30/CreditorDiscount.php b/src/Responses/V30/CreditorDiscount.php new file mode 100644 index 0000000..a40b911 --- /dev/null +++ b/src/Responses/V30/CreditorDiscount.php @@ -0,0 +1,37 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + typeId: $data['TypeId'] ?? 0, + creditorId: $data['CreditorId'] ?? 0, + brandId: $data['BrandId'] ?? 0, + dateFrom: isset($data['DateFrom']) ? \Carbon\Carbon::parse($data['DateFrom']) : null, + dateTo: isset($data['DateTo']) ? \Carbon\Carbon::parse($data['DateTo']) : null, + percentage: $data['Percentage'] ?? null, + amount: $data['Amount'] ?? null, + remarks: $data['Remarks'] ?? null, + ); + } +} diff --git a/src/Responses/V30/CreditorDiscountType.php b/src/Responses/V30/CreditorDiscountType.php new file mode 100644 index 0000000..2b9043a --- /dev/null +++ b/src/Responses/V30/CreditorDiscountType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/CreditorThirdPartyExternalIdentifer.php b/src/Responses/V30/CreditorThirdPartyExternalIdentifer.php new file mode 100644 index 0000000..03413c3 --- /dev/null +++ b/src/Responses/V30/CreditorThirdPartyExternalIdentifer.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + creditorId: $data['CreditorId'] ?? 0, + typeId: $data['TypeId'] ?? 0, + value: $data['Value'] ?? null, + ); + } +} diff --git a/src/Responses/V30/Customer.php b/src/Responses/V30/Customer.php new file mode 100644 index 0000000..68e1458 --- /dev/null +++ b/src/Responses/V30/Customer.php @@ -0,0 +1,118 @@ + $pricelistIds */ + public function __construct( + public int $id, + public ?int $relationGroupId, + public ?int $relationGroup2Id, + public bool $hide, + public ?\Webparking\Logic4Client\Data\V30\VatCode $vatCode, + public ?\Webparking\Logic4Client\Data\V30\Representative $representative, + public ?\Webparking\Logic4Client\Data\V30\RelationType $type, + public ?\Webparking\Logic4Client\Data\V30\Gender $gender, + public ?\Webparking\Logic4Client\Data\V30\RelationStatus $status, + public ?string $invoiceEmail, + public ?string $paymentReminderEmail, + public ?string $firstClickGclIdValues, + public ?string $firstClickUtmValues, + public ?string $isoCode, + public ?string $countryCode, + public int $countryId, + public ?string $companyName, + public ?string $firstName, + public ?string $lastName, + public ?string $emailAddress, + public ?string $loginName, + public ?int $paymentMethodId, + public ?array $pricelistIds, + public ?string $telephoneNumber, + public ?string $mobileNumber, + public ?string $faxnumber, + public ?string $chamberOfCommerceCode, + public ?string $website, + public ?float $discount, + public ?int $standardReportIdForPickingList, + public ?int $standardReportIdForSalesOrderDelivery, + public ?string $city, + public ?string $zipcode, + public ?string $street, + public ?string $houseNumber, + public ?string $houseNumberAddition, + public ?string $vatNumber, + public bool $dontPrintPaperInvoiceForDebtor, + public bool $receiveInvoiceElectronically, + public ?int $electronicInvoiceAttachmentType, + public ?int $standardInvoiceLayoutReportId, + public ?string $preposition, + public ?float $creditLimit, + public ?int $shippingMethodId, + public ?int $globalisationId, + public ?int $standardPackagingSlipLayoutReportId, + public ?string $freeValue1, + public ?string $freeValue2, + public ?string $freeValue3, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + relationGroupId: $data['RelationGroupId'] ?? null, + relationGroup2Id: $data['RelationGroup2Id'] ?? null, + hide: $data['Hide'] ?? false, + vatCode: isset($data['VatCode']) ? \Webparking\Logic4Client\Data\V30\VatCode::make($data['VatCode']) : null, + representative: isset($data['Representative']) ? \Webparking\Logic4Client\Data\V30\Representative::make($data['Representative']) : null, + type: isset($data['Type']) ? \Webparking\Logic4Client\Data\V30\RelationType::make($data['Type']) : null, + gender: isset($data['Gender']) ? \Webparking\Logic4Client\Data\V30\Gender::make($data['Gender']) : null, + status: isset($data['Status']) ? \Webparking\Logic4Client\Data\V30\RelationStatus::make($data['Status']) : null, + invoiceEmail: $data['InvoiceEmail'] ?? null, + paymentReminderEmail: $data['PaymentReminderEmail'] ?? null, + firstClickGclIdValues: $data['FirstClickGclIdValues'] ?? null, + firstClickUtmValues: $data['FirstClickUtmValues'] ?? null, + isoCode: $data['IsoCode'] ?? null, + countryCode: $data['CountryCode'] ?? null, + countryId: $data['CountryId'] ?? 0, + companyName: $data['CompanyName'] ?? null, + firstName: $data['FirstName'] ?? null, + lastName: $data['LastName'] ?? null, + emailAddress: $data['EmailAddress'] ?? null, + loginName: $data['LoginName'] ?? null, + paymentMethodId: $data['PaymentMethodId'] ?? null, + pricelistIds: $data['PricelistIds'] ?? null, + telephoneNumber: $data['TelephoneNumber'] ?? null, + mobileNumber: $data['MobileNumber'] ?? null, + faxnumber: $data['Faxnumber'] ?? null, + chamberOfCommerceCode: $data['ChamberOfCommerceCode'] ?? null, + website: $data['Website'] ?? null, + discount: $data['Discount'] ?? null, + standardReportIdForPickingList: $data['StandardReportIdForPickingList'] ?? null, + standardReportIdForSalesOrderDelivery: $data['StandardReportIdForSalesOrderDelivery'] ?? null, + city: $data['City'] ?? null, + zipcode: $data['Zipcode'] ?? null, + street: $data['Street'] ?? null, + houseNumber: $data['HouseNumber'] ?? null, + houseNumberAddition: $data['HouseNumberAddition'] ?? null, + vatNumber: $data['VatNumber'] ?? null, + dontPrintPaperInvoiceForDebtor: $data['DontPrintPaperInvoiceForDebtor'] ?? false, + receiveInvoiceElectronically: $data['ReceiveInvoiceElectronically'] ?? false, + electronicInvoiceAttachmentType: $data['ElectronicInvoiceAttachmentType'] ?? null, + standardInvoiceLayoutReportId: $data['StandardInvoiceLayoutReportId'] ?? null, + preposition: $data['Preposition'] ?? null, + creditLimit: $data['CreditLimit'] ?? null, + shippingMethodId: $data['ShippingMethodId'] ?? null, + globalisationId: $data['GlobalisationId'] ?? null, + standardPackagingSlipLayoutReportId: $data['StandardPackagingSlipLayoutReportId'] ?? null, + freeValue1: $data['FreeValue1'] ?? null, + freeValue2: $data['FreeValue2'] ?? null, + freeValue3: $data['FreeValue3'] ?? null, + ); + } +} diff --git a/src/Responses/V30/CustomerAddress.php b/src/Responses/V30/CustomerAddress.php new file mode 100644 index 0000000..abfe8b0 --- /dev/null +++ b/src/Responses/V30/CustomerAddress.php @@ -0,0 +1,65 @@ + $data */ + public static function make(array $data): self + { + return new self( + type: isset($data['Type']) ? \Webparking\Logic4Client\Data\V30\AddressType::make($data['Type']) : null, + province: isset($data['Province']) ? \Webparking\Logic4Client\Data\V30\Province::make($data['Province']) : null, + email: $data['Email'] ?? null, + contactName: $data['ContactName'] ?? null, + companyName: $data['CompanyName'] ?? null, + address1: $data['Address1'] ?? null, + address2: $data['Address2'] ?? null, + id: $data['Id'] ?? null, + debtorId: $data['DebtorId'] ?? null, + creditorId: $data['CreditorId'] ?? null, + isMainContact: $data['IsMainContact'] ?? false, + isHidden: $data['IsHidden'] ?? null, + ownContactNumber: $data['OwnContactNumber'] ?? null, + countryCode: $data['CountryCode'] ?? null, + isoCode: $data['IsoCode'] ?? null, + city: $data['City'] ?? null, + zipcode: $data['Zipcode'] ?? null, + street: $data['Street'] ?? null, + houseNumber: $data['HouseNumber'] ?? null, + houseNumberAddition: $data['HouseNumberAddition'] ?? null, + telephoneNumber: $data['TelephoneNumber'] ?? null, + countryId: $data['CountryId'] ?? 0, + zoneId: $data['ZoneId'] ?? 0, + ); + } +} diff --git a/src/Responses/V30/CustomerContact.php b/src/Responses/V30/CustomerContact.php new file mode 100644 index 0000000..a288491 --- /dev/null +++ b/src/Responses/V30/CustomerContact.php @@ -0,0 +1,71 @@ + $data */ + public static function make(array $data): self + { + return new self( + emailAddress: $data['EmailAddress'] ?? null, + firstName: $data['FirstName'] ?? null, + function: $data['Function'] ?? null, + gender: isset($data['Gender']) ? \Webparking\Logic4Client\Data\V30\Gender::make($data['Gender']) : null, + initials: $data['Initials'] ?? null, + insertionName: $data['InsertionName'] ?? null, + lastName: $data['LastName'] ?? null, + mobileNumber: $data['MobileNumber'] ?? null, + createdDateTime: isset($data['CreatedDateTime']) ? \Carbon\Carbon::parse($data['CreatedDateTime']) : null, + changedDateTime: isset($data['ChangedDateTime']) ? \Carbon\Carbon::parse($data['ChangedDateTime']) : null, + id: $data['Id'] ?? null, + debtorId: $data['DebtorId'] ?? null, + creditorId: $data['CreditorId'] ?? null, + isMainContact: $data['IsMainContact'] ?? false, + isHidden: $data['IsHidden'] ?? null, + ownContactNumber: $data['OwnContactNumber'] ?? null, + countryCode: $data['CountryCode'] ?? null, + isoCode: $data['IsoCode'] ?? null, + city: $data['City'] ?? null, + zipcode: $data['Zipcode'] ?? null, + street: $data['Street'] ?? null, + houseNumber: $data['HouseNumber'] ?? null, + houseNumberAddition: $data['HouseNumberAddition'] ?? null, + telephoneNumber: $data['TelephoneNumber'] ?? null, + countryId: $data['CountryId'] ?? 0, + zoneId: $data['ZoneId'] ?? 0, + ); + } +} diff --git a/src/Responses/V30/CustomerThirdPartyExternalIdentifer.php b/src/Responses/V30/CustomerThirdPartyExternalIdentifer.php new file mode 100644 index 0000000..234dfe0 --- /dev/null +++ b/src/Responses/V30/CustomerThirdPartyExternalIdentifer.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + debtorId: $data['DebtorId'] ?? 0, + typeId: $data['TypeId'] ?? 0, + value: $data['Value'] ?? null, + ); + } +} diff --git a/src/Responses/V30/DatabaseConfiguration.php b/src/Responses/V30/DatabaseConfiguration.php new file mode 100644 index 0000000..762bd1c --- /dev/null +++ b/src/Responses/V30/DatabaseConfiguration.php @@ -0,0 +1,21 @@ + $data */ + public static function make(array $data): self + { + return new self( + pickbonExternalStockMovementsIntervalInSeconds: $data['PickbonExternalStockMovementsIntervalInSeconds'] ?? 0, + ); + } +} diff --git a/src/Responses/V30/DebtorCharacteristic.php b/src/Responses/V30/DebtorCharacteristic.php new file mode 100644 index 0000000..23aeaf2 --- /dev/null +++ b/src/Responses/V30/DebtorCharacteristic.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + debtorId: $data['DebtorId'] ?? 0, + relationCharacteristic: $data['RelationCharacteristic'] ?? null, + representative: $data['Representative'] ?? null, + ); + } +} diff --git a/src/Responses/V30/DebtorWebsiteDomainsList.php b/src/Responses/V30/DebtorWebsiteDomainsList.php new file mode 100644 index 0000000..6a2ad09 --- /dev/null +++ b/src/Responses/V30/DebtorWebsiteDomainsList.php @@ -0,0 +1,22 @@ + $debtorWebsiteDomains */ + public function __construct( + public ?array $debtorWebsiteDomains, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + debtorWebsiteDomains: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\DebtorWebsiteDomains::make($item), $data['DebtorWebsiteDomains'] ?? []), + ); + } +} diff --git a/src/Responses/V30/DeliveryOption.php b/src/Responses/V30/DeliveryOption.php new file mode 100644 index 0000000..2435fb6 --- /dev/null +++ b/src/Responses/V30/DeliveryOption.php @@ -0,0 +1,31 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + code: $data['Code'] ?? null, + isPickupLocation: $data['IsPickupLocation'] ?? false, + shipperTypeId: $data['ShipperTypeId'] ?? 0, + externalTypeValue: $data['ExternalTypeValue'] ?? null, + ); + } +} diff --git a/src/Responses/V30/EmailAddress.php b/src/Responses/V30/EmailAddress.php new file mode 100644 index 0000000..acc9ca2 --- /dev/null +++ b/src/Responses/V30/EmailAddress.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + name: $data['Name'] ?? null, + email: $data['Email'] ?? null, + ); + } +} diff --git a/src/Responses/V30/EmailAttachment.php b/src/Responses/V30/EmailAttachment.php new file mode 100644 index 0000000..e35c6d6 --- /dev/null +++ b/src/Responses/V30/EmailAttachment.php @@ -0,0 +1,29 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + emailMessageId: $data['EmailMessageId'] ?? 0, + name: $data['Name'] ?? null, + contentId: $data['ContentId'] ?? null, + isEmbeddedContent: $data['IsEmbeddedContent'] ?? false, + ); + } +} diff --git a/src/Responses/V30/EmailBox.php b/src/Responses/V30/EmailBox.php new file mode 100644 index 0000000..5e58f58 --- /dev/null +++ b/src/Responses/V30/EmailBox.php @@ -0,0 +1,35 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + parentId: $data['ParentId'] ?? null, + userCanRead: $data['UserCanRead'] ?? false, + userCanDelete: $data['UserCanDelete'] ?? false, + sortId: $data['SortId'] ?? 0, + newMessages: $data['NewMessages'] ?? 0, + hasEmails: $data['HasEmails'] ?? false, + ); + } +} diff --git a/src/Responses/V30/EmailMessage.php b/src/Responses/V30/EmailMessage.php new file mode 100644 index 0000000..d6d6a63 --- /dev/null +++ b/src/Responses/V30/EmailMessage.php @@ -0,0 +1,60 @@ + $toEmailAddresses + * @param array<\Webparking\Logic4Client\Data\V30\EmailAddress> $CCEmailAddresses + * @param array<\Webparking\Logic4Client\Data\V30\EmailAddress> $BCCEmailAddresses + */ + public function __construct( + public int $id, + public ?string $subject, + public ?string $emailBody, + public bool $isHTMLBody, + public int $boxId, + public ?\Carbon\Carbon $dateTimeSend, + public bool $isInbound, + public bool $isRead, + public ?\Carbon\Carbon $isReplyedOn, + public ?\Carbon\Carbon $isForwardedOn, + public ?\Webparking\Logic4Client\Data\V30\EmailMessageStatus $status, + public ?array $toEmailAddresses, + public ?\Webparking\Logic4Client\Data\V30\EmailAddress $fromEmailAddress, + public ?array $CCEmailAddresses, + public ?array $BCCEmailAddresses, + public bool $hasAttachment, + public ?int $previousEmailId, + public ?bool $canDelete, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + subject: $data['Subject'] ?? null, + emailBody: $data['EmailBody'] ?? null, + isHTMLBody: $data['IsHTMLBody'] ?? false, + boxId: $data['BoxId'] ?? 0, + dateTimeSend: isset($data['DateTimeSend']) ? \Carbon\Carbon::parse($data['DateTimeSend']) : null, + isInbound: $data['IsInbound'] ?? false, + isRead: $data['IsRead'] ?? false, + isReplyedOn: isset($data['IsReplyedOn']) ? \Carbon\Carbon::parse($data['IsReplyedOn']) : null, + isForwardedOn: isset($data['IsForwardedOn']) ? \Carbon\Carbon::parse($data['IsForwardedOn']) : null, + status: isset($data['Status']) ? \Webparking\Logic4Client\Data\V30\EmailMessageStatus::make($data['Status']) : null, + toEmailAddresses: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\EmailAddress::make($item), $data['ToEmailAddresses'] ?? []), + fromEmailAddress: isset($data['FromEmailAddress']) ? \Webparking\Logic4Client\Data\V30\EmailAddress::make($data['FromEmailAddress']) : null, + CCEmailAddresses: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\EmailAddress::make($item), $data['CCEmailAddresses'] ?? []), + BCCEmailAddresses: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\EmailAddress::make($item), $data['BCCEmailAddresses'] ?? []), + hasAttachment: $data['HasAttachment'] ?? false, + previousEmailId: $data['PreviousEmailId'] ?? null, + canDelete: $data['CanDelete'] ?? null, + ); + } +} diff --git a/src/Responses/V30/EmailMessageStatus.php b/src/Responses/V30/EmailMessageStatus.php new file mode 100644 index 0000000..85b340c --- /dev/null +++ b/src/Responses/V30/EmailMessageStatus.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + color: $data['Color'] ?? 0, + ); + } +} diff --git a/src/Responses/V30/EmailUser.php b/src/Responses/V30/EmailUser.php new file mode 100644 index 0000000..28e100e --- /dev/null +++ b/src/Responses/V30/EmailUser.php @@ -0,0 +1,32 @@ + $emailAddresses */ + public function __construct( + public ?array $emailAddresses, + public ?int $startBoxId, + public ?int $deleteBoxId, + public ?int $sendBoxId, + public ?int $outBoxId, + public ?int $conceptBoxId, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + emailAddresses: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\EmailUserEmailAddress::make($item), $data['EmailAddresses'] ?? []), + startBoxId: $data['StartBoxId'] ?? null, + deleteBoxId: $data['DeleteBoxId'] ?? null, + sendBoxId: $data['SendBoxId'] ?? null, + outBoxId: $data['OutBoxId'] ?? null, + conceptBoxId: $data['ConceptBoxId'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ExplodedView.php b/src/Responses/V30/ExplodedView.php new file mode 100644 index 0000000..9a307cf --- /dev/null +++ b/src/Responses/V30/ExplodedView.php @@ -0,0 +1,38 @@ + $nameTranslations + * @param array<\Webparking\Logic4Client\Data\V30\ExplodedViewHighlight> $highlights + * @param array<\Webparking\Logic4Client\Data\V30\ExplodedViewProductGroup> $productGroups + */ + public function __construct( + public int $id, + public ?string $imageUrl, + public ?int $sortId, + public ?string $name, + public ?array $nameTranslations, + public ?array $highlights, + public ?array $productGroups, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + imageUrl: $data['ImageUrl'] ?? null, + sortId: $data['SortId'] ?? null, + name: $data['Name'] ?? null, + nameTranslations: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\Translation::make($item), $data['NameTranslations'] ?? []), + highlights: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\ExplodedViewHighlight::make($item), $data['Highlights'] ?? []), + productGroups: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\ExplodedViewProductGroup::make($item), $data['Product_Groups'] ?? []), + ); + } +} diff --git a/src/Responses/V30/FinancialBook.php b/src/Responses/V30/FinancialBook.php new file mode 100644 index 0000000..6056eb0 --- /dev/null +++ b/src/Responses/V30/FinancialBook.php @@ -0,0 +1,29 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + financialBookType: $data['FinancialBookType'] ?? 0, + name: $data['Name'] ?? null, + ledgerId: $data['LedgerId'] ?? null, + administrationId: $data['AdministrationId'] ?? 0, + ); + } +} diff --git a/src/Responses/V30/FinancialBookBooking.php b/src/Responses/V30/FinancialBookBooking.php new file mode 100644 index 0000000..b825f36 --- /dev/null +++ b/src/Responses/V30/FinancialBookBooking.php @@ -0,0 +1,48 @@ + $mutations */ + public function __construct( + public int $bookingId, + public int $financialBookId, + public ?\Carbon\Carbon $bookingDateTime, + public ?string $reference, + public ?\Carbon\Carbon $dateTimeCreated, + public int $userId, + public int $bookingNumberByUser, + public ?string $description, + public ?int $statusId, + public ?int $financialCostCenterId, + public ?string $freeValue1, + public ?string $freeValue2, + public ?string $freeValue3, + public ?array $mutations, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + bookingId: $data['BookingId'] ?? 0, + financialBookId: $data['FinancialBookId'] ?? 0, + bookingDateTime: isset($data['BookingDateTime']) ? \Carbon\Carbon::parse($data['BookingDateTime']) : null, + reference: $data['Reference'] ?? null, + dateTimeCreated: isset($data['DateTimeCreated']) ? \Carbon\Carbon::parse($data['DateTimeCreated']) : null, + userId: $data['UserId'] ?? 0, + bookingNumberByUser: $data['BookingNumberByUser'] ?? 0, + description: $data['Description'] ?? null, + statusId: $data['StatusId'] ?? null, + financialCostCenterId: $data['FinancialCostCenterId'] ?? null, + freeValue1: $data['FreeValue1'] ?? null, + freeValue2: $data['FreeValue2'] ?? null, + freeValue3: $data['FreeValue3'] ?? null, + mutations: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\FinancialBookBookingMutation::make($item), $data['Mutations'] ?? []), + ); + } +} diff --git a/src/Responses/V30/FinancialJournal.php b/src/Responses/V30/FinancialJournal.php new file mode 100644 index 0000000..095f249 --- /dev/null +++ b/src/Responses/V30/FinancialJournal.php @@ -0,0 +1,61 @@ + $data */ + public static function make(array $data): self + { + return new self( + ledgerId: $data['LedgerId'] ?? null, + ledgerCode: $data['LedgerCode'] ?? null, + bookingId: $data['BookingId'] ?? null, + invoiceNr: $data['InvoiceNr'] ?? null, + creditorId: $data['CreditorId'] ?? null, + debtorId: $data['DebtorId'] ?? null, + description: $data['Description'] ?? null, + costCenterId: $data['CostCenterId'] ?? null, + transactionCodeId: $data['TransactionCodeId'] ?? null, + entityCodeId: $data['EntityCodeId'] ?? null, + amount: $data['Amount'] ?? null, + amountDebit: $data['AmountDebit'] ?? null, + amountCredit: $data['AmountCredit'] ?? null, + vatAmount: $data['VatAmount'] ?? null, + vatPercent: $data['VatPercent'] ?? null, + vatId: $data['VatId'] ?? null, + userId: $data['UserId'] ?? null, + dateTime: isset($data['DateTime']) ? \Carbon\Carbon::parse($data['DateTime']) : null, + internalDateTime: isset($data['InternalDateTime']) ? \Carbon\Carbon::parse($data['InternalDateTime']) : null, + productId: $data['ProductId'] ?? null, + productCode: $data['ProductCode'] ?? null, + ); + } +} diff --git a/src/Responses/V30/FinancialJournalStatus.php b/src/Responses/V30/FinancialJournalStatus.php new file mode 100644 index 0000000..07a5974 --- /dev/null +++ b/src/Responses/V30/FinancialJournalStatus.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + value: $data['Value'] ?? null, + blockPayment: $data['BlockPayment'] ?? false, + ); + } +} diff --git a/src/Responses/V30/Gender.php b/src/Responses/V30/Gender.php new file mode 100644 index 0000000..394a886 --- /dev/null +++ b/src/Responses/V30/Gender.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/GetRound.php b/src/Responses/V30/GetRound.php new file mode 100644 index 0000000..a42a3ea --- /dev/null +++ b/src/Responses/V30/GetRound.php @@ -0,0 +1,51 @@ + $itsIds + * @param array $orderIds + */ + public function __construct( + public int $id, + public ?\Carbon\Carbon $dateTimeCreated, + public int $createdByUserId, + public ?array $itsIds, + public ?array $orderIds, + public int $typeId, + public ?string $description, + public ?string $memo, + public ?\Carbon\Carbon $dateTimePlanned, + public ?int $vehicleId, + public ?int $driverId, + public ?int $coDriverId, + public int $statusId, + public bool $hideInSystem, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + dateTimeCreated: isset($data['DateTimeCreated']) ? \Carbon\Carbon::parse($data['DateTimeCreated']) : null, + createdByUserId: $data['CreatedByUserId'] ?? 0, + itsIds: $data['ItsIds'] ?? null, + orderIds: $data['OrderIds'] ?? null, + typeId: $data['TypeId'] ?? 0, + description: $data['Description'] ?? null, + memo: $data['Memo'] ?? null, + dateTimePlanned: isset($data['DateTimePlanned']) ? \Carbon\Carbon::parse($data['DateTimePlanned']) : null, + vehicleId: $data['VehicleId'] ?? null, + driverId: $data['DriverId'] ?? null, + coDriverId: $data['CoDriverId'] ?? null, + statusId: $data['StatusId'] ?? 0, + hideInSystem: $data['HideInSystem'] ?? false, + ); + } +} diff --git a/src/Responses/V30/GetRoundOrder.php b/src/Responses/V30/GetRoundOrder.php new file mode 100644 index 0000000..3925ee0 --- /dev/null +++ b/src/Responses/V30/GetRoundOrder.php @@ -0,0 +1,35 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + orderId: $data['OrderId'] ?? null, + ITSIssueId: $data['ITSIssueId'] ?? null, + roundId: $data['RoundId'] ?? 0, + remarks: $data['Remarks'] ?? null, + statusId: $data['StatusId'] ?? 0, + sorting: $data['Sorting'] ?? 0, + estimatedArrivalDateTime: isset($data['EstimatedArrivalDateTime']) ? \Carbon\Carbon::parse($data['EstimatedArrivalDateTime']) : null, + ); + } +} diff --git a/src/Responses/V30/GlobalizationType.php b/src/Responses/V30/GlobalizationType.php new file mode 100644 index 0000000..9094f91 --- /dev/null +++ b/src/Responses/V30/GlobalizationType.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + value: $data['Value'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ITSFreeValue.php b/src/Responses/V30/ITSFreeValue.php new file mode 100644 index 0000000..448cfa2 --- /dev/null +++ b/src/Responses/V30/ITSFreeValue.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ITSIssue.php b/src/Responses/V30/ITSIssue.php new file mode 100644 index 0000000..dffbc75 --- /dev/null +++ b/src/Responses/V30/ITSIssue.php @@ -0,0 +1,77 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['id'] ?? 0, + name: $data['Name'] ?? null, + dateTimeCreatedOn: isset($data['DateTimeCreatedOn']) ? \Carbon\Carbon::parse($data['DateTimeCreatedOn']) : null, + dateTimeClosed: isset($data['DateTimeClosed']) ? \Carbon\Carbon::parse($data['DateTimeClosed']) : null, + createdByUserId: $data['CreatedByUserId'] ?? 0, + description: $data['Description'] ?? null, + orderId: $data['OrderId'] ?? null, + invoiceId: $data['InvoiceId'] ?? null, + status: isset($data['Status']) ? \Webparking\Logic4Client\Data\V30\ITSIssueStatus::make($data['Status']) : null, + type: isset($data['Type']) ? \Webparking\Logic4Client\Data\V30\ITSIssueType::make($data['Type']) : null, + responsibleByUserId: $data['ResponsibleByUserId'] ?? null, + responsibleByUserName: $data['ResponsibleByUserName'] ?? null, + dateTimeMustBeCompletedOn: isset($data['DateTimeMustBeCompletedOn']) ? \Carbon\Carbon::parse($data['DateTimeMustBeCompletedOn']) : null, + freeValue1: $data['FreeValue1'] ?? null, + freeValue2: $data['FreeValue2'] ?? null, + priority: isset($data['Priority']) ? \Webparking\Logic4Client\Data\V30\ITSPriority::make($data['Priority']) : null, + project: isset($data['Project']) ? \Webparking\Logic4Client\Data\V30\ITSProject::make($data['Project']) : null, + group: isset($data['Group']) ? \Webparking\Logic4Client\Data\V30\ITSIssueGroup::make($data['Group']) : null, + level: isset($data['Level']) ? \Webparking\Logic4Client\Data\V30\ITSIssueLevel::make($data['Level']) : null, + productData: isset($data['ProductData']) ? \Webparking\Logic4Client\Data\V30\BasicProductData::make($data['ProductData']) : null, + freeValueType1: isset($data['FreeValueType1']) ? \Webparking\Logic4Client\Data\V30\ITSIssueFreeType::make($data['FreeValueType1']) : null, + freeValueType2: isset($data['FreeValueType2']) ? \Webparking\Logic4Client\Data\V30\ITSIssueFreeType::make($data['FreeValueType2']) : null, + lastModifiedSince: isset($data['LastModifiedSince']) ? \Carbon\Carbon::parse($data['LastModifiedSince']) : null, + reportedByDebtorId: $data['ReportedByDebtorId'] ?? null, + reportedByCreditorId: $data['ReportedByCreditorId'] ?? null, + contactId: $data['ContactId'] ?? null, + dateTimeReported: isset($data['DateTimeReported']) ? \Carbon\Carbon::parse($data['DateTimeReported']) : null, + archiveIssue: $data['ArchiveIssue'] ?? false, + minutes: $data['Minutes'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ITSIssueGroup.php b/src/Responses/V30/ITSIssueGroup.php new file mode 100644 index 0000000..59c2973 --- /dev/null +++ b/src/Responses/V30/ITSIssueGroup.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ITSIssueLevel.php b/src/Responses/V30/ITSIssueLevel.php new file mode 100644 index 0000000..becd3a6 --- /dev/null +++ b/src/Responses/V30/ITSIssueLevel.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ITSIssueStatus.php b/src/Responses/V30/ITSIssueStatus.php new file mode 100644 index 0000000..96e8c09 --- /dev/null +++ b/src/Responses/V30/ITSIssueStatus.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ITSIssueType.php b/src/Responses/V30/ITSIssueType.php new file mode 100644 index 0000000..0c6f41b --- /dev/null +++ b/src/Responses/V30/ITSIssueType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ITSProject.php b/src/Responses/V30/ITSProject.php new file mode 100644 index 0000000..8d468ba --- /dev/null +++ b/src/Responses/V30/ITSProject.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ITSTaskPriority.php b/src/Responses/V30/ITSTaskPriority.php new file mode 100644 index 0000000..3d5869c --- /dev/null +++ b/src/Responses/V30/ITSTaskPriority.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/InvoiceOpenPayment.php b/src/Responses/V30/InvoiceOpenPayment.php new file mode 100644 index 0000000..9a0a4d3 --- /dev/null +++ b/src/Responses/V30/InvoiceOpenPayment.php @@ -0,0 +1,37 @@ + $data */ + public static function make(array $data): self + { + return new self( + invoiceId: $data['InvoiceId'] ?? 0, + debtorId: $data['DebtorId'] ?? 0, + dueDate: isset($data['DueDate']) ? \Carbon\Carbon::parse($data['DueDate']) : null, + invoiceDate: isset($data['InvoiceDate']) ? \Carbon\Carbon::parse($data['InvoiceDate']) : null, + daysPastDueDate: $data['DaysPastDueDate'] ?? 0, + totalAmount: $data['TotalAmount'] ?? 0.0, + totalAmountPayed: $data['TotalAmountPayed'] ?? 0.0, + amountOutstanding: $data['AmountOutstanding'] ?? 0.0, + paymentMethodId: $data['PaymentMethodId'] ?? 0, + ); + } +} diff --git a/src/Responses/V30/Ledger.php b/src/Responses/V30/Ledger.php new file mode 100644 index 0000000..24fb409 --- /dev/null +++ b/src/Responses/V30/Ledger.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + code: $data['Code'] ?? 0, + ); + } +} diff --git a/src/Responses/V30/OperatingSystemType.php b/src/Responses/V30/OperatingSystemType.php new file mode 100644 index 0000000..454e0ac --- /dev/null +++ b/src/Responses/V30/OperatingSystemType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Responses/V30/Order.php b/src/Responses/V30/Order.php new file mode 100644 index 0000000..a6f7be2 --- /dev/null +++ b/src/Responses/V30/Order.php @@ -0,0 +1,114 @@ + $orderShipments + * @param array<\Webparking\Logic4Client\Data\V30\Payment> $payments + * @param array<\Webparking\Logic4Client\Data\V30\OrderRow> $orderRows + */ + public function __construct( + public int $debtorId, + public int $id, + public ?\Webparking\Logic4Client\Data\V30\OrderTotalsRead $totals, + public ?\Webparking\Logic4Client\Data\V30\PaymentMethod $paymentMethod, + public ?\Webparking\Logic4Client\Data\V30\OrderStatus $orderStatus, + public ?\Webparking\Logic4Client\Data\V30\OrderShippingMethod $shippingMethod, + public ?array $orderShipments, + public ?int $invoiceBelongsToOrderNumber, + public ?array $payments, + public ?\Webparking\Logic4Client\Data\V30\DebtorCostCentre $costCentre, + public ?\Webparking\Logic4Client\Data\V30\CustomerAddress $accountAddress, + public ?array $orderRows, + public ?int $deliveryProvinceId, + public ?int $invoiceProvinceId, + public ?int $accountProvinceId, + public ?string $lastClickGclIdValues, + public ?string $lastClickUtmValues, + public ?\Webparking\Logic4Client\Data\V30\CustomerAddress $deliveryAddress, + public ?\Webparking\Logic4Client\Data\V30\CustomerAddress $invoiceAddress, + public ?\Carbon\Carbon $creationDate, + public ?string $description, + public ?string $reference, + public ?int $branchId, + public ?int $userId, + public ?int $websiteDomainId, + public ?int $deliveryOptionId, + public ?\Carbon\Carbon $deliveryDate, + public ?\Webparking\Logic4Client\Data\V30\OrderShipmentFreeValue $orderShipmentFreeValues, + public ?string $notes, + public ?string $freeValue1, + public ?string $freeValue2, + public ?string $freeValue3, + public ?string $freeValue4, + public ?string $freeValue5, + public ?string $freeValue6, + public ?string $freeValue7, + public ?string $freeValue8, + public ?int $orderType1Id, + public ?int $orderType2Id, + public ?int $orderType3Id, + public ?int $orderType4Id, + public ?int $orderType5Id, + public ?int $orderType6Id, + public ?int $orderType7Id, + public ?int $orderType8Id, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + debtorId: $data['DebtorId'] ?? 0, + id: $data['Id'] ?? 0, + totals: isset($data['Totals']) ? \Webparking\Logic4Client\Data\V30\OrderTotalsRead::make($data['Totals']) : null, + paymentMethod: isset($data['PaymentMethod']) ? \Webparking\Logic4Client\Data\V30\PaymentMethod::make($data['PaymentMethod']) : null, + orderStatus: isset($data['OrderStatus']) ? \Webparking\Logic4Client\Data\V30\OrderStatus::make($data['OrderStatus']) : null, + shippingMethod: isset($data['ShippingMethod']) ? \Webparking\Logic4Client\Data\V30\OrderShippingMethod::make($data['ShippingMethod']) : null, + orderShipments: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\OrderShipment::make($item), $data['OrderShipments'] ?? []), + invoiceBelongsToOrderNumber: $data['InvoiceBelongsToOrderNumber'] ?? null, + payments: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\Payment::make($item), $data['Payments'] ?? []), + costCentre: isset($data['CostCentre']) ? \Webparking\Logic4Client\Data\V30\DebtorCostCentre::make($data['CostCentre']) : null, + accountAddress: isset($data['AccountAddress']) ? \Webparking\Logic4Client\Data\V30\CustomerAddress::make($data['AccountAddress']) : null, + orderRows: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\OrderRow::make($item), $data['OrderRows'] ?? []), + deliveryProvinceId: $data['DeliveryProvinceId'] ?? null, + invoiceProvinceId: $data['InvoiceProvinceId'] ?? null, + accountProvinceId: $data['AccountProvinceId'] ?? null, + lastClickGclIdValues: $data['LastClickGclIdValues'] ?? null, + lastClickUtmValues: $data['LastClickUtmValues'] ?? null, + deliveryAddress: isset($data['DeliveryAddress']) ? \Webparking\Logic4Client\Data\V30\CustomerAddress::make($data['DeliveryAddress']) : null, + invoiceAddress: isset($data['InvoiceAddress']) ? \Webparking\Logic4Client\Data\V30\CustomerAddress::make($data['InvoiceAddress']) : null, + creationDate: isset($data['CreationDate']) ? \Carbon\Carbon::parse($data['CreationDate']) : null, + description: $data['Description'] ?? null, + reference: $data['Reference'] ?? null, + branchId: $data['BranchId'] ?? null, + userId: $data['UserId'] ?? null, + websiteDomainId: $data['WebsiteDomainId'] ?? null, + deliveryOptionId: $data['DeliveryOptionId'] ?? null, + deliveryDate: isset($data['DeliveryDate']) ? \Carbon\Carbon::parse($data['DeliveryDate']) : null, + orderShipmentFreeValues: isset($data['OrderShipmentFreeValues']) ? \Webparking\Logic4Client\Data\V30\OrderShipmentFreeValue::make($data['OrderShipmentFreeValues']) : null, + notes: $data['Notes'] ?? null, + freeValue1: $data['FreeValue1'] ?? null, + freeValue2: $data['FreeValue2'] ?? null, + freeValue3: $data['FreeValue3'] ?? null, + freeValue4: $data['FreeValue4'] ?? null, + freeValue5: $data['FreeValue5'] ?? null, + freeValue6: $data['FreeValue6'] ?? null, + freeValue7: $data['FreeValue7'] ?? null, + freeValue8: $data['FreeValue8'] ?? null, + orderType1Id: $data['OrderType1Id'] ?? null, + orderType2Id: $data['OrderType2Id'] ?? null, + orderType3Id: $data['OrderType3Id'] ?? null, + orderType4Id: $data['OrderType4Id'] ?? null, + orderType5Id: $data['OrderType5Id'] ?? null, + orderType6Id: $data['OrderType6Id'] ?? null, + orderType7Id: $data['OrderType7Id'] ?? null, + orderType8Id: $data['OrderType8Id'] ?? null, + ); + } +} diff --git a/src/Responses/V30/OrderAction.php b/src/Responses/V30/OrderAction.php new file mode 100644 index 0000000..0b107ac --- /dev/null +++ b/src/Responses/V30/OrderAction.php @@ -0,0 +1,33 @@ + $data */ + public static function make(array $data): self + { + return new self( + orderId: $data['OrderId'] ?? 0, + dateTimeCreated: isset($data['DateTimeCreated']) ? \Carbon\Carbon::parse($data['DateTimeCreated']) : null, + description: $data['Description'] ?? null, + userId: $data['UserId'] ?? 0, + relatedId: $data['RelatedId'] ?? null, + typeDescription: $data['TypeDescription'] ?? null, + typeId: $data['TypeId'] ?? 0, + ); + } +} diff --git a/src/Responses/V30/OrderActionType.php b/src/Responses/V30/OrderActionType.php new file mode 100644 index 0000000..ec3d0d2 --- /dev/null +++ b/src/Responses/V30/OrderActionType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Responses/V30/OrderHeadPickbon.php b/src/Responses/V30/OrderHeadPickbon.php new file mode 100644 index 0000000..bc21219 --- /dev/null +++ b/src/Responses/V30/OrderHeadPickbon.php @@ -0,0 +1,61 @@ + $data */ + public static function make(array $data): self + { + return new self( + isProcessed: $data['IsProcessed'] ?? false, + orderDate: isset($data['OrderDate']) ? \Carbon\Carbon::parse($data['OrderDate']) : null, + pickbonDateTimePrinted: isset($data['PickbonDateTimePrinted']) ? \Carbon\Carbon::parse($data['PickbonDateTimePrinted']) : null, + amountRows: $data['AmountRows'] ?? 0, + amountItemsToPick: $data['AmountItemsToPick'] ?? 0.0, + debtorId: $data['DebtorId'] ?? 0, + orderHeadPickbonId: $data['OrderHeadPickbonId'] ?? 0, + orderId: $data['OrderId'] ?? 0, + deliveryCompanyName: $data['Delivery_CompanyName'] ?? null, + deliveryExpDate: isset($data['DeliveryExpDate']) ? \Carbon\Carbon::parse($data['DeliveryExpDate']) : null, + deliveryContactName: $data['Delivery_ContactName'] ?? null, + deliveryAddress: $data['Delivery_Address'] ?? null, + deliveryAddress2: $data['Delivery_Address2'] ?? null, + deliveryCity: $data['Delivery_City'] ?? null, + deliveryTelephone: $data['Delivery_Telephone'] ?? null, + deliveryZipcode: $data['Delivery_Zipcode'] ?? null, + softBlockedAt: isset($data['SoftBlockedAt']) ? \Carbon\Carbon::parse($data['SoftBlockedAt']) : null, + softBlockedBy: $data['SoftBlockedBy'] ?? null, + zoneId: $data['ZoneId'] ?? null, + lastReprintedOn: isset($data['LastReprintedOn']) ? \Carbon\Carbon::parse($data['LastReprintedOn']) : null, + lastReprintedByUserId: $data['LastReprintedByUserId'] ?? null, + ); + } +} diff --git a/src/Responses/V30/OrderHeadPickbonRow.php b/src/Responses/V30/OrderHeadPickbonRow.php new file mode 100644 index 0000000..bf883d2 --- /dev/null +++ b/src/Responses/V30/OrderHeadPickbonRow.php @@ -0,0 +1,35 @@ + $data */ + public static function make(array $data): self + { + return new self( + orderRowId: $data['OrderRowId'] ?? 0, + productId: $data['ProductId'] ?? 0, + qty: $data['Qty'] ?? 0.0, + warehouseId: $data['WarehouseId'] ?? null, + orderHeadPickbonId: $data['OrderHeadPickbonId'] ?? 0, + orderRowSorting: $data['OrderRowSorting'] ?? 0, + orderHeadPickbonRowId: $data['OrderHeadPickbonRowId'] ?? 0, + productGroupTypeId: $data['ProductGroupTypeId'] ?? 0, + ); + } +} diff --git a/src/Responses/V30/OrderOpenPayment.php b/src/Responses/V30/OrderOpenPayment.php new file mode 100644 index 0000000..ffb91e2 --- /dev/null +++ b/src/Responses/V30/OrderOpenPayment.php @@ -0,0 +1,29 @@ + $data */ + public static function make(array $data): self + { + return new self( + amount: $data['Amount'] ?? 0.0, + amountEx: $data['AmountEx'] ?? 0.0, + endDate: isset($data['EndDate']) ? \Carbon\Carbon::parse($data['EndDate']) : null, + periodDescription: $data['PeriodDescription'] ?? null, + totalPayments: $data['TotalPayments'] ?? null, + ); + } +} diff --git a/src/Responses/V30/OrderRowV11.php b/src/Responses/V30/OrderRowV11.php new file mode 100644 index 0000000..51e2d23 --- /dev/null +++ b/src/Responses/V30/OrderRowV11.php @@ -0,0 +1,108 @@ + $serialNumbers */ + public function __construct( + public ?int $composedProductOrderRowParentId, + public ?int $optionVariantProductOrderRowParentId, + public ?array $serialNumbers, + public ?float $expectedNextQtyOnDelivery, + public ?float $discountPercent, + public float $qtyReserved, + public float $inclPrice, + public ?string $internalNotes, + public bool $isAssemblyChild, + public ?int $packingMaterialDepositId, + public ?int $id, + public ?string $description, + public ?string $description2, + public ?int $productId, + public float $qty, + public ?float $buyPrice, + public ?float $grossPrice, + public ?float $nettPrice, + public float $qtyDeliverd, + public float $qtyDeliverdNotInvoiced, + public ?string $productCode, + public ?string $productBarcode1, + public ?float $VATPercentage, + public ?string $notes, + public int $debtorId, + public ?int $orderId, + public ?int $warehouseId, + public ?string $commission, + public ?int $deliveryOptionId, + public ?int $vatCodeId, + public ?int $vatCodeIdOverrule, + public ?string $freeValue1, + public ?string $freeValue2, + public ?string $freeValue3, + public ?string $freeValue4, + public ?string $freeValue5, + public ?\Carbon\Carbon $expectedNextDelivery, + public ?\Webparking\Logic4Client\Data\V30\ExternalValue $externalValue, + public ?\Carbon\Carbon $agreedDeliveryDate, + public ?int $type1Id, + public ?int $type2Id, + public ?int $type3Id, + public ?int $type4Id, + public ?int $type5Id, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + composedProductOrderRowParentId: $data['ComposedProductOrderRowParentId'] ?? null, + optionVariantProductOrderRowParentId: $data['OptionVariantProductOrderRowParentId'] ?? null, + serialNumbers: $data['SerialNumbers'] ?? null, + expectedNextQtyOnDelivery: $data['ExpectedNextQtyOnDelivery'] ?? null, + discountPercent: $data['DiscountPercent'] ?? null, + qtyReserved: $data['QtyReserved'] ?? 0.0, + inclPrice: $data['InclPrice'] ?? 0.0, + internalNotes: $data['InternalNotes'] ?? null, + isAssemblyChild: $data['IsAssemblyChild'] ?? false, + packingMaterialDepositId: $data['PackingMaterialDepositId'] ?? null, + id: $data['Id'] ?? null, + description: $data['Description'] ?? null, + description2: $data['Description2'] ?? null, + productId: $data['ProductId'] ?? null, + qty: $data['Qty'] ?? 0.0, + buyPrice: $data['BuyPrice'] ?? null, + grossPrice: $data['GrossPrice'] ?? null, + nettPrice: $data['NettPrice'] ?? null, + qtyDeliverd: $data['QtyDeliverd'] ?? 0.0, + qtyDeliverdNotInvoiced: $data['QtyDeliverd_NotInvoiced'] ?? 0.0, + productCode: $data['ProductCode'] ?? null, + productBarcode1: $data['ProductBarcode1'] ?? null, + VATPercentage: $data['VATPercentage'] ?? null, + notes: $data['Notes'] ?? null, + debtorId: $data['DebtorId'] ?? 0, + orderId: $data['OrderId'] ?? null, + warehouseId: $data['WarehouseId'] ?? null, + commission: $data['Commission'] ?? null, + deliveryOptionId: $data['DeliveryOptionId'] ?? null, + vatCodeId: $data['VatCodeId'] ?? null, + vatCodeIdOverrule: $data['VatCodeIdOverrule'] ?? null, + freeValue1: $data['FreeValue1'] ?? null, + freeValue2: $data['FreeValue2'] ?? null, + freeValue3: $data['FreeValue3'] ?? null, + freeValue4: $data['FreeValue4'] ?? null, + freeValue5: $data['FreeValue5'] ?? null, + expectedNextDelivery: isset($data['ExpectedNextDelivery']) ? \Carbon\Carbon::parse($data['ExpectedNextDelivery']) : null, + externalValue: isset($data['ExternalValue']) ? \Webparking\Logic4Client\Data\V30\ExternalValue::make($data['ExternalValue']) : null, + agreedDeliveryDate: isset($data['AgreedDeliveryDate']) ? \Carbon\Carbon::parse($data['AgreedDeliveryDate']) : null, + type1Id: $data['Type1Id'] ?? null, + type2Id: $data['Type2Id'] ?? null, + type3Id: $data['Type3Id'] ?? null, + type4Id: $data['Type4Id'] ?? null, + type5Id: $data['Type5Id'] ?? null, + ); + } +} diff --git a/src/Responses/V30/OrderShipment.php b/src/Responses/V30/OrderShipment.php new file mode 100644 index 0000000..f5d671a --- /dev/null +++ b/src/Responses/V30/OrderShipment.php @@ -0,0 +1,35 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + deliveryId: $data['DeliveryId'] ?? null, + dateTimeAdded: isset($data['DateTimeAdded']) ? \Carbon\Carbon::parse($data['DateTimeAdded']) : null, + sendEmail: $data['SendEmail'] ?? null, + orderId: $data['OrderId'] ?? 0, + shipperId: $data['ShipperId'] ?? 0, + barcode: $data['Barcode'] ?? null, + trackTraceUrl: $data['TrackTraceUrl'] ?? null, + ); + } +} diff --git a/src/Responses/V30/OrderStatus.php b/src/Responses/V30/OrderStatus.php new file mode 100644 index 0000000..7e3872b --- /dev/null +++ b/src/Responses/V30/OrderStatus.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + value: $data['Value'] ?? null, + ); + } +} diff --git a/src/Responses/V30/PackingMaterialDepositType.php b/src/Responses/V30/PackingMaterialDepositType.php new file mode 100644 index 0000000..a3649cd --- /dev/null +++ b/src/Responses/V30/PackingMaterialDepositType.php @@ -0,0 +1,33 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + price: $data['Price'] ?? 0.0, + returnProductId: $data['ReturnProductId'] ?? null, + purchasesLedgerId: $data['PurchasesLedgerId'] ?? null, + salesLedgerId: $data['SalesLedgerId'] ?? null, + stockLedgerId: $data['StockLedgerId'] ?? null, + ); + } +} diff --git a/src/Responses/V30/PaymentMethod.php b/src/Responses/V30/PaymentMethod.php new file mode 100644 index 0000000..1e2f6d4 --- /dev/null +++ b/src/Responses/V30/PaymentMethod.php @@ -0,0 +1,27 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + maxAmount: $data['MaxAmount'] ?? null, + selectKey: $data['SelectKey'] ?? null, + ); + } +} diff --git a/src/Responses/V30/PickbonSoftBlocked.php b/src/Responses/V30/PickbonSoftBlocked.php new file mode 100644 index 0000000..5c4d71d --- /dev/null +++ b/src/Responses/V30/PickbonSoftBlocked.php @@ -0,0 +1,27 @@ + $data */ + public static function make(array $data): self + { + return new self( + userId: $data['UserId'] ?? null, + softBlockedAt: isset($data['SoftBlockedAt']) ? \Carbon\Carbon::parse($data['SoftBlockedAt']) : null, + username: $data['Username'] ?? null, + orderHeadPickbonId: $data['OrderHeadPickbonId'] ?? 0, + ); + } +} diff --git a/src/Responses/V30/ProductAssemblyRecipeItem.php b/src/Responses/V30/ProductAssemblyRecipeItem.php new file mode 100644 index 0000000..8a41f9d --- /dev/null +++ b/src/Responses/V30/ProductAssemblyRecipeItem.php @@ -0,0 +1,29 @@ + $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + productCode: $data['ProductCode'] ?? null, + qty: $data['Qty'] ?? 0.0, + sorting: $data['Sorting'] ?? null, + isStockBasedProduct: $data['IsStockBasedProduct'] ?? false, + ); + } +} diff --git a/src/Responses/V30/ProductBarcode.php b/src/Responses/V30/ProductBarcode.php new file mode 100644 index 0000000..b11fdfc --- /dev/null +++ b/src/Responses/V30/ProductBarcode.php @@ -0,0 +1,24 @@ + $barcodes */ + public function __construct( + public ?array $barcodes, + public int $productId, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + barcodes: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\BarcodeWithAmount::make($item), $data['Barcodes'] ?? []), + productId: $data['ProductId'] ?? 0, + ); + } +} diff --git a/src/Responses/V30/ProductCodeWithSupplierCode.php b/src/Responses/V30/ProductCodeWithSupplierCode.php new file mode 100644 index 0000000..2bd27ea --- /dev/null +++ b/src/Responses/V30/ProductCodeWithSupplierCode.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + productCode: $data['ProductCode'] ?? null, + supplierCode: $data['SupplierCode'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ProductCompositionItem.php b/src/Responses/V30/ProductCompositionItem.php new file mode 100644 index 0000000..5c8ae91 --- /dev/null +++ b/src/Responses/V30/ProductCompositionItem.php @@ -0,0 +1,29 @@ + $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + productCode: $data['ProductCode'] ?? null, + qty: $data['Qty'] ?? 0.0, + sorting: $data['Sorting'] ?? null, + isStockBasedProduct: $data['IsStockBasedProduct'] ?? false, + ); + } +} diff --git a/src/Responses/V30/ProductDimensions.php b/src/Responses/V30/ProductDimensions.php new file mode 100644 index 0000000..8de9f12 --- /dev/null +++ b/src/Responses/V30/ProductDimensions.php @@ -0,0 +1,59 @@ + $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + productCode: $data['ProductCode'] ?? null, + piecesOnPallet: $data['PiecesOnPallet'] ?? null, + PCSinInsidePackage: $data['PCSinInsidePackage'] ?? null, + PCSinOutsidePackage: $data['PCSinOutsidePackage'] ?? null, + weightSingleProduct: $data['WeightSingleProduct'] ?? 0.0, + weightInsidePackage: $data['WeightInsidePackage'] ?? 0.0, + weightOutsidePackage: $data['WeightOutsidePackage'] ?? 0.0, + volumeSingleProduct: $data['VolumeSingleProduct'] ?? 0.0, + volumeInsidePackage: $data['VolumeInsidePackage'] ?? 0.0, + volumeOutsidePackage: $data['VolumeOutsidePackage'] ?? 0.0, + widthSingleProduct: $data['WidthSingleProduct'] ?? 0.0, + widthInsidePackage: $data['WidthInsidePackage'] ?? 0.0, + widthOutsidePackage: $data['WidthOutsidePackage'] ?? 0.0, + heightSingleProduct: $data['HeightSingleProduct'] ?? 0.0, + heightInsidePackage: $data['HeightInsidePackage'] ?? 0.0, + heightOutsidePackage: $data['HeightOutsidePackage'] ?? 0.0, + depthSingleProduct: $data['DepthSingleProduct'] ?? 0.0, + depthInsidePackage: $data['DepthInsidePackage'] ?? 0.0, + depthOutsidePackage: $data['DepthOutsidePackage'] ?? 0.0, + ); + } +} diff --git a/src/Responses/V30/ProductExtraBarcodeType.php b/src/Responses/V30/ProductExtraBarcodeType.php new file mode 100644 index 0000000..31836b9 --- /dev/null +++ b/src/Responses/V30/ProductExtraBarcodeType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ProductGroup.php b/src/Responses/V30/ProductGroup.php new file mode 100644 index 0000000..6d68f1e --- /dev/null +++ b/src/Responses/V30/ProductGroup.php @@ -0,0 +1,44 @@ + $translations */ + public function __construct( + public int $id, + public ?string $name, + public ?int $parentProductGroupId, + public ?string $shortname, + public ?string $pictureUrl, + public int $sortValue, + public ?string $pictureName, + public int $productGroupTypeId, + public bool $isVisibleOnWebshop, + public int $depthLevel, + public bool $showUnitOnWebsite, + public ?array $translations, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + parentProductGroupId: $data['ParentProductGroupId'] ?? null, + shortname: $data['Shortname'] ?? null, + pictureUrl: $data['PictureUrl'] ?? null, + sortValue: $data['SortValue'] ?? 0, + pictureName: $data['PictureName'] ?? null, + productGroupTypeId: $data['ProductGroupTypeId'] ?? 0, + isVisibleOnWebshop: $data['IsVisibleOnWebshop'] ?? false, + depthLevel: $data['DepthLevel'] ?? 0, + showUnitOnWebsite: $data['ShowUnitOnWebsite'] ?? false, + translations: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\ProductGroupTranslation::make($item), $data['Translations'] ?? []), + ); + } +} diff --git a/src/Responses/V30/ProductGroupType.php b/src/Responses/V30/ProductGroupType.php new file mode 100644 index 0000000..faeef32 --- /dev/null +++ b/src/Responses/V30/ProductGroupType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ProductImageV2.php b/src/Responses/V30/ProductImageV2.php new file mode 100644 index 0000000..6945b13 --- /dev/null +++ b/src/Responses/V30/ProductImageV2.php @@ -0,0 +1,24 @@ + $productImages */ + public function __construct( + public ?string $baseUrl, + public ?array $productImages, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + baseUrl: $data['BaseUrl'] ?? null, + productImages: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\GetProductImage::make($item), $data['ProductImages'] ?? []), + ); + } +} diff --git a/src/Responses/V30/ProductMediaFileDto.php b/src/Responses/V30/ProductMediaFileDto.php new file mode 100644 index 0000000..b94d4ad --- /dev/null +++ b/src/Responses/V30/ProductMediaFileDto.php @@ -0,0 +1,24 @@ + $resources */ + public function __construct( + public int $productId, + public ?array $resources, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + resources: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\ProductResource::make($item), $data['Resources'] ?? []), + ); + } +} diff --git a/src/Responses/V30/ProductMinimalStockNumber.php b/src/Responses/V30/ProductMinimalStockNumber.php new file mode 100644 index 0000000..018bec5 --- /dev/null +++ b/src/Responses/V30/ProductMinimalStockNumber.php @@ -0,0 +1,28 @@ + $minimalStockWarehouses */ + public function __construct( + public int $productId, + public ?int $minimalStockForAdministrationLevel, + public ?int $minimalStockProductLevel, + public ?array $minimalStockWarehouses, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + minimalStockForAdministrationLevel: $data['MinimalStockForAdministrationLevel'] ?? null, + minimalStockProductLevel: $data['MinimalStockProductLevel'] ?? null, + minimalStockWarehouses: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\WarehouseMinimalStockNumber::make($item), $data['MinimalStockWarehouses'] ?? []), + ); + } +} diff --git a/src/Responses/V30/ProductPickLocationBasedOnSystemSettings.php b/src/Responses/V30/ProductPickLocationBasedOnSystemSettings.php new file mode 100644 index 0000000..f883130 --- /dev/null +++ b/src/Responses/V30/ProductPickLocationBasedOnSystemSettings.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + defaultPickLocationId: $data['DefaultPickLocationId'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ProductPriceInformation.php b/src/Responses/V30/ProductPriceInformation.php new file mode 100644 index 0000000..f58ac65 --- /dev/null +++ b/src/Responses/V30/ProductPriceInformation.php @@ -0,0 +1,24 @@ + $shiftPrices */ + public function __construct( + public int $productId, + public ?array $shiftPrices, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + shiftPrices: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\ProductShiftPrice::make($item), $data['ShiftPrices'] ?? []), + ); + } +} diff --git a/src/Responses/V30/ProductPricelist.php b/src/Responses/V30/ProductPricelist.php new file mode 100644 index 0000000..9143228 --- /dev/null +++ b/src/Responses/V30/ProductPricelist.php @@ -0,0 +1,33 @@ + $debtorIds + * @param array<\Webparking\Logic4Client\Data\V30\ProductPricelistContractPrice> $contractPrices + */ + public function __construct( + public int $id, + public ?string $name, + public ?array $debtorIds, + public ?float $fixedDiscount, + public ?array $contractPrices, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + debtorIds: $data['DebtorIds'] ?? null, + fixedDiscount: $data['FixedDiscount'] ?? null, + contractPrices: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\ProductPricelistContractPrice::make($item), $data['ContractPrices'] ?? []), + ); + } +} diff --git a/src/Responses/V30/ProductRelationType.php b/src/Responses/V30/ProductRelationType.php new file mode 100644 index 0000000..1accc0b --- /dev/null +++ b/src/Responses/V30/ProductRelationType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ProductReview.php b/src/Responses/V30/ProductReview.php new file mode 100644 index 0000000..27447e5 --- /dev/null +++ b/src/Responses/V30/ProductReview.php @@ -0,0 +1,38 @@ + $websiteIds */ + public function __construct( + public int $id, + public ?int $productId, + public ?string $username, + public ?string $emailAddress, + public ?\Carbon\Carbon $dateTimeCreated, + public ?string $review, + public int $score, + public ?array $websiteIds, + public ?string $reaction, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + productId: $data['ProductId'] ?? null, + username: $data['Username'] ?? null, + emailAddress: $data['EmailAddress'] ?? null, + dateTimeCreated: isset($data['DateTimeCreated']) ? \Carbon\Carbon::parse($data['DateTimeCreated']) : null, + review: $data['Review'] ?? null, + score: $data['Score'] ?? 0, + websiteIds: $data['WebsiteIds'] ?? null, + reaction: $data['Reaction'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ProductSEOInformation.php b/src/Responses/V30/ProductSEOInformation.php new file mode 100644 index 0000000..5cde741 --- /dev/null +++ b/src/Responses/V30/ProductSEOInformation.php @@ -0,0 +1,35 @@ + $data */ + public static function make(array $data): self + { + return new self( + websiteDomainId: $data['WebsiteDomainId'] ?? null, + globalizationId: $data['GlobalizationId'] ?? null, + productId: $data['ProductId'] ?? 0, + title: $data['Title'] ?? null, + description: $data['Description'] ?? null, + USP: $data['USP'] ?? null, + metaName: $data['MetaName'] ?? null, + metaDescription: $data['MetaDescription'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ProductSalesInformation.php b/src/Responses/V30/ProductSalesInformation.php new file mode 100644 index 0000000..b1957c7 --- /dev/null +++ b/src/Responses/V30/ProductSalesInformation.php @@ -0,0 +1,31 @@ + $data */ + public static function make(array $data): self + { + return new self( + productCode: $data['ProductCode'] ?? null, + productDescription: $data['ProductDescription'] ?? null, + value: $data['Value'] ?? 0.0, + dateStart: isset($data['DateStart']) ? \Carbon\Carbon::parse($data['DateStart']) : null, + dateEnd: isset($data['DateEnd']) ? \Carbon\Carbon::parse($data['DateEnd']) : null, + periodDescription: $data['PeriodDescription'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ProductShiftPrice.php b/src/Responses/V30/ProductShiftPrice.php new file mode 100644 index 0000000..24afbc6 --- /dev/null +++ b/src/Responses/V30/ProductShiftPrice.php @@ -0,0 +1,33 @@ + $data */ + public static function make(array $data): self + { + return new self( + qty: $data['Qty'] ?? 0, + buyPrice: $data['BuyPrice'] ?? 0.0, + margin: $data['Margin'] ?? 0.0, + sellPriceExcl: $data['SellPriceExcl'] ?? 0.0, + sellPriceGrossExcl: $data['SellPriceGrossExcl'] ?? 0.0, + description: $data['Description'] ?? null, + discountType: $data['DiscountType'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ProductShippingInformation.php b/src/Responses/V30/ProductShippingInformation.php new file mode 100644 index 0000000..afcb152 --- /dev/null +++ b/src/Responses/V30/ProductShippingInformation.php @@ -0,0 +1,39 @@ + $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + customsTariffnumber: $data['CustomsTariffnumber'] ?? null, + productCode: $data['ProductCode'] ?? null, + packagesDecimal: $data['PackagesDecimal'] ?? null, + piecesOnPallet: $data['PiecesOnPallet'] ?? null, + weight: $data['Weight'] ?? 0.0, + volume: $data['Volume'] ?? 0.0, + width: $data['Width'] ?? 0.0, + height: $data['Height'] ?? 0.0, + depth: $data['Depth'] ?? 0.0, + ); + } +} diff --git a/src/Responses/V30/ProductStatus.php b/src/Responses/V30/ProductStatus.php new file mode 100644 index 0000000..4acdde9 --- /dev/null +++ b/src/Responses/V30/ProductStatus.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + statusId: $data['StatusId'] ?? 0, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ProductStock.php b/src/Responses/V30/ProductStock.php new file mode 100644 index 0000000..c814f3b --- /dev/null +++ b/src/Responses/V30/ProductStock.php @@ -0,0 +1,31 @@ + $data */ + public static function make(array $data): self + { + return new self( + productCode: $data['ProductCode'] ?? null, + warehouseId: $data['WarehouseId'] ?? 0, + qtyReserved: $data['QtyReserved'] ?? 0.0, + freeStock: $data['FreeStock'] ?? 0.0, + productId: $data['ProductId'] ?? 0, + qty: $data['Qty'] ?? 0.0, + ); + } +} diff --git a/src/Responses/V30/ProductStockControlHead.php b/src/Responses/V30/ProductStockControlHead.php new file mode 100644 index 0000000..46fa08e --- /dev/null +++ b/src/Responses/V30/ProductStockControlHead.php @@ -0,0 +1,40 @@ + $rows */ + public function __construct( + public ?\Carbon\Carbon $createdDate, + public ?int $id, + public ?string $locationName, + public int $locationId, + public ?\Carbon\Carbon $processDate, + public ?string $username, + public ?int $userId, + public ?array $rows, + public ?string $eventLog, + public ?int $warehouseStockControlEmailTemplateId, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + createdDate: isset($data['CreatedDate']) ? \Carbon\Carbon::parse($data['CreatedDate']) : null, + id: $data['Id'] ?? null, + locationName: $data['LocationName'] ?? null, + locationId: $data['LocationId'] ?? 0, + processDate: isset($data['ProcessDate']) ? \Carbon\Carbon::parse($data['ProcessDate']) : null, + username: $data['Username'] ?? null, + userId: $data['UserId'] ?? null, + rows: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\ProductStockControlRow::make($item), $data['Rows'] ?? []), + eventLog: $data['EventLog'] ?? null, + warehouseStockControlEmailTemplateId: $data['WarehouseStockControlEmailTemplateId'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ProductStockControlRow.php b/src/Responses/V30/ProductStockControlRow.php new file mode 100644 index 0000000..3da4403 --- /dev/null +++ b/src/Responses/V30/ProductStockControlRow.php @@ -0,0 +1,50 @@ + $barcodeExtraList */ + public function __construct( + public ?int $id, + public ?int $productStockHeadId, + public int $productId, + public ?string $productDescription, + public ?string $productDescription2, + public ?string $vendorcode, + public float $stockTotal, + public float $stockOnCurrentLocation, + public ?float $stockCountedByUser, + public ?\Carbon\Carbon $stockLevelDate, + public ?string $barcode, + public ?string $productCode, + public ?string $barcode2, + public ?string $systemBarcode, + public ?array $barcodeExtraList, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? null, + productStockHeadId: $data['ProductStockHeadId'] ?? null, + productId: $data['ProductId'] ?? 0, + productDescription: $data['ProductDescription'] ?? null, + productDescription2: $data['ProductDescription2'] ?? null, + vendorcode: $data['Vendorcode'] ?? null, + stockTotal: $data['StockTotal'] ?? 0.0, + stockOnCurrentLocation: $data['StockOnCurrentLocation'] ?? 0.0, + stockCountedByUser: $data['StockCountedByUser'] ?? null, + stockLevelDate: isset($data['StockLevelDate']) ? \Carbon\Carbon::parse($data['StockLevelDate']) : null, + barcode: $data['Barcode'] ?? null, + productCode: $data['ProductCode'] ?? null, + barcode2: $data['Barcode2'] ?? null, + systemBarcode: $data['SystemBarcode'] ?? null, + barcodeExtraList: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\ProductExtraBarcode::make($item), $data['BarcodeExtraList'] ?? []), + ); + } +} diff --git a/src/Responses/V30/ProductStockInformationV2.php b/src/Responses/V30/ProductStockInformationV2.php new file mode 100644 index 0000000..1f9b6b6 --- /dev/null +++ b/src/Responses/V30/ProductStockInformationV2.php @@ -0,0 +1,35 @@ + $warehouseDefaultPickLocations + * @param array<\Webparking\Logic4Client\Data\V30\ProductStockInformationWarehouseStock> $stockInformation + */ + public function __construct( + public int $productId, + public float $totalStock, + public float $reservedStock, + public float $freeStock, + public ?array $warehouseDefaultPickLocations, + public ?array $stockInformation, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + totalStock: $data['TotalStock'] ?? 0.0, + reservedStock: $data['ReservedStock'] ?? 0.0, + freeStock: $data['FreeStock'] ?? 0.0, + warehouseDefaultPickLocations: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\ProductStockInformationWarehouseDefaultPickLocation::make($item), $data['WarehouseDefaultPickLocations'] ?? []), + stockInformation: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\ProductStockInformationWarehouseStock::make($item), $data['StockInformation'] ?? []), + ); + } +} diff --git a/src/Responses/V30/ProductStockLocations.php b/src/Responses/V30/ProductStockLocations.php new file mode 100644 index 0000000..21add59 --- /dev/null +++ b/src/Responses/V30/ProductStockLocations.php @@ -0,0 +1,31 @@ + $data */ + public static function make(array $data): self + { + return new self( + locationId: $data['LocationId'] ?? 0, + location: $data['Location'] ?? null, + productId: $data['ProductId'] ?? 0, + qty: $data['Qty'] ?? 0.0, + freeStock: $data['FreeStock'] ?? 0.0, + zoneId: $data['ZoneId'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ProductStockMutation.php b/src/Responses/V30/ProductStockMutation.php new file mode 100644 index 0000000..6bb6873 --- /dev/null +++ b/src/Responses/V30/ProductStockMutation.php @@ -0,0 +1,43 @@ + $data */ + public static function make(array $data): self + { + return new self( + productCode: $data['ProductCode'] ?? null, + buyOrderId: $data['BuyOrderId'] ?? null, + mutationDateTime: isset($data['MutationDateTime']) ? \Carbon\Carbon::parse($data['MutationDateTime']) : null, + buyPrice: $data['BuyPrice'] ?? 0.0, + stockMutationType: $data['StockMutationType'] ?? null, + ITSIssueId: $data['ITS_IssueId'] ?? null, + pickbonId: $data['PickbonId'] ?? null, + productId: $data['ProductId'] ?? 0, + amount: $data['Amount'] ?? 0.0, + remarks: $data['Remarks'] ?? null, + stockLocationId: $data['StockLocationId'] ?? 0, + stockMutationTypeId: $data['StockMutationTypeId'] ?? 0, + ); + } +} diff --git a/src/Responses/V30/ProductStockMutationTypeV11.php b/src/Responses/V30/ProductStockMutationTypeV11.php new file mode 100644 index 0000000..cc49fc1 --- /dev/null +++ b/src/Responses/V30/ProductStockMutationTypeV11.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + negative: $data['Negative'] ?? false, + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ProductStockSupplierWithActive.php b/src/Responses/V30/ProductStockSupplierWithActive.php new file mode 100644 index 0000000..e845e34 --- /dev/null +++ b/src/Responses/V30/ProductStockSupplierWithActive.php @@ -0,0 +1,29 @@ + $data */ + public static function make(array $data): self + { + return new self( + active: $data['Active'] ?? false, + supplierId: $data['SupplierId'] ?? 0, + productNextDelivery: isset($data['ProductNextDelivery']) ? \Carbon\Carbon::parse($data['ProductNextDelivery']) : null, + productId: $data['ProductId'] ?? 0, + qty: $data['Qty'] ?? 0.0, + ); + } +} diff --git a/src/Responses/V30/ProductStockSuppliers.php b/src/Responses/V30/ProductStockSuppliers.php new file mode 100644 index 0000000..1209b20 --- /dev/null +++ b/src/Responses/V30/ProductStockSuppliers.php @@ -0,0 +1,27 @@ + $data */ + public static function make(array $data): self + { + return new self( + supplierId: $data['SupplierId'] ?? 0, + productNextDelivery: isset($data['ProductNextDelivery']) ? \Carbon\Carbon::parse($data['ProductNextDelivery']) : null, + productId: $data['ProductId'] ?? 0, + qty: $data['Qty'] ?? 0.0, + ); + } +} diff --git a/src/Responses/V30/ProductStockWarehouseWithDefaultPickLocation.php b/src/Responses/V30/ProductStockWarehouseWithDefaultPickLocation.php new file mode 100644 index 0000000..2f00c60 --- /dev/null +++ b/src/Responses/V30/ProductStockWarehouseWithDefaultPickLocation.php @@ -0,0 +1,31 @@ + $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + warehouseId: $data['WarehouseId'] ?? 0, + minimalStock: $data['MinimalStock'] ?? 0.0, + maximumStock: $data['MaximumStock'] ?? null, + defaultPickLocationId: $data['DefaultPickLocationId'] ?? null, + note: $data['Note'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ProductSupplier.php b/src/Responses/V30/ProductSupplier.php new file mode 100644 index 0000000..374a7ee --- /dev/null +++ b/src/Responses/V30/ProductSupplier.php @@ -0,0 +1,32 @@ + $creditorBuyPrices */ + public function __construct( + public int $productId, + public ?string $creditorName, + public ?string $creditorProductCode, + public bool $isActive, + public int $creditorId, + public ?array $creditorBuyPrices, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + creditorName: $data['CreditorName'] ?? null, + creditorProductCode: $data['CreditorProductCode'] ?? null, + isActive: $data['IsActive'] ?? false, + creditorId: $data['CreditorId'] ?? 0, + creditorBuyPrices: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\KeyValuePairOfintAnddecimal::make($item), $data['CreditorBuyPrices'] ?? []), + ); + } +} diff --git a/src/Responses/V30/ProductSupplierNextDelivery.php b/src/Responses/V30/ProductSupplierNextDelivery.php new file mode 100644 index 0000000..06ae458 --- /dev/null +++ b/src/Responses/V30/ProductSupplierNextDelivery.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + supplierId: $data['SupplierId'] ?? 0, + deliveryDate: isset($data['DeliveryDate']) ? \Carbon\Carbon::parse($data['DeliveryDate']) : null, + ); + } +} diff --git a/src/Responses/V30/ProductTemplate.php b/src/Responses/V30/ProductTemplate.php new file mode 100644 index 0000000..d7b56f9 --- /dev/null +++ b/src/Responses/V30/ProductTemplate.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + templateId: $data['TemplateId'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ProductTemplateProductValue.php b/src/Responses/V30/ProductTemplateProductValue.php new file mode 100644 index 0000000..544092a --- /dev/null +++ b/src/Responses/V30/ProductTemplateProductValue.php @@ -0,0 +1,28 @@ + $values */ + public function __construct( + public int $productId, + public int $templatePropertyId, + public ?array $values, + public ?string $templatePropertyName, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + templatePropertyId: $data['TemplatePropertyId'] ?? 0, + values: $data['Values'] ?? null, + templatePropertyName: $data['TemplatePropertyName'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ProductTemplateProperty.php b/src/Responses/V30/ProductTemplateProperty.php new file mode 100644 index 0000000..97b22c9 --- /dev/null +++ b/src/Responses/V30/ProductTemplateProperty.php @@ -0,0 +1,41 @@ + $nameTranslations + * @param array<\Webparking\Logic4Client\Data\V30\Translation> $filterInfomations + * @param array<\Webparking\Logic4Client\Data\V30\Translation> $unitTranslations + * @param array $values + */ + public function __construct( + public int $templatePropertyId, + public ?string $name, + public ?array $nameTranslations, + public ?array $filterInfomations, + public ?string $unit, + public ?array $unitTranslations, + public ?string $remark, + public ?array $values, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + templatePropertyId: $data['TemplatePropertyId'] ?? 0, + name: $data['Name'] ?? null, + nameTranslations: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\Translation::make($item), $data['NameTranslations'] ?? []), + filterInfomations: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\Translation::make($item), $data['FilterInfomations'] ?? []), + unit: $data['Unit'] ?? null, + unitTranslations: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\Translation::make($item), $data['UnitTranslations'] ?? []), + remark: $data['Remark'] ?? null, + values: $data['Values'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ProductTemplatesWithTranslation.php b/src/Responses/V30/ProductTemplatesWithTranslation.php new file mode 100644 index 0000000..5d8c22e --- /dev/null +++ b/src/Responses/V30/ProductTemplatesWithTranslation.php @@ -0,0 +1,27 @@ + $productTemplates + * @param array<\Webparking\Logic4Client\Data\V30\ProductTemplatePropertyWithTranslation> $productTemplateTranslations + */ + public function __construct( + public ?array $productTemplates, + public ?array $productTemplateTranslations, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + productTemplates: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\ProductTemplateValuesWithTranslation::make($item), $data['ProductTemplates'] ?? []), + productTemplateTranslations: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\ProductTemplatePropertyWithTranslation::make($item), $data['ProductTemplateTranslations'] ?? []), + ); + } +} diff --git a/src/Responses/V30/ProductUnit.php b/src/Responses/V30/ProductUnit.php new file mode 100644 index 0000000..6c94661 --- /dev/null +++ b/src/Responses/V30/ProductUnit.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + unitId: $data['UnitId'] ?? 0, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ProductV14.php b/src/Responses/V30/ProductV14.php new file mode 100644 index 0000000..242b249 --- /dev/null +++ b/src/Responses/V30/ProductV14.php @@ -0,0 +1,194 @@ + $shiftPrices + * @param array<\Webparking\Logic4Client\Data\V30\FreeValue> $freeValues + * @param array<\Webparking\Logic4Client\Data\V30\Translation> $descriptions + * @param array<\Webparking\Logic4Client\Data\V30\ProductGroup> $productGroups + * @param array<\Webparking\Logic4Client\Data\V30\ProductExtraBarcode> $barcodeExtraList + * @param array<\Webparking\Logic4Client\Data\V30\ProductStockWarehouse> $wareHouses + * @param array $tags + */ + public function __construct( + public float $costPrice, + public ?array $shiftPrices, + public int $productId, + public ?string $productCode, + public ?string $productName1, + public ?string $productName2, + public ?string $productInfo, + public int $statusId, + public ?string $statusname, + public int $brandId, + public ?string $brandname, + public ?string $imagename1, + public ?string $imageUrl1, + public ?string $imagename2, + public ?string $imageUrl2, + public ?string $imagename3, + public ?string $imageUrl3, + public ?string $unit, + public int $unitId, + public int $minSaleAmount, + public ?int $minSaleAmountWebshop, + public ?int $minSaleBuyAmountDropShipment, + public ?int $saleCountIncrement, + public ?int $saleCountIncrementWebshop, + public ?int $saleCountIncrementDropShipment, + public ?int $minBuyAmount, + public float $vatPercent, + public ?int $vatCodeId, + public float $sellPriceGross, + public float $weight, + public float $volume, + public ?\Webparking\Logic4Client\Data\V30\ProductOffer $offer, + public ?float $sellPriceAdvice, + public float $buyPrice, + public int $productGroupId1, + public ?int $productGroupId2, + public ?int $productGroupId3, + public ?int $productGroupId4, + public ?int $buyCountIncrement, + public ?float $sellPriceLowestForWebshop, + public bool $excludePriceFromPricelistCalculations, + public ?float $additionalBuyPriceAmount, + public ?float $additionalBuyPricePercentage, + public ?bool $isComposedProduct, + public bool $isAssemblyProduct, + public bool $composedProductSetChildSellPricesToZero, + public ?bool $composedProductSetSellPriceToZero, + public float $freeStock, + public ?int $externalStockActiveSupplier, + public ?int $creditorDiscountGroupId, + public ?\Carbon\Carbon $dateTimeLastChanged, + public ?\Carbon\Carbon $dateTimeAdded, + public ?string $barCode1, + public ?array $freeValues, + public ?int $sorting, + public ?\Carbon\Carbon $nextDelivery, + public ?array $descriptions, + public ?array $productGroups, + public ?string $barcode2, + public ?array $barcodeExtraList, + public ?string $systemBarcode, + public int $productGroup1ProductGroupTypeId, + public ?array $wareHouses, + public ?int $minimalStock, + public int $PCSinInsidePackage, + public int $PCSinOutsidePackage, + public ?\Webparking\Logic4Client\Data\V30\ProductType $productType1, + public ?\Webparking\Logic4Client\Data\V30\ProductType $productType2, + public ?\Webparking\Logic4Client\Data\V30\ProductType $productType3, + public ?\Webparking\Logic4Client\Data\V30\ProductType $productType4, + public ?\Webparking\Logic4Client\Data\V30\ProductType $productType5, + public ?float $standardAmount, + public ?string $vendorCode, + public ?int $productTemplateId, + public ?string $productTemplateName, + public bool $hasVariants, + public ?int $variantParentProductId, + public ?array $tags, + public ?int $defaultPickLocation, + public ?int $defaultBulkLocation, + public bool $hidePricesOnWebsite, + public bool $showOfferButtonOnWebsite, + public bool $hideStartingPricesOnWebsite, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + costPrice: $data['CostPrice'] ?? 0.0, + shiftPrices: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\ProductShiftPriceV14::make($item), $data['ShiftPrices'] ?? []), + productId: $data['ProductId'] ?? 0, + productCode: $data['ProductCode'] ?? null, + productName1: $data['ProductName1'] ?? null, + productName2: $data['ProductName2'] ?? null, + productInfo: $data['ProductInfo'] ?? null, + statusId: $data['StatusId'] ?? 0, + statusname: $data['Statusname'] ?? null, + brandId: $data['BrandId'] ?? 0, + brandname: $data['Brandname'] ?? null, + imagename1: $data['Imagename1'] ?? null, + imageUrl1: $data['ImageUrl1'] ?? null, + imagename2: $data['Imagename2'] ?? null, + imageUrl2: $data['ImageUrl2'] ?? null, + imagename3: $data['Imagename3'] ?? null, + imageUrl3: $data['ImageUrl3'] ?? null, + unit: $data['Unit'] ?? null, + unitId: $data['UnitId'] ?? 0, + minSaleAmount: $data['MinSaleAmount'] ?? 0, + minSaleAmountWebshop: $data['MinSaleAmountWebshop'] ?? null, + minSaleBuyAmountDropShipment: $data['MinSaleBuyAmountDropShipment'] ?? null, + saleCountIncrement: $data['SaleCountIncrement'] ?? null, + saleCountIncrementWebshop: $data['SaleCountIncrementWebshop'] ?? null, + saleCountIncrementDropShipment: $data['SaleCountIncrementDropShipment'] ?? null, + minBuyAmount: $data['MinBuyAmount'] ?? null, + vatPercent: $data['VatPercent'] ?? 0.0, + vatCodeId: $data['VatCodeId'] ?? null, + sellPriceGross: $data['SellPriceGross'] ?? 0.0, + weight: $data['Weight'] ?? 0.0, + volume: $data['Volume'] ?? 0.0, + offer: isset($data['Offer']) ? \Webparking\Logic4Client\Data\V30\ProductOffer::make($data['Offer']) : null, + sellPriceAdvice: $data['SellPriceAdvice'] ?? null, + buyPrice: $data['BuyPrice'] ?? 0.0, + productGroupId1: $data['ProductGroupId1'] ?? 0, + productGroupId2: $data['ProductGroupId2'] ?? null, + productGroupId3: $data['ProductGroupId3'] ?? null, + productGroupId4: $data['ProductGroupId4'] ?? null, + buyCountIncrement: $data['BuyCountIncrement'] ?? null, + sellPriceLowestForWebshop: $data['SellPriceLowestForWebshop'] ?? null, + excludePriceFromPricelistCalculations: $data['ExcludePriceFromPricelistCalculations'] ?? false, + additionalBuyPriceAmount: $data['AdditionalBuyPriceAmount'] ?? null, + additionalBuyPricePercentage: $data['AdditionalBuyPricePercentage'] ?? null, + isComposedProduct: $data['IsComposedProduct'] ?? null, + isAssemblyProduct: $data['IsAssemblyProduct'] ?? false, + composedProductSetChildSellPricesToZero: $data['ComposedProductSetChildSellPricesToZero'] ?? false, + composedProductSetSellPriceToZero: $data['ComposedProductSetSellPriceToZero'] ?? null, + freeStock: $data['FreeStock'] ?? 0.0, + externalStockActiveSupplier: $data['ExternalStockActiveSupplier'] ?? null, + creditorDiscountGroupId: $data['CreditorDiscountGroupId'] ?? null, + dateTimeLastChanged: isset($data['DateTimeLastChanged']) ? \Carbon\Carbon::parse($data['DateTimeLastChanged']) : null, + dateTimeAdded: isset($data['DateTimeAdded']) ? \Carbon\Carbon::parse($data['DateTimeAdded']) : null, + barCode1: $data['BarCode1'] ?? null, + freeValues: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\FreeValue::make($item), $data['FreeValues'] ?? []), + sorting: $data['Sorting'] ?? null, + nextDelivery: isset($data['NextDelivery']) ? \Carbon\Carbon::parse($data['NextDelivery']) : null, + descriptions: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\Translation::make($item), $data['Descriptions'] ?? []), + productGroups: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\ProductGroup::make($item), $data['ProductGroups'] ?? []), + barcode2: $data['Barcode2'] ?? null, + barcodeExtraList: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\ProductExtraBarcode::make($item), $data['BarcodeExtraList'] ?? []), + systemBarcode: $data['SystemBarcode'] ?? null, + productGroup1ProductGroupTypeId: $data['ProductGroup1ProductGroupTypeId'] ?? 0, + wareHouses: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\ProductStockWarehouse::make($item), $data['WareHouses'] ?? []), + minimalStock: $data['MinimalStock'] ?? null, + PCSinInsidePackage: $data['PCSinInsidePackage'] ?? 0, + PCSinOutsidePackage: $data['PCSinOutsidePackage'] ?? 0, + productType1: isset($data['ProductType1']) ? \Webparking\Logic4Client\Data\V30\ProductType::make($data['ProductType1']) : null, + productType2: isset($data['ProductType2']) ? \Webparking\Logic4Client\Data\V30\ProductType::make($data['ProductType2']) : null, + productType3: isset($data['ProductType3']) ? \Webparking\Logic4Client\Data\V30\ProductType::make($data['ProductType3']) : null, + productType4: isset($data['ProductType4']) ? \Webparking\Logic4Client\Data\V30\ProductType::make($data['ProductType4']) : null, + productType5: isset($data['ProductType5']) ? \Webparking\Logic4Client\Data\V30\ProductType::make($data['ProductType5']) : null, + standardAmount: $data['StandardAmount'] ?? null, + vendorCode: $data['VendorCode'] ?? null, + productTemplateId: $data['ProductTemplateId'] ?? null, + productTemplateName: $data['ProductTemplateName'] ?? null, + hasVariants: $data['HasVariants'] ?? false, + variantParentProductId: $data['VariantParentProductId'] ?? null, + tags: $data['Tags'] ?? null, + defaultPickLocation: $data['DefaultPickLocation'] ?? null, + defaultBulkLocation: $data['DefaultBulkLocation'] ?? null, + hidePricesOnWebsite: $data['HidePricesOnWebsite'] ?? false, + showOfferButtonOnWebsite: $data['ShowOfferButtonOnWebsite'] ?? false, + hideStartingPricesOnWebsite: $data['HideStartingPricesOnWebsite'] ?? false, + ); + } +} diff --git a/src/Responses/V30/ProductVariantBalk.php b/src/Responses/V30/ProductVariantBalk.php new file mode 100644 index 0000000..bb18701 --- /dev/null +++ b/src/Responses/V30/ProductVariantBalk.php @@ -0,0 +1,31 @@ + $productVariants + * @param array<\Webparking\Logic4Client\Data\V30\ProductVariantBalkTranslation> $productVariantBalkTranslations + */ + public function __construct( + public ?string $name, + public int $id, + public ?array $productVariants, + public ?array $productVariantBalkTranslations, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + name: $data['Name'] ?? null, + id: $data['Id'] ?? 0, + productVariants: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\ProductVariant::make($item), $data['ProductVariants'] ?? []), + productVariantBalkTranslations: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\ProductVariantBalkTranslation::make($item), $data['ProductVariantBalkTranslations'] ?? []), + ); + } +} diff --git a/src/Responses/V30/ProductVariantBalkChildrenGroup.php b/src/Responses/V30/ProductVariantBalkChildrenGroup.php new file mode 100644 index 0000000..a76610d --- /dev/null +++ b/src/Responses/V30/ProductVariantBalkChildrenGroup.php @@ -0,0 +1,24 @@ + $children */ + public function __construct( + public int $productId, + public ?array $children, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + children: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\ProductVariantBalkChildrenGroupChildren::make($item), $data['Children'] ?? []), + ); + } +} diff --git a/src/Responses/V30/ProductWithRelatedProductsV3.php b/src/Responses/V30/ProductWithRelatedProductsV3.php new file mode 100644 index 0000000..112e6a8 --- /dev/null +++ b/src/Responses/V30/ProductWithRelatedProductsV3.php @@ -0,0 +1,24 @@ + $relatedProducts */ + public function __construct( + public int $productId, + public ?array $relatedProducts, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + relatedProducts: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\RelatedProductV3::make($item), $data['RelatedProducts'] ?? []), + ); + } +} diff --git a/src/Responses/V30/Province.php b/src/Responses/V30/Province.php new file mode 100644 index 0000000..f7b9ece --- /dev/null +++ b/src/Responses/V30/Province.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/RelationStatus.php b/src/Responses/V30/RelationStatus.php new file mode 100644 index 0000000..c379abc --- /dev/null +++ b/src/Responses/V30/RelationStatus.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Responses/V30/RelationType.php b/src/Responses/V30/RelationType.php new file mode 100644 index 0000000..027fe1a --- /dev/null +++ b/src/Responses/V30/RelationType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Responses/V30/Representative.php b/src/Responses/V30/Representative.php new file mode 100644 index 0000000..d6d8846 --- /dev/null +++ b/src/Responses/V30/Representative.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ReturnCategory.php b/src/Responses/V30/ReturnCategory.php new file mode 100644 index 0000000..d885a36 --- /dev/null +++ b/src/Responses/V30/ReturnCategory.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ReturnOrderV2.php b/src/Responses/V30/ReturnOrderV2.php new file mode 100644 index 0000000..b92f1a5 --- /dev/null +++ b/src/Responses/V30/ReturnOrderV2.php @@ -0,0 +1,126 @@ + $orderShipments + * @param array<\Webparking\Logic4Client\Data\V30\Payment> $payments + * @param array<\Webparking\Logic4Client\Data\V30\OrderRow> $orderRows + */ + public function __construct( + public int $categoryId, + public ?\Webparking\Logic4Client\Data\V30\ReturnProblem $problem, + public ?\Webparking\Logic4Client\Data\V30\ReturnSolution $solution, + public int $originalOrderId, + public ?\Carbon\Carbon $approvedReturnOrderDate, + public ?\Carbon\Carbon $receivedReturnOrderDate, + public int $debtorId, + public int $id, + public ?\Webparking\Logic4Client\Data\V30\OrderTotalsRead $totals, + public ?\Webparking\Logic4Client\Data\V30\PaymentMethod $paymentMethod, + public ?\Webparking\Logic4Client\Data\V30\OrderStatus $orderStatus, + public ?\Webparking\Logic4Client\Data\V30\OrderShippingMethod $shippingMethod, + public ?array $orderShipments, + public ?int $invoiceBelongsToOrderNumber, + public ?array $payments, + public ?\Webparking\Logic4Client\Data\V30\DebtorCostCentre $costCentre, + public ?\Webparking\Logic4Client\Data\V30\CustomerAddress $accountAddress, + public ?array $orderRows, + public ?int $deliveryProvinceId, + public ?int $invoiceProvinceId, + public ?int $accountProvinceId, + public ?string $lastClickGclIdValues, + public ?string $lastClickUtmValues, + public ?\Webparking\Logic4Client\Data\V30\CustomerAddress $deliveryAddress, + public ?\Webparking\Logic4Client\Data\V30\CustomerAddress $invoiceAddress, + public ?\Carbon\Carbon $creationDate, + public ?string $description, + public ?string $reference, + public ?int $branchId, + public ?int $userId, + public ?int $websiteDomainId, + public ?int $deliveryOptionId, + public ?\Carbon\Carbon $deliveryDate, + public ?\Webparking\Logic4Client\Data\V30\OrderShipmentFreeValue $orderShipmentFreeValues, + public ?string $notes, + public ?string $freeValue1, + public ?string $freeValue2, + public ?string $freeValue3, + public ?string $freeValue4, + public ?string $freeValue5, + public ?string $freeValue6, + public ?string $freeValue7, + public ?string $freeValue8, + public ?int $orderType1Id, + public ?int $orderType2Id, + public ?int $orderType3Id, + public ?int $orderType4Id, + public ?int $orderType5Id, + public ?int $orderType6Id, + public ?int $orderType7Id, + public ?int $orderType8Id, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + categoryId: $data['CategoryId'] ?? 0, + problem: isset($data['Problem']) ? \Webparking\Logic4Client\Data\V30\ReturnProblem::make($data['Problem']) : null, + solution: isset($data['Solution']) ? \Webparking\Logic4Client\Data\V30\ReturnSolution::make($data['Solution']) : null, + originalOrderId: $data['OriginalOrderId'] ?? 0, + approvedReturnOrderDate: isset($data['ApprovedReturnOrderDate']) ? \Carbon\Carbon::parse($data['ApprovedReturnOrderDate']) : null, + receivedReturnOrderDate: isset($data['ReceivedReturnOrderDate']) ? \Carbon\Carbon::parse($data['ReceivedReturnOrderDate']) : null, + debtorId: $data['DebtorId'] ?? 0, + id: $data['Id'] ?? 0, + totals: isset($data['Totals']) ? \Webparking\Logic4Client\Data\V30\OrderTotalsRead::make($data['Totals']) : null, + paymentMethod: isset($data['PaymentMethod']) ? \Webparking\Logic4Client\Data\V30\PaymentMethod::make($data['PaymentMethod']) : null, + orderStatus: isset($data['OrderStatus']) ? \Webparking\Logic4Client\Data\V30\OrderStatus::make($data['OrderStatus']) : null, + shippingMethod: isset($data['ShippingMethod']) ? \Webparking\Logic4Client\Data\V30\OrderShippingMethod::make($data['ShippingMethod']) : null, + orderShipments: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\OrderShipment::make($item), $data['OrderShipments'] ?? []), + invoiceBelongsToOrderNumber: $data['InvoiceBelongsToOrderNumber'] ?? null, + payments: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\Payment::make($item), $data['Payments'] ?? []), + costCentre: isset($data['CostCentre']) ? \Webparking\Logic4Client\Data\V30\DebtorCostCentre::make($data['CostCentre']) : null, + accountAddress: isset($data['AccountAddress']) ? \Webparking\Logic4Client\Data\V30\CustomerAddress::make($data['AccountAddress']) : null, + orderRows: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\OrderRow::make($item), $data['OrderRows'] ?? []), + deliveryProvinceId: $data['DeliveryProvinceId'] ?? null, + invoiceProvinceId: $data['InvoiceProvinceId'] ?? null, + accountProvinceId: $data['AccountProvinceId'] ?? null, + lastClickGclIdValues: $data['LastClickGclIdValues'] ?? null, + lastClickUtmValues: $data['LastClickUtmValues'] ?? null, + deliveryAddress: isset($data['DeliveryAddress']) ? \Webparking\Logic4Client\Data\V30\CustomerAddress::make($data['DeliveryAddress']) : null, + invoiceAddress: isset($data['InvoiceAddress']) ? \Webparking\Logic4Client\Data\V30\CustomerAddress::make($data['InvoiceAddress']) : null, + creationDate: isset($data['CreationDate']) ? \Carbon\Carbon::parse($data['CreationDate']) : null, + description: $data['Description'] ?? null, + reference: $data['Reference'] ?? null, + branchId: $data['BranchId'] ?? null, + userId: $data['UserId'] ?? null, + websiteDomainId: $data['WebsiteDomainId'] ?? null, + deliveryOptionId: $data['DeliveryOptionId'] ?? null, + deliveryDate: isset($data['DeliveryDate']) ? \Carbon\Carbon::parse($data['DeliveryDate']) : null, + orderShipmentFreeValues: isset($data['OrderShipmentFreeValues']) ? \Webparking\Logic4Client\Data\V30\OrderShipmentFreeValue::make($data['OrderShipmentFreeValues']) : null, + notes: $data['Notes'] ?? null, + freeValue1: $data['FreeValue1'] ?? null, + freeValue2: $data['FreeValue2'] ?? null, + freeValue3: $data['FreeValue3'] ?? null, + freeValue4: $data['FreeValue4'] ?? null, + freeValue5: $data['FreeValue5'] ?? null, + freeValue6: $data['FreeValue6'] ?? null, + freeValue7: $data['FreeValue7'] ?? null, + freeValue8: $data['FreeValue8'] ?? null, + orderType1Id: $data['OrderType1Id'] ?? null, + orderType2Id: $data['OrderType2Id'] ?? null, + orderType3Id: $data['OrderType3Id'] ?? null, + orderType4Id: $data['OrderType4Id'] ?? null, + orderType5Id: $data['OrderType5Id'] ?? null, + orderType6Id: $data['OrderType6Id'] ?? null, + orderType7Id: $data['OrderType7Id'] ?? null, + orderType8Id: $data['OrderType8Id'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ReturnProblemV11.php b/src/Responses/V30/ReturnProblemV11.php new file mode 100644 index 0000000..0aa8e4a --- /dev/null +++ b/src/Responses/V30/ReturnProblemV11.php @@ -0,0 +1,28 @@ + $solutions */ + public function __construct( + public ?array $solutions, + public int $id, + public ?string $name, + public ?string $description, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + solutions: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\ReturnSolution::make($item), $data['Solutions'] ?? []), + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ReturnSolution.php b/src/Responses/V30/ReturnSolution.php new file mode 100644 index 0000000..00ba920 --- /dev/null +++ b/src/Responses/V30/ReturnSolution.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Responses/V30/SalesOrderDelivery.php b/src/Responses/V30/SalesOrderDelivery.php new file mode 100644 index 0000000..57c1dd2 --- /dev/null +++ b/src/Responses/V30/SalesOrderDelivery.php @@ -0,0 +1,38 @@ + $details */ + public function __construct( + public int $deliveryId, + public ?int $orderId, + public int $orderStatusId, + public ?\Carbon\Carbon $deliveryDate, + public int $debtorId, + public int $shippingMethodId, + public ?int $branchId, + public ?int $websiteDomainId, + public ?array $details, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + deliveryId: $data['DeliveryId'] ?? 0, + orderId: $data['OrderId'] ?? null, + orderStatusId: $data['OrderStatusId'] ?? 0, + deliveryDate: isset($data['DeliveryDate']) ? \Carbon\Carbon::parse($data['DeliveryDate']) : null, + debtorId: $data['DebtorId'] ?? 0, + shippingMethodId: $data['ShippingMethodId'] ?? 0, + branchId: $data['BranchId'] ?? null, + websiteDomainId: $data['WebsiteDomainId'] ?? null, + details: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\SalesOrderDeliveryDetailRow::make($item), $data['Details'] ?? []), + ); + } +} diff --git a/src/Responses/V30/SalesOrderDeliveryRow.php b/src/Responses/V30/SalesOrderDeliveryRow.php new file mode 100644 index 0000000..66efc24 --- /dev/null +++ b/src/Responses/V30/SalesOrderDeliveryRow.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + rowId: $data['RowId'] ?? 0, + amountDelivered: $data['AmountDelivered'] ?? 0.0, + ); + } +} diff --git a/src/Responses/V30/SecondTypeContactGroup.php b/src/Responses/V30/SecondTypeContactGroup.php new file mode 100644 index 0000000..26f998a --- /dev/null +++ b/src/Responses/V30/SecondTypeContactGroup.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + value: $data['Value'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ShipperType.php b/src/Responses/V30/ShipperType.php new file mode 100644 index 0000000..09ba0ee --- /dev/null +++ b/src/Responses/V30/ShipperType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/ShippingMethod.php b/src/Responses/V30/ShippingMethod.php new file mode 100644 index 0000000..fec4114 --- /dev/null +++ b/src/Responses/V30/ShippingMethod.php @@ -0,0 +1,47 @@ + $countryIsoCodes + * @param array<\Webparking\Logic4Client\Data\V30\WebsiteDomain> $websiteDomains + */ + public function __construct( + public int $id, + public ?string $name, + public ?string $description, + public float $shipmentCosts, + public ?string $deliveryTime, + public bool $tracing, + public ?string $selectkeyCms, + public ?array $countryIsoCodes, + public float $basicAmount, + public ?float $freeShippingAboveAmount, + public ?float $freeShippingAboveAmountInclusive, + public ?array $websiteDomains, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + description: $data['Description'] ?? null, + shipmentCosts: $data['ShipmentCosts'] ?? 0.0, + deliveryTime: $data['DeliveryTime'] ?? null, + tracing: $data['Tracing'] ?? false, + selectkeyCms: $data['SelectkeyCms'] ?? null, + countryIsoCodes: $data['CountryIsoCodes'] ?? null, + basicAmount: $data['BasicAmount'] ?? 0.0, + freeShippingAboveAmount: $data['FreeShippingAboveAmount'] ?? null, + freeShippingAboveAmountInclusive: $data['FreeShippingAboveAmountInclusive'] ?? null, + websiteDomains: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\WebsiteDomain::make($item), $data['WebsiteDomains'] ?? []), + ); + } +} diff --git a/src/Responses/V30/StockLocationForProduct.php b/src/Responses/V30/StockLocationForProduct.php new file mode 100644 index 0000000..5f58711 --- /dev/null +++ b/src/Responses/V30/StockLocationForProduct.php @@ -0,0 +1,26 @@ + $stockLocations */ + public function __construct( + public int $numberOfStockLocations, + public int $productId, + public ?array $stockLocations, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + numberOfStockLocations: $data['NumberOfStockLocations'] ?? 0, + productId: $data['ProductId'] ?? 0, + stockLocations: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\StockLocationForProductItem::make($item), $data['StockLocations'] ?? []), + ); + } +} diff --git a/src/Responses/V30/Subscriber.php b/src/Responses/V30/Subscriber.php new file mode 100644 index 0000000..0d015e8 --- /dev/null +++ b/src/Responses/V30/Subscriber.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + emailaddress: $data['Emailaddress'] ?? null, + globalisationId: $data['GlobalisationId'] ?? 0, + ); + } +} diff --git a/src/Responses/V30/ThirdPartyExternalIdentifierType.php b/src/Responses/V30/ThirdPartyExternalIdentifierType.php new file mode 100644 index 0000000..e9139e4 --- /dev/null +++ b/src/Responses/V30/ThirdPartyExternalIdentifierType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + value: $data['Value'] ?? null, + ); + } +} diff --git a/src/Responses/V30/Top10Item.php b/src/Responses/V30/Top10Item.php new file mode 100644 index 0000000..afcfd19 --- /dev/null +++ b/src/Responses/V30/Top10Item.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? null, + name: $data['Name'] ?? null, + value: $data['Value'] ?? 0.0, + ); + } +} diff --git a/src/Responses/V30/TypeContactGroup.php b/src/Responses/V30/TypeContactGroup.php new file mode 100644 index 0000000..97ef735 --- /dev/null +++ b/src/Responses/V30/TypeContactGroup.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + value: $data['Value'] ?? null, + ); + } +} diff --git a/src/Responses/V30/TypeCostCenter.php b/src/Responses/V30/TypeCostCenter.php new file mode 100644 index 0000000..04e3c0a --- /dev/null +++ b/src/Responses/V30/TypeCostCenter.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + value: $data['Value'] ?? null, + ); + } +} diff --git a/src/Responses/V30/TypeEntityCode.php b/src/Responses/V30/TypeEntityCode.php new file mode 100644 index 0000000..94808a5 --- /dev/null +++ b/src/Responses/V30/TypeEntityCode.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + value: $data['Value'] ?? null, + ); + } +} diff --git a/src/Responses/V30/TypeFinancialBookingStatus.php b/src/Responses/V30/TypeFinancialBookingStatus.php new file mode 100644 index 0000000..3bb0f62 --- /dev/null +++ b/src/Responses/V30/TypeFinancialBookingStatus.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/TypeLedgerColumn.php b/src/Responses/V30/TypeLedgerColumn.php new file mode 100644 index 0000000..92b920f --- /dev/null +++ b/src/Responses/V30/TypeLedgerColumn.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + value: $data['Value'] ?? null, + sortId: $data['SortId'] ?? 0, + ); + } +} diff --git a/src/Responses/V30/TypeRoundOrderStatus.php b/src/Responses/V30/TypeRoundOrderStatus.php new file mode 100644 index 0000000..000dc17 --- /dev/null +++ b/src/Responses/V30/TypeRoundOrderStatus.php @@ -0,0 +1,27 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + value: $data['Value'] ?? null, + enablePlanning: $data['EnablePlanning'] ?? false, + customerAgreesToDeliver: $data['CustomerAgreesToDeliver'] ?? false, + ); + } +} diff --git a/src/Responses/V30/TypeRoundStatus.php b/src/Responses/V30/TypeRoundStatus.php new file mode 100644 index 0000000..bf68611 --- /dev/null +++ b/src/Responses/V30/TypeRoundStatus.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + value: $data['Value'] ?? null, + blocked: $data['Blocked'] ?? false, + ); + } +} diff --git a/src/Responses/V30/TypeTransactionCode.php b/src/Responses/V30/TypeTransactionCode.php new file mode 100644 index 0000000..06f88c8 --- /dev/null +++ b/src/Responses/V30/TypeTransactionCode.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + value: $data['Value'] ?? null, + ); + } +} diff --git a/src/Responses/V30/Userstatus.php b/src/Responses/V30/Userstatus.php new file mode 100644 index 0000000..4783ebc --- /dev/null +++ b/src/Responses/V30/Userstatus.php @@ -0,0 +1,39 @@ + $data */ + public static function make(array $data): self + { + return new self( + userName: $data['UserName'] ?? null, + statusDateTimeSince: isset($data['StatusDateTimeSince']) ? \Carbon\Carbon::parse($data['StatusDateTimeSince']) : null, + statusId: $data['StatusId'] ?? 0, + isAutoAwayStatus: $data['IsAutoAwayStatus'] ?? false, + isOfflineStatus: $data['IsOfflineStatus'] ?? false, + isOnlineStatus: $data['IsOnlineStatus'] ?? false, + isOnThePhoneStatus: $data['IsOnThePhoneStatus'] ?? false, + statusName: $data['StatusName'] ?? null, + statusNotes: $data['StatusNotes'] ?? null, + userId: $data['UserId'] ?? 0, + ); + } +} diff --git a/src/Responses/V30/ValuevsBudget.php b/src/Responses/V30/ValuevsBudget.php new file mode 100644 index 0000000..138eba5 --- /dev/null +++ b/src/Responses/V30/ValuevsBudget.php @@ -0,0 +1,31 @@ + $data */ + public static function make(array $data): self + { + return new self( + budget: $data['Budget'] ?? null, + typeContactGroupId: $data['TypeContactGroupId'] ?? null, + value: $data['Value'] ?? 0.0, + dateStart: isset($data['DateStart']) ? \Carbon\Carbon::parse($data['DateStart']) : null, + dateEnd: isset($data['DateEnd']) ? \Carbon\Carbon::parse($data['DateEnd']) : null, + periodDescription: $data['PeriodDescription'] ?? null, + ); + } +} diff --git a/src/Responses/V30/VariantBalkCategory.php b/src/Responses/V30/VariantBalkCategory.php new file mode 100644 index 0000000..a3c1dd6 --- /dev/null +++ b/src/Responses/V30/VariantBalkCategory.php @@ -0,0 +1,26 @@ + $translations */ + public function __construct( + public int $id, + public ?string $value, + public ?array $translations, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + value: $data['Value'] ?? null, + translations: array_map(static fn (array $item) => \Webparking\Logic4Client\Data\V30\VariantBalkCategoryTranslation::make($item), $data['Translations'] ?? []), + ); + } +} diff --git a/src/Responses/V30/VatCode.php b/src/Responses/V30/VatCode.php new file mode 100644 index 0000000..187ca4b --- /dev/null +++ b/src/Responses/V30/VatCode.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + percent: $data['Percent'] ?? 0.0, + name: $data['Name'] ?? null, + ); + } +} diff --git a/src/Responses/V30/Vehicle.php b/src/Responses/V30/Vehicle.php new file mode 100644 index 0000000..542e199 --- /dev/null +++ b/src/Responses/V30/Vehicle.php @@ -0,0 +1,41 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + licensePlate: $data['LicensePlate'] ?? null, + startAddress: $data['StartAddress'] ?? null, + startPostalCode: $data['StartPostalCode'] ?? null, + startCity: $data['StartCity'] ?? null, + endAddress: $data['EndAddress'] ?? null, + endPostalCode: $data['EndPostalCode'] ?? null, + endCity: $data['EndCity'] ?? null, + type: $data['Type'] ?? null, + minutes: $data['Minutes'] ?? null, + ); + } +} diff --git a/src/Responses/V30/WareHouse.php b/src/Responses/V30/WareHouse.php new file mode 100644 index 0000000..e8a1e31 --- /dev/null +++ b/src/Responses/V30/WareHouse.php @@ -0,0 +1,33 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + stockLocationIdWhenBilling: $data['StockLocationIdWhenBilling'] ?? null, + defaultPickStockLocationId: $data['DefaultPickStockLocationId'] ?? null, + defaultPickStockLocationIdForBuyorderDelivery: $data['DefaultPickStockLocationIdForBuyorderDelivery'] ?? null, + warehouseStockControlEmailTemplate: $data['WarehouseStockControlEmailTemplate'] ?? null, + reservationLocationId: $data['ReservationLocationId'] ?? null, + ); + } +} diff --git a/src/Responses/V30/WarehouseStockLocation.php b/src/Responses/V30/WarehouseStockLocation.php new file mode 100644 index 0000000..2dc71ec --- /dev/null +++ b/src/Responses/V30/WarehouseStockLocation.php @@ -0,0 +1,61 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + sortId: $data['SortId'] ?? 0, + blockLocationForStockIncrease: $data['BlockLocationForStockIncrease'] ?? false, + blockLocationForStockDecrease: $data['BlockLocationForStockDecrease'] ?? false, + databaseAdministration: $data['DatabaseAdministration'] ?? 0, + warehouseColumnId: $data['WarehouseColumnId'] ?? 0, + warehouseColumnSortId: $data['WarehouseColumnSortId'] ?? 0, + warehouseRowId: $data['WarehouseRowId'] ?? 0, + warehouseRowSortId: $data['WarehouseRowSortId'] ?? 0, + warehouseId: $data['WarehouseId'] ?? 0, + warehouseSortId: $data['WarehouseSortId'] ?? 0, + warehouseLocationZoneId: $data['WarehouseLocationZoneId'] ?? null, + warehouseColumnZoneId: $data['WarehouseColumnZoneId'] ?? null, + warehouseRowZoneId: $data['WarehouseRowZoneId'] ?? null, + remarks: $data['Remarks'] ?? null, + locationName: $data['LocationName'] ?? null, + stockType: $data['StockType'] ?? 0, + columnName: $data['ColumnName'] ?? null, + rowName: $data['RowName'] ?? null, + warehouseName: $data['WarehouseName'] ?? null, + ); + } +} diff --git a/src/Responses/V30/WarehouseZone.php b/src/Responses/V30/WarehouseZone.php new file mode 100644 index 0000000..1f700ba --- /dev/null +++ b/src/Responses/V30/WarehouseZone.php @@ -0,0 +1,27 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + name: $data['Name'] ?? null, + warehouseId: $data['WarehouseId'] ?? 0, + warehouseName: $data['WarehouseName'] ?? null, + ); + } +} diff --git a/src/Responses/V30/WebshopOrderlistProduct.php b/src/Responses/V30/WebshopOrderlistProduct.php new file mode 100644 index 0000000..bab874d --- /dev/null +++ b/src/Responses/V30/WebshopOrderlistProduct.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + typeId: $data['TypeId'] ?? null, + qty: $data['Qty'] ?? null, + ); + } +} diff --git a/src/Responses/V30/WebshopSearchWord.php b/src/Responses/V30/WebshopSearchWord.php new file mode 100644 index 0000000..1ef0f27 --- /dev/null +++ b/src/Responses/V30/WebshopSearchWord.php @@ -0,0 +1,31 @@ + $data */ + public static function make(array $data): self + { + return new self( + dateTimeAdded: isset($data['DateTimeAdded']) ? \Carbon\Carbon::parse($data['DateTimeAdded']) : null, + websiteDomainId: $data['WebsiteDomainId'] ?? null, + searchTerm: $data['SearchTerm'] ?? null, + visitorCode: $data['VisitorCode'] ?? null, + resultCount: $data['ResultCount'] ?? 0, + globalisationId: $data['GlobalisationId'] ?? 0, + ); + } +} diff --git a/src/Responses/V30/WebshopUser.php b/src/Responses/V30/WebshopUser.php new file mode 100644 index 0000000..4f159b8 --- /dev/null +++ b/src/Responses/V30/WebshopUser.php @@ -0,0 +1,112 @@ + $debtorWebshopUserProductExcludedFromAnnualBudgets */ + public function __construct( + public bool $displayPricesWithoutPricelistCalculations, + public ?int $webshopUserId, + public int $debtorId, + public bool $limitedToOrderlist, + public bool $canOrderOutsideOrderListWithApproval, + public bool $canModifyOrderList, + public ?int $supervisorId1, + public ?int $supervisorId2, + public bool $hideProductPrices, + public int $showOrdersRightLevel, + public int $showInvoicesRightLevel, + public ?float $annualBudget, + public bool $hasAnualBudget, + public ?float $maxOrderAmountWithoutApproval, + public int $webShopUserTypeId, + public ?string $username, + public ?string $email, + public ?string $telephoneNumber, + public ?string $city, + public ?string $postalCode, + public ?string $address, + public ?int $deliveryAddressId, + public ?float $minOrderAmount, + public int $countryId, + public ?string $companyName, + public ?string $name, + public int $globalisationId, + public bool $webshopAssortment, + public ?int $debtorCostCenterId, + public bool $canParkOrders, + public ?\Carbon\Carbon $passwordLastchanged, + public bool $navigateWebshopUserToProductlistAfterLogin, + public bool $navigateWebshopUserToAssortmentAfterLogin, + public bool $canUseCustomDeliveryAddress, + public bool $isParticulier, + public int $relationTypeId, + public bool $canUseCustomInvoiceAddress, + public ?int $invoiceAddressId, + public bool $limitedToAssortment, + public bool $isExternalBuyer, + public bool $hideFromPrices, + public ?int $relationGroupId, + public ?float $offerModePriceMargin, + public bool $offerModeUseLocations, + public ?string $offerModeExportConfigurationJson, + public ?array $debtorWebshopUserProductExcludedFromAnnualBudgets, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + displayPricesWithoutPricelistCalculations: $data['DisplayPricesWithoutPricelistCalculations'] ?? false, + webshopUserId: $data['WebshopUserId'] ?? null, + debtorId: $data['DebtorId'] ?? 0, + limitedToOrderlist: $data['LimitedToOrderlist'] ?? false, + canOrderOutsideOrderListWithApproval: $data['CanOrderOutsideOrderListWithApproval'] ?? false, + canModifyOrderList: $data['CanModifyOrderList'] ?? false, + supervisorId1: $data['SupervisorId1'] ?? null, + supervisorId2: $data['SupervisorId2'] ?? null, + hideProductPrices: $data['HideProductPrices'] ?? false, + showOrdersRightLevel: $data['ShowOrdersRightLevel'] ?? 0, + showInvoicesRightLevel: $data['ShowInvoicesRightLevel'] ?? 0, + annualBudget: $data['AnnualBudget'] ?? null, + hasAnualBudget: $data['HasAnualBudget'] ?? false, + maxOrderAmountWithoutApproval: $data['MaxOrderAmountWithoutApproval'] ?? null, + webShopUserTypeId: $data['WebShopUserTypeId'] ?? 0, + username: $data['Username'] ?? null, + email: $data['Email'] ?? null, + telephoneNumber: $data['TelephoneNumber'] ?? null, + city: $data['City'] ?? null, + postalCode: $data['PostalCode'] ?? null, + address: $data['Address'] ?? null, + deliveryAddressId: $data['DeliveryAddressId'] ?? null, + minOrderAmount: $data['MinOrderAmount'] ?? null, + countryId: $data['CountryId'] ?? 0, + companyName: $data['CompanyName'] ?? null, + name: $data['Name'] ?? null, + globalisationId: $data['GlobalisationId'] ?? 0, + webshopAssortment: $data['WebshopAssortment'] ?? false, + debtorCostCenterId: $data['Debtor_CostCenterId'] ?? null, + canParkOrders: $data['CanParkOrders'] ?? false, + passwordLastchanged: isset($data['Password_Lastchanged']) ? \Carbon\Carbon::parse($data['Password_Lastchanged']) : null, + navigateWebshopUserToProductlistAfterLogin: $data['NavigateWebshopUser_ToProductlistAfterLogin'] ?? false, + navigateWebshopUserToAssortmentAfterLogin: $data['NavigateWebshopUser_ToAssortmentAfterLogin'] ?? false, + canUseCustomDeliveryAddress: $data['CanUseCustomDeliveryAddress'] ?? false, + isParticulier: $data['IsParticulier'] ?? false, + relationTypeId: $data['RelationTypeId'] ?? 0, + canUseCustomInvoiceAddress: $data['CanUseCustomInvoiceAddress'] ?? false, + invoiceAddressId: $data['InvoiceAddressId'] ?? null, + limitedToAssortment: $data['LimitedToAssortment'] ?? false, + isExternalBuyer: $data['IsExternalBuyer'] ?? false, + hideFromPrices: $data['HideFromPrices'] ?? false, + relationGroupId: $data['RelationGroupId'] ?? null, + offerModePriceMargin: $data['OfferModePriceMargin'] ?? null, + offerModeUseLocations: $data['OfferModeUseLocations'] ?? false, + offerModeExportConfigurationJson: $data['OfferModeExportConfigurationJson'] ?? null, + debtorWebshopUserProductExcludedFromAnnualBudgets: $data['Debtor_WebshopUser_ProductExcludedFromAnnualBudgets'] ?? null, + ); + } +} diff --git a/src/Responses/V30/WebshopUserProductOfProductV12.php b/src/Responses/V30/WebshopUserProductOfProductV12.php new file mode 100644 index 0000000..c12df24 --- /dev/null +++ b/src/Responses/V30/WebshopUserProductOfProductV12.php @@ -0,0 +1,47 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + dateTimeAdded: isset($data['DateTimeAdded']) ? \Carbon\Carbon::parse($data['DateTimeAdded']) : null, + composedProductParentId: $data['ComposedProductParentId'] ?? null, + webshopUserId: $data['WebshopUserId'] ?? null, + productInformation: isset($data['ProductInformation']) ? \Webparking\Logic4Client\Data\V30\ProductV12::make($data['ProductInformation']) : null, + productId: $data['ProductId'] ?? 0, + qtyDec: $data['QtyDec'] ?? null, + commission: $data['Commission'] ?? null, + excludedFromAnnualBudget: $data['ExcludedFromAnnualBudget'] ?? false, + typeId: $data['TypeId'] ?? 0, + debtorId: $data['DebtorId'] ?? null, + visitorCode: $data['VisitorCode'] ?? null, + websiteDomainId: $data['WebsiteDomainId'] ?? null, + shoppingCartKey: $data['ShoppingCartKey'] ?? null, + ); + } +} diff --git a/src/Responses/V30/WebshopUserProductType.php b/src/Responses/V30/WebshopUserProductType.php new file mode 100644 index 0000000..925d080 --- /dev/null +++ b/src/Responses/V30/WebshopUserProductType.php @@ -0,0 +1,25 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + type: $data['Type'] ?? null, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Responses/V30/WebshopUserType.php b/src/Responses/V30/WebshopUserType.php new file mode 100644 index 0000000..53c73d0 --- /dev/null +++ b/src/Responses/V30/WebshopUserType.php @@ -0,0 +1,23 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + description: $data['Description'] ?? null, + ); + } +} diff --git a/src/Responses/V30/WebshopVisitorBehaviour.php b/src/Responses/V30/WebshopVisitorBehaviour.php new file mode 100644 index 0000000..13b82ef --- /dev/null +++ b/src/Responses/V30/WebshopVisitorBehaviour.php @@ -0,0 +1,39 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + dateTimeAdded: isset($data['DateTimeAdded']) ? \Carbon\Carbon::parse($data['DateTimeAdded']) : null, + dateTimeModified: isset($data['DateTimeModified']) ? \Carbon\Carbon::parse($data['DateTimeModified']) : null, + productId: $data['ProductId'] ?? 0, + composedProductParentId: $data['ComposedProductParentId'] ?? null, + qtyDec: $data['QtyDec'] ?? null, + commission: $data['Commission'] ?? null, + webshopUserProductListType: isset($data['WebshopUserProductListType']) ? \Webparking\Logic4Client\Data\V30\WebsiteProductListType::make($data['WebshopUserProductListType']) : null, + debtorId: $data['DebtorId'] ?? null, + websiteDomainId: $data['WebsiteDomainId'] ?? null, + ); + } +} diff --git a/src/Responses/V30/WebsiteAlias.php b/src/Responses/V30/WebsiteAlias.php new file mode 100644 index 0000000..1cfb324 --- /dev/null +++ b/src/Responses/V30/WebsiteAlias.php @@ -0,0 +1,34 @@ + $websiteDomainIds */ + public function __construct( + public int $id, + public ?int $productId, + public ?int $brandId, + public ?int $productGroupId, + public ?string $aliasUrl, + public int $globalisationId, + public ?array $websiteDomainIds, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + productId: $data['ProductId'] ?? null, + brandId: $data['BrandId'] ?? null, + productGroupId: $data['ProductGroupId'] ?? null, + aliasUrl: $data['AliasUrl'] ?? null, + globalisationId: $data['GlobalisationId'] ?? 0, + websiteDomainIds: $data['WebsiteDomainIds'] ?? null, + ); + } +} diff --git a/src/Responses/V30/WebsiteDomain.php b/src/Responses/V30/WebsiteDomain.php new file mode 100644 index 0000000..addc96c --- /dev/null +++ b/src/Responses/V30/WebsiteDomain.php @@ -0,0 +1,27 @@ + $data */ + public static function make(array $data): self + { + return new self( + id: $data['Id'] ?? 0, + url: $data['Url'] ?? null, + title: $data['Title'] ?? null, + isMainDomain: $data['IsMainDomain'] ?? false, + ); + } +} diff --git a/src/Responses/V30/WebsiteDomainsForProduct.php b/src/Responses/V30/WebsiteDomainsForProduct.php new file mode 100644 index 0000000..1fd8110 --- /dev/null +++ b/src/Responses/V30/WebsiteDomainsForProduct.php @@ -0,0 +1,24 @@ + $websiteDomainIds */ + public function __construct( + public int $productId, + public ?array $websiteDomainIds, + ) { + } + + /** @param array $data */ + public static function make(array $data): self + { + return new self( + productId: $data['ProductId'] ?? 0, + websiteDomainIds: $data['WebsiteDomainIds'] ?? null, + ); + } +} diff --git a/tests/Feature/OrderLogic4ResponseListTest.php b/tests/Feature/Logic4ResponseListOfOrderTest.php similarity index 66% rename from tests/Feature/OrderLogic4ResponseListTest.php rename to tests/Feature/Logic4ResponseListOfOrderTest.php index 4b0c05c..7a81d05 100644 --- a/tests/Feature/OrderLogic4ResponseListTest.php +++ b/tests/Feature/Logic4ResponseListOfOrderTest.php @@ -4,14 +4,14 @@ namespace Webparking\Logic4Client\Tests\Feature; -use Webparking\Logic4Client\Responses\V10\OrderLogic4ResponseList; +use Webparking\Logic4Client\Responses\V10\Logic4ResponseListOfOrder; use Webparking\Logic4Client\Tests\TestCase; -final class OrderLogic4ResponseListTest extends TestCase +final class Logic4ResponseListOfOrderTest extends TestCase { public function testMakeWithMinimalData(): void { - $data = OrderLogic4ResponseList::make([]); + $data = Logic4ResponseListOfOrder::make([]); static::assertSame([], $data->records); static::assertSame(0, $data->recordsCounter);