PHP code example of traimmu / mf-cloud-invoice

1. Go to this page and download the library: Download traimmu/mf-cloud-invoice library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

traimmu / mf-cloud-invoice example snippets


use Traimmu\MfCloud\Invoice\Client;

$client = new Client('YOUR_ACCESS_TOKEN');

$client->billings()->all();
// => your billings

$office = $client->office(); // => returns Traimmu\MfCloud\Invoice\Models\Office instance
echo $office->name; // => '株式会社Traimmu'

$office->update([
    'name' => 'section9',
    'zip' => '101-1111',
]);
echo $office->name; // => 'section9'

$client->partners()->all();
$client->partners()->find('MF INVOICE PARTNER ID');

$client->billings()->all();

$client->items()->all();

'providers' => [
    // ...
    Traimmu\MfCloud\Invoice\Misc\ServiceProvider::class,
],

'aliases' => [
    // ...
    'Invoice' => Traimmu\MfCloud\Invoice\Misc\Facade::class,
],

// ...
'mfcloud' => [
    'secret' => env('MFCLOUD_INVOICE_API_TOKEN'),
],


$client->partners()->all()->filter(function ($partner) {
  return count($partner->departments) > 0;
});