OpenAPI description for the Integration with MyDHL
This PHP package is automatically generated by the OpenAPI Generator project:
- API version: 1.1.0
- Build package: org.openapitools.codegen.languages.PhpClientCodegen For more information, please visit http://spysystem.dk
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/spysystem/mydhl.git"
}
],
"require": {
"spysystem/mydhl": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
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;
}
?>
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 |
- 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
- Type: HTTP basic authentication