Class: Ekam::Client
- Inherits:
-
Object
- Object
- Ekam::Client
- Includes:
- HTTParty
- Defined in:
- lib/ekam-ruby/client.rb
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
- #close_shift! ⇒ Object
- #create_receipt_request!(params) ⇒ Object
- #get_receipt_requests(params = {}) ⇒ Object
-
#initialize(token) ⇒ Client
constructor
A new instance of Client.
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
#token ⇒ Object (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 |