Skip to content

Commit b417561

Browse files
feat: rename tariff to plan in AI hosting API client and responses
- Updated method comments and return types to change references from "tariff" to "plan" for clarity. - Removed deprecated `TariffOptions`, `TariffUsage`, `TariffUsageBig`, and related classes, replacing them with `PlanOptions` and `PlanUsage`. - Added support for pagination and filtering in the `ListConversationsRequest` class, including fields for `fullTextSearch`, `status`, `limit`, `skip`, and `page`.
1 parent e1f49ea commit b417561

File tree

11 files changed

+396
-63
lines changed

11 files changed

+396
-63
lines changed

src/Generated/V2/Clients/AIhosting/AIhostingClient.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ public function aiHostingCustomerGetKey(AiHostingCustomerGetKeyRequest $request)
8989
*/
9090
public function aiHostingCustomerGetKeys(AiHostingCustomerGetKeysRequest $request): AiHostingCustomerGetKeysOKResponse;
9191
/**
92-
* Get ai hosting tariff and usages of a customer.
92+
* Get ai hosting plan and usages of a customer.
9393
*
9494
* @see https://developer.mittwald.de/reference/v2/#tag/AI-hosting/operation/ai-hosting-customer-get-usage
9595
* @throws GuzzleException
9696
* @throws UnexpectedResponseException
9797
* @param AiHostingCustomerGetUsageRequest $request An object representing the request for this operation
98-
* @return AiHostingCustomerGetUsageOKResponse The customer usage and tariff.
98+
* @return AiHostingCustomerGetUsageOKResponse The customer usage and plan.
9999
*/
100100
public function aiHostingCustomerGetUsage(AiHostingCustomerGetUsageRequest $request): AiHostingCustomerGetUsageOKResponse;
101101
/**
@@ -159,13 +159,13 @@ public function aiHostingProjectGetKey(AiHostingProjectGetKeyRequest $request):
159159
*/
160160
public function aiHostingProjectGetKeys(AiHostingProjectGetKeysRequest $request): AiHostingProjectGetKeysOKResponse;
161161
/**
162-
* Get ai hosting tariff and usages of a project. Same as the customer route, but less details.
162+
* Get ai hosting plan and usages of a project. Same as the customer route, but less details.
163163
*
164164
* @see https://developer.mittwald.de/reference/v2/#tag/AI-hosting/operation/ai-hosting-project-get-usage
165165
* @throws GuzzleException
166166
* @throws UnexpectedResponseException
167167
* @param AiHostingProjectGetUsageRequest $request An object representing the request for this operation
168-
* @return AiHostingProjectGetUsageOKResponse The project usage and tariff.
168+
* @return AiHostingProjectGetUsageOKResponse The project usage and plan.
169169
*/
170170
public function aiHostingProjectGetUsage(AiHostingProjectGetUsageRequest $request): AiHostingProjectGetUsageOKResponse;
171171
/**

src/Generated/V2/Clients/AIhosting/AIhostingClientImpl.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,13 @@ public function aiHostingCustomerGetKeys(AiHostingCustomerGetKeysRequest $reques
239239
}
240240

241241
/**
242-
* Get ai hosting tariff and usages of a customer.
242+
* Get ai hosting plan and usages of a customer.
243243
*
244244
* @see https://developer.mittwald.de/reference/v2/#tag/AI-hosting/operation/ai-hosting-customer-get-usage
245245
* @throws GuzzleException
246246
* @throws UnexpectedResponseException
247247
* @param AiHostingCustomerGetUsageRequest $request An object representing the request for this operation
248-
* @return AiHostingCustomerGetUsageOKResponse The customer usage and tariff.
248+
* @return AiHostingCustomerGetUsageOKResponse The customer usage and plan.
249249
*/
250250
public function aiHostingCustomerGetUsage(AiHostingCustomerGetUsageRequest $request): AiHostingCustomerGetUsageOKResponse
251251
{
@@ -420,13 +420,13 @@ public function aiHostingProjectGetKeys(AiHostingProjectGetKeysRequest $request)
420420
}
421421

422422
/**
423-
* Get ai hosting tariff and usages of a project. Same as the customer route, but less details.
423+
* Get ai hosting plan and usages of a project. Same as the customer route, but less details.
424424
*
425425
* @see https://developer.mittwald.de/reference/v2/#tag/AI-hosting/operation/ai-hosting-project-get-usage
426426
* @throws GuzzleException
427427
* @throws UnexpectedResponseException
428428
* @param AiHostingProjectGetUsageRequest $request An object representing the request for this operation
429-
* @return AiHostingProjectGetUsageOKResponse The project usage and tariff.
429+
* @return AiHostingProjectGetUsageOKResponse The project usage and plan.
430430
*/
431431
public function aiHostingProjectGetUsage(AiHostingProjectGetUsageRequest $request): AiHostingProjectGetUsageOKResponse
432432
{

src/Generated/V2/Clients/AIhosting/AiHostingCustomerGetUsage/AiHostingCustomerGetUsageOKResponse.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use InvalidArgumentException;
88
use JsonSchema\Validator;
99
use Mittwald\ApiClient\Client\ResponseContainer;
10-
use Mittwald\ApiClient\Generated\V2\Schemas\Aihosting\TariffOptions;
10+
use Mittwald\ApiClient\Generated\V2\Schemas\Aihosting\PlanOptions;
1111
use Psr\Http\Message\ResponseInterface;
1212

1313
class AiHostingCustomerGetUsageOKResponse implements ResponseContainer
@@ -22,26 +22,26 @@ class AiHostingCustomerGetUsageOKResponse implements ResponseContainer
2222
],
2323
'properties' => [
2424
'body' => [
25-
'$ref' => '#/components/schemas/de.mittwald.v1.aihosting.TariffOptions',
25+
'$ref' => '#/components/schemas/de.mittwald.v1.aihosting.PlanOptions',
2626
],
2727
],
2828
];
2929

