rescale()
Signature
public function rescale(ProductHosting $productHosting, array $productOptionMapping, array $deltaProductOptionMapping, ProductHostingRescale $rescale): ServerHostingRescaledResponseParameters
$productHosting
The ProductHosting model where the action gets executed on
$productOptionMapping A key-value mapping of all productOptions, including the new/changed ones
$deltaProductOptionMapping Sames as 2., but only the delta/changed productOptions which have changed
$rescale The ProductHostingRescale model which may be useful sometimes (most cases: ignore it)
Description
Performs a rescale (up/downgrade) of the hosting. The function will get triggered asynchronous in a queue and only after the upgrade was paid.
This should only send the changed options to the integration, the entire billing part etc. is handled by hostware.
Return value
An empty ServerHostingRescaledResponse for success, Exception with the mesage on error. If you return an error, the rescale will be marked as pending and e.g. will be executed by an admin in the future. The new productOptions / new pricing will only be applied to the user once the rescale was successfull. Example: