e2e/e2e-sdk-php

E2E.pt PHP 客户端库

1.17.0 2023-06-15 13:05 UTC

README

REST API 用于与 ERP PRIMAVERASAGEPHCARTSOFT 集成。<br/><br/>示例: https://e2e.pt/examples<br/><br/>文档: https://e2e.pt/documentation<br/><br/>更多信息、价格和演示请访问: https://e2e.pt

此 PHP 包由 Swagger Codegen 项目自动生成

  • API 版本:0.0.1
  • 构建包:io.swagger.codegen.languages.PhpClientCodegen

需求

PHP 5.5 及更高版本

安装和用法

Composer

要使用 Composer 安装绑定,请将以下内容添加到 composer.json

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com//.git"
    }
  ],
  "require": {
    "/": "*@dev"
  }
}

然后运行 composer install

手动安装

下载文件并包含 autoload.php

    require_once('/path/to/SwaggerClient-php/vendor/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门指南

请遵循 安装过程,然后运行以下命令

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

$apiInstance = new Swagger\Client\Api\AccountApi(
    // 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()
);
$body = new \Swagger\Client\Model\Account(); // \Swagger\Client\Model\Account | 

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

?>

API 端点文档

所有 URI 都相对于 https://e2e.pt/ws

方法HTTP 请求描述
AccountApiaccountCreatePOST /account创建记录
AccountApiaccountIdGET /account/id/{id}获取记录
AccountApiaccountListGET /account列出记录
AccountApicurrentAccountListGET /account/id/{id}/currentAccount列出当前账户记录
AccountApicurrentAccountListTypeGET /account/type/{type}/currentAccount按账户类型列出当前账户记录
DocumentApidocumentCreatePOST /document创建记录
DocumentApidocumentIdGET /document/id/{id}获取记录
DocumentApidocumentListGET /document列出记录
DocumentApidocumenttypeListGET /document/type列出记录
PriceApipriceListGET /price列出记录
PriceApipriceTypeListGET /price/type列出记录
ProductApiproductCategoryListGET /product/category列出记录
ProductApiproductIdGET /product/id/{id}获取记录
ProductApiproductListGET /product列出记录
ToolsApiquerySqlPOST /tools/query执行 SQL 命令

模型文档

授权文档

api_key

  • 类型:API 密钥
  • API 密钥参数名:api_key
  • 位置:HTTP 头

company_key

  • 类型:API 密钥
  • API 密钥参数名:company_key
  • 位置:HTTP 头

作者