30-
private TariffOptions $body;
30+
private PlanOptions $body;
3131

3232
private ResponseInterface|null $httpResponse = null;
3333

34-
public function __construct(TariffOptions $body)
34+
public function __construct(PlanOptions $body)
3535
{
3636
$this->body = $body;
3737
}
3838

39-
public function getBody(): TariffOptions
39+
public function getBody(): PlanOptions
4040
{
4141
return $this->body;
4242
}
4343

44-
public function withBody(TariffOptions $body): self
44+
public function withBody(PlanOptions $body): self
4545
{
4646
$clone = clone $this;
4747
$clone->body = $body;
@@ -64,7 +64,7 @@ public static function buildFromInput(array|object $input, bool $validate = true
6464
static::validateInput($input);
6565
}
6666

67-
$body = TariffOptions::buildFromInput($input->{'body'}, validate: $validate);
67+
$body = PlanOptions::buildFromInput($input->{'body'}, validate: $validate);
6868

6969
$obj = new self($body);
7070

src/Generated/V2/Clients/AIhosting/AiHostingProjectGetUsage/AiHostingProjectGetUsageOKResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class AiHostingProjectGetUsageOKResponse implements ResponseContainer
2323
'body' => [
2424
'properties' => [
2525
'keys' => [
26-
'$ref' => '#/components/schemas/de.mittwald.v1.aihosting.TariffUsage',
26+
'$ref' => '#/components/schemas/de.mittwald.v1.aihosting.PlanUsage',
2727
],
2828
'nextTokenReset' => [
2929
'format' => 'date-time',

src/Generated/V2/Clients/AIhosting/AiHostingProjectGetUsage/AiHostingProjectGetUsageOKResponseBody.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use DateTime;
88
use InvalidArgumentException;
99
use JsonSchema\Validator;
10-
use Mittwald\ApiClient\Generated\V2\Schemas\Aihosting\TariffUsage;
10+
use Mittwald\ApiClient\Generated\V2\Schemas\Aihosting\PlanUsage;
1111

1212
class AiHostingProjectGetUsageOKResponseBody
1313
{
@@ -17,7 +17,7 @@ class AiHostingProjectGetUsageOKResponseBody
1717
private static array $internalValidationSchema = [
1818
'properties' => [
1919
'keys' => [
20-
'$ref' => '#/components/schemas/de.mittwald.v1.aihosting.TariffUsage',
20+
'$ref' => '#/components/schemas/de.mittwald.v1.aihosting.PlanUsage',
2121
],
2222
'nextTokenReset' => [
2323
'format' => 'date-time',
@@ -34,19 +34,19 @@ class AiHostingProjectGetUsageOKResponseBody
3434
'type' => 'object',
3535
];
3636

37-
private TariffUsage $keys;
37+
private PlanUsage $keys;
3838

3939
private ?DateTime $nextTokenReset = null;
4040

4141
private string $projectId;
4242

43-
public function __construct(TariffUsage $keys, string $projectId)
43+
public function __construct(PlanUsage $keys, string $projectId)
4444
{
4545
$this->keys = $keys;
4646
$this->projectId = $projectId;
4747
}
4848

49-
public function getKeys(): TariffUsage
49+
public function getKeys(): PlanUsage
5050
{
5151
return $this->keys;
5252
}
@@ -61,7 +61,7 @@ public function getProjectId(): string
6161
return $this->projectId;
6262
}
6363

64-
public function withKeys(TariffUsage $keys): self
64+
public function withKeys(PlanUsage $keys): self
6565
{
6666
$clone = clone $this;
6767
$clone->keys = $keys;
@@ -114,7 +114,7 @@ public static function buildFromInput(array|object $input, bool $validate = true
114114
static::validateInput($input);
115115
}
116116

117-
$keys = TariffUsage::buildFromInput($input->{'keys'}, validate: $validate);
117+
$keys = PlanUsage::buildFromInput($input->{'keys'}, validate: $validate);
118118
$nextTokenReset = null;
119119
if (isset($input->{'nextTokenReset'})) {
120120
$nextTokenReset = new DateTime($input->{'nextTokenReset'});

0 commit comments

Comments
 (0)