Class: MyTankInfo::AlarmNotesResource
- Defined in:
- lib/my_tank_info/resources/alarm_notes.rb
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
Methods inherited from Resource
#delete_request, #get_request, #initialize, #patch_request, #post_request, #put_request
Constructor Details
This class inherits a constructor from MyTankInfo::Resource
Instance Method Details
#create(alarm_id:, **attributes) ⇒ Object
5 6 7 |
# File 'lib/my_tank_info/resources/alarm_notes.rb', line 5 def create(alarm_id:, **attributes) AlarmNote.new post_request("api/alarmhistory/#{alarm_id}/notes", body: attributes).body end |
#delete(alarm_id:, note_id:) ⇒ Object
9 10 11 |
# File 'lib/my_tank_info/resources/alarm_notes.rb', line 9 def delete(alarm_id:, note_id:) delete_request("api/alarmhistory/#{alarm_id}/notes/#{note_id}") end |