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
Customer
CustomerGroupAssignmentDraftModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Customer
;
10
11
use
Commercetools\Api\Models\CustomerGroup\CustomerGroupResourceIdentifier
;
12
use
Commercetools\Api\Models\CustomerGroup\CustomerGroupResourceIdentifierModel
;
13
use
Commercetools\Base\DateTimeImmutableCollection
;
14
use
Commercetools\Base\JsonObject
;
15
use
Commercetools\Base\JsonObjectModel
;
16
use
Commercetools\Base\MapperFactory
;
17
use stdClass;
18
22
final
class
CustomerGroupAssignmentDraftModel
extends
JsonObjectModel
implements
CustomerGroupAssignmentDraft
23
{
28
protected
$customerGroup
;
29
30
34
public
function
__construct
(
35
?
CustomerGroupResourceIdentifier
$customerGroup
=
null
36
) {
37
$this->customerGroup =
$customerGroup
;
38
}
39
46
public
function
getCustomerGroup
()
47
{
48
if
(is_null($this->customerGroup)) {
50
$data = $this->
raw
(self::FIELD_CUSTOMER_GROUP);
51
if
(is_null($data)) {
52
return
null
;
53
}
54
55
$this->customerGroup = CustomerGroupResourceIdentifierModel::of($data);
56
}
57
58
return
$this->customerGroup
;
59
}
60
61
65
public
function
setCustomerGroup
(?
CustomerGroupResourceIdentifier
$customerGroup
): void
66
{
67
$this->customerGroup =
$customerGroup
;
68
}
69
}
Commercetools\Api\Models\Customer\CustomerGroupAssignmentDraftModel
Definition
CustomerGroupAssignmentDraftModel.php:23
Commercetools\Api\Models\Customer\CustomerGroupAssignmentDraftModel\$customerGroup
$customerGroup
Definition
CustomerGroupAssignmentDraftModel.php:28
Commercetools\Api\Models\Customer\CustomerGroupAssignmentDraftModel\getCustomerGroup
getCustomerGroup()
Definition
CustomerGroupAssignmentDraftModel.php:46
Commercetools\Api\Models\Customer\CustomerGroupAssignmentDraftModel\setCustomerGroup
setCustomerGroup(?CustomerGroupResourceIdentifier $customerGroup)
Definition
CustomerGroupAssignmentDraftModel.php:65
Commercetools\Api\Models\Customer\CustomerGroupAssignmentDraftModel\__construct
__construct(?CustomerGroupResourceIdentifier $customerGroup=null)
Definition
CustomerGroupAssignmentDraftModel.php:34
Commercetools\Api\Models\CustomerGroup\CustomerGroupResourceIdentifierModel
Definition
CustomerGroupResourceIdentifierModel.php:23
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\Customer\CustomerGroupAssignmentDraft
Definition
CustomerGroupAssignmentDraft.php:16
Commercetools\Api\Models\CustomerGroup\CustomerGroupResourceIdentifier
Definition
CustomerGroupResourceIdentifier.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Customer
Definition
Customer.php:9
Generated by
1.9.8