commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Common
HighPrecisionMoneyDraftBuilder.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
HighPrecisionMoneyDraftBuilder
implements
Builder
22
{
27
private
$centAmount;
28
33
private
$currencyCode;
34
39
private
$fractionDigits;
40
45
private
$preciseAmount;
46
55
public
function
getCentAmount
()
56
{
57
return
$this->centAmount;
58
}
59
66
public
function
getCurrencyCode
()
67
{
68
return
$this->currencyCode;
69
}
70
77
public
function
getFractionDigits
()
78
{
79
return
$this->fractionDigits;
80
}
81
88
public
function
getPreciseAmount
()
89
{
90
return
$this->preciseAmount;
91
}
92
97
public
function
withCentAmount
(?
int
$centAmount)
98
{
99
$this->centAmount = $centAmount;
100
101
return
$this;
102
}
103
108
public
function
withCurrencyCode
(?
string
$currencyCode)
109
{
110
$this->currencyCode = $currencyCode;
111
112
return
$this;
113
}
114
119
public
function
withFractionDigits
(?
int
$fractionDigits)
120
{
121
$this->fractionDigits = $fractionDigits;
122
123
return
$this;
124
}
125
130
public
function
withPreciseAmount
(?
int
$preciseAmount)
131
{
132
$this->preciseAmount = $preciseAmount;
133
134
return
$this;
135
}
136
137
138
public
function
build
():
HighPrecisionMoneyDraft
139
{
140
return
new
HighPrecisionMoneyDraftModel
(
141
$this->centAmount,
142
$this->currencyCode,
143
$this->fractionDigits,
144
$this->preciseAmount
145
);
146
}
147
148
public
static
function
of
():
HighPrecisionMoneyDraftBuilder
149
{
150
return
new
self
();
151
}
152
}
Commercetools\Api\Models\Common\HighPrecisionMoneyDraftBuilder
Definition:
HighPrecisionMoneyDraftBuilder.php:22
Commercetools\Api\Models\Common\HighPrecisionMoneyDraftBuilder\withFractionDigits
withFractionDigits(?int $fractionDigits)
Definition:
HighPrecisionMoneyDraftBuilder.php:119
Commercetools\Api\Models\Common\HighPrecisionMoneyDraftBuilder\withCurrencyCode
withCurrencyCode(?string $currencyCode)
Definition:
HighPrecisionMoneyDraftBuilder.php:108
Commercetools\Api\Models\Common\HighPrecisionMoneyDraftBuilder\getFractionDigits
getFractionDigits()
Definition:
HighPrecisionMoneyDraftBuilder.php:77
Commercetools\Api\Models\Common\HighPrecisionMoneyDraftBuilder\getCurrencyCode
getCurrencyCode()
Definition:
HighPrecisionMoneyDraftBuilder.php:66
Commercetools\Api\Models\Common\HighPrecisionMoneyDraftBuilder\of
static of()
Definition:
HighPrecisionMoneyDraftBuilder.php:148
Commercetools\Api\Models\Common\HighPrecisionMoneyDraftBuilder\withCentAmount
withCentAmount(?int $centAmount)
Definition:
HighPrecisionMoneyDraftBuilder.php:97
Commercetools\Api\Models\Common\HighPrecisionMoneyDraftBuilder\getCentAmount
getCentAmount()
Definition:
HighPrecisionMoneyDraftBuilder.php:55
Commercetools\Api\Models\Common\HighPrecisionMoneyDraftBuilder\withPreciseAmount
withPreciseAmount(?int $preciseAmount)
Definition:
HighPrecisionMoneyDraftBuilder.php:130
Commercetools\Api\Models\Common\HighPrecisionMoneyDraftBuilder\build
build()
Definition:
HighPrecisionMoneyDraftBuilder.php:138
Commercetools\Api\Models\Common\HighPrecisionMoneyDraftBuilder\getPreciseAmount
getPreciseAmount()
Definition:
HighPrecisionMoneyDraftBuilder.php:88
Commercetools\Api\Models\Common\HighPrecisionMoneyDraftModel
Definition:
HighPrecisionMoneyDraftModel.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\HighPrecisionMoneyDraft
Definition:
HighPrecisionMoneyDraft.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