class SBF::Client::ShaveScheduleEndpoint

Public Instance Methods

get(id, year, with = {}) click to toggle source
Calls superclass method SBF::Client::EntityEndpoint#get
# File lib/stbaldricks/endpoints/shave_schedule.rb, line 6
def get(id, year, with = {})
  super("#{id}/#{year}", with)
end
notify(data) click to toggle source
# File lib/stbaldricks/endpoints/shave_schedule.rb, line 14
def notify(data)
  response = SBF::Client::Api::Request.post_request("#{base_uri}/notify", data)

  if ok?(response)
    data = nil
  else
    parsed_response_body = JSON.parse(response.body).symbolize!
    error = SBF::Client::ErrorEntity.new(parsed_response_body)
  end

  SBF::Client::Api::Response.new(http_code: response.code, data: data, error: error)
end
update(id, year, data, with = {}) click to toggle source
Calls superclass method SBF::Client::EntityEndpoint#update
# File lib/stbaldricks/endpoints/shave_schedule.rb, line 10
def update(id, year, data, with = {})
  super("#{id}/#{year}", data, with)
end