Class: Restonomic::Customer

Inherits:
Object
  • Object
show all
Defined in:
lib/restonomic/customer.rb

Instance Method Summary collapse

Constructor Details

#initialize(api) ⇒ Customer

Returns a new instance of Customer.



3
4
5
# File 'lib/restonomic/customer.rb', line 3

def initialize(api)
  @api = api
end

Instance Method Details

#read_collection(skippages = 0, pagesize = 1000) ⇒ Object



7
8
9
10
# File 'lib/restonomic/customer.rb', line 7

def read_collection(skippages=0, pagesize=1000)
  response = @api.call "/customers?skippages=#{skippages}&pagesize=#{pagesize}"
  response['collection']
end

#read_item(id) ⇒ Object



12
13
14
# File 'lib/restonomic/customer.rb', line 12

def read_item(id)
  response = @api.call "/customers/#{id}"
end