commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
Label
PaymentLabelBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\Label
;
10
11
use
Commercetools\Base\Builder
;
12
use
Commercetools\Base\DateTimeImmutableCollection
;
13
use
Commercetools\Base\JsonObject
;
14
use
Commercetools\Base\JsonObjectModel
;
15
use
Commercetools\Base\MapperFactory
;
16
use stdClass;
17
use
Commercetools\History\Models\Common\Money
;
18
use
Commercetools\History\Models\Common\MoneyBuilder
;
19
23
final
class
PaymentLabelBuilder
implements
Builder
24
{
29
private
$key;
30
35
private
$amountPlanned;
36
43
public
function
getKey
()
44
{
45
return
$this->key;
46
}
47
54
public
function
getAmountPlanned
()
55
{
56
return
$this->amountPlanned instanceof
MoneyBuilder
? $this->amountPlanned->
build
() : $this->amountPlanned;
57
}
58
63
public
function
withKey
(?
string
$key)
64
{
65
$this->key = $key;
66
67
return
$this;
68
}
69
74
public
function
withAmountPlanned
(?
Money
$amountPlanned)
75
{
76
$this->amountPlanned = $amountPlanned;
77
78
return
$this;
79
}
80
85
public
function
withAmountPlannedBuilder
(?
MoneyBuilder
$amountPlanned)
86
{
87
$this->amountPlanned = $amountPlanned;
88
89
return
$this;
90
}
91
92
public
function
build
():
PaymentLabel
93
{
94
return
new
PaymentLabelModel
(
95
$this->key,
96
$this->amountPlanned instanceof
MoneyBuilder
? $this->amountPlanned->
build
() : $this->amountPlanned
97
);
98
}
99
100
public
static
function
of
():
PaymentLabelBuilder
101
{
102
return
new
self
();
103
}
104
}
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\History\Models\Common\MoneyBuilder
Definition:
MoneyBuilder.php:22
Commercetools\History\Models\Common\MoneyBuilder\build
build()
Definition:
MoneyBuilder.php:130
Commercetools\History\Models\Label\PaymentLabelBuilder
Definition:
PaymentLabelBuilder.php:24
Commercetools\History\Models\Label\PaymentLabelBuilder\withAmountPlannedBuilder
withAmountPlannedBuilder(?MoneyBuilder $amountPlanned)
Definition:
PaymentLabelBuilder.php:85
Commercetools\History\Models\Label\PaymentLabelBuilder\getKey
getKey()
Definition:
PaymentLabelBuilder.php:43
Commercetools\History\Models\Label\PaymentLabelBuilder\build
build()
Definition:
PaymentLabelBuilder.php:92
Commercetools\History\Models\Label\PaymentLabelBuilder\getAmountPlanned
getAmountPlanned()
Definition:
PaymentLabelBuilder.php:54
Commercetools\History\Models\Label\PaymentLabelBuilder\withAmountPlanned
withAmountPlanned(?Money $amountPlanned)
Definition:
PaymentLabelBuilder.php:74
Commercetools\History\Models\Label\PaymentLabelBuilder\withKey
withKey(?string $key)
Definition:
PaymentLabelBuilder.php:63
Commercetools\History\Models\Label\PaymentLabelBuilder\of
static of()
Definition:
PaymentLabelBuilder.php:100
Commercetools\History\Models\Label\PaymentLabelModel
Definition:
PaymentLabelModel.php:23
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\History\Models\Common\Money
Definition:
Money.php:15
Commercetools\History\Models\Label\PaymentLabel
Definition:
PaymentLabel.php:16
Commercetools\History\Models\Label
Definition:
AssociateRoleLabel.php:9
Generated by
1.9.1