ckailash / myob-php-oauth2
MYOB AccountRight API file
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-12-14 13:03:46 UTC
README
MYOB AccountRight API file
This PHP package is automatically generated by the OpenAPI Generator project:
- API version: 1.0
- Build package: org.openapitools.codegen.languages.PhpClientCodegen
Requirements
PHP 5.5 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{ "repositories": [ { "type": "vcs", "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" } ], "require": { "GIT_USER_ID/GIT_REPO_ID": "*@dev" } }
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
Tests
To run the unit tests:
composer install ./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:
<?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; } ?>
Documentation for API Endpoints
All URIs are relative to https://api.myob.com/accountright
Documentation For Models
- Account
- AccountsList
- Address
- BankingDetails
- BuyingDetailTerms
- BuyingDetails
- CompanyFile
- CreateDebitRefund
- CreateItemBill
- CreateSupplierRequest
- Credit
- CustomField
- CustomList
- DebitRefund
- DebitRefundAccount
- DebitRefundBill
- DeleteDebitRefund
- DeleteItemBill
- DeleteSupplierRequest
- EditItemBill
- EditSupplierRequest
- ExpenseAccount
- ForeignCurrency
- FreightTaxCode
- GetCompanyFile
- GetDebitRefunds
- GetItemBills
- Identifiers
- ImportDutyPayableAccount
- Item
- ItemBill
- ItemBillCategory
- ItemBillLine
- ItemBillLineAccount
- ItemBillLineLocation
- ItemBillOrder
- ItemBillTerms
- Job
- ListCompanyFile
- ListOfSuppliers
- ParentAccount
- PaymentDetails
- PaymentDetailsRefund
- ProductLevel
- Supplier
- Suppliers
- TaxCode
- TaxCodeExtended
- TaxCodes
- TaxCollectedAccount
- TaxPaidAccount
- WithholdingCreditAccount
- WithholdingPayableAccount
Documentation For Authorization
OAuth2
- Type: OAuth
- Flow: accessCode
- Authorization URL: https://secure.myob.com/oauth2/account/authorize
- Scopes:
- CompanyFile: Read and write access to the company files