class MyTankInfo::TankRulesResource

Public Instance Methods

list(tank_id:) click to toggle source
# File lib/my_tank_info/resources/tank_rules.rb, line 5
def list(tank_id:)
  response = get_request("/api/tanks/#{tank_id}/rules")
  Collection.from_response(response, type: TankRule)
end
update(tank_id:, attributes:) click to toggle source
# File lib/my_tank_info/resources/tank_rules.rb, line 10
def update(tank_id:, attributes:)
  response = put_request("api/tanks/#{tank_id}/rules", body: attributes)
  Collection.from_response(response, type: TankRule)
end