Create TariffChange Order
POST/tariff-changes/
v2
POST
order-create-tariff-change
Request
Responses
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-X POST \
-d '{"tariffChangeData":{"contractId":"string","diskspaceInGiB":20,"spec":{"machineType":"prospace.2cpu.4gb"}},"tariffChangeType":"projectHosting"}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/tariff-changes
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";
const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.contract.orderCreateTariffChange({
"data": {
"tariffChangeData": {
"contractId": "string",
"diskspaceInGiB": 20,
"spec": {
"machineType": "prospace.2cpu.4gb"
}
},
"tariffChangeType": "projectHosting"
}
});
assertStatus(response, 201);
use \Mittwald\ApiClient\Generated\V2\Clients\Contract\OrderCreateTariffChange\OrderCreateTariffChangeRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Contract\OrderCreateTariffChange\OrderCreateTariffChangeRequestBody;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
// TODO: Please consult the properties and constructor signature of
// OrderCreateTariffChangeRequestBody to learn how to construct a valid instance
$body = new OrderCreateTariffChangeRequestBody(/* TODO: ... */);
$request = (new OrderCreateTariffChangeRequest(
body: $body
));
$response = $client->contract()->orderCreateTariffChange($request);
var_dump($response->getBody();