GitXplorerGitXplorer
e

billecta-api-php-client

public
3 stars
2 forks
0 issues

Commits

List of commits on branch master.
Verified
6682052de62ec0e6d8bb34ceff1494a68727db81

Merge pull request #3 from appitudeio/master

eelitan committed 8 months ago
Unverified
1996e30129405e37cc1a0115c973f50b0b8824b9

Update Billecta.php

ooakleaf committed 9 months ago
Unverified
b3ab12ddab6a852b68b4a3bd8c8af49c3cb66076

Update composer.json

ooakleaf committed 9 months ago
Verified
41ab1e35ea1a2f81a996f0c8e97ee28a4efe165f

Update Billecta.php

eelitan committed 6 years ago
Verified
f22f5585d7832ebdae75994e8ab26c2679ca1a98

Update Billecta.php

eelitan committed 6 years ago
Unverified
8d18cce5ec75f3b19b2ab2e15c8aad3f807ab4e4

Merge branch 'master' of github.com:elitan/billecta-api-php-client

eelitan committed 6 years ago

README

The README file for this repository.

billecta-api-php-client

A PHP client library for accessing Billecta API.

Link to the Billecta API https://app.billecta.com/docs/v1/index

Install

composer require elitan/billecta-api-php-client

Next, you need a api secret (SecureToken). This is a bit of a hassle. Read more here under SecureToken: https://app.billecta.com/docs/v1/StartAPI#authentication

Example

<?php

require_once __DIR__ . '/vendor/autoload.php';

$base_uri = 'https://apitest.billecta.com';
$api_secret = 'api secret';

$billecta = new \Billecta\Billecta($base_uri, $api_secret);

// get all companies
$companies = $billecta->getCreditors();

var_dump($companies);

// set what company we are working with
$billecta->setCreditorPublicId('creditor_public_id');

// create debtor (customer)
$debtor = Array(
	'Name' => 'Joe Doe'
);
$customer = $billecta->createDebtor($debtor);

var_dump($customer);

Functions



// MiSC
$billecta->setCreditorPublicId($creditor_public_id);

// CREDITORS aka COMPANIES
$billecta->getCreditors();

// DEBTORS aka CUSTOMERS
$billecta->createDebtor($debtor);

$billecta->createDebtors($debtors);

$billecta->getDebtor($debtor_public_id);

$billecta->getAllDebtors();

$billecta->deleteDebtor($debtor_public_id);

$billecta->updateDebtor($debtor);

$billecta->getDebtorByExternalId($external_id);

$billecta->getDebtorEvents($debtor_public_id);


// PRODUCTS

$billecta->createProduct($product);

$billecta->updateProduct($product);

$billecta->deleteProduct($product_public_id);

$billecta->getProduct($product_public_id);

$billecta->getAllProducts();

$billecta->getProductByExternalId($external_id);


// INVOICES

$billecta->createInvoice($invoice);

$billecta->updateInvoice($invoice, $invoice_public_id);

$billecta->getInvoice($invoice_public_id);

// Retreives all drafts/attested and unpaid invoices.
$billecta->getOpenInvoices();

// Retreives all invoices that have a closed/full payment date between the specified from and to dates.
$billecta->getClosedInvoices($from_date, $to_date);

$billecta->getOpenInvoicesByDebtor($debtor_public_id);

$billecta->getClosedInvoicesByDebtor($debtor_public_id, $from_date, $to_date);