Module: Moneybird::Traits::Delete
- Included in:
- Service::Contact, Service::Estimate, Service::Identity, Service::LedgerAccount, Service::Product, Service::RecurringSalesInvoice, Service::SalesInvoice, Service::Webhook
- Defined in:
- lib/moneybird/traits/delete.rb
Constant Summary collapse
- DELETE_SUCCESS_CODE =
204
Instance Method Summary collapse
Instance Method Details
#delete(resource) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/moneybird/traits/delete.rb', line 6 def delete(resource) client.delete(resource_path(resource)) if client._last_response.code.to_i != DELETE_SUCCESS_CODE resource.errors = client._last_response.body return false end true end |