module BusinessInsightApiClient::Api::Animals
Animal API based methods. This module contains methods to query the Animal API.
Public Instance Methods
get: '/animals/:id' @param [Integer] animal_id animal id @return [BusinessInsightApiClient::Mash] response mash. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/animals.rb, line 19 def animal(animal_id) ::BusinessInsightApiClient::Mash.from_json client.get("/animals/#{animal_id}") end
get: '/animals/with_life_number/:life_number' @param [String] life_number animal life number @return [BusinessInsightApiClient::Mash] response mash. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/animals.rb, line 27 def animal_with_life_number(life_number) body = { life_number: life_number } ::BusinessInsightApiClient::Mash.from_json client.get('/animals/with_life_number', body: body) end
get: '/animals/with_number/:number' @param [Integer] number animal number @return [BusinessInsightApiClient::Mash] response mash. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/animals.rb, line 45 def animal_with_number(number) body = { number: number } ::BusinessInsightApiClient::Mash.from_json client.get('/animals/with_number', body: body) end
get: '/animals/animal_with_responder/:responder' @param [String] responder animal responder @return [BusinessInsightApiClient::Mash] response mash. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/animals.rb, line 36 def animal_with_responder(responder) body = { responder: responder } ::BusinessInsightApiClient::Mash.from_json client.get('/animals/with_responder', body: body) end
get: '/animals' @return [BusinessInsightApiClient::Mash] response mash. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/animals.rb, line 10 def animals ::BusinessInsightApiClient::Mash.from_json client.get('/animals') end
post: '/animals/:animal' @param [Hash] animal animal to be created. See docs for parameters. @return [BusinessInsightApiClient::Mash] response mash. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/animals.rb, line 54 def create_animal(animal={}) ::BusinessInsightApiClient::Mash.from_json client.post('/animals', animal.to_json) end
delete: '/animals/:animal_id' @param [Integer] animal_id animal to be deleted. @return [BusinessInsightApiClient::Mash] response mash. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/animals.rb, line 71 def delete_animal(animal_id) ::BusinessInsightApiClient::Mash.from_json client.delete("/animals/#{animal_id}") end
put: '/animals/:animal_id' @param [Integer] animal_id animal to be updated. @param [Hash] animal animal to be updated. See docs for parameters. @return [BusinessInsightApiClient::Mash] response mash. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/animals.rb, line 63 def update_animal(animal_id, animal={}) ::BusinessInsightApiClient::Mash.from_json client.put("/animals/#{animal_id}", animal.to_json) end