module BusinessInsightApiClient::Api::Calendar
Calendar
API based methods. This module contains methods to query the Calendar
API.
Public Instance Methods
get: '/calendar/:id' @param [Integer] id calendar id @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/calendars.rb, line 22 def calendar_event(id) ::BusinessInsightApiClient::Mash.from_json client.get("/calendar/#{id}") end
get: '/calendar' @param [Integer] animal_id animal id @param [Integer] cycle_number (nil) cycle_number @param [String] type (nil) calendar type @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/calendars.rb, line 12 def calendar_events(animal_id, cycle_number = nil, type = nil) body = { animal_id: animal_id } body[:cycle_number] = cycle_number if cycle_number body[:type] = type if type ::BusinessInsightApiClient::Mash.from_json client.get('/calendar', body: body) end
get: '/calendar/by_cycle/' @param [Integer] animal_id animal id @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/calendars.rb, line 39 def calendar_events_by_cycle(animal_id) body = { animal_id: animal_id } ::BusinessInsightApiClient::Mash.from_json client.get('/calendar/by_cycle', body: body) end
get: '/calendar/current_cycle/' @param [Integer] animal_id animal id @param [String] type (nil) calendar type @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/calendars.rb, line 30 def calendar_events_current_cycle(animal_id, type=nil) body = { animal_id: animal_id } body[:type] = type if type ::BusinessInsightApiClient::Mash.from_json client.get('/calendar/current_cycle', body: body) end
post: '/calendar/birth_event' @param [Hash] calendar_event
calendar event to be created. See docs for parameters. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/calendars.rb, line 47 def create_birth_event(calendar_event = {}) ::BusinessInsightApiClient::Mash.from_json client.post('/calendar/birth_event', calendar_event.to_json) end
post: '/calendar/calving_event' @param [Hash] calendar_event
calendar event to be created. See docs for parameters. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/calendars.rb, line 62 def create_calving_event(calendar_event = {}) ::BusinessInsightApiClient::Mash.from_json client.post('/calendar/calving_event', calendar_event.to_json) end
post: '/calendar/dryoff_event' @param [Hash] calendar_event
calendar event to be created. See docs for parameters. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/calendars.rb, line 77 def create_dryoff_event(calendar_event = {}) ::BusinessInsightApiClient::Mash.from_json client.post('/calendar/dryoff_event', calendar_event.to_json) end
post: '/calendar/heat_event' @param [Hash] calendar_event
calendar event to be created. See docs for parameters. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/calendars.rb, line 92 def create_heat_event(calendar_event = {}) ::BusinessInsightApiClient::Mash.from_json client.post('/calendar/heat_event', calendar_event.to_json) end
post: '/calendar/insemination_event' @param [Hash] calendar_event
calendar event to be created. See docs for parameters. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/calendars.rb, line 122 def create_insemination_event(calendar_event = {}) ::BusinessInsightApiClient::Mash.from_json client.post('/calendar/insemination_event', calendar_event.to_json) end
post: '/calendar/keep_open_event' @param [Hash] calendar_event
calendar event to be created. See docs for parameters. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/calendars.rb, line 107 def create_keep_open_event(calendar_event = {}) ::BusinessInsightApiClient::Mash.from_json client.post('/calendar/keep_open_event', calendar_event.to_json) end
post: '/calendar/pregnancy_check_event' @param [Hash] calendar_event
calendar event to be created. See docs for parameters. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/calendars.rb, line 137 def create_pregnancy_check_event(calendar_event = {}) ::BusinessInsightApiClient::Mash.from_json client.post('/calendar/pregnancy_check_event', calendar_event.to_json) end
delete: '/calendar/:calendar_event_id' @param [Integer] calendar_event_id calendar event to be deleted. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/calendars.rb, line 152 def delete_calendar_event(calendar_event_id) ::BusinessInsightApiClient::Mash.from_json client.delete("/calendar/#{calendar_event_id}") end
put: '/calendar/birth_event/:calendar_event_id' @param [Integer] calendar_event_id calendar event to be updated. @param [Hash] calendar_event
({}) parameters to be updated. See docs for parameters. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/calendars.rb, line 55 def update_birth_event(calendar_event_id, calendar_event = {}) ::BusinessInsightApiClient::Mash.from_json client.put("/calendar/birth_event/#{calendar_event_id}", calendar_event.to_json) end
put: '/calendar/calving_event/:calendar_event_id' @param [Integer] calendar_event_id calendar event to be updated. @param [Hash] calendar_event
({}) parameters to be updated. See docs for parameters. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/calendars.rb, line 70 def update_calving_event(calendar_event_id, calendar_event = {}) ::BusinessInsightApiClient::Mash.from_json client.put("/calendar/calving_event/#{calendar_event_id}", calendar_event.to_json) end
put: '/calendar/dryoff_event/:calendar_event_id' @param [Integer] calendar_event_id calendar event to be updated. @param [Hash] calendar_event
({}) parameters to be updated. See docs for parameters. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/calendars.rb, line 85 def update_dryoff_event(calendar_event_id, calendar_event = {}) ::BusinessInsightApiClient::Mash.from_json client.put("/calendar/dryoff_event/#{calendar_event_id}", calendar_event.to_json) end
put: '/calendar/heat_event/:calendar_event_id' @param [Integer] calendar_event_id calendar event to be updated. @param [Hash] calendar_event
({}) parameters to be updated. See docs for parameters. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/calendars.rb, line 100 def update_heat_event(calendar_event_id, calendar_event = {}) ::BusinessInsightApiClient::Mash.from_json client.put("/calendar/heat_event/#{calendar_event_id}", calendar_event.to_json) end
put: '/calendar/insemination_event/:calendar_event_id' @param [Integer] calendar_event_id calendar event to be updated. @param [Hash] calendar_event
({}) parameters to be updated. See docs for parameters. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/calendars.rb, line 130 def update_insemination_event(calendar_event_id, calendar_event = {}) ::BusinessInsightApiClient::Mash.from_json client.put("/calendar/insemination_event/#{calendar_event_id}", calendar_event.to_json) end
put: '/calendar/keep_open_event/:calendar_event_id' @param [Integer] calendar_event_id calendar event to be updated. @param [Hash] calendar_event
({}) parameters to be updated. See docs for parameters. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/calendars.rb, line 115 def update_keep_open_event(calendar_event_id, calendar_event = {}) ::BusinessInsightApiClient::Mash.from_json client.put("/calendar/keep_open_event/#{calendar_event_id}", calendar_event.to_json) end
put: '/calendar/pregnancy_check_event/:calendar_event_id' @param [Integer] calendar_event_id calendar event to be updated. @param [Hash] calendar_event
({}) parameters to be updated. See docs for parameters. @see api.nedap-bi.com/api/docs/
# File lib/business_insight_api_client/api/calendars.rb, line 145 def update_pregnancy_check_event(calendar_event_id, calendar_event = {}) ::BusinessInsightApiClient::Mash.from_json client.put("/calendar/pregnancy_check_event/#{calendar_event_id}", calendar_event.to_json) end