承接 kruegge82/dhl-php-rest-sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kruegge82/dhl-php-rest-sdk

最新稳定版本:v2.1.13.1

Composer 安装命令:

composer require kruegge82/dhl-php-rest-sdk

包简介

Note: This is the specification of the DPDHL Group Parcel DE Shipping API for Post & Parcel Germany. This REST web service allows business customers to create shipping labels on demand.

README 文档

README

Note: This is the specification of the DPDHL Group Parcel DE Shipping API for Post & Parcel Germany. This REST web service allows business customers to create shipping labels on demand.

Installation & Usage

Requirements

PHP 8.1 and later.

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:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');




$apiInstance = new kruegge82\DHL\Api\GeneralApi(
    // 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()
);

try {
    $result = $apiInstance->rootGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GeneralApi->rootGet: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api-eu.dhl.com/parcel/de/shipping/v2

Class Method HTTP request Description
GeneralApi rootGet GET / Return API version
ManifestsApi getManifests GET /manifests Retrieve daily manifest document
ManifestsApi manifestsPost POST /manifests Mark shipments as being ready for shipping
ShipmentsAndLabelsApi createOrders POST /orders Create one or more shipments and their documents. (This is the primary call of the API.)
ShipmentsAndLabelsApi getLabel GET /labels Download PDF document
ShipmentsAndLabelsApi getOrder GET /orders Retrieve shipment documents - labels and customs documents
ShipmentsAndLabelsApi ordersAccountDelete DELETE /orders Delete one or more shipments

Models

Authorization

Authentication schemes defined for the API:

BasicAuth

  • Type: HTTP basic authentication

ApiKey

  • Type: API key
  • API key parameter name: dhl-api-key
  • Location: HTTP header

OAuth2

  • Type: OAuth
  • Flow: password
  • Authorization URL: ``
  • Scopes: N/A

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 2.1.13
    • Generator version: 7.17.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

统计信息

  • 总下载量: 316
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: unlicense
  • 更新时间: 2024-08-28