commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
OutOfStockErrorBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
17 
21 final class OutOfStockErrorBuilder implements Builder
22 {
27  private $message;
28 
33  private $lineItems;
34 
39  private $skus;
40 
47  public function getMessage()
48  {
49  return $this->message;
50  }
51 
58  public function getLineItems()
59  {
60  return $this->lineItems;
61  }
62 
69  public function getSkus()
70  {
71  return $this->skus;
72  }
73 
78  public function withMessage(?string $message)
79  {
80  $this->message = $message;
81 
82  return $this;
83  }
84 
89  public function withLineItems(?array $lineItems)
90  {
91  $this->lineItems = $lineItems;
92 
93  return $this;
94  }
95 
100  public function withSkus(?array $skus)
101  {
102  $this->skus = $skus;
103 
104  return $this;
105  }
106 
107 
108  public function build(): OutOfStockError
109  {
110  return new OutOfStockErrorModel(
111  $this->message,
112  $this->lineItems,
113  $this->skus
114  );
115  }
116 
117  public static function of(): OutOfStockErrorBuilder
118  {
119  return new self();
120  }
121 }