e2e / e2e-sdk-php
1.17.0
2023-06-15 13:05 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- e2e/e2e-data-model: 1.17.0
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
README
REST API 用于与 ERP PRIMAVERA、SAGE、PHC 和 ARTSOFT 集成。<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 请求 | 描述 |
---|---|---|---|
AccountApi | accountCreate | POST /account | 创建记录 |
AccountApi | accountId | GET /account/id/{id} | 获取记录 |
AccountApi | accountList | GET /account | 列出记录 |
AccountApi | currentAccountList | GET /account/id/{id}/currentAccount | 列出当前账户记录 |
AccountApi | currentAccountListType | GET /account/type/{type}/currentAccount | 按账户类型列出当前账户记录 |
DocumentApi | documentCreate | POST /document | 创建记录 |
DocumentApi | documentId | GET /document/id/{id} | 获取记录 |
DocumentApi | documentList | GET /document | 列出记录 |
DocumentApi | documenttypeList | GET /document/type | 列出记录 |
PriceApi | priceList | GET /price | 列出记录 |
PriceApi | priceTypeList | GET /price/type | 列出记录 |
ProductApi | productCategoryList | GET /product/category | 列出记录 |
ProductApi | productId | GET /product/id/{id} | 获取记录 |
ProductApi | productList | GET /product | 列出记录 |
ToolsApi | querySql | POST /tools/query | 执行 SQL 命令 |
模型文档
- Account
- AccountListContainer
- Address
- Column
- Country
- CurrentAccount
- CurrentAccountListContainer
- Document
- DocumentLine
- DocumentListContainer
- DocumentSerie
- DocumentType
- DocumentTypeListContainer
- Pair
- Price
- PriceListContainer
- PriceType
- PriceTypeListContainer
- Product
- ProductCategory
- ProductCategoryListContainer
- ProductListContainer
- QueryResultDTO
- Record
- Salesman
- Stock
- Tax
- Unit
授权文档
api_key
- 类型:API 密钥
- API 密钥参数名:api_key
- 位置:HTTP 头
company_key
- 类型:API 密钥
- API 密钥参数名:company_key
- 位置:HTTP 头