fakturoid / fakturoid-php

Fakturoid PHP bindings
https://www.fakturoid.cz/api
MIT License
30 stars 16 forks source link

Add custom_id into options array when fetching Invoices #15

Closed marecektn closed 7 years ago

marecektn commented 7 years ago

There is missing field custom_id for get_invoices, get_regular_invoices, get_proforma_invoices. Pull request to follow.

marecektn commented 7 years ago

since I don't have permission for Fakturoid project, I am suggesting fix of Fakturoid class as follows:

 public function get_invoices($options = NULL) {
    return $this->get("/invoices.json" . $this->convert_options($options, array('subject_id', 'since', 'updated_since', 'page', 'status', 'custom_id')));
  }

  public function get_regular_invoices($options = NULL) {
    return $this->get('/invoices/regular.json'. $this->convert_options($options, array('subject_id', 'since', 'updated_since', 'page', 'status', 'custom_id')));
  }

  public function get_proforma_invoices($options = NULL) {
    return $this->get('/invoices/proforma.json'. $this->convert_options($options, array('subject_id', 'since', 'updated_since', 'page', 'status', 'custom_id')));
  }
ollie commented 7 years ago

I'm not sure what you mean by not having permissions, but the way to do it is to fork the project, clone that, commit & push, and then make a pull request from there.

Thanks though, already fixed it!