From ad0cd51e67aa5ba349a5de9a584bb79d47095f28 Mon Sep 17 00:00:00 2001 From: Eshop Bot Date: Tue, 18 Jul 2023 11:36:02 +0000 Subject: [PATCH] Automated rebuild from definitions --- src/Entity/ProductApiEntity.php | 4 ++++ src/Entity/StockItemApiEntity.php | 16 ++++++++++++++ src/Entity/VariantApiEntity.php | 4 ++++ src/FieldConfig/ProductApiFieldConfig.php | 6 ++++++ src/FieldConfig/StockItemApiFieldConfig.php | 24 +++++++++++++++++++++ src/FieldConfig/VariantApiFieldConfig.php | 6 ++++++ 6 files changed, 60 insertions(+) diff --git a/src/Entity/ProductApiEntity.php b/src/Entity/ProductApiEntity.php index c2f24f5..0eb5372 100644 --- a/src/Entity/ProductApiEntity.php +++ b/src/Entity/ProductApiEntity.php @@ -56,6 +56,10 @@ public function getEan(): ?string { return $this->returnField('ean'); } + public function getCreated(): string { + return $this->returnField('created'); + } + final public static function createFieldConfig(): ProductApiFieldConfig { return new ProductApiFieldConfig(); } diff --git a/src/Entity/StockItemApiEntity.php b/src/Entity/StockItemApiEntity.php index 3e19cbe..68f87d5 100644 --- a/src/Entity/StockItemApiEntity.php +++ b/src/Entity/StockItemApiEntity.php @@ -32,6 +32,10 @@ public function getFullPrice(): float { return $this->returnField('full_price'); } + public function getOriginalPrice(): float { + return $this->returnField('original_price'); + } + public function getAccountingValue(): string { return $this->returnField('accounting_value'); } @@ -93,6 +97,18 @@ public function getStockAmounts(): array { return $this->returnFieldArray('stock_amounts', StockItemAmountApiEntity::class); } + public function getFirstPurchase(): ?string { + return $this->returnField('first_purchase'); + } + + public function getLastPurchase(): ?string { + return $this->returnField('last_purchase'); + } + + public function getLastSale(): ?string { + return $this->returnField('last_sale'); + } + final public static function createFieldConfig(): StockItemApiFieldConfig { return new StockItemApiFieldConfig(); } diff --git a/src/Entity/VariantApiEntity.php b/src/Entity/VariantApiEntity.php index 14fee2a..eb4f2d9 100644 --- a/src/Entity/VariantApiEntity.php +++ b/src/Entity/VariantApiEntity.php @@ -36,6 +36,10 @@ public function getEan(): ?string { return $this->returnField('ean'); } + public function getCreated(): string { + return $this->returnField('created'); + } + final public static function createFieldConfig(): VariantApiFieldConfig { return new VariantApiFieldConfig(); } diff --git a/src/FieldConfig/ProductApiFieldConfig.php b/src/FieldConfig/ProductApiFieldConfig.php index d24b207..74813ef 100644 --- a/src/FieldConfig/ProductApiFieldConfig.php +++ b/src/FieldConfig/ProductApiFieldConfig.php @@ -75,4 +75,10 @@ public function withEan(): self { return $this; } + + public function withCreated(): self { + $this->fields['created'] = true; + + return $this; + } } diff --git a/src/FieldConfig/StockItemApiFieldConfig.php b/src/FieldConfig/StockItemApiFieldConfig.php index d1916d4..ffd0e22 100644 --- a/src/FieldConfig/StockItemApiFieldConfig.php +++ b/src/FieldConfig/StockItemApiFieldConfig.php @@ -40,6 +40,12 @@ public function withFullPrice(): self { return $this; } + public function withOriginalPrice(): self { + $this->fields['original_price'] = true; + + return $this; + } + public function withAccountingValue(): self { $this->fields['accounting_value'] = true; @@ -117,4 +123,22 @@ public function withStockAmounts(StockItemAmountApiFieldConfig $config): self { return $this; } + + public function withFirstPurchase(): self { + $this->fields['first_purchase'] = true; + + return $this; + } + + public function withLastPurchase(): self { + $this->fields['last_purchase'] = true; + + return $this; + } + + public function withLastSale(): self { + $this->fields['last_sale'] = true; + + return $this; + } } diff --git a/src/FieldConfig/VariantApiFieldConfig.php b/src/FieldConfig/VariantApiFieldConfig.php index 1d1b17a..5062273 100644 --- a/src/FieldConfig/VariantApiFieldConfig.php +++ b/src/FieldConfig/VariantApiFieldConfig.php @@ -45,4 +45,10 @@ public function withEan(): self { return $this; } + + public function withCreated(): self { + $this->fields['created'] = true; + + return $this; + } }