class Lightspeed::API::Customers

Attributes

client[R]

Public Class Methods

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

Public Instance Methods

create(attributes = {}) click to toggle source
# File lib/lightspeed/api/customers.rb, line 12
def create(attributes = {})
  client.post("Account/#{client.account_id}/Customer.json", body: attributes).body
end
find(customer_id, with: []) click to toggle source
# File lib/lightspeed/api/customers.rb, line 8
def find(customer_id, with: [])
  client.get("Account/#{client.account_id}/Customer/#{customer_id}.json", relations: with).body
end
update(customer_id, attributes = {}) click to toggle source
# File lib/lightspeed/api/customers.rb, line 16
def update(customer_id, attributes = {})
  client.put("Account/#{client.account_id}/Customer/#{customer_id}.json", body: attributes)
end