Method: Forecasting::Client#delete
- Defined in:
- lib/forecasting/client.rb
#delete(entity) ⇒ Hash
It removes an ‘entity` from your Harvest account.
185 186 187 188 189 190 191 192 |
# File 'lib/forecasting/client.rb', line 185 def delete(entity) url = "#{host}/#{entity.path}" uri = URI(url) response = http_response(:delete, uri) raise Forecasting::Errors::UnprocessableRequest.new(response.to_s) unless response.code.to_i == 200 JSON.parse(response.body) end |