Skip to content

Commit

Permalink
TASK: Updating SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
Auto Mation committed Jul 18, 2023
1 parent 24d574a commit 9bd758b
Show file tree
Hide file tree
Showing 40 changed files with 3,330 additions and 0 deletions.
24 changes: 24 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,27 @@
- :warning: changed property `key` of type `PriceDraftImport` to be required
</details>

**History changes**

<details>
<summary>Added Type(s)</summary>

- added type `AddInheritedAssociateChange`
- added type `AssociateRoleLabel`
- added type `ChangeBuyerAssignableChange`
- added type `ChangeInheritedAssociateChange`
- added type `InheritedAssociate`
- added type `InheritedAssociateRoleAssignment`
- added type `Permission`
- added type `RemoveInheritedAssociateChange`
- added type `SetLocalizedNameChange`
- added type `SetPermissionsChange`
</details>


<details>
<summary>Added Enum(s)</summary>

- added enum `associate-role` to type `ChangeHistoryResourceType`
</details>

Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

declare(strict_types=1);
/**
* This file has been auto generated
* Do not change it.
*/

namespace Commercetools\History\Models\Change;

use Commercetools\Base\JsonObject;
use Commercetools\Base\DateTimeImmutableCollection;
use Commercetools\History\Models\Common\InheritedAssociate;

interface AddInheritedAssociateChange extends Change
{

public const FIELD_NEXT_VALUE = 'nextValue';

/**

* @return null|string
*/
public function getChange();

/**

* @return null|string
*/
public function getType();

/**
* <p>Value after the change.</p>
*

* @return null|InheritedAssociate
*/
public function getNextValue();

/**
* @param ?string $change
*/
public function setChange(?string $change): void;

/**
* @param ?InheritedAssociate $nextValue
*/
public function setNextValue(?InheritedAssociate $nextValue): void;
}
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\History\Models\Change;

use Commercetools\Base\Builder;
use Commercetools\Base\DateTimeImmutableCollection;
use Commercetools\Base\JsonObject;
use Commercetools\Base\JsonObjectModel;
use Commercetools\Base\MapperFactory;
use stdClass;
use Commercetools\History\Models\Common\InheritedAssociate;
use Commercetools\History\Models\Common\InheritedAssociateBuilder;

/**
* @implements Builder<AddInheritedAssociateChange>
*/
final class AddInheritedAssociateChangeBuilder implements Builder
{
/**

* @var ?string
*/
private $change;

/**

* @var null|InheritedAssociate|InheritedAssociateBuilder
*/
private $nextValue;

/**

* @return null|string
*/
public function getChange()
{
return $this->change;
}

/**
* <p>Value after the change.</p>
*

* @return null|InheritedAssociate
*/
public function getNextValue()
{
return $this->nextValue instanceof InheritedAssociateBuilder ? $this->nextValue->build() : $this->nextValue;
}

/**
* @param ?string $change
* @return $this
*/
public function withChange(?string $change)
{
$this->change = $change;

return $this;
}

/**
* @param ?InheritedAssociate $nextValue
* @return $this
*/
public function withNextValue(?InheritedAssociate $nextValue)
{
$this->nextValue = $nextValue;

return $this;
}

/**
* @deprecated use withNextValue() instead
* @return $this
*/
public function withNextValueBuilder(?InheritedAssociateBuilder $nextValue)
{
$this->nextValue = $nextValue;

return $this;
}

public function build(): AddInheritedAssociateChange
{
return new AddInheritedAssociateChangeModel(
$this->change,
$this->nextValue instanceof InheritedAssociateBuilder ? $this->nextValue->build() : $this->nextValue
);
}

public static function of(): AddInheritedAssociateChangeBuilder
{
return new self();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php

declare(strict_types=1);
/**
* This file has been auto generated
* Do not change it.
*/

namespace Commercetools\History\Models\Change;

use Commercetools\History\Models\Change\ChangeCollection;
use Commercetools\Exception\InvalidArgumentException;
use stdClass;

/**
* @extends ChangeCollection<AddInheritedAssociateChange>
* @method AddInheritedAssociateChange current()
* @method AddInheritedAssociateChange end()
* @method AddInheritedAssociateChange at($offset)
*/
class AddInheritedAssociateChangeCollection extends ChangeCollection
{
/**
* @psalm-assert AddInheritedAssociateChange $value
* @psalm-param AddInheritedAssociateChange|stdClass $value
* @throws InvalidArgumentException
*
* @return AddInheritedAssociateChangeCollection
*/
public function add($value)
{
if (!$value instanceof AddInheritedAssociateChange) {
throw new InvalidArgumentException();
}
$this->store($value);

return $this;
}

/**
* @psalm-return callable(int):?AddInheritedAssociateChange
*/
protected function mapper()
{
return function (?int $index): ?AddInheritedAssociateChange {
$data = $this->get($index);
if ($data instanceof stdClass) {
/** @var AddInheritedAssociateChange $data */
$data = AddInheritedAssociateChangeModel::of($data);
$this->set($data, $index);
}

return $data;
};
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
<?php

declare(strict_types=1);
/**
* This file has been auto generated
* Do not change it.
*/

namespace Commercetools\History\Models\Change;

use Commercetools\Base\DateTimeImmutableCollection;
use Commercetools\Base\JsonObject;
use Commercetools\Base\JsonObjectModel;
use Commercetools\Base\MapperFactory;
use stdClass;
use Commercetools\History\Models\Common\InheritedAssociate;
use Commercetools\History\Models\Common\InheritedAssociateModel;

/**
* @internal
*/
final class AddInheritedAssociateChangeModel extends JsonObjectModel implements AddInheritedAssociateChange
{

public const DISCRIMINATOR_VALUE = 'AddInheritedAssociateChange';
/**
*
* @var ?string
*/
protected $type;

/**
*
* @var ?string
*/
protected $change;

/**
*
* @var ?InheritedAssociate
*/
protected $nextValue;


/**
* @psalm-suppress MissingParamType
*/
public function __construct(
?string $change = null,
?InheritedAssociate $nextValue = null,
?string $type = null
) {
$this->change = $change;
$this->nextValue = $nextValue;
$this->type = $type ?? self::DISCRIMINATOR_VALUE;
}

/**
*
* @return null|string
*/
public function getType()
{
if (is_null($this->type)) {
/** @psalm-var ?string $data */
$data = $this->raw(self::FIELD_TYPE);
if (is_null($data)) {
return null;
}
$this->type = (string) $data;
}

return $this->type;
}

/**
*
* @return null|string
*/
public function getChange()
{
if (is_null($this->change)) {
/** @psalm-var ?string $data */
$data = $this->raw(self::FIELD_CHANGE);
if (is_null($data)) {
return null;
}
$this->change = (string) $data;
}

return $this->change;
}

/**
* <p>Value after the change.</p>
*
*
* @return null|InheritedAssociate
*/
public function getNextValue()
{
if (is_null($this->nextValue)) {
/** @psalm-var stdClass|array<string, mixed>|null $data */
$data = $this->raw(self::FIELD_NEXT_VALUE);
if (is_null($data)) {
return null;
}

$this->nextValue = InheritedAssociateModel::of($data);
}

return $this->nextValue;
}


/**
* @param ?string $change
*/
public function setChange(?string $change): void
{
$this->change = $change;
}

/**
* @param ?InheritedAssociate $nextValue
*/
public function setNextValue(?InheritedAssociate $nextValue): void
{
$this->nextValue = $nextValue;
}



}
Loading

0 comments on commit 9bd758b

Please sign in to comment.