WeFact Hosting API versie 2.7



VPS

VPS diensten zijn te beheren via de controller 'vps'.



terminate

Middels deze functie kunt u een VPS opzeggen.
Voorbeeldbestand: /voorbeelden/vps/vps.terminate.php


Invoerparameters:
Veldnaam Waarde Omschrijving
Identifier int De unieke ID van een VPS
Hostname string De hostnaam
Date date De datum waarop de dienst opgezegd wordt
Reason text Reden van opzegging
Verplichte velden: Identifier of Hostname

Voorbeeld invoer:
<?php

require_once("../wefact_api.php");

$api = new WeFactAPI();

$vpsParams = array(
					'Hostname' 	=> 'vps1.example.com',
					'Date'	=> '2016-01-01'
);

$response = $api->sendRequest('vps', 'terminate', $vpsParams);

print_r_pre($response);

?>

Voorbeeld uitvoer:
Array
(
    [controller] => vps
    [action] => terminate
    [status] => success
    [date] => 2016-09-01T12:00:00+02:00
    [success] => Array
        (
            [0] => Dienst is opgezegd met opzegdatum 01-01-2016
        )

    [vps] => Array
        (
            [Identifier] => 1
            [Hostname] => vps1.example.com
            [Debtor] => 1
            [DebtorCode] => DB0001
            [IPAddress] => 123.45.67.89
            [Package] => 1
            [Node] => 1
            [ServerID] => 1234
            [Image] => img1
            [MemoryMB] => 500
            [DiskSpaceGB] => 20
            [BandWidthGB] => 20
            [CPUCores] => 1
            [Comment] => 
            [Status] => active
            [Created] => 2016-09-01 12:00:00
            [Modified] => 2016-09-01 12:00:00
            [Subscription] => Array
                (
                    [Number] => 1
                    [NumberSuffix] => 
                    [ProductCode] => P005
                    [Description] => VPS package 1
                    [PriceExcl] => 35
                    [PriceIncl] => 42.35
                    [TaxPercentage] => 21
                    [DiscountPercentage] => 0
                    [Periods] => 1
                    [Periodic] => m
                    [StartPeriod] => 2016-10-14
                    [EndPeriod] => 2016-11-14
                    [NextDate] => 2016-09-30
                    [ContractPeriods] => 1
                    [ContractPeriodic] => m
                    [StartContract] => 2016-07-14
                    [EndContract] => 2016-08-14
                    [TerminationDate] => 2016-01-01
                    [Reminder] => 
                    [InvoiceAuthorisation] => yes
                    [AmountExcl] => 35
                    [AmountIncl] => 42.35
                )

            [NodeInfo] => Array
                (
                    [Name] => Example VPS Node
                    [Images] => Array
                        (
                            [0] => Array
                                (
                                    [Node] => 1
                                    [Key] => img1
                                    [ImageName] => An example image
                                    [Status] => active
                                )

                        )

                    [Platform] => apiexample
                    [Location] => a
                    [Port] => 
                )

            [Translations] => Array
                (
                    [PackageName] => VPS package 1
                    [NodeName] => Example VPS Node
                    [ImageName] => An example image
                )

            [Termination] => Array
                (
                    [Date] => 2016-01-01
                    [Created] => 2016-09-01 12:00:00
                    [Status] => pending
                )

        )

)