class Lightspeed::API::Sales

Attributes

client[R]

Public Class Methods

new(client) click to toggle source
# File lib/lightspeed/api/sales.rb, line 6
def initialize(client)
  @client = client
end

Public Instance Methods

find(sale_id, with: []) click to toggle source
# File lib/lightspeed/api/sales.rb, line 12
def find(sale_id, with: [])
  client.get("Account/#{client.account_id}/Sale/#{sale_id}.json", relations: with).body
end
sale_lines() click to toggle source
# File lib/lightspeed/api/sales.rb, line 10
def sale_lines; API::Sales::SaleLines.new(client); end
update(sale_id, attributes = {}) click to toggle source
# File lib/lightspeed/api/sales.rb, line 16
def update(sale_id, attributes = {})
  client.put("Account/#{client.account_id}/Sale/#{sale_id}.json", body: attributes).body
end