rangka / quickbooks

PHP Library for connecting to QuickBooks.
MIT License
8 stars 11 forks source link

Add Delete method on Service #4

Closed basherr closed 7 years ago

basherr commented 7 years ago

First of all thanks for the great and enhanced Quickbooks package. Could you please also add delete operation on services. currently I've just modified the Service class with adding just a new method for delete operation which just works fine for Quickbooks Bill though I've not tested with other Services. Would you please add the below code to the Service or may I sent a pull request over this issue. Thanks

  /**
    * Delete an entity.
    *
    * @param array $data Item information.
    * @return void
    */
    public function delete($data) {
        return parent::post($this->getResourceName() . '?operation=delete', $data)->{$this->getEntityName()};
    }
khairulashraff commented 7 years ago

Hello, I'll test it out quickly and push it sometime today.

khairulashraff commented 7 years ago

Added. Usage is as load();

$service->delete($id)

Thanks.