commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
MyBusinessUnitAssociateDraftBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
17 use stdClass;
18 
23 {
28  private $version;
29 
34  private $customer;
35 
40  private $associateRoleAssignments;
41 
49  public function getVersion()
50  {
51  return $this->version;
52  }
53 
60  public function getCustomer()
61  {
62  return $this->customer instanceof MyCustomerDraftBuilder ? $this->customer->build() : $this->customer;
63  }
64 
71  public function getAssociateRoleAssignments()
72  {
73  return $this->associateRoleAssignments;
74  }
75 
80  public function withVersion(?int $version)
81  {
82  $this->version = $version;
83 
84  return $this;
85  }
86 
91  public function withCustomer(?MyCustomerDraft $customer)
92  {
93  $this->customer = $customer;
94 
95  return $this;
96  }
97 
102  public function withAssociateRoleAssignments(?AssociateRoleAssignmentDraftCollection $associateRoleAssignments)
103  {
104  $this->associateRoleAssignments = $associateRoleAssignments;
105 
106  return $this;
107  }
108 
113  public function withCustomerBuilder(?MyCustomerDraftBuilder $customer)
114  {
115  $this->customer = $customer;
116 
117  return $this;
118  }
119 
121  {
123  $this->version,
124  $this->customer instanceof MyCustomerDraftBuilder ? $this->customer->build() : $this->customer,
125  $this->associateRoleAssignments
126  );
127  }
128 
129  public static function of(): MyBusinessUnitAssociateDraftBuilder
130  {
131  return new self();
132  }
133 }
withAssociateRoleAssignments(?AssociateRoleAssignmentDraftCollection $associateRoleAssignments)