ckailash / myob-php-oauth2
MYOB AccountRight API 文件
v0.1
2020-05-12 14:40 UTC
Requires
- php: >=7.1
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.12
- phpunit/phpunit: ^7.4
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-09-14 12:29:19 UTC
README
MYOB AccountRight API 文件
此PHP包由OpenAPI Generator项目自动生成
- API版本:1.0
- 构建包:org.openapitools.codegen.languages.PhpClientCodegen
要求
PHP 5.5及以上
安装与使用
Composer
要使用Composer安装绑定,请将以下内容添加到composer.json
{ "repositories": [ { "type": "vcs", "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" } ], "require": { "GIT_USER_ID/GIT_REPO_ID": "*@dev" } }
然后运行composer install
手动安装
下载文件并包含autoload.php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
测试
要运行单元测试
composer install ./vendor/bin/phpunit
入门
请遵循安装程序,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: OAuth2 $config = MyobAPI\MyobPHP\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new MyobAPI\MyobPHP\Api\AccountsApi( // 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 ); $x_myobapi_key = {{client_id}}; // string | The API key registered in https://my.myob.com.au/au/bd/DevAppList.aspx $company_file_id = 'company_file_id_example'; // string | The ID of the company in use $guid = 'guid_example'; // string | The GUID of the resource being created $x_myobapi_version = v2; // string | The version of the API, v2 is the current version $accept_encoding = gzip,deflate; // string | try { $result = $apiInstance->getAccount($x_myobapi_key, $company_file_id, $guid, $x_myobapi_version, $accept_encoding); print_r($result); } catch (Exception $e) { echo 'Exception when calling AccountsApi->getAccount: ', $e->getMessage(), PHP_EOL; } ?>
API端点文档
所有URI均相对于https://api.myob.com/accountright
模型文档
- 账户
- 账户列表
- 地址
- 银行详情
- 采购明细条款
- 采购明细
- 公司文件
- 创建借方退款
- 创建项目发票
- 创建供应商请求
- 贷方
- 自定义字段
- 自定义列表
- 借方退款
- 借方退款账户
- 借方退款发票
- 删除借方退款
- 删除项目发票
- 删除供应商请求
- 编辑项目发票
- 编辑供应商请求
- 费用账户
- 外币
- 运费税代码
- 获取公司文件
- 获取借方退款
- 获取项目发票
- 标识符
- 进口关税应付账户
- 项目
- 项目发票
- 项目发票类别
- 项目发票行
- 项目发票行账户
- 项目发票行位置
- 项目发票订单
- 项目发票条款
- 工作
- 公司文件列表
- 供应商列表
- 父账户
- 支付详情
- 支付详情退款
- 产品级别
- 供应商
- 供应商
- 税代码
- 扩展税代码
- 税代码
- 已收税账户
- 已付税账户
- 扣缴信用账户
- 扣缴应付账户
授权文档
OAuth2
- 类型:OAuth
- 流程:accessCode
- 授权URL:https://secure.myob.com/oauth2/account/authorize
- 作用域:
- 公司文件:读取和写入公司文件