PHP code example of naugrim / wortmann-soap-api
1. Go to this page and download the library: Download naugrim/wortmann-soap-api library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
naugrim / wortmann-soap-api example snippets
use Naugrim\WortmannSoapApi\Client\Type\GetStockAndPriceInformationByProductIds;
use Naugrim\WortmannSoapApi\Contracts\WortmannSoapApi;
class MyController {
/**
* @var WortmannSoapApi
*/
protected $client;
/**
* @param WortmannSoapApi $client
*/
public function __construct(WortmannSoapApi $client)
{
$this->client = $client;
}
public function getStockInformation(array $productIds)
{
$response = $this->client->request(
GetStockAndPriceInformationByProductIds::class,
[6466010, 6466011]
);
// do something with the response
dump($response->entry());
}
}
php artisan vendor:publish --provider='Naugrim\WortmannSoapApi\Provider\WortmannSoapApiProv'