diff --git a/src/Resources/Supplier/EconomicOperator.php b/src/Resources/Supplier/EconomicOperator.php new file mode 100644 index 0000000..60b0c35 --- /dev/null +++ b/src/Resources/Supplier/EconomicOperator.php @@ -0,0 +1,79 @@ +offsetSet('id', $id); + + return $this; + } + + public function name(string $name): self + { + $this->offsetSet('name', $name); + + return $this; + } + + public function street(string $street): self + { + $this->offsetSet('street', $street); + + return $this; + } + + public function houseNumber(string $houseNumber): self + { + $this->offsetSet('house_number', $houseNumber); + + return $this; + } + + public function additionalAddressDetails(string $additionalAddressDetails): self + { + $this->offsetSet('additional_address_details', $additionalAddressDetails); + + return $this; + } + + public function postalCode(string $postalCode): self + { + $this->offsetSet('postal_code', $postalCode); + + return $this; + } + + public function city(string $city): self + { + $this->offsetSet('city', $city); + + return $this; + } + + public function country(string $country): self + { + $this->offsetSet('country', $country); + + return $this; + } + + public function contactEmail(string $contactEmail): self + { + $this->offsetSet('contact_email', $contactEmail); + + return $this; + } + + public function contactPhone(string $contactPhone): self + { + $this->offsetSet('contact_phone', $contactPhone); + + return $this; + } +} \ No newline at end of file diff --git a/src/Resources/Supplier/Product.php b/src/Resources/Supplier/Product.php index 35e3fef..b473d89 100644 --- a/src/Resources/Supplier/Product.php +++ b/src/Resources/Supplier/Product.php @@ -16,35 +16,35 @@ class Product extends Resource const MEASURE_GRAM = 'g'; const MEASURE_KILOGRAM = 'kg'; - public function ean($ean): self + public function ean(string $ean): self { $this->offsetSet('ean', $ean); return $this; } - public function sku($sku): self + public function sku(string $sku): self { $this->offsetSet('sku', $sku); return $this; } - public function isbn($isbn): self + public function isbn(string $isbn): self { $this->offsetSet('isbn', $isbn); return $this; } - public function articleNumber($articleNumber): self + public function articleNumber(string $articleNumber): self { $this->offsetSet('article_number', $articleNumber); return $this; } - public function title($title): self + public function title(string $title): self { $this->offsetSet('title', $title); @@ -57,14 +57,14 @@ public function title($title): self * @param string $name * @return $this */ - public function name($name): self + public function name(string $name): self { $this->offsetSet('title', $name); return $this; } - public function brand($brand): self + public function brand(string $brand): self { $this->offsetSet('brand', $brand); @@ -182,4 +182,11 @@ public function condition(Condition $condition): self return $this; } + public function economicOperator(EconomicOperator $economicOperator): self + { + $this->offsetSet('economic_operator', $economicOperator->toArray()); + + return $this; + } + } \ No newline at end of file