pcae / mydhl
OpenAPI description for the Integration with MyDHL
dev-master
2021-02-03 05:02 UTC
Requires
- php: >=7.1
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.12
- phpunit/phpunit: ^7.4
- squizlabs/php_codesniffer: ~2.6
This package is not auto-updated.
Last update: 2025-04-24 23:53:33 UTC
README
OpenAPI description for the Integration with MyDHL
This PHP package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Build package: org.openapitools.codegen.languages.PhpClientCodegen For more information, please visit http://spysystem.dk
Requirements
PHP 5.5 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{ "repositories": [ { "type": "vcs", "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" } ], "require": { "GIT_USER_ID/GIT_REPO_ID": "*@dev" } }
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
Tests
To run the unit tests:
composer install ./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: BasicAuth $config = MyDHL\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new MyDHL\Api\DHLClientApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $data = new \MyDHL\Model\RateRequestRequest(); // \MyDHL\Model\RateRequestRequest | Rate Request Data try { $result = $apiInstance->requestRate($data); print_r($result); } catch (Exception $e) { echo 'Exception when calling DHLClientApi->requestRate: ', $e->getMessage(), PHP_EOL; } ?>
Documentation for API Endpoints
All URIs are relative to https://wsbexpress.dhl.com/rest/sndpt
Class | Method | HTTP request | Description |
---|---|---|---|
DHLClientApi | requestRate | POST /RateRequest | Requests a Shipment Rate |
DHLClientApi | requestShipment | POST /ShipmentRequest | Create a Shipment |
Documentation For Models
- AdditionalInformation
- Address
- Billing
- Charge
- Charges
- Commodities
- Contact
- CustomerLogo
- Details
- Dimensions
- Document
- DocumentImage
- DocumentImages
- Documents
- ExportDeclaration
- ExportLineItem
- ExportLineItems
- InternationalDetail
- InvoiceDeclarationText
- InvoiceDeclarationTexts
- InvoiceSignature
- LabelImage
- LabelOptions
- Model401Response
- Notification
- OnDemandDeliveryOptions
- PackageResult
- Packages
- PackagesResult
- Provider
- RateRequest
- RateRequestPackages
- RateRequestRequest
- RateRequestRequestedPackage
- RateRequestRequestedShipment
- RateRequestResponse
- RateRequestShip
- RateRequestStakeHolder
- RateRequestTotalNet
- RateResponse
- Reason
- RegistrationNumber
- RegistrationNumbers
- Request
- RequestedPackage
- RequestedShipment
- Response
- ResponseContact
- ResponseShip
- ResponseSteakHolder
- Service
- ServiceArea
- ServiceHeader
- Ship
- ShipmentInfo
- ShipmentNotification
- ShipmentNotifications
- ShipmentRequest
- ShipmentRequestRequest
- ShipmentRequestResponse
- ShipmentResponse
- SpecialService
- SpecialServices
- StakeHolder
- TotalChargeType
- TotalChargeTypes
- TotalNet
- Weight
Documentation For Authorization
BasicAuth
- Type: HTTP basic authentication