Skip to content

Commit

Permalink
Update generated client
Browse files Browse the repository at this point in the history
  • Loading branch information
mittwald-machine committed Dec 17, 2023
1 parent 42ea963 commit 3157b0d
Show file tree
Hide file tree
Showing 43 changed files with 2,992 additions and 298 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class AcceptCustomerInviteRequest
private static array $schema = [
'type' => 'object',
'properties' => [
'inviteId' => [
'customerInviteId' => [
'format' => 'uuid',
'type' => 'string',
],
Expand All @@ -34,15 +34,15 @@ class AcceptCustomerInviteRequest
],
],
'required' => [
'inviteId',
'customerInviteId',
'body',
],
];

/**
* @var string
*/
private string $inviteId;
private string $customerInviteId;

/**
* @var AcceptCustomerInviteRequestBody
Expand All @@ -54,21 +54,21 @@ class AcceptCustomerInviteRequest
];

/**
* @param string $inviteId
* @param string $customerInviteId
* @param AcceptCustomerInviteRequestBody $body
*/
public function __construct(string $inviteId, AcceptCustomerInviteRequestBody $body)
public function __construct(string $customerInviteId, AcceptCustomerInviteRequestBody $body)
{
$this->inviteId = $inviteId;
$this->customerInviteId = $customerInviteId;
$this->body = $body;
}

/**
* @return string
*/
public function getInviteId(): string
public function getCustomerInviteId(): string
{
return $this->inviteId;
return $this->customerInviteId;
}

/**
Expand All @@ -80,19 +80,19 @@ public function getBody(): AcceptCustomerInviteRequestBody
}

/**
* @param string $inviteId
* @param string $customerInviteId
* @return self
*/
public function withInviteId(string $inviteId): self
public function withCustomerInviteId(string $customerInviteId): self
{
$validator = new Validator();
$validator->validate($inviteId, static::$schema['properties']['inviteId']);
$validator->validate($customerInviteId, static::$schema['properties']['customerInviteId']);
if (!$validator->isValid()) {
throw new InvalidArgumentException($validator->getErrors()[0]['message']);
}

$clone = clone $this;
$clone->inviteId = $inviteId;
$clone->customerInviteId = $customerInviteId;

return $clone;
}
Expand Down Expand Up @@ -124,10 +124,10 @@ public static function buildFromInput(array|object $input, bool $validate = true
static::validateInput($input);
}

$inviteId = $input->{'inviteId'};
$customerInviteId = $input->{'customerInviteId'};
$body = AcceptCustomerInviteRequestBody::buildFromInput($input->{'body'}, validate: $validate);

$obj = new self($inviteId, $body);
$obj = new self($customerInviteId, $body);

return $obj;
}
Expand All @@ -140,7 +140,7 @@ public static function buildFromInput(array|object $input, bool $validate = true
public function toJson(): array
{
$output = [];
$output['inviteId'] = $this->inviteId;
$output['customerInviteId'] = $this->customerInviteId;
$output['body'] = ($this->body)->toJson();

return $output;
Expand Down Expand Up @@ -178,8 +178,8 @@ public function __clone()
public function getUrl(): string
{
$mapped = $this->toJson();
$inviteId = urlencode($mapped['inviteId']);
return '/v2/customer-invites/' . $inviteId . '/actions/accept';
$customerInviteId = urlencode($mapped['customerInviteId']);
return '/v2/customer-invites/' . $customerInviteId . '/actions/accept';
}

public function getQuery(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ public function __clone()
public function getUrl(): string
{
$mapped = $this->toJson();
$inviteId = urlencode($mapped['inviteId']);
return '/v2/customer-invites/' . $inviteId . '/actions/accept';
$customerInviteId = urlencode($mapped['customerInviteId']);
return '/v2/customer-invites/' . $customerInviteId . '/actions/accept';
}

public function getQuery(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class DeclineCustomerInviteRequest
private static array $schema = [
'type' => 'object',
'properties' => [
'inviteId' => [
'customerInviteId' => [
'format' => 'uuid',
'type' => 'string',
],
Expand All @@ -28,15 +28,15 @@ class DeclineCustomerInviteRequest
],
],
'required' => [
'inviteId',
'customerInviteId',
'body',
],
];

/**
* @var string
*/
private string $inviteId;
private string $customerInviteId;

/**
* @var mixed
Expand All @@ -48,21 +48,21 @@ class DeclineCustomerInviteRequest
];

/**
* @param string $inviteId
* @param string $customerInviteId
* @param mixed $body
*/
public function __construct(string $inviteId, $body)
public function __construct(string $customerInviteId, $body)
{
$this->inviteId = $inviteId;
$this->customerInviteId = $customerInviteId;
$this->body = $body;
}

/**
* @return string
*/
public function getInviteId(): string
public function getCustomerInviteId(): string
{
return $this->inviteId;
return $this->customerInviteId;
}

/**
Expand All @@ -74,19 +74,19 @@ public function getBody()
}

/**
* @param string $inviteId
* @param string $customerInviteId
* @return self
*/
public function withInviteId(string $inviteId): self
public function withCustomerInviteId(string $customerInviteId): self
{
$validator = new Validator();
$validator->validate($inviteId, static::$schema['properties']['inviteId']);
$validator->validate($customerInviteId, static::$schema['properties']['customerInviteId']);
if (!$validator->isValid()) {
throw new InvalidArgumentException($validator->getErrors()[0]['message']);
}

$clone = clone $this;
$clone->inviteId = $inviteId;
$clone->customerInviteId = $customerInviteId;

return $clone;
}
Expand Down Expand Up @@ -124,10 +124,10 @@ public static function buildFromInput(array|object $input, bool $validate = true
static::validateInput($input);
}

$inviteId = $input->{'inviteId'};
$customerInviteId = $input->{'customerInviteId'};
$body = $input->{'body'};

$obj = new self($inviteId, $body);
$obj = new self($customerInviteId, $body);

return $obj;
}
Expand All @@ -140,7 +140,7 @@ public static function buildFromInput(array|object $input, bool $validate = true
public function toJson(): array
{
$output = [];
$output['inviteId'] = $this->inviteId;
$output['customerInviteId'] = $this->customerInviteId;
$output['body'] = $this->body;

return $output;
Expand Down Expand Up @@ -177,8 +177,8 @@ public function __clone()
public function getUrl(): string
{
$mapped = $this->toJson();
$inviteId = urlencode($mapped['inviteId']);
return '/v2/customer-invites/' . $inviteId . '/actions/decline';
$customerInviteId = urlencode($mapped['customerInviteId']);
return '/v2/customer-invites/' . $customerInviteId . '/actions/decline';
}

public function getQuery(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,55 +19,55 @@ class DeleteCustomerInviteRequest
private static array $schema = [
'type' => 'object',
'properties' => [
'inviteId' => [
'customerInviteId' => [
'format' => 'uuid',
'type' => 'string',
],
],
'required' => [
'inviteId',
'customerInviteId',
],
];

/**
* @var string
*/
private string $inviteId;
private string $customerInviteId;

private array $headers = [

];

/**
* @param string $inviteId
* @param string $customerInviteId
*/
public function __construct(string $inviteId)
public function __construct(string $customerInviteId)
{
$this->inviteId = $inviteId;
$this->customerInviteId = $customerInviteId;
}

/**
* @return string
*/
public function getInviteId(): string
public function getCustomerInviteId(): string
{
return $this->inviteId;
return $this->customerInviteId;
}

/**
* @param string $inviteId
* @param string $customerInviteId
* @return self
*/
public function withInviteId(string $inviteId): self
public function withCustomerInviteId(string $customerInviteId): self
{
$validator = new Validator();
$validator->validate($inviteId, static::$schema['properties']['inviteId']);
$validator->validate($customerInviteId, static::$schema['properties']['customerInviteId']);
if (!$validator->isValid()) {
throw new InvalidArgumentException($validator->getErrors()[0]['message']);
}

$clone = clone $this;
$clone->inviteId = $inviteId;
$clone->customerInviteId = $customerInviteId;

return $clone;
}
Expand All @@ -87,9 +87,9 @@ public static function buildFromInput(array|object $input, bool $validate = true
static::validateInput($input);
}

$inviteId = $input->{'inviteId'};
$customerInviteId = $input->{'customerInviteId'};

$obj = new self($inviteId);
$obj = new self($customerInviteId);

return $obj;
}
Expand All @@ -102,7 +102,7 @@ public static function buildFromInput(array|object $input, bool $validate = true
public function toJson(): array
{
$output = [];
$output['inviteId'] = $this->inviteId;
$output['customerInviteId'] = $this->customerInviteId;

return $output;
}
Expand Down Expand Up @@ -138,8 +138,8 @@ public function __clone()
public function getUrl(): string
{
$mapped = $this->toJson();
$inviteId = urlencode($mapped['inviteId']);
return '/v2/customer-invites/' . $inviteId;
$customerInviteId = urlencode($mapped['customerInviteId']);
return '/v2/customer-invites/' . $customerInviteId;
}

public function getQuery(): array
Expand Down
Loading

0 comments on commit 3157b0d

Please sign in to comment.