commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
TaxCategory
TaxRateDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\TaxCategory
;
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
TaxRateDraftBuilder
implements
Builder
22
{
27
private
$name;
28
33
private
$amount;
34
39
private
$includedInPrice;
40
45
private
$country;
46
51
private
$state;
52
57
private
$subRates;
58
63
private
$key;
64
71
public
function
getName
()
72
{
73
return
$this->name;
74
}
75
84
public
function
getAmount
()
85
{
86
return
$this->amount;
87
}
88
95
public
function
getIncludedInPrice
()
96
{
97
return
$this->includedInPrice;
98
}
99
106
public
function
getCountry
()
107
{
108
return
$this->country;
109
}
110
117
public
function
getState
()
118
{
119
return
$this->state;
120
}
121
129
public
function
getSubRates
()
130
{
131
return
$this->subRates;
132
}
133
140
public
function
getKey
()
141
{
142
return
$this->key;
143
}
144
149
public
function
withName
(?
string
$name)
150
{
151
$this->name = $name;
152
153
return
$this;
154
}
155
160
public
function
withAmount
(?
float
$amount)
161
{
162
$this->amount = $amount;
163
164
return
$this;
165
}
166
171
public
function
withIncludedInPrice
(?
bool
$includedInPrice)
172
{
173
$this->includedInPrice = $includedInPrice;
174
175
return
$this;
176
}
177
182
public
function
withCountry
(?
string
$country)
183
{
184
$this->country = $country;
185
186
return
$this;
187
}
188
193
public
function
withState
(?
string
$state)
194
{
195
$this->state = $state;
196
197
return
$this;
198
}
199
204
public
function
withSubRates
(?
SubRateCollection
$subRates)
205
{
206
$this->subRates = $subRates;
207
208
return
$this;
209
}
210
215
public
function
withKey
(?
string
$key)
216
{
217
$this->key = $key;
218
219
return
$this;
220
}
221
222
223
public
function
build
():
TaxRateDraft
224
{
225
return
new
TaxRateDraftModel
(
226
$this->name,
227
$this->amount,
228
$this->includedInPrice,
229
$this->country,
230
$this->state,
231
$this->subRates,
232
$this->key
233
);
234
}
235
236
public
static
function
of
():
TaxRateDraftBuilder
237
{
238
return
new
self
();
239
}
240
}
Commercetools\Api\Models\TaxCategory\SubRateCollection
Definition:
SubRateCollection.php:22
Commercetools\Api\Models\TaxCategory\TaxRateDraftBuilder
Definition:
TaxRateDraftBuilder.php:22
Commercetools\Api\Models\TaxCategory\TaxRateDraftBuilder\withAmount
withAmount(?float $amount)
Definition:
TaxRateDraftBuilder.php:160
Commercetools\Api\Models\TaxCategory\TaxRateDraftBuilder\withIncludedInPrice
withIncludedInPrice(?bool $includedInPrice)
Definition:
TaxRateDraftBuilder.php:171
Commercetools\Api\Models\TaxCategory\TaxRateDraftBuilder\withSubRates
withSubRates(?SubRateCollection $subRates)
Definition:
TaxRateDraftBuilder.php:204
Commercetools\Api\Models\TaxCategory\TaxRateDraftBuilder\build
build()
Definition:
TaxRateDraftBuilder.php:223
Commercetools\Api\Models\TaxCategory\TaxRateDraftBuilder\withCountry
withCountry(?string $country)
Definition:
TaxRateDraftBuilder.php:182
Commercetools\Api\Models\TaxCategory\TaxRateDraftBuilder\withState
withState(?string $state)
Definition:
TaxRateDraftBuilder.php:193
Commercetools\Api\Models\TaxCategory\TaxRateDraftBuilder\getSubRates
getSubRates()
Definition:
TaxRateDraftBuilder.php:129
Commercetools\Api\Models\TaxCategory\TaxRateDraftBuilder\withKey
withKey(?string $key)
Definition:
TaxRateDraftBuilder.php:215
Commercetools\Api\Models\TaxCategory\TaxRateDraftBuilder\getAmount
getAmount()
Definition:
TaxRateDraftBuilder.php:84
Commercetools\Api\Models\TaxCategory\TaxRateDraftBuilder\getIncludedInPrice
getIncludedInPrice()
Definition:
TaxRateDraftBuilder.php:95
Commercetools\Api\Models\TaxCategory\TaxRateDraftBuilder\getName
getName()
Definition:
TaxRateDraftBuilder.php:71
Commercetools\Api\Models\TaxCategory\TaxRateDraftBuilder\withName
withName(?string $name)
Definition:
TaxRateDraftBuilder.php:149
Commercetools\Api\Models\TaxCategory\TaxRateDraftBuilder\getKey
getKey()
Definition:
TaxRateDraftBuilder.php:140
Commercetools\Api\Models\TaxCategory\TaxRateDraftBuilder\getCountry
getCountry()
Definition:
TaxRateDraftBuilder.php:106
Commercetools\Api\Models\TaxCategory\TaxRateDraftBuilder\getState
getState()
Definition:
TaxRateDraftBuilder.php:117
Commercetools\Api\Models\TaxCategory\TaxRateDraftBuilder\of
static of()
Definition:
TaxRateDraftBuilder.php:236
Commercetools\Api\Models\TaxCategory\TaxRateDraftModel
Definition:
TaxRateDraftModel.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\TaxCategory\TaxRateDraft
Definition:
TaxRateDraft.php:15
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\TaxCategory
Definition:
SubRate.php:9
Generated by
1.9.1