-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d16749
commit f05eed1
Showing
24 changed files
with
1,642 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
lib/commercetools-api/src/Models/ProductTailoring/ProductTailoringAttribute.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* This file has been auto generated | ||
* Do not change it. | ||
*/ | ||
|
||
namespace Commercetools\Api\Models\ProductTailoring; | ||
|
||
use Commercetools\Base\DateTimeImmutableCollection; | ||
use Commercetools\Base\JsonObject; | ||
|
||
interface ProductTailoringAttribute extends JsonObject | ||
{ | ||
public const FIELD_NAME = 'name'; | ||
public const FIELD_VALUE = 'value'; | ||
|
||
/** | ||
* <p>Name of the Attribute.</p> | ||
* | ||
* @return null|string | ||
*/ | ||
public function getName(); | ||
|
||
/** | ||
* <p>The <a href="ctp:api:type:AttributeType">AttributeType</a> determines the format of the Attribute <code>value</code> to be provided:</p> | ||
* <ul> | ||
* <li>For <a href="ctp:api:type:AttributeEnumType">Enum Type</a> and <a href="ctp:api:type:AttributeLocalizedEnumType">Localized Enum Type</a>, | ||
* use the <code>key</code> of the <a href="ctp:api:type:AttributePlainEnumValue">Plain Enum Value</a> or <a href="ctp:api:type:AttributeLocalizedEnumValue">Localized Enum Value</a> objects, | ||
* or the complete objects as <code>value</code>.</li> | ||
* <li>For <a href="ctp:api:type:AttributeLocalizableTextType">Localizable Text Type</a>, use the <a href="ctp:api:type:LocalizedString">LocalizedString</a> object as <code>value</code>.</li> | ||
* <li>For <a href="ctp:api:type:AttributeMoneyType">Money Type</a> Attributes, use the <a href="ctp:api:type:Money">Money</a> object as <code>value</code>.</li> | ||
* <li>For <a href="ctp:api:type:AttributeSetType">Set Type</a> Attributes, use the entire <code>set</code> object as <code>value</code>.</li> | ||
* <li>For <a href="ctp:api:type:AttributeReferenceType">Reference Type</a> Attributes, use the <a href="ctp:api:type:Reference">Reference</a> object as <code>value</code>.</li> | ||
* </ul> | ||
* <p>Tailoring of <a href="ctp:api:type:AttributeNestedType">Nested Type</a> Attributes is not supported.</p> | ||
* | ||
* @return null|mixed | ||
*/ | ||
public function getValue(); | ||
|
||
/** | ||
* @param ?string $name | ||
*/ | ||
public function setName(?string $name): void; | ||
|
||
/** | ||
* @param mixed $value | ||
*/ | ||
public function setValue($value): void; | ||
} |
102 changes: 102 additions & 0 deletions
102
lib/commercetools-api/src/Models/ProductTailoring/ProductTailoringAttributeBuilder.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* This file has been auto generated | ||
* Do not change it. | ||
*/ | ||
|
||
namespace Commercetools\Api\Models\ProductTailoring; | ||
|
||
use Commercetools\Base\Builder; | ||
use Commercetools\Base\DateTimeImmutableCollection; | ||
use Commercetools\Base\JsonObject; | ||
use Commercetools\Base\JsonObjectModel; | ||
use Commercetools\Base\MapperFactory; | ||
use stdClass; | ||
|
||
/** | ||
* @implements Builder<ProductTailoringAttribute> | ||
*/ | ||
final class ProductTailoringAttributeBuilder implements Builder | ||
{ | ||
/** | ||
* @var ?string | ||
*/ | ||
private $name; | ||
|
||
/** | ||
* @var null|mixed|mixed | ||
*/ | ||
private $value; | ||
|
||
/** | ||
* <p>Name of the Attribute.</p> | ||
* | ||
* @return null|string | ||
*/ | ||
public function getName() | ||
{ | ||
return $this->name; | ||
} | ||
|
||
/** | ||
* <p>The <a href="ctp:api:type:AttributeType">AttributeType</a> determines the format of the Attribute <code>value</code> to be provided:</p> | ||
* <ul> | ||
* <li>For <a href="ctp:api:type:AttributeEnumType">Enum Type</a> and <a href="ctp:api:type:AttributeLocalizedEnumType">Localized Enum Type</a>, | ||
* use the <code>key</code> of the <a href="ctp:api:type:AttributePlainEnumValue">Plain Enum Value</a> or <a href="ctp:api:type:AttributeLocalizedEnumValue">Localized Enum Value</a> objects, | ||
* or the complete objects as <code>value</code>.</li> | ||
* <li>For <a href="ctp:api:type:AttributeLocalizableTextType">Localizable Text Type</a>, use the <a href="ctp:api:type:LocalizedString">LocalizedString</a> object as <code>value</code>.</li> | ||
* <li>For <a href="ctp:api:type:AttributeMoneyType">Money Type</a> Attributes, use the <a href="ctp:api:type:Money">Money</a> object as <code>value</code>.</li> | ||
* <li>For <a href="ctp:api:type:AttributeSetType">Set Type</a> Attributes, use the entire <code>set</code> object as <code>value</code>.</li> | ||
* <li>For <a href="ctp:api:type:AttributeReferenceType">Reference Type</a> Attributes, use the <a href="ctp:api:type:Reference">Reference</a> object as <code>value</code>.</li> | ||
* </ul> | ||
* <p>Tailoring of <a href="ctp:api:type:AttributeNestedType">Nested Type</a> Attributes is not supported.</p> | ||
* | ||
* @return null|mixed | ||
*/ | ||
public function getValue() | ||
{ | ||
return $this->value; | ||
} | ||
|
||
/** | ||
* @param ?string $name | ||
* @return $this | ||
*/ | ||
public function withName(?string $name) | ||
{ | ||
$this->name = $name; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @param mixed $value | ||
* @return $this | ||
*/ | ||
public function withValue($value) | ||
{ | ||
$this->value = $value; | ||
|
||
return $this; | ||
} | ||
|
||
|
||
public function build(): ProductTailoringAttribute | ||
{ | ||
return new ProductTailoringAttributeModel( | ||
$this->name, | ||
$this->value | ||
); | ||
} | ||
|
||
public static function of(): ProductTailoringAttributeBuilder | ||
{ | ||
return new self(); | ||
} | ||
} |
Oops, something went wrong.