commercetools-sdk-php-v2  master
The platform, import-api and ml-api PHP sdks generated from our api reference.
ReturnItemDraftBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
17 
21 final class ReturnItemDraftBuilder implements Builder
22 {
27  private $quantity;
28 
33  private $lineItemId;
34 
39  private $customLineItemId;
40 
45  private $comment;
46 
51  private $shipmentState;
52 
57  public function getQuantity()
58  {
59  return $this->quantity;
60  }
61 
66  public function getLineItemId()
67  {
68  return $this->lineItemId;
69  }
70 
75  public function getCustomLineItemId()
76  {
77  return $this->customLineItemId;
78  }
79 
84  public function getComment()
85  {
86  return $this->comment;
87  }
88 
95  public function getShipmentState()
96  {
97  return $this->shipmentState;
98  }
99 
104  public function withQuantity(?int $quantity)
105  {
106  $this->quantity = $quantity;
107 
108  return $this;
109  }
110 
115  public function withLineItemId(?string $lineItemId)
116  {
117  $this->lineItemId = $lineItemId;
118 
119  return $this;
120  }
121 
126  public function withCustomLineItemId(?string $customLineItemId)
127  {
128  $this->customLineItemId = $customLineItemId;
129 
130  return $this;
131  }
132 
137  public function withComment(?string $comment)
138  {
139  $this->comment = $comment;
140 
141  return $this;
142  }
143 
148  public function withShipmentState(?string $shipmentState)
149  {
150  $this->shipmentState = $shipmentState;
151 
152  return $this;
153  }
154 
155 
156  public function build(): ReturnItemDraft
157  {
158  return new ReturnItemDraftModel(
159  $this->quantity,
160  $this->lineItemId,
161  $this->customLineItemId,
162  $this->comment,
163  $this->shipmentState
164  );
165  }
166 
167  public static function of(): ReturnItemDraftBuilder
168  {
169  return new self();
170  }
171 }