commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
QuoteRequestLabelModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use stdClass;
18 
23 {
24 
25  public const DISCRIMINATOR_VALUE = 'QuoteRequestLabel';
30  protected $type;
31 
36  protected $key;
37 
42  protected $customer;
43 
44 
48  public function __construct(
49  ?string $key = null,
50  ?Reference $customer = null,
51  ?string $type = null
52  ) {
53  $this->key = $key;
54  $this->customer = $customer;
55  $this->type = $type ?? self::DISCRIMINATOR_VALUE;
56  }
57 
62  public function getType()
63  {
64  if (is_null($this->type)) {
66  $data = $this->raw(self::FIELD_TYPE);
67  if (is_null($data)) {
68  return null;
69  }
70  $this->type = (string) $data;
71  }
72 
73  return $this->type;
74  }
75 
82  public function getKey()
83  {
84  if (is_null($this->key)) {
86  $data = $this->raw(self::FIELD_KEY);
87  if (is_null($data)) {
88  return null;
89  }
90  $this->key = (string) $data;
91  }
92 
93  return $this->key;
94  }
95 
102  public function getCustomer()
103  {
104  if (is_null($this->customer)) {
106  $data = $this->raw(self::FIELD_CUSTOMER);
107  if (is_null($data)) {
108  return null;
109  }
110 
111  $this->customer = ReferenceModel::of($data);
112  }
113 
114  return $this->customer;
115  }
116 
117 
121  public function setKey(?string $key): void
122  {
123  $this->key = $key;
124  }
125 
129  public function setCustomer(?Reference $customer): void
130  {
131  $this->customer = $customer;
132  }
133 
134 
135 
136 }
__construct(?string $key=null, ?Reference $customer=null, ?string $type=null)