commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
MyQuoteRequestDraftBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
17 
21 final class MyQuoteRequestDraftBuilder implements Builder
22 {
27  private $cartId;
28 
33  private $cartVersion;
34 
39  private $comment;
40 
48  public function getCartId()
49  {
50  return $this->cartId;
51  }
52 
59  public function getCartVersion()
60  {
61  return $this->cartVersion;
62  }
63 
70  public function getComment()
71  {
72  return $this->comment;
73  }
74 
79  public function withCartId(?string $cartId)
80  {
81  $this->cartId = $cartId;
82 
83  return $this;
84  }
85 
90  public function withCartVersion(?int $cartVersion)
91  {
92  $this->cartVersion = $cartVersion;
93 
94  return $this;
95  }
96 
101  public function withComment(?string $comment)
102  {
103  $this->comment = $comment;
104 
105  return $this;
106  }
107 
108 
109  public function build(): MyQuoteRequestDraft
110  {
111  return new MyQuoteRequestDraftModel(
112  $this->cartId,
113  $this->cartVersion,
114  $this->comment
115  );
116  }
117 
118  public static function of(): MyQuoteRequestDraftBuilder
119  {
120  return new self();
121  }
122 }