WeFact Hosting API versie 2.7



Hosting

Hostingaccounts zijn te beheren via de controller 'hosting'.



terminate

Middels deze functie kunt u een hostingaccount opzeggen.
Voorbeeldbestand: /voorbeelden/hosting/hosting.terminate.php


Invoerparameters:
Veldnaam Waarde Omschrijving
Identifier int De unieke ID van een hosting account
Date date De datum waarop de dienst opgezegd wordt
Reason text Reden van opzegging
Verplichte velden: Identifier

Voorbeeld invoer:
<?php

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

$api = new WeFactAPI();

$hostingParams = array(
						'Identifier'		=> '1',
						//'Date'				=> '2015-01-01', // Date of termination 
);

$response = $api->sendRequest('hosting', 'terminate', $hostingParams);

print_r_pre($response);

?>

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

    [hosting] => Array
        (
            [Identifier] => 1
            [Username] => examplesite
            [Debtor] => 1
            [DebtorCode] => DB0001
            [Domain] => example-site.com
            [Server] => 1
            [Package] => 1
            [PackageName] => Hosting small
            [Comment] => 
            [Status] => 4
            [Created] => 2016-09-01 12:00:00
            [Modified] => 2016-09-01 12:00:00
            [Subscription] => Array
                (
                    [Number] => 1
                    [NumberSuffix] => 
                    [ProductCode] => P001
                    [Description] => Default product
                    [PriceExcl] => 250
                    [PriceIncl] => 302.5
                    [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] => 2017-03-14
                    [Reminder] => 
                    [InvoiceAuthorisation] => yes
                    [AmountExcl] => 250
                    [AmountIncl] => 302.5
                )

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

            [PackageInfo] => Array
                (
                    [Identifier] => 1
                    [Name] => Hosting small
                    [Type] => normal
                    [Template] => yes
                    [TemplateName] => 
                    [BandWidth] => 
                    [DiscSpace] => 
                    [Domains] => 
                    [SubDomains] => 
                    [Domainpointers] => 
                    [MySQLDatabases] => 
                    [EmailAccounts] => 
                )

            [ServerInfo] => Array
                (
                    [Identifier] => 1
                    [Name] => Example server
                    [Panel] => hostingclass
                    [Location] => https://localhost
                    [Port] => 1234
                    [IP] => 
                    [AdditionalIP] => 
                    [Settings] => 
                    [DefaultDNSTemplate] => 1
                    [SSOSupport] => url
                )

            [Translations] => Array
                (
                    [Status] => Actief
                )

        )

)