fastbill / fastbill-php-sdk

php sdk for the api of https://www.fastbill.com/
https://apidocs.fastbill.com/
MIT License
24 stars 14 forks source link

Missing fields in InvoiceSearchStruct #47

Closed krisdante closed 8 months ago

krisdante commented 8 months ago

START_DATE | Invoices from a specific date END_DATE | Invoices until a specific date

is missing

teiling88 commented 8 months ago

Have a look at: https://packagist.org/packages/fastbill/fastbill-php-sdk

Have to give some love to the existing test suite but this fix is publishable without running the hole test suite :-)

krisdante commented 8 months ago

I'm not sure if I follow the suggestion. I reported this issue exactly against this package :)

The workaround is to extend this class https://github.com/fastbill/fastbill-php-sdk/blob/master/src/Invoice/InvoiceSearchStruct.php and

class InvoiceSearchStruct extends \FastBillSdk\Invoice\InvoiceSearchStruct
{
    public function setStartDate(string $startDate)
    {
        $this->filters['START_DATE'] = $startDate;
    }
}

but would be nice to just update the SDK.

teiling88 commented 8 months ago

Thanks for the pr I thought the two fields are missing in the InvoiceEntity. Don't code when you are in a hurry :D

released 0.1.5