Class: Ekam::Client

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/ekam-ruby/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token) ⇒ Client

Returns a new instance of Client.



12
13
14
# File 'lib/ekam-ruby/client.rb', line 12

def initialize(token)
  @token = token
end

Instance Attribute Details

#tokenObject (readonly)

Returns the value of attribute token.



10
11
12
# File 'lib/ekam-ruby/client.rb', line 10

def token
  @token
end

Instance Method Details

#close_shift!Object



26
27
28
29
# File 'lib/ekam-ruby/client.rb', line 26

def close_shift!
  resource_url = "/v1/receipt_requests/close_retail_shift"
  post_resource(resource_url)
end

#create_receipt_request!(params) ⇒ Object



21
22
23
24
# File 'lib/ekam-ruby/client.rb', line 21

def create_receipt_request!(params)
  resource_url = "/v1/receipt_requests"
  post_resource(resource_url, params)
end

#get_receipt_requests(params = {}) ⇒ Object



16
17
18
19
# File 'lib/ekam-ruby/client.rb', line 16

def get_receipt_requests(params = {})
  resource_url = "/v1/receipt_requests"
  get_resource(resource_url, params)["items"]
end