Zum Hauptinhalt springen

Creates or Updates Pricing for an Extension

PUT/v2/contributors/{contributorId}/extensions/{extensionId}/pricing
API-Version
v2
Request-Methode
PUT
Operation-ID
extension-update-extension-pricing

The Pricing is needed to publish paid extensions.

Request​

  • extensionIdstring (uuid)required
    Beispiel:"907a24e9-0723-4566-b584-86578419e983"
  • contributorIdstringrequired

Responses​

Format
application/json
Beschreibung

The Pricing has been updated.

  • extensionIdstring (uuid)required

    The ID of the Extension.

  • nextPossiblePriceChangestring (date-time)

    The time until which the contributor is blocked from changing the price again.

  • priceChangeConsequenceobjectrequired
    • contributorConsequencestring (einer von: NONE, EDIT_BLOCK)required

      Description of the consequence for the Extension from the perspective of the contributor. Values: * "NONE": No consequence. * "EDIT_BLOCK": The Extension will be blocked for editing by the contributor for 30 days.

    • globalCustomerConsequencestring (einer von: NONE, INFO, CONFIRM_REQUIRED)required

      Description of the consequence for all Customers of the Extension. Values: * "NONE": No consequence. * "INFO": Customers will be informed about the upcoming changes to their contracts. * "CONFIRM_REQUIRED": Customers will have to confirm or select the accepted changes to their contracts within 30 days or their contracts will be automatically cancelled.

    • variantConsequencesArray von objectrequired
      • Array[
        • *object
          • consequencestring (einer von: NONE, INFO, CONFIRM_REQUIRED)

            The individual consequence for customers of a specific variant of the Extension. Values: * "NONE": No consequence. * "INFO": Customers will be informed about the upcoming changes to their contracts. * "CONFIRM_REQUIRED": Customers will have to confirm or select the accepted changes to their contracts within 30 days or their contracts will be automatically cancelled.

          • deletionDeadlinestring (date-time)

            The date the variant will ne deleted

          • variantKeystring

            The key of the variant of the Extension.

        ]
Content-Type: application/json

{
"extensionId": "f0f86186-0a5a-45b2-aa33-502777496347",
"nextPossiblePriceChange": "1985-10-26T01:21:00.000Z",
"priceChangeConsequence": {
"contributorConsequence": "NONE",
"globalCustomerConsequence": "NONE",
"variantConsequences": [
{
"consequence": "NONE",
"deletionDeadline": "1985-10-26T01:21:00.000Z",
"variantKey": "string"
}
]
}
}
{
"properties": {
"extensionId": {
"description": "The ID of the Extension.",
"format": "uuid",
"type": "string"
},
"nextPossiblePriceChange": {
"description": "The time until which the contributor is blocked from changing the price again.",
"format": "date-time",
"type": "string"
},
"priceChangeConsequence": {
"properties": {
"contributorConsequence": {
"description": "Description of the consequence for the Extension from the perspective of the contributor. Values: * \"NONE\": No consequence. * \"EDIT_BLOCK\": The Extension will be blocked for editing by the contributor for 30 days.\n",
"enum": [
"NONE",
"EDIT_BLOCK"
],
"type": "string"
},
"globalCustomerConsequence": {
"description": "Description of the consequence for all Customers of the Extension. Values: * \"NONE\": No consequence. * \"INFO\": Customers will be informed about the upcoming changes to their contracts. * \"CONFIRM_REQUIRED\": Customers will have to confirm or select the accepted changes to their contracts within 30 days or their contracts will be automatically cancelled.\n",
"enum": [
"NONE",
"INFO",
"CONFIRM_REQUIRED"
],
"type": "string"
},
"variantConsequences": {
"items": {
"properties": {
"consequence": {
"description": "The individual consequence for customers of a specific variant of the Extension. Values: * \"NONE\": No consequence. * \"INFO\": Customers will be informed about the upcoming changes to their contracts. * \"CONFIRM_REQUIRED\": Customers will have to confirm or select the accepted changes to their contracts within 30 days or their contracts will be automatically cancelled.\n",
"enum": [
"NONE",
"INFO",
"CONFIRM_REQUIRED"
],
"type": "string"
},
"deletionDeadline": {
"description": "The date the variant will ne deleted",
"format": "date-time",
"type": "string"
},
"variantKey": {
"description": "The key of the variant of the Extension.",
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"required": [
"contributorConsequence",
"globalCustomerConsequence",
"variantConsequences"
],
"type": "object"
}
},
"required": [
"extensionId",
"priceChangeConsequence"
],
"type": "object"
}

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-X PUT \
-d '{"dryRun":true,"priceInCents":123}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/contributors/string/extensions/f0f86186-0a5a-45b2-aa33-502777496347/pricing
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.marketplace.extensionUpdateExtensionPricing({
"extensionId": "f0f86186-0a5a-45b2-aa33-502777496347",
"contributorId": "string",
"data": {
"dryRun": true,
"priceInCents": 123
}
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Marketplace\ExtensionUpdateExtensionPricing\ExtensionUpdateExtensionPricingRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Marketplace\ExtensionUpdateExtensionPricing\ExtensionUpdateExtensionPricingRequestBody;

$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

// TODO: Please consult the properties and constructor signature of
// ExtensionUpdateExtensionPricingRequestBody to learn how to construct a valid instance
$body = new ExtensionUpdateExtensionPricingRequestBody(/* TODO: ... */);

$request = (new ExtensionUpdateExtensionPricingRequest(
extensionId: "f0f86186-0a5a-45b2-aa33-502777496347",
contributorId: "string",
body: $body
));
$response = $client->marketplace()->extensionUpdateExtensionPricing($request);

var_dump($response->getBody();

Auf dieser Seite