commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
QuoteRequestReferenceBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
18 use stdClass;
19 
23 final class QuoteRequestReferenceBuilder implements Builder
24 {
29  private $id;
30 
35  private $obj;
36 
43  public function getId()
44  {
45  return $this->id;
46  }
47 
55  public function getObj()
56  {
57  return $this->obj instanceof QuoteRequestBuilder ? $this->obj->build() : $this->obj;
58  }
59 
64  public function withId(?string $id)
65  {
66  $this->id = $id;
67 
68  return $this;
69  }
70 
75  public function withObj(?QuoteRequest $obj)
76  {
77  $this->obj = $obj;
78 
79  return $this;
80  }
81 
86  public function withObjBuilder(?QuoteRequestBuilder $obj)
87  {
88  $this->obj = $obj;
89 
90  return $this;
91  }
92 
93  public function build(): QuoteRequestReference
94  {
95  return new QuoteRequestReferenceModel(
96  $this->id,
97  $this->obj instanceof QuoteRequestBuilder ? $this->obj->build() : $this->obj
98  );
99  }
100 
101  public static function of(): QuoteRequestReferenceBuilder
102  {
103  return new self();
104  }
105 }