PHPackages                             easyinspect/economic - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. easyinspect/economic

ActiveLibrary[API Development](/categories/api)

easyinspect/economic
====================

Wrapper to call economic API.

v0.2-alpha(8y ago)6657[1 PRs](https://github.com/easyinspect/Economic/pulls)open sourcePHPPHP &gt;=7.1

Since Dec 2Pushed 5y ago6 watchersCompare

[ Source](https://github.com/easyinspect/Economic)[ Packagist](https://packagist.org/packages/easyinspect/economic)[ RSS](/packages/easyinspect-economic/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (1)Versions (5)Used By (0)

E-conomicPHPWrapper
===================

[](#e-conomicphpwrapper)

PHP Wrapper for E-conomic REST API implementing a fluent interface pattern

The Wrapper is made to be used with a E-conomic developer agreement where a end user can connect their agreement to your system through a token. Please tak a look at the connection guide to understand the mechanism behind obtaining the tokens at

This E-conomic PHP Wrapper supports following options:

1. Customers - Create, Show, Update, Delete &amp; Filter by filterable options.
2. Currency - Get all &amp; Get one by currency code fx. "DKK".
3. Units - Create, Show, Update, Delete.
4. Products - Create, Show, Update, Delete.
5. Payment types - Get all &amp; Get one by ID.
6. Layouts - Get all &amp; Get one by ID.
7. Invoice(draft) - Create with empty invoicelines, create with invoicelines where products are assigned &amp; You can book invoice.

1. Getting Started
------------------

[](#1-getting-started)

In order to work with this E-conomic wrapper you'll need to provide a AppSecretToken &amp; AgreementGrantToken key. The AppSecretToken is the one you obtain from your E-conomic developer account and the AgreementGrantToken is obtained from the customer. See Step 2A for manual or 2B for automatic retrival of the token at

Be sure to set the correct namespace of the E-conomic wrapper.

```
$economic = new Economic(
    'AppSecretToken key',
    'AgreementGrantToken key'
);

```

### 2. Customers

[](#2-customers)

There are two different customer objects, they are listed below.

- **Customer**
- **CustomerCollection**

    #### 2.1. Customer

    [](#21-customer)

    **Read** - You can retrieve customers one by one with this object, aswell this object is the one you use when you wan't to create, update &amp; delete a specific customer.

    ```
    $customer = $economic
                ->customer()
                ->get('ID'); // This will give you all information about this customer.

    ```

    **Create** - If you wan't to create a customer there are five properties that are required before you can do that, they are *name, currency, paymentTerms, customerGroup, vatZone*.

    ```
    $customer = $economic
                ->customer()
                ->setCurrency('DKK') // You can retrive one list with all available currencies.
                ->setName('Test Company')
                ->setPaymentTermsNumber(1)
                ->setCustomerGroupNumber(1)
                ->setVatZoneNumber(1)
                ->create();
                ->getCustomerNumber(); After you have created this customer you can retrieve its ID by doing this.

    ```

    **Update** - To update a customer the process is almost identical, however you are not required to provide any properties, you can simply choose to update any property.

    ```
    $customer = $economic
                ->customer()
                ->get('ID') // Retrieve existing customer
                ->setName('Test Company')
                ->setCustomerGroupNumber(2)
                ->setVatZoneNumber(1)
                ->update(); // Updates customer.

    ```

    **Delete** - You can delete any customer, with a simple method.

    ```
    $customer = $economic
                ->customer()
                ->get('ID')
                ->delete(); // Deletes customer.

    ```

    #### 2.2. CustomerCollection

    [](#22-customercollection)

    **Read** - This will give you an entire list of all customers, another option there is, is that you can filter on customer names.

    ```
    $customer = $economic
                ->customerCollection()
                ->all();

    ```

    **Filter** - Filter on filterable properties, incase something match it will return object with information about the given customer, make sure to read through the documentation in order to see which properties you can filter on, I do also recommend read through the Filter documentation to see which operators they support.

    Filterable properties:

    Filter operators:

    ```
    $customer = $economic
                ->customerCollection()
                ->all(new Filter(['name'], ['$like:'], ['Mikkel'])); // Bear in mind you can filter on more properties, you simply add                                                                           them to the array.

    ```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

2

Last Release

3088d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b9761a79e61f2d5b9d650510dfb3555da18daf38f027aa84012c937e397e39a7?d=identicon)[cboxdk](/maintainers/cboxdk)

---

Top Contributors

[![mbseasy1997](https://avatars.githubusercontent.com/u/31537872?v=4)](https://github.com/mbseasy1997 "mbseasy1997 (3 commits)")

---

Tags

currencyeconomicsinvoicephp71restful-clientwrapper

### Embed Badge

![Health badge](/badges/easyinspect-economic/health.svg)

```
[![Health](https://phpackages.com/badges/easyinspect-economic/health.svg)](https://phpackages.com/packages/easyinspect-economic)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
