commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
AssociateDraftModel.php
1<?php
2
3declare(strict_types=1);
10
17use stdClass;
18
23{
29
34 protected $customer;
35
36
40 public function __construct(
43 ) {
44 $this->associateRoleAssignments = $associateRoleAssignments;
45 $this->customer = $customer;
46 }
47
55 {
56 if (is_null($this->associateRoleAssignments)) {
58 $data = $this->raw(self::FIELD_ASSOCIATE_ROLE_ASSIGNMENTS);
59 if (is_null($data)) {
60 return null;
61 }
62 $this->associateRoleAssignments = AssociateRoleAssignmentDraftCollection::fromArray($data);
63 }
64
66 }
67
74 public function getCustomer()
75 {
76 if (is_null($this->customer)) {
78 $data = $this->raw(self::FIELD_CUSTOMER);
79 if (is_null($data)) {
80 return null;
81 }
82
83 $this->customer = CustomerResourceIdentifierModel::of($data);
84 }
85
86 return $this->customer;
87 }
88
89
97
102 {
103 $this->customer = $customer;
104 }
105}
__construct(?AssociateRoleAssignmentDraftCollection $associateRoleAssignments=null, ?CustomerResourceIdentifier $customer=null)
setAssociateRoleAssignments(?AssociateRoleAssignmentDraftCollection $associateRoleAssignments)
static fromArray(array $data)