ckailash/myob-php-oauth2

MYOB AccountRight API file

v0.1 2020-05-12 14:40 UTC

This package is auto-updated.

Last update: 2024-05-14 11:35:16 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

Class Method HTTP request Description
AccountsApi getAccount GET /{company_file_id}/GeneralLedger/Account/{guid} Get an account by GUID
AccountsApi getAccounts GET /{company_file_id}/GeneralLedger/Account Gets all accounts
DebitRefundApi createDebitRefund POST /{company_file_id}/Purchase/DebitRefund Create a debit refund
DebitRefundApi deleteDebitRefund DELETE /{company_file_id}/Purchase/DebitRefund/{guid} Delete a debit refund
DebitRefundApi getDebitRefund GET /{company_file_id}/Purchase/DebitRefund/{guid} Get a debit refund by GUID
DebitRefundApi getDebitRefunds GET /{company_file_id}/Purchase/DebitRefund Get debit refunds
GeneralAPIEndpointsApi getCompanyFile GET /{company_file_id} Get the details of one specific company file
GeneralAPIEndpointsApi getCompanyFiles GET / List all company files in the users account
PurchaseBillItemsApi createItemBill POST /{company_file_id}/Purchase/Bill/Item Create a new item bill
PurchaseBillItemsApi deleteItemBill DELETE /{company_file_id}/Purchase/Bill/Item/{guid} Delete an bill of item type
PurchaseBillItemsApi editItemBill PUT /{company_file_id}/Purchase/Bill/Item/{guid} Update a new item type bill
PurchaseBillItemsApi getItemBill GET /{company_file_id}/Purchase/Bill/Item/{guid} Get one Bill Item by GUID
PurchaseBillItemsApi getItemBills GET /{company_file_id}/Purchase/Bill/Item List all the Item bills
SupplierApi createSupplier POST /{company_file_id}/Contact/Supplier Create a new supplier
SupplierApi deleteSupplier DELETE /{company_file_id}/Contact/Supplier/{guid} Delete a supplier
SupplierApi editSupplier PUT /{company_file_id}/Contact/Supplier/{guid} Edit a supplier
SupplierApi getSupplier GET /{company_file_id}/Contact/Supplier/{guid} Get a supplier by GUID
SupplierApi getSuppliers GET /{company_file_id}/Contact/Supplier Fetch a list of all Suppliers
TaxCodesApi getTaxCode GET /{company_file_id}/GeneralLedger/TaxCode/{guid} Get a tax code by GUID
TaxCodesApi getTaxCodes GET /{company_file_id}/GeneralLedger/TaxCode Get all tax codes

Documentation For Models

Documentation For Authorization

OAuth2

Author