commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
ShippingMethod
PriceFunctionBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\ShippingMethod
;
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
PriceFunctionBuilder
implements
Builder
22
{
27
private
$currencyCode;
28
33
private
$function;
34
41
public
function
getCurrencyCode
()
42
{
43
return
$this->currencyCode;
44
}
45
53
public
function
getFunction
()
54
{
55
return
$this->function;
56
}
57
62
public
function
withCurrencyCode
(?
string
$currencyCode)
63
{
64
$this->currencyCode = $currencyCode;
65
66
return
$this;
67
}
68
73
public
function
withFunction
(?
string
$function)
74
{
75
$this->
function
= $function;
76
77
return
$this;
78
}
79
80
81
public
function
build
():
PriceFunction
82
{
83
return
new
PriceFunctionModel
(
84
$this->currencyCode,
85
$this->
function
86
);
87
}
88
89
public
static
function
of
():
PriceFunctionBuilder
90
{
91
return
new
self
();
92
}
93
}
Commercetools\Api\Models\ShippingMethod\PriceFunctionBuilder
Definition:
PriceFunctionBuilder.php:22
Commercetools\Api\Models\ShippingMethod\PriceFunctionBuilder\build
build()
Definition:
PriceFunctionBuilder.php:81
Commercetools\Api\Models\ShippingMethod\PriceFunctionBuilder\withCurrencyCode
withCurrencyCode(?string $currencyCode)
Definition:
PriceFunctionBuilder.php:62
Commercetools\Api\Models\ShippingMethod\PriceFunctionBuilder\of
static of()
Definition:
PriceFunctionBuilder.php:89
Commercetools\Api\Models\ShippingMethod\PriceFunctionBuilder\getFunction
getFunction()
Definition:
PriceFunctionBuilder.php:53
Commercetools\Api\Models\ShippingMethod\PriceFunctionBuilder\withFunction
withFunction(?string $function)
Definition:
PriceFunctionBuilder.php:73
Commercetools\Api\Models\ShippingMethod\PriceFunctionBuilder\getCurrencyCode
getCurrencyCode()
Definition:
PriceFunctionBuilder.php:41
Commercetools\Api\Models\ShippingMethod\PriceFunctionModel
Definition:
PriceFunctionModel.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\ShippingMethod\PriceFunction
Definition:
PriceFunction.php:15
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\ShippingMethod
Definition:
CartClassificationTier.php:9
Generated by
1.9.1