smart-dato / duty-refunds-landmark
Duty Refunds Landmark API SDK for Laravel
Fund package maintenance!
SmartDato
Requires
- php: ^8.2
- illuminate/contracts: ^10.0||^11.0
- saloonphp/saloon: ^3.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^2.9
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^9.0.0||^8.22.0
- pestphp/pest: ^2.34
- pestphp/pest-plugin-arch: ^2.7
- pestphp/pest-plugin-laravel: ^2.3
- phpstan/extension-installer: ^1.3
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-phpunit: ^1.3
- spatie/laravel-ray: ^1.35
README
This is a Laravel plugin for the Duty Refunds Landmark API
Installation
You can install the package via composer:
composer require smart-dato/duty-refunds-landmark
You can publish the config file with:
php artisan vendor:publish --tag="duty-refunds-landmark-config"
This is the contents of the published config file:
return [ 'url' => env('DUTY_REFUNDS_LANDMARK_URL', 'https://api.stage.dutyrefunds.co.uk/landmark'), 'username' => env('DUTY_REFUNDS_LANDMARK_USERNAME', ''), 'password' => env('DUTY_REFUNDS_LANDMARK_PASSWORD', ''), ];
Usage
$shipment = new \SmartDato\DutyRefundsLandmark\Data\Shipment\ShipmentData( reference: "3245325", shipTo: new \SmartDato\DutyRefundsLandmark\Data\Shipment\AddressData( name: "Test Company", attention: "Ole Olsen", address1: "5130 Halford Drive", address2: "Building #C", address3: "Unit 1", city: "Windsor", state: "ON", postalCode: "N9A6J3", country: \SmartDato\DutyRefundsLandmark\Enums\Country::CANADA, phone: "1-519-737-9101", email: "orders@test.com" ), orderTotal: 187.98, orderInsuranceFreightTotal: 20.65, shipmentInsuranceFreight: 20.65, itemsCurrency: \SmartDato\DutyRefundsLandmark\Enums\Currency::United_States_Dollar, produceLabel: false, labelFormat: \SmartDato\DutyRefundsLandmark\Enums\LabelFormat::PDF, labelEncoding: \SmartDato\DutyRefundsLandmark\Enums\LabelEncoding::LINKS, vendorInformation: new \SmartDato\DutyRefundsLandmark\Data\Shipment\VendorData( name: "Test Company Legal Name", phone: "12223334444", email: "contact@vendor.com", address1: "Sample Company Street", address2: "Suite 135", city: "Santa Barbara", state: "CA", postalCode: "93101", country: \SmartDato\DutyRefundsLandmark\Enums\Country::UNITED_STATES, businessNumber: "12345", RGRNumber: "123", IOSSNumber: "IM1234567891", EORINumber: "12345" ), package: new \SmartDato\DutyRefundsLandmark\Data\Shipment\PackageData( weightUnit: \SmartDato\DutyRefundsLandmark\Enums\Units\WeightUnit::Pound, weight: 4.5, dimensionsUnit: \SmartDato\DutyRefundsLandmark\Enums\Units\DimensionUnit::Inches, length: 12, width: 12, height: 12, packageReference: "98233310" ), items: [ new \SmartDato\DutyRefundsLandmark\Data\Shipment\ItemData( sku: "7224059", quantity: 2, unitPrice: 93.99, description: "Women's Shoes", hsCode: "640399.30.00", countryOfOrigin: \SmartDato\DutyRefundsLandmark\Enums\Country::CHINA, url: "", hs: new \SmartDato\DutyRefundsLandmark\Data\Shipment\HarmonizedSystemData( code: '6403993000', region: 'US' ), dangerousGood: new \SmartDato\DutyRefundsLandmark\Data\Shipment\DangerousGoodData( containsDangerousGoods: true, unCode: "UN3481", packingGroup: \SmartDato\DutyRefundsLandmark\Enums\PackingGroup::II, packingInstructions: "PS967S1", weight: 10, weightUnit: \SmartDato\DutyRefundsLandmark\Enums\Units\WeightUnit::Kilogram, volume: 30, volumeUnit: \SmartDato\DutyRefundsLandmark\Enums\Units\VolumeUnit::CubicCentimeter ) ), ] ); $connector = new \SmartDato\DutyRefundsLandmark\DutyRefundsLandmark(); $response = (new \SmartDato\DutyRefundsLandmark\Resource\Shipment($connector)) ->importShipment($shipment);
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.