Skip to content

e-conomic OpenAPI Client for the Json-schema REST API

Notifications You must be signed in to change notification settings

spysystem/economic-rest

Repository files navigation

OpenAPIClient-php

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

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

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

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



// Configure API key authorization: X-AgreementGrantToken
$config = EconomicRest\Configuration::getDefaultConfiguration()->setApiKey('X-AgreementGrantToken', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = EconomicRest\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-AgreementGrantToken', 'Bearer');

// Configure API key authorization: X-AppSecretToken
$config = EconomicRest\Configuration::getDefaultConfiguration()->setApiKey('X-AppSecretToken', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = EconomicRest\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-AppSecretToken', 'Bearer');


$apiInstance = new EconomicRest\Api\AccountingYearsApi(
    // 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
);
$id = 56; // int

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

API Endpoints

All URIs are relative to https://restapi.e-conomic.com

Class Method HTTP request Description
AccountingYearsApi getAccountingYear GET /accounting-years/{id}
AccountingYearsApi getAccountingYearPeriod GET /accounting-years/{accountingYear}/periods/{id}
AccountingYearsApi searchAccountingYearEntries GET /accounting-years/{accountingYear}/entries
AccountingYearsApi searchAccountingYearPeriodEntries GET /accounting-years/{accountingYear}/periods/{id}/entries
AccountingYearsApi searchAccountingYearPeriods GET /accounting-years/{accountingYear}/periods
AccountingYearsApi searchAccountingYears GET /accounting-years
AccountsApi getAccount GET /accounts/{id}
AccountsApi getDepartment GET /departments/{id}
AccountsApi searchAccountAccountingYearEntries GET /accounts/{id}/accounting-years/{accountingYear}/entries
AccountsApi searchAccountAccountingYears GET /accounts/{id}/accounting-years
AccountsApi searchAccounts GET /accounts
AccountsApi searchDepartmentalDistributions GET /departmental-distributions
AccountsApi searchDepartments GET /departments
CompanyApi getCompanySettings GET /self
CustomerApi createCustomer POST /customers
CustomerApi createCustomerGroup POST /customer-groups
CustomerApi getCustomer GET /customers/{id}
CustomerApi getCustomerGroup GET /customer-groups/{id}
CustomerApi searchCustomerGroups GET /customer-groups
CustomerApi searchCustomers GET /customers
CustomerApi updateCustomer PUT /customers/{id}
CustomerApi updateCustomerGroup PUT /customer-groups/{id}
EntriesApi getEntry GET /entries/{id}
JournalEntriesApi searchEntries GET /journals/{id}/entries
JournalVouchersApi createVoucher POST /journals/{journalId}/vouchers
JournalVouchersApi searchVouchers GET /journals/{journalId}/vouchers
JournalVouchersApi uploadVoucherAttachment PATCH /journals/{journalId}/vouchers/{accountingYear-voucherNumber}/attachment/file
JournalsApi getJournal GET /journals/{id}
JournalsApi searchJournals GET /journals
PaymentTermApi createPaymentTerm POST /payment-terms
PaymentTermApi getPaymentTerm GET /payment-terms/{id}
PaymentTermApi searchPaymentTerms GET /payment-terms
PaymentTermApi updatePaymentTerm PUT /payment-terms/{id}
SupplierApi createSuppliers POST /suppliers
SupplierApi getSupplier GET /suppliers/{id}
SupplierApi searchSuppliers GET /suppliers
SupplierApi updateSupplier PUT /suppliers/{id}
VATZonesApi getVATZone GET /vat-zones/{id}
VATZonesApi searchVATZones GET /vat-zones
VatAccountApi searchVatAccounts GET /vat-accounts
VatAccountsApi getVatAccount GET /vat-accounts/{id}

Models

Authorization

X-AgreementGrantToken

  • Type: API key
  • API key parameter name: X-AgreementGrantToken
  • Location: HTTP header

X-AppSecretToken

  • Type: API key
  • API key parameter name: X-AppSecretToken
  • Location: HTTP header

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

About

e-conomic OpenAPI Client for the Json-schema REST API

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages