invoiceninja / sdk-php

PHP wrapper for Invoice Ninja's REST API
https://www.invoiceninja.com
83 stars 41 forks source link

No support for creating a quote? #38

Closed thinckx closed 5 years ago

thinckx commented 5 years ago

Hi!

According to my findings, the sdk currently doesn't support creating quotes, am I correct? I never contributed to open source before, but I'd be glad to do so.

Are you accepting PR's?

Thomas

hillelcoren commented 5 years ago

You can use the /invoices route to create a quote

thinckx commented 5 years ago

Yes, in the API you mean? I'm talking about the SDK, where I'd do something like this:

$client = new Client('hello@acme.org');
$client->save();

$is_quote = true;
$client->createInvoice($is_quote);
hillelcoren commented 5 years ago

I think something like this may work:

$quote = $client->createInvoice();
$quote->is_quote = true; 
thinckx commented 5 years ago

Ah yes indeed. Perfect.

Thanks @hillelcoren!