ruudk/moneybird-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

A Symfony2 bundle for working with Moneybird

Installs: 1 481

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 2

Forks: 2

Open Issues: 0

Type:symfony-bundle

0.1.8 2015-08-04 07:32 UTC

This package is auto-updated.

Last update: 2022-02-01 12:21:43 UTC


README

A Symfony2 bundle for working with Moneybird

This bundle uses the official Moneybird PHP API created by Sjors van der Pluijm.

Installation

Step1: Require the package with Composer

php composer.phar require ruudk/moneybird-bundle

Step2: Enable the bundle

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...

        new Ruudk\MoneybirdBundle\RuudkMoneybirdBundle(),
    );
}

Step3: Configure

Finally, add the following to your config.yml

# app/config/config_prod.yml

ruudk_moneybird:
    subdomain: # Subdomain
    username: # Username
    password: # Password

Congratulations! You're ready.

Use the API

$moneybird = $this->container->get('moneybird.api');

$contactService = $moneybird->getService('Contact');

$contacts = $contactService->getAll();
foreach($contacts AS $contact) {
    echo $contact->name . "<br>";
}

For full usage of the Moneybird API see the documentation.

Commands

If you want to reset your Moneybird account and delete all invoices and contacts you can run:

php app/console moneybird:reset