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