etrias/rase-connector

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (v1.0.0) of this package.

Package generated from http://webservice.ra-group.be:4751/salesorderservice.svc?wsdl using wsdltophp/packagegenerator

v1.0.0 2021-11-26 12:05 UTC

This package is auto-updated.

Last update: 2023-06-27 05:06:42 UTC


README

No replacement suggested.

RASE order connector

You can use this package to easily make a soap connection to RASE order service in PHP.

Ex.

$salesTable = new \rase\StructType\AxdEntity_SalesTable();
$salesTable->setSalesPoolId('WEBORD')
     ->setCustAccount('account')
     ->setDeliveryCity('city')
     ->setDeliveryCountryRegionId('NL')
     ->setDeliveryName('delivery_name')
     ->setDeliveryStreet('street')
     ->setDeliveryZipCode('zip_code')
     ->setDlvMode('DHL_B2B')
     ->setEmail('reply@company.com'))
     ->setPurchOrderFormNum('rase' . date('YmdHis'))
     ->setCustomerRef('rase' . date('YmdHis'))
     ->setReceiptDateRequested(new DateTime('today'))
     ->setDeliveryDate(new DateTime('tomorrow'))
     ->setSalesOriginId('sales_origin_id')
     ->setSalesTaker('ADM')
     ->setSalesType(AxdEnum_SalesType::VALUE_SALES)
     ->setIgnoreMarkup('No')
     ->setInclTax('No')
     ->setClass('entity');
     
$salesLine = (new AxdEntity_SalesLine($skuNumber, (int)$quantity, 'PAIR'))->setClass('entity');
$inventDim = (new AxdEntity_InventDim())->setInventColorId($item_color)->setInventSizeId($item_size)->setClass('entity');
$salesLine->setInventDim([$inventDim]);

$salesTable->addToSalesLine($salesLine);

$salesOrder = new AxdSalesOrder();
$salesOrder->addToSalesTable($salesTable);
$createRequest = new SalesOrderServiceCreateRequest($salesOrder);

$soapOptions = [
    AbstractSoapClientBase::WSDL_URL => https://endpoint.com,
    AbstractSoapClientBase::WSDL_CLASSMAP => RaseConnector\ClassMap::get(),
    AbstractSoapClientBase::DEFAULT_SOAP_CLIENT_CLASS => jamesiarmes\PhpNtlm\SoapClient::class,
    'wsdl_user' => 'username',
    'wsdl_password' => 'password'
];

$soapClient = new RaseConnector\ServiceType\Create($options, true);
$soapClient->create($createRequest);

Regenerate package

wget https://phar.wsdltophp.com/wsdltophp.phar
php wsdltophp.phar generate:package \
    --urlorpath="http://webservice.ra-group.be:4751/salesorderservice.svc?wsdl" \
    --soapclient="\RaseConnector\SoapClient" \
    --destination ./ \
    --composer-name="etrias/rase-connector" \
    --namespace RaseConnector \
    --force