commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Message
QuoteCustomerChangedMessagePayloadBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Message
;
10
11
use
Commercetools\Api\Models\Customer\CustomerReference
;
12
use
Commercetools\Api\Models\Customer\CustomerReferenceBuilder
;
13
use
Commercetools\Base\Builder
;
14
use
Commercetools\Base\DateTimeImmutableCollection
;
15
use
Commercetools\Base\JsonObject
;
16
use
Commercetools\Base\JsonObjectModel
;
17
use
Commercetools\Base\MapperFactory
;
18
use stdClass;
19
23
final
class
QuoteCustomerChangedMessagePayloadBuilder
implements
Builder
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
85
public
function
withCustomerBuilder
(?
CustomerReferenceBuilder
$customer)
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
103
public
function
build
():
QuoteCustomerChangedMessagePayload
104
{
105
return
new
QuoteCustomerChangedMessagePayloadModel
(
106
$this->customer instanceof
CustomerReferenceBuilder
? $this->customer->
build
() : $this->customer,
107
$this->previousCustomer instanceof
CustomerReferenceBuilder
? $this->previousCustomer->
build
() : $this->previousCustomer
108
);
109
}
110
111
public
static
function
of
():
QuoteCustomerChangedMessagePayloadBuilder
112
{
113
return
new
self
();
114
}
115
}
Commercetools\Api\Models\Customer\CustomerReferenceBuilder
Definition:
CustomerReferenceBuilder.php:24
Commercetools\Api\Models\Customer\CustomerReferenceBuilder\build
build()
Definition:
CustomerReferenceBuilder.php:92
Commercetools\Api\Models\Message\QuoteCustomerChangedMessagePayloadBuilder
Definition:
QuoteCustomerChangedMessagePayloadBuilder.php:24
Commercetools\Api\Models\Message\QuoteCustomerChangedMessagePayloadBuilder\withPreviousCustomerBuilder
withPreviousCustomerBuilder(?CustomerReferenceBuilder $previousCustomer)
Definition:
QuoteCustomerChangedMessagePayloadBuilder.php:96
Commercetools\Api\Models\Message\QuoteCustomerChangedMessagePayloadBuilder\getPreviousCustomer
getPreviousCustomer()
Definition:
QuoteCustomerChangedMessagePayloadBuilder.php:54
Commercetools\Api\Models\Message\QuoteCustomerChangedMessagePayloadBuilder\withCustomer
withCustomer(?CustomerReference $customer)
Definition:
QuoteCustomerChangedMessagePayloadBuilder.php:63
Commercetools\Api\Models\Message\QuoteCustomerChangedMessagePayloadBuilder\getCustomer
getCustomer()
Definition:
QuoteCustomerChangedMessagePayloadBuilder.php:43
Commercetools\Api\Models\Message\QuoteCustomerChangedMessagePayloadBuilder\build
build()
Definition:
QuoteCustomerChangedMessagePayloadBuilder.php:103
Commercetools\Api\Models\Message\QuoteCustomerChangedMessagePayloadBuilder\withCustomerBuilder
withCustomerBuilder(?CustomerReferenceBuilder $customer)
Definition:
QuoteCustomerChangedMessagePayloadBuilder.php:85
Commercetools\Api\Models\Message\QuoteCustomerChangedMessagePayloadBuilder\withPreviousCustomer
withPreviousCustomer(?CustomerReference $previousCustomer)
Definition:
QuoteCustomerChangedMessagePayloadBuilder.php:74
Commercetools\Api\Models\Message\QuoteCustomerChangedMessagePayloadBuilder\of
static of()
Definition:
QuoteCustomerChangedMessagePayloadBuilder.php:111
Commercetools\Api\Models\Message\QuoteCustomerChangedMessagePayloadModel
Definition:
QuoteCustomerChangedMessagePayloadModel.php:23
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\Customer\CustomerReference
Definition:
CustomerReference.php:16
Commercetools\Api\Models\Message\QuoteCustomerChangedMessagePayload
Definition:
QuoteCustomerChangedMessagePayload.php:16
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Message
Definition:
ApprovalFlowApprovedMessage.php:9
Generated by
1.9.1