Skip to content

Commit

Permalink
feat(certs): add delete certs method in package
Browse files Browse the repository at this point in the history
  • Loading branch information
raul-facturapi authored and javorosas committed Feb 9, 2024
1 parent 5b1e829 commit a8ffdd7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/Resources/Organizations.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,4 +290,22 @@ public function delete($id)
throw new Facturapi_Exception('Unable to delete organization: ' . $e);
}
}

/**
* Delete a Organization's Certificate
*
* @param id : Unique ID for the Organization
*
* @return Response body from HTTP DELETE request
*
* @throws Facturapi_Exception
**/
public function deleteCertificate($id)
{
try {
return json_decode($this->execute_delete_request($this->get_request_url($id) . "/certificate", null));
} catch (Facturapi_Exception $e) {
throw new Facturapi_Exception('Unable to delete organization: ' . $e);
}
}
}

0 comments on commit a8ffdd7

Please sign in to comment.