commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
QuoteCustomerChangedMessagePayloadBuilder.php
1<?php
2
3declare(strict_types=1);
10
18use stdClass;
19
24{
29 private $customer;
30
35 private $previousCustomer;
36
43 public function getCustomer()
44 {
45 return $this->customer instanceof CustomerReferenceBuilder ? $this->customer->build() : $this->customer;
46 }
47
54 public function getPreviousCustomer()
55 {
56 return $this->previousCustomer instanceof CustomerReferenceBuilder ? $this->previousCustomer->build() : $this->previousCustomer;
57 }
58
63 public function withCustomer(?CustomerReference $customer)
64 {
65 $this->customer = $customer;
66
67 return $this;
68 }
69
74 public function withPreviousCustomer(?CustomerReference $previousCustomer)
75 {
76 $this->previousCustomer = $previousCustomer;
77
78 return $this;
79 }
80
86 {
87 $this->customer = $customer;
88
89 return $this;
90 }
91
96 public function withPreviousCustomerBuilder(?CustomerReferenceBuilder $previousCustomer)
97 {
98 $this->previousCustomer = $previousCustomer;
99
100 return $this;
101 }
102
104 {
106 $this->customer instanceof CustomerReferenceBuilder ? $this->customer->build() : $this->customer,
107 $this->previousCustomer instanceof CustomerReferenceBuilder ? $this->previousCustomer->build() : $this->previousCustomer
108 );
109 }
110
112 {
113 return new self();
114 }
115}