lib/eatabit_rails/printer.rb in eatabit_rails-0.1.0 vs lib/eatabit_rails/printer.rb in eatabit_rails-0.1.1
- old
+ new
@@ -1,24 +1,34 @@
module EatabitRails
class Printer
- attr_reader :name,
+ attr_reader :id,
+ :name,
:enabled,
:pickup_minutes,
:delivery_minutes,
:state,
:online,
- :has_paper
+ :paper,
+ :fulfillment,
+ :sound,
+ :light,
+ :autoprint
def initialize(attributes)
+ @id = attributes['id']
@name = attributes['name']
@enabled = attributes['enabled']
@pickup_minutes = attributes['pickup_minutes']
@delivery_minutes = attributes['delivery_minutes']
@state = attributes['state']
@online = attributes['online']
- @has_paper = attributes['has_paper']
+ @paper = attributes['paper']
+ @fulfillment = attributes['fulfillment']
+ @sound = attributes['sound']
+ @light = attributes['light']
+ @autoprint = attributes['autoprint']
end
def self.find(id)
printer_uri = EatabitRails::REST::Uri.new.printer id
params = EatabitRails::REST::Uri.default_params