ruudk / moneybird-bundle
A Symfony2 bundle for working with Moneybird
Installs: 1 486
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 2
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.2
- bluetools/moneybird-php-api: ~2.3
- symfony/framework-bundle: >=2.1,<3.0
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