<?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 fist 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 => 'http://86.43.105.23:40000/rslink/weborder.asmx?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 => 'http://86.43.105.23:40000/rslink/weborder.asmx?WSDL',
    \WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_CLASSMAP => ClassMap::get(),
);
/**
 * Samples for Get ServiceType
 */
$get = new \ServiceType\Get($options);
/**
 * Sample call for getDepartments operation/method
 */
if ($get->getDepartments(new \StructType\GetDepartments()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for getProductFile operation/method
 */
if ($get->getProductFile(new \StructType\GetProductFile()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for getCustomers operation/method
 */
if ($get->getCustomers(new \StructType\GetCustomers()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for getStockBalance operation/method
 */
if ($get->getStockBalance(new \StructType\GetStockBalance()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for getVatRates operation/method
 */
if ($get->getVatRates(new \StructType\GetVatRates()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Sample call for getSimplePromotions operation/method
 */
if ($get->getSimplePromotions(new \StructType\GetSimplePromotions()) !== false) {
    print_r($get->getResult());
} else {
    print_r($get->getLastError());
}
/**
 * Samples for Update ServiceType
 */
$update = new \ServiceType\Update($options);
/**
 * Sample call for UpdateCustomerStatus operation/method
 */
if ($update->UpdateCustomerStatus(new \StructType\UpdateCustomerStatus()) !== false) {
    print_r($update->getResult());
} else {
    print_r($update->getLastError());
}
/**
 * Samples for Start ServiceType
 */
$start = new \ServiceType\Start($options);
/**
 * Sample call for StartTransaction operation/method
 */
if ($start->StartTransaction(new \StructType\StartTransaction()) !== false) {
    print_r($start->getResult());
} else {
    print_r($start->getLastError());
}
/**
 * Samples for Write ServiceType
 */
$write = new \ServiceType\Write($options);
/**
 * Sample call for WriteLines operation/method
 */
if ($write->WriteLines(new \StructType\WriteLines()) !== false) {
    print_r($write->getResult());
} else {
    print_r($write->getLastError());
}
/**
 * Sample call for WriteLinesInsertVat operation/method
 */
if ($write->WriteLinesInsertVat(new \StructType\WriteLinesInsertVat()) !== false) {
    print_r($write->getResult());
} else {
    print_r($write->getLastError());
}
/**
 * Samples for Commit ServiceType
 */
$commit = new \ServiceType\Commit($options);
/**
 * Sample call for CommitTransaction operation/method
 */
if ($commit->CommitTransaction(new \StructType\CommitTransaction()) !== false) {
    print_r($commit->getResult());
} else {
    print_r($commit->getLastError());
}
/**
 * Samples for Print ServiceType
 */
$print = new \ServiceType\_Print($options);
/**
 * Sample call for PrintSlip operation/method
 */
if ($print->PrintSlip(new \StructType\PrintSlip()) !== false) {
    print_r($print->getResult());
} else {
    print_r($print->getLastError());
}
/**
 * Samples for Cancel ServiceType
 */
$cancel = new \ServiceType\Cancel($options);
/**
 * Sample call for CancelTransaction operation/method
 */
if ($cancel->CancelTransaction(new \StructType\CancelTransaction()) !== false) {
    print_r($cancel->getResult());
} else {
    print_r($cancel->getLastError());
}
