commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Payment
PaymentSetCustomerActionBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Payment
;
10
11
use
Commercetools\Api\Models\Customer\CustomerResourceIdentifier
;
12
use
Commercetools\Api\Models\Customer\CustomerResourceIdentifierBuilder
;
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
PaymentSetCustomerActionBuilder
implements
Builder
24
{
29
private
$customer;
30
38
public
function
getCustomer
()
39
{
40
return
$this->customer instanceof
CustomerResourceIdentifierBuilder
? $this->customer->
build
() : $this->customer;
41
}
42
47
public
function
withCustomer
(?
CustomerResourceIdentifier
$customer)
48
{
49
$this->customer = $customer;
50
51
return
$this;
52
}
53
58
public
function
withCustomerBuilder
(?
CustomerResourceIdentifierBuilder
$customer)
59
{
60
$this->customer = $customer;
61
62
return
$this;
63
}
64
65
public
function
build
():
PaymentSetCustomerAction
66
{
67
return
new
PaymentSetCustomerActionModel
(
68
$this->customer instanceof
CustomerResourceIdentifierBuilder
? $this->customer->
build
() : $this->customer
69
);
70
}
71
72
public
static
function
of
():
PaymentSetCustomerActionBuilder
73
{
74
return
new
self
();
75
}
76
}
Commercetools\Api\Models\Customer\CustomerResourceIdentifierBuilder
Definition:
CustomerResourceIdentifierBuilder.php:24
Commercetools\Api\Models\Customer\CustomerResourceIdentifierBuilder\build
build()
Definition:
CustomerResourceIdentifierBuilder.php:82
Commercetools\Api\Models\Payment\PaymentSetCustomerActionBuilder
Definition:
PaymentSetCustomerActionBuilder.php:24
Commercetools\Api\Models\Payment\PaymentSetCustomerActionBuilder\of
static of()
Definition:
PaymentSetCustomerActionBuilder.php:72
Commercetools\Api\Models\Payment\PaymentSetCustomerActionBuilder\build
build()
Definition:
PaymentSetCustomerActionBuilder.php:65
Commercetools\Api\Models\Payment\PaymentSetCustomerActionBuilder\withCustomerBuilder
withCustomerBuilder(?CustomerResourceIdentifierBuilder $customer)
Definition:
PaymentSetCustomerActionBuilder.php:58
Commercetools\Api\Models\Payment\PaymentSetCustomerActionBuilder\getCustomer
getCustomer()
Definition:
PaymentSetCustomerActionBuilder.php:38
Commercetools\Api\Models\Payment\PaymentSetCustomerActionBuilder\withCustomer
withCustomer(?CustomerResourceIdentifier $customer)
Definition:
PaymentSetCustomerActionBuilder.php:47
Commercetools\Api\Models\Payment\PaymentSetCustomerActionModel
Definition:
PaymentSetCustomerActionModel.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\CustomerResourceIdentifier
Definition:
CustomerResourceIdentifier.php:16
Commercetools\Api\Models\Payment\PaymentSetCustomerAction
Definition:
PaymentSetCustomerAction.php:16
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Payment
Definition:
Payment.php:9
Generated by
1.9.1