sinanulker/epost-global-php-client 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

sinanulker/epost-global-php-client

Composer 安装命令:

composer require sinanulker/epost-global-php-client

包简介

ePost Global Shipping API Production Environment.<BR>Built at 09/25/2024 12:43:58

README 文档

README

ePost Global Shipping API Production Environment.
Built at 09/25/2024 12:43:58

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

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');



// Configure API key authorization: Bearer
$config = Sinan\Epost\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Sinan\Epost\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new Sinan\Epost\Api\AuthorizeApi(
    // 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
);

try {
    $apiInstance->apiV1AuthorizeValidateGet();
} catch (Exception $e) {
    echo 'Exception when calling AuthorizeApi->apiV1AuthorizeValidateGet: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to http://localhost

ClassMethodHTTP requestDescription
AuthorizeApiapiV1AuthorizeValidateGetGET /api/v1/Authorize/ValidateCheck to see if a token is valid
RateApiapiV1RatePostPOST /api/v1/Rate
RateApiapiV1RateServicesGetGET /api/v1/Rate/ServicesList all services.
ShipApiapiV1ShipCloseGetGET /api/v1/Ship/CloseRetrieve a list of Accounts that are ready to be closed.
ShipApiapiV1ShipClosePostPOST /api/v1/Ship/CloseInitiate the end of day procedure.
ShipApiapiV1ShipGetGET /api/v1/ShipRetrieve a list of packages sorted by most recent packages first.
ShipApiapiV1ShipIdVoidGetGET /api/v1/Ship/{id}/VoidVoid a shipment. Required for reship.
ShipApiapiV1ShipPostPOST /api/v1/ShipRequest a shipping label to be created.

Models

Authorization

Authentication schemes defined for the API:

Bearer

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

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: v1
    • Generator version: 7.10.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: unlicense
  • 更新时间: 2024-12-11