commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
Project
CartsConfigurationModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Project
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
20
final
class
CartsConfigurationModel
extends
JsonObjectModel
implements
CartsConfiguration
21
{
26
protected
$deleteDaysAfterLastModification
;
27
32
protected
$countryTaxRateFallbackEnabled
;
33
34
38
public
function
__construct
(
39
?
int
$deleteDaysAfterLastModification
=
null
,
40
?
bool
$countryTaxRateFallbackEnabled
=
null
41
) {
42
$this->deleteDaysAfterLastModification =
$deleteDaysAfterLastModification
;
43
$this->countryTaxRateFallbackEnabled =
$countryTaxRateFallbackEnabled
;
44
}
45
54
public
function
getDeleteDaysAfterLastModification
()
55
{
56
if
(is_null($this->deleteDaysAfterLastModification)) {
58
$data = $this->
raw
(self::FIELD_DELETE_DAYS_AFTER_LAST_MODIFICATION);
59
if
(is_null($data)) {
60
return
null
;
61
}
62
$this->deleteDaysAfterLastModification = (int) $data;
63
}
64
65
return
$this->deleteDaysAfterLastModification
;
66
}
67
74
public
function
getCountryTaxRateFallbackEnabled
()
75
{
76
if
(is_null($this->countryTaxRateFallbackEnabled)) {
78
$data = $this->
raw
(self::FIELD_COUNTRY_TAX_RATE_FALLBACK_ENABLED);
79
if
(is_null($data)) {
80
return
null
;
81
}
82
$this->countryTaxRateFallbackEnabled = (bool) $data;
83
}
84
85
return
$this->countryTaxRateFallbackEnabled
;
86
}
87
88
92
public
function
setDeleteDaysAfterLastModification
(?
int
$deleteDaysAfterLastModification
): void
93
{
94
$this->deleteDaysAfterLastModification =
$deleteDaysAfterLastModification
;
95
}
96
100
public
function
setCountryTaxRateFallbackEnabled
(?
bool
$countryTaxRateFallbackEnabled
): void
101
{
102
$this->countryTaxRateFallbackEnabled =
$countryTaxRateFallbackEnabled
;
103
}
104
}
Commercetools\Api\Models\Project\CartsConfigurationModel
Definition
CartsConfigurationModel.php:21
Commercetools\Api\Models\Project\CartsConfigurationModel\$deleteDaysAfterLastModification
$deleteDaysAfterLastModification
Definition
CartsConfigurationModel.php:26
Commercetools\Api\Models\Project\CartsConfigurationModel\$countryTaxRateFallbackEnabled
$countryTaxRateFallbackEnabled
Definition
CartsConfigurationModel.php:32
Commercetools\Api\Models\Project\CartsConfigurationModel\setCountryTaxRateFallbackEnabled
setCountryTaxRateFallbackEnabled(?bool $countryTaxRateFallbackEnabled)
Definition
CartsConfigurationModel.php:100
Commercetools\Api\Models\Project\CartsConfigurationModel\getDeleteDaysAfterLastModification
getDeleteDaysAfterLastModification()
Definition
CartsConfigurationModel.php:54
Commercetools\Api\Models\Project\CartsConfigurationModel\getCountryTaxRateFallbackEnabled
getCountryTaxRateFallbackEnabled()
Definition
CartsConfigurationModel.php:74
Commercetools\Api\Models\Project\CartsConfigurationModel\__construct
__construct(?int $deleteDaysAfterLastModification=null, ?bool $countryTaxRateFallbackEnabled=null)
Definition
CartsConfigurationModel.php:38
Commercetools\Api\Models\Project\CartsConfigurationModel\setDeleteDaysAfterLastModification
setDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification)
Definition
CartsConfigurationModel.php:92
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Project\CartsConfiguration
Definition
CartsConfiguration.php:15
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Project
Definition
BusinessUnitConfiguration.php:9
Generated by
1.9.8