承接 vekkon/postbarcodeclient-php 相关项目开发

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

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

vekkon/postbarcodeclient-php

最新稳定版本:v1.0.2

Composer 安装命令:

composer require vekkon/postbarcodeclient-php

包简介

README 文档

README

Digital Commerce Swiss Post web REST API for the generation of the address label. With the "Generate address label" request, the combinations of selected basic and additional services/delivery instructions will be tested automatically, whether or not you have already done this yourself beforehand. With the "Generate address label" operation, the mailing data (e.g. COD amount) is also validated. For the "Parcels", "Express" and "Solutions" service groups, the mailing data is automatically transferred to DataTransfer. This means that you receive the same benefits as you would under DataTransfer. API documentation https://developer.post.ch/en/digital-commerce-api

This PHP package is automatically generated by the Swagger Codegen project:

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "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/SwaggerClient-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 OAuth2 access token for authorization: ClientCredentials
$config = Vekkon\PostBarcodeClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Vekkon\PostBarcodeClient\Api\BarcodeApi(
    // 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
);
$body = new \Vekkon\PostBarcodeClient\Model\GenerateLabel(); // \Vekkon\PostBarcodeClient\Model\GenerateLabel | 

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

Documentation for API Endpoints

All URIs are relative to https://dcapi.apis.post.ch/barcode/v1

Class Method HTTP request Description
BarcodeApi generateAddressLabel POST /generateAddressLabel Generate Label
ReplacementApi submitReplacementRequest POST /generateReplacementLabel
SingleBarcodeApi generateSingleBarcodes POST /generateSingleBarcodes Generate Single Barcode

Documentation For Models

Documentation For Authorization

ClientCredentials

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
  • DCAPI_BARCODE_READ: get barcode label

Author

digitalintegration@post.ch

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2024-01-02