class DearInventory::Purchase
Public Class Methods
index(params = {})
click to toggle source
# File lib/dear_inventory/resources/purchase.rb, line 17 def index(params = {}) new.request( :get, endpoint: "index", model: DearInventory::Models::PurchasesResults, params: params ) end
Also aliased as: call
show(params = {})
click to toggle source
# File lib/dear_inventory/resources/purchase.rb, line 36 def show(params = {}) new.request( :get, endpoint: "show", model: DearInventory::Models::Purchase, params: params ) end
Private Instance Methods
resource_uri(endpoint)
click to toggle source
# File lib/dear_inventory/resources/purchase.rb, line 49 def resource_uri(endpoint) suffix = case endpoint when "index" "/purchaselist" when "show" "/purchase" end self.class.const_get(:URI_BASE) + suffix end