A php connector for Yuki's Sales and Accounting API (subsets), intended to create Sales Invoices and get back payment status.

dev-master / 0.3.x-dev 2025-05-01 08:46 UTC

This package is auto-updated.

Last update: 2025-05-31 09:00:04 UTC


README

A php connector for Yuki's Sales and Accounting API (subsets), intended to create Sales Invoices and get back payment status.

$invoice = [
    'Reference' => '',
    // ...
    'Contact' => [
        'ContactCode' => '',
        // ...
    ]
    'ContactPerson' => ['FullName' => ''],
    'InvoiceLines' => [
        'InvoiceLine' => [
            'ProductQuantity' => '',
            'Product' => [
                'Description' => '',
                // ...
            ]
        ]
    ]
    ];
];
$YukiSales = new \FunkyTime\Yuki($api_key, 'sales');
$YukiSales->ProcessInvoice($invoice);
$YukiAccounting = new \FunkyTime\Yuki($api_key, 'accounting');
$status = $YukiAccounting->GetInvoiceBalance($inv_reference);
// Result: an array with keys 'openAmount' and 'originalAmount'