smart-dato/eushipments is a Laravel package for eushipments laravel sdk.
It currently has 0 GitHub stars and 6.450 downloads on Packagist (latest version 0.0.4).
Install it with composer require smart-dato/eushipments.
Discover more Laravel packages by smart-dato
or browse all Laravel packages to compare alternatives.
Last updated
This is our EuShipments Laravel SDK. API documentation can be found here
You can install the package via composer:
composer require smart-dato/eushipments
You can publish the config file with:
php artisan vendor:publish --tag="eushipments-config"
EUSHIPMENTS_BASE_URL=https://test-api.inout.bg/api/v1/
EUSHIPMENTS_TOKEN=your-api-token
The test environment is https://test-api.inout.bg/api/v1/; production is https://api1.inout.bg/api/v1/.
use SmartDato\EuShipments\Data\AddressData;
use SmartDato\EuShipments\Data\AirWaybillData;
use SmartDato\EuShipments\Data\ShipmentData;
use SmartDato\EuShipments\Enums\Payer;
use SmartDato\EuShipments\Enums\Service;
use SmartDato\EuShipments\EuShipmentsConnector;
use SmartDato\EuShipments\Requests\Shipment\CreateShipmentRequest;
$connector = new EuShipmentsConnector();
$response = $connector->send(new CreateShipmentRequest(new ShipmentData(
senderId: 1234,
courierId: 999,
waybillAvailableDate: now(),
serviceName: Service::crossborder,
recipient: new AddressData(
name: 'Jane Doe',
countryIsoCode: 'PL',
streetName: 'ul. Przykladowa 1',
buildingNumber: '1',
addressText: 'ul. Przykladowa 1',
phoneNumber: '000000000',
cityName: 'Warszawa',
zipCode: '00-001',
contactPerson: 'Jane Doe',
email: '[email protected]',
),
awb: new AirWaybillData(
parcels: 1,
envelopes: 0,
totalWeight: 0.7,
openPackage: false,
saturdayDelivery: false,
referenceNumber: 'order-1001',
products: 'Clothes',
bankRepayment: 0,
shipmentPayer: Payer::sender,
declaredValue: 0,
otherRepayment: null,
observations: null,
fragile: true,
productsInfo: 'Clothes',
piecesInPack: 1,
),
)));
senderId and courierId are the IDs from your EuShipments account.
composer test
Please see CHANGELOG for more information on what has changed recently.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.