commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Common
CentPrecisionMoneyBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Common
;
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
21
final
class
CentPrecisionMoneyBuilder
implements
Builder
22
{
27
private
$centAmount;
28
33
private
$currencyCode;
34
39
private
$fractionDigits;
40
51
public
function
getCentAmount
()
52
{
53
return
$this->centAmount;
54
}
55
62
public
function
getCurrencyCode
()
63
{
64
return
$this->currencyCode;
65
}
66
73
public
function
getFractionDigits
()
74
{
75
return
$this->fractionDigits;
76
}
77
82
public
function
withCentAmount
(?
int
$centAmount)
83
{
84
$this->centAmount = $centAmount;
85
86
return
$this;
87
}
88
93
public
function
withCurrencyCode
(?
string
$currencyCode)
94
{
95
$this->currencyCode = $currencyCode;
96
97
return
$this;
98
}
99
104
public
function
withFractionDigits
(?
int
$fractionDigits)
105
{
106
$this->fractionDigits = $fractionDigits;
107
108
return
$this;
109
}
110
111
112
public
function
build
():
CentPrecisionMoney
113
{
114
return
new
CentPrecisionMoneyModel
(
115
$this->centAmount,
116
$this->currencyCode,
117
$this->fractionDigits
118
);
119
}
120
121
public
static
function
of
():
CentPrecisionMoneyBuilder
122
{
123
return
new
self
();
124
}
125
}
Commercetools\Api\Models\Common\CentPrecisionMoneyBuilder
Definition:
CentPrecisionMoneyBuilder.php:22
Commercetools\Api\Models\Common\CentPrecisionMoneyBuilder\withCurrencyCode
withCurrencyCode(?string $currencyCode)
Definition:
CentPrecisionMoneyBuilder.php:93
Commercetools\Api\Models\Common\CentPrecisionMoneyBuilder\getCurrencyCode
getCurrencyCode()
Definition:
CentPrecisionMoneyBuilder.php:62
Commercetools\Api\Models\Common\CentPrecisionMoneyBuilder\withCentAmount
withCentAmount(?int $centAmount)
Definition:
CentPrecisionMoneyBuilder.php:82
Commercetools\Api\Models\Common\CentPrecisionMoneyBuilder\getFractionDigits
getFractionDigits()
Definition:
CentPrecisionMoneyBuilder.php:73
Commercetools\Api\Models\Common\CentPrecisionMoneyBuilder\of
static of()
Definition:
CentPrecisionMoneyBuilder.php:121
Commercetools\Api\Models\Common\CentPrecisionMoneyBuilder\build
build()
Definition:
CentPrecisionMoneyBuilder.php:112
Commercetools\Api\Models\Common\CentPrecisionMoneyBuilder\withFractionDigits
withFractionDigits(?int $fractionDigits)
Definition:
CentPrecisionMoneyBuilder.php:104
Commercetools\Api\Models\Common\CentPrecisionMoneyBuilder\getCentAmount
getCentAmount()
Definition:
CentPrecisionMoneyBuilder.php:51
Commercetools\Api\Models\Common\CentPrecisionMoneyModel
Definition:
CentPrecisionMoneyModel.php:21
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\Common\CentPrecisionMoney
Definition:
CentPrecisionMoney.php:15
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Common
Definition:
Address.php:9
Generated by
1.9.1