class MyTankInfo::NotificationRulesResource

Public Instance Methods

delete(rule_id:) click to toggle source
# File lib/my_tank_info/resources/notification_rules.rb, line 24
def delete(rule_id:)
  delete_request("api/admin/notificationrules/#{rule_id}")
end
list(code_id:) click to toggle source
# File lib/my_tank_info/resources/notification_rules.rb, line 15
def list(code_id:)
  response = get_request("api/admin/notificationrules?codeId=#{code_id}")
  Collection.from_response(response, type: NotificationRule)
end
list_codes() click to toggle source
# File lib/my_tank_info/resources/notification_rules.rb, line 5
def list_codes
  response = get_request("api/admin/notificationrules/codes")
  Collection.from_response(response, type: NotificationCode)
end
list_contacts(rule_id:) click to toggle source
# File lib/my_tank_info/resources/notification_rules.rb, line 10
def list_contacts(rule_id:)
  response = get_request("api/admin/notificationrules/#{rule_id}/contacts")
  Collection.from_response(response, type: NotificationRuleContact)
end
update(rule_id:, **attributes) click to toggle source
# File lib/my_tank_info/resources/notification_rules.rb, line 20
def update(rule_id:, **attributes)
  put_request("api/admin/notificationrules/#{rule_id}", body: attributes)
end