commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
BusinessUnitConfigurationBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
18 use stdClass;
19 
24 {
29  private $myBusinessUnitStatusOnCreation;
30 
35  private $myBusinessUnitAssociateRoleOnCreation;
36 
44  {
45  return $this->myBusinessUnitStatusOnCreation;
46  }
47 
55  {
56  return $this->myBusinessUnitAssociateRoleOnCreation instanceof AssociateRoleKeyReferenceBuilder ? $this->myBusinessUnitAssociateRoleOnCreation->build() : $this->myBusinessUnitAssociateRoleOnCreation;
57  }
58 
63  public function withMyBusinessUnitStatusOnCreation(?string $myBusinessUnitStatusOnCreation)
64  {
65  $this->myBusinessUnitStatusOnCreation = $myBusinessUnitStatusOnCreation;
66 
67  return $this;
68  }
69 
74  public function withMyBusinessUnitAssociateRoleOnCreation(?AssociateRoleKeyReference $myBusinessUnitAssociateRoleOnCreation)
75  {
76  $this->myBusinessUnitAssociateRoleOnCreation = $myBusinessUnitAssociateRoleOnCreation;
77 
78  return $this;
79  }
80 
85  public function withMyBusinessUnitAssociateRoleOnCreationBuilder(?AssociateRoleKeyReferenceBuilder $myBusinessUnitAssociateRoleOnCreation)
86  {
87  $this->myBusinessUnitAssociateRoleOnCreation = $myBusinessUnitAssociateRoleOnCreation;
88 
89  return $this;
90  }
91 
92  public function build(): BusinessUnitConfiguration
93  {
95  $this->myBusinessUnitStatusOnCreation,
96  $this->myBusinessUnitAssociateRoleOnCreation instanceof AssociateRoleKeyReferenceBuilder ? $this->myBusinessUnitAssociateRoleOnCreation->build() : $this->myBusinessUnitAssociateRoleOnCreation
97  );
98  }
99 
100  public static function of(): BusinessUnitConfigurationBuilder
101  {
102  return new self();
103  }
104 }
withMyBusinessUnitAssociateRoleOnCreationBuilder(?AssociateRoleKeyReferenceBuilder $myBusinessUnitAssociateRoleOnCreation)
withMyBusinessUnitAssociateRoleOnCreation(?AssociateRoleKeyReference $myBusinessUnitAssociateRoleOnCreation)