Class: MyTankInfo::TankRunoutResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/my_tank_info/resources/tank_runout.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

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

#list(tank_id:) ⇒ Object



5
6
7
8
# File 'lib/my_tank_info/resources/tank_runout.rb', line 5

def list(tank_id:)
  response = get_request("api/tanks/#{tank_id}/runout")
  Collection.from_response(response, type: TankRunoutRecord)
end