Class: EposNowClient::Resources::Customers
Instance Attribute Summary
Attributes inherited from BaseResource
#connection
Instance Method Summary
collapse
#initialize
Instance Method Details
#all(params = {}) ⇒ Object
6
7
8
|
# File 'lib/epos_now_client/resources/customers.rb', line 6
def all(params = {})
fetch_all_pages(params)
end
|
#create_customer(attributes) ⇒ Object
14
15
16
|
# File 'lib/epos_now_client/resources/customers.rb', line 14
def create_customer(attributes)
create(attributes)
end
|
#delete_customer(id) ⇒ Object
22
23
24
|
# File 'lib/epos_now_client/resources/customers.rb', line 22
def delete_customer(id)
destroy(id)
end
|
#find(id) ⇒ Object
10
11
12
|
# File 'lib/epos_now_client/resources/customers.rb', line 10
def find(id)
fetch(id)
end
|
#search(query, params = {}) ⇒ Object
26
27
28
|
# File 'lib/epos_now_client/resources/customers.rb', line 26
def search(query, params = {})
list(params.merge(search: query))
end
|
#update_customer(id, attributes) ⇒ Object
18
19
20
|
# File 'lib/epos_now_client/resources/customers.rb', line 18
def update_customer(id, attributes)
update(id, attributes)
end
|