Class: Cloverrb::LineItem

Inherits:
Client
  • Object
show all
Defined in:
lib/cloverrb/line_item.rb

Constant Summary

Constants inherited from Client

Client::AUTH_URL, Client::BASE_URL

Instance Method Summary collapse

Methods inherited from Client

generate_access_token, #get, #post, #put

Constructor Details

#initialize(token, order, merchant) ⇒ LineItem

Returns a new instance of LineItem.



3
4
5
6
7
# File 'lib/cloverrb/line_item.rb', line 3

def initialize(token, order, merchant)
  @token = token
  @order = order
  @merchant = merchant
end

Instance Method Details

#allObject



9
10
11
12
# File 'lib/cloverrb/line_item.rb', line 9

def all
  url = "/merchants/#{@merchant}/orders/#{@order}/line_items"
  get(@token, url)
end