定制 webapix/mygls-sdk 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

webapix/mygls-sdk

最新稳定版本:v3.0.0

Composer 安装命令:

composer require webapix/mygls-sdk

包简介

An lightweight php SDK for the MyGLS REST API

README 文档

README

Tests StyleCI MIT Licensed

An unofficial lightweight PHP SDK for the MyGLS REST API.

Installation

You can install the package via composer:

composer require webapix/mygls-sdk

Usage

use GuzzleHttp\Client as HttpClient;
use Webapix\GLS\Client;
use Webapix\GLS\Models\Parcel;
use Webapix\GLS\Services\SMS;
use Webapix\GLS\Requests\PrintLabels;

$parcel = (new Parcel)
    ->setClientNumber(123456789)
    ->setPickupAddress(<class that extends \Webapix\GLS\Contracts\Address>)
    ->setDeliveryInfo(<class that extends \Webapix\GLS\Contracts\Contact>)
    ->when($order->cutomerWantsSmsAlert(), function (Parcel $parcel) use ($order) {
        return $parcel->addService(
            new SMS($order->phone_number, 'Your package (#ParcelNr#) is on its way to GLS facility!')
        );
    });

$client = new Client(new HttpClient);

$request = PrintLabels;
$request->addParcel($parcel);

/** @var \Webapix\GLS\Responses\PrintLabels $response */
$response = $client->on($account)->request($request);

if ($response->successfull()) {

    // get the pdf
    $response->getPdf();
}

You can find more information and examples in our wiki.

Docs

Package docs
Official GLS Docs

Testing

composer test

Postcardware

According to the postcardware concept, if you use the software for your project(s) we would appreciate to receive a postcard of your hometown.

Please send it to:

WEBAPIX KFT. Kőris utca 2/E, 2/1
2051 Biatorbágy
Hungary

Support us

If you find our packages useful and would like to support our work in maintaining and regularly updating them, consider becoming a patron. Any size of donation is welcome and highly appreciated.

Contributing

Contributions are welcome! When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security

If you discover any security related issues, please email pdo@webapix.hu instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 31
  • Watchers: 4
  • Forks: 12
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-09-15