Earny API Client
Simple wrapper for the Earny!, (*1)
Examples. For more information about the Earny API, visit their documentation page., (*2)
Use this source at your own risk. Please report any bugs or improvements., (*3)
Add Draft
$earny_data = [
'idcontact' => 1,
'idpaymentmethod' => 2,
'idtemplate' => 3,
'language' => 'nl',
'rules' => [[
'idcategory' => 4,
'idvatgroup' => 5,
'productcode' => 6,
'name' => 'Some Product name',
'description' => 'Some cool description'
'price' => 10.00,
'amount' => 2
]],
];
// insert into the database
$earny = new Earny\Earny('your@username.com', 'withyourpassword');
$result = $earny->addDraft($earny_data);