<?php
/**
 * This file aims to show you how to use this generated package.
 * In addition, the goal is to show which methods are available and the first needed parameter(s)
 * You have to use an associative array such as:
 * - the key must be a constant beginning with WSDL_ from AbstractSoapClientBase class (each generated ServiceType class extends this class)
 * - the value must be the corresponding key value (each option matches a {@link http://www.php.net/manual/en/soapclient.soapclient.php} option)
 * $options = array(
 * \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_URL => 'https://whistlservices.whistl.co.uk/DespatchAllocating.svc?WSDL',
 * \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_TRACE => true,
 * \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_LOGIN => 'you_secret_login',
 * \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_PASSWORD => 'you_secret_password',
 * );
 * etc...
 */
require_once __DIR__ . '/vendor/autoload.php';
/**
 * Minimal options
 */
$options = array(
    \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_URL => 'https://whistlservices.whistl.co.uk/DespatchAllocating.svc?WSDL',
    \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_CLASSMAP => ClassMap::get(),
);
/**
 * Samples for Get ServiceType
 */
$get = new \ServiceType\Get($options);
/**
 * Sample call for GetDiagnosticInfo operation/method
 */
if ($get->GetDiagnosticInfo(new \StructType\GetDiagnosticInfo()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for GetSpeedTestInfo operation/method
 */
if ($get->GetSpeedTestInfo(new \StructType\GetSpeedTestInfo()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for GetScriptsRun operation/method
 */
if ($get->GetScriptsRun(new \StructType\GetScriptsRun()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for GetMaintenanceMode operation/method
 */
if ($get->GetMaintenanceMode(new \StructType\GetMaintenanceMode()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for GetManifestedOrders operation/method
 */
if ($get->GetManifestedOrders(new \StructType\GetManifestedOrders()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for GetTrackingEvents operation/method
 */
if ($get->GetTrackingEvents(new \StructType\GetTrackingEvents()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for GetDespatchDetails operation/method
 */
if ($get->GetDespatchDetails(new \StructType\GetDespatchDetails()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for GetStores operation/method
 */
if ($get->GetStores(new \StructType\GetStores()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for GetDespatchManagerPrintRequestById operation/method
 */
if ($get->GetDespatchManagerPrintRequestById(new \StructType\GetDespatchManagerPrintRequestById()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for GetParcelPrintsCount operation/method
 */
if ($get->GetParcelPrintsCount(new \StructType\GetParcelPrintsCount()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for GetOrderPrintsCount operation/method
 */
if ($get->GetOrderPrintsCount(new \StructType\GetOrderPrintsCount()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Samples for Throw ServiceType
 */
$throw = new \ServiceType\_Throw($options);
/**
 * Sample call for ThrowException operation/method
 */
if ($throw->ThrowException(new \StructType\ThrowException()) !== false) {
    print_r($throw->getResult());
} else {
    print_r($throw->getLastError());
}
/**
 * Samples for Test ServiceType
 */
$test = new \ServiceType\Test($options);
/**
 * Sample call for TestExceptionLog operation/method
 */
if ($test->TestExceptionLog(new \StructType\TestExceptionLog()) !== false) {
    print_r($test->getResult());
} else {
    print_r($test->getLastError());
}
/**
 * Sample call for TestGeneralLog operation/method
 */
if ($test->TestGeneralLog(new \StructType\TestGeneralLog()) !== false) {
    print_r($test->getResult());
} else {
    print_r($test->getLastError());
}
/**
 * Samples for Allocate ServiceType
 */
$allocate = new \ServiceType\Allocate($options);
/**
 * Sample call for AllocateDespatchMethod operation/method
 */
if ($allocate->AllocateDespatchMethod(new \StructType\AllocateDespatchMethod()) !== false) {
    print_r($allocate->getResult());
} else {
    print_r($allocate->getLastError());
}
/**
 * Samples for Clear ServiceType
 */
$clear = new \ServiceType\Clear($options);
/**
 * Sample call for ClearCache operation/method
 */
if ($clear->ClearCache(new \StructType\ClearCache()) !== false) {
    print_r($clear->getResult());
} else {
    print_r($clear->getLastError());
}
/**
 * Samples for Set ServiceType
 */
$set = new \ServiceType\Set($options);
/**
 * Sample call for SetMaintenanceMode operation/method
 */
if ($set->SetMaintenanceMode(new \StructType\SetMaintenanceMode()) !== false) {
    print_r($set->getResult());
} else {
    print_r($set->getLastError());
}
/**
 * Samples for Despatch ServiceType
 */
$despatch = new \ServiceType\Despatch($options);
/**
 * Sample call for DespatchParcel operation/method
 */
if ($despatch->DespatchParcel(new \StructType\DespatchParcel()) !== false) {
    print_r($despatch->getResult());
} else {
    print_r($despatch->getLastError());
}
/**
 * Sample call for DespatchManagedOrder operation/method
 */
if ($despatch->DespatchManagedOrder(new \StructType\DespatchManagedOrder()) !== false) {
    print_r($despatch->getResult());
} else {
    print_r($despatch->getLastError());
}
/**
 * Samples for Confirm ServiceType
 */
$confirm = new \ServiceType\Confirm($options);
/**
 * Sample call for ConfirmDespatch operation/method
 */
if ($confirm->ConfirmDespatch(new \StructType\ConfirmDespatch()) !== false) {
    print_r($confirm->getResult());
} else {
    print_r($confirm->getLastError());
}
/**
 * Samples for Bulk ServiceType
 */
$bulk = new \ServiceType\Bulk($options);
/**
 * Sample call for BulkDespatchParcel operation/method
 */
if ($bulk->BulkDespatchParcel(new \StructType\BulkDespatchParcel()) !== false) {
    print_r($bulk->getResult());
} else {
    print_r($bulk->getLastError());
}
/**
 * Samples for Create ServiceType
 */
$create = new \ServiceType\Create($options);
/**
 * Sample call for CreateOrder operation/method
 */
if ($create->CreateOrder(new \StructType\CreateOrder()) !== false) {
    print_r($create->getResult());
} else {
    print_r($create->getLastError());
}
/**
 * Sample call for CreateBooking operation/method
 */
if ($create->CreateBooking(new \StructType\CreateBooking()) !== false) {
    print_r($create->getResult());
} else {
    print_r($create->getLastError());
}
/**
 * Sample call for CreateManifest operation/method
 */
if ($create->CreateManifest(new \StructType\CreateManifest()) !== false) {
    print_r($create->getResult());
} else {
    print_r($create->getLastError());
}
/**
 * Sample call for CreateTrackingEvent operation/method
 */
if ($create->CreateTrackingEvent(new \StructType\CreateTrackingEvent()) !== false) {
    print_r($create->getResult());
} else {
    print_r($create->getLastError());
}
/**
 * Sample call for CreateNormalisedEvent operation/method
 */
if ($create->CreateNormalisedEvent(new \StructType\CreateNormalisedEvent()) !== false) {
    print_r($create->getResult());
} else {
    print_r($create->getLastError());
}
/**
 * Sample call for CreatePreDespatchedOrder operation/method
 */
if ($create->CreatePreDespatchedOrder(new \StructType\CreatePreDespatchedOrder()) !== false) {
    print_r($create->getResult());
} else {
    print_r($create->getLastError());
}
/**
 * Samples for Update ServiceType
 */
$update = new \ServiceType\Update($options);
/**
 * Sample call for UpdateOrder operation/method
 */
if ($update->UpdateOrder(new \StructType\UpdateOrder()) !== false) {
    print_r($update->getResult());
} else {
    print_r($update->getLastError());
}
/**
 * Samples for Export ServiceType
 */
$export = new \ServiceType\Export($options);
/**
 * Sample call for ExportBooking operation/method
 */
if ($export->ExportBooking(new \StructType\ExportBooking()) !== false) {
    print_r($export->getResult());
} else {
    print_r($export->getLastError());
}
/**
 * Sample call for ExportManifest operation/method
 */
if ($export->ExportManifest(new \StructType\ExportManifest()) !== false) {
    print_r($export->getResult());
} else {
    print_r($export->getLastError());
}
/**
 * Sample call for ExportTracking operation/method
 */
if ($export->ExportTracking(new \StructType\ExportTracking()) !== false) {
    print_r($export->getResult());
} else {
    print_r($export->getLastError());
}
/**
 * Samples for Print ServiceType
 */
$print = new \ServiceType\_Print($options);
/**
 * Sample call for PrintLabel operation/method
 */
if ($print->PrintLabel(new \StructType\PrintLabel()) !== false) {
    print_r($print->getResult());
} else {
    print_r($print->getLastError());
}
/**
 * Sample call for PrintLabelForDespatchManager operation/method
 */
if ($print->PrintLabelForDespatchManager(new \StructType\PrintLabelForDespatchManager()) !== false) {
    print_r($print->getResult());
} else {
    print_r($print->getLastError());
}
/**
 * Sample call for PrintManifest operation/method
 */
if ($print->PrintManifest(new \StructType\PrintManifest()) !== false) {
    print_r($print->getResult());
} else {
    print_r($print->getLastError());
}
/**
 * Sample call for PrintServerAuditLog operation/method
 */
if ($print->PrintServerAuditLog(new \StructType\PrintServerAuditLog()) !== false) {
    print_r($print->getResult());
} else {
    print_r($print->getLastError());
}
/**
 * Samples for Reprint ServiceType
 */
$reprint = new \ServiceType\Reprint($options);
/**
 * Sample call for ReprintLabel operation/method
 */
if ($reprint->ReprintLabel(new \StructType\ReprintLabel()) !== false) {
    print_r($reprint->getResult());
} else {
    print_r($reprint->getLastError());
}
/**
 * Samples for Cancel ServiceType
 */
$cancel = new \ServiceType\Cancel($options);
/**
 * Sample call for CancelConsignment operation/method
 */
if ($cancel->CancelConsignment(new \StructType\CancelConsignment()) !== false) {
    print_r($cancel->getResult());
} else {
    print_r($cancel->getLastError());
}
/**
 * Samples for Store ServiceType
 */
$store = new \ServiceType\Store($options);
/**
 * Sample call for StoreCustomerOrder operation/method
 */
if ($store->StoreCustomerOrder(new \StructType\StoreCustomerOrder()) !== false) {
    print_r($store->getResult());
} else {
    print_r($store->getLastError());
}
/**
 * Samples for Evaluate ServiceType
 */
$evaluate = new \ServiceType\Evaluate($options);
/**
 * Sample call for EvaluateDespatchServices operation/method
 */
if ($evaluate->EvaluateDespatchServices(new \StructType\EvaluateDespatchServices()) !== false) {
    print_r($evaluate->getResult());
} else {
    print_r($evaluate->getLastError());
}
/**
 * Samples for Pre ServiceType
 */
$pre = new \ServiceType\Pre($options);
/**
 * Sample call for PreLoadCache operation/method
 */
if ($pre->PreLoadCache(new \StructType\PreLoadCache()) !== false) {
    print_r($pre->getResult());
} else {
    print_r($pre->getLastError());
}
/**
 * Samples for Import ServiceType
 */
$import = new \ServiceType\Import($options);
/**
 * Sample call for ImportOrders operation/method
 */
if ($import->ImportOrders(new \StructType\ImportOrders()) !== false) {
    print_r($import->getResult());
} else {
    print_r($import->getLastError());
}
/**
 * Sample call for ImportTracking operation/method
 */
if ($import->ImportTracking(new \StructType\ImportTracking()) !== false) {
    print_r($import->getResult());
} else {
    print_r($import->getLastError());
}
/**
 * Samples for Validate ServiceType
 */
$validate = new \ServiceType\Validate($options);
/**
 * Sample call for ValidateDespatchManagerOrder operation/method
 */
if ($validate->ValidateDespatchManagerOrder(new \StructType\ValidateDespatchManagerOrder()) !== false) {
    print_r($validate->getResult());
} else {
    print_r($validate->getLastError());
}
