Skip to content

Commit

Permalink
Automated rebuild from definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
Eshop Bot committed Jul 18, 2023
1 parent 3e751c2 commit ad0cd51
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Entity/ProductApiEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
16 changes: 16 additions & 0 deletions src/Entity/StockItemApiEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down Expand Up @@ -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();
}
Expand Down
4 changes: 4 additions & 0 deletions src/Entity/VariantApiEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
6 changes: 6 additions & 0 deletions src/FieldConfig/ProductApiFieldConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,10 @@ public function withEan(): self {

return $this;
}

public function withCreated(): self {
$this->fields['created'] = true;

return $this;
}
}
24 changes: 24 additions & 0 deletions src/FieldConfig/StockItemApiFieldConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
}
6 changes: 6 additions & 0 deletions src/FieldConfig/VariantApiFieldConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,10 @@ public function withEan(): self {

return $this;
}

public function withCreated(): self {
$this->fields['created'] = true;

return $this;
}
}

0 comments on commit ad0cd51

Please sign in to comment.