hyperext/hyperaccounts-v2-sdk 问题修复 & 功能扩展

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

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

hyperext/hyperaccounts-v2-sdk

最新稳定版本:2.22

Composer 安装命令:

composer require hyperext/hyperaccounts-v2-sdk

包简介

HyperAccounts V2 SDK

README 文档

README

The HyperAccounts API SDK provides an easy-to-use interface for handling the Sage 50 Accounts HyperAccounts web API, version 2 and onwards. If you are interested in gaining access to the API, contact Hyperext directly. This tool has been developed to simplify the process of making HTTP requests to the web API, abstracting away the complexity of the underlying technology. Additionally, the SDK provides models for both the request body and the API's response, streamlining the development process.

Usage

$request = ClientConstructor::construct($url,$username,$password);

$query = SalesInvoicesRequestBuilderGetRequestConfiguration::addQueryParameters(null,null,'items',null,'3');
$requestConfiguration = new SalesInvoicesRequestBuilderGetRequestConfiguration(null,null,$query);

$request->api()->v2()->salesInvoices()->get($requestConfiguration)->then(

        function (SalesInvoiceCollection $response) {
            foreach ($response->getData() as $data){
                echo $data->getInvoiceNumber();
                echo $data->getAttributes()->getAddress1();
                echo $data->getIncluded()->getItems()->getData()[0]->getRelationships()->getStock()->getData()->getStockCode();              
            }
        },
        function ($exception) {
            // Gets full API error but will throw a php error if it gets a CURL error
            echo $exception->getResponse()->getBody()->getContents();   
            
            // gets CURL errors but will truncate API errors
            echo $exception->getMessage();

        }

);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-24