class Sagekit::AR::CustomersResource
Public Instance Methods
create(company, **attributes)
click to toggle source
# File lib/sagekit/resources/AR/customers.rb, line 12 def create(company, **attributes) Customer.new post_request("#{company}/AR/ARCustomers", body: attributes).body end
delete(company, customer_id)
click to toggle source
# File lib/sagekit/resources/AR/customers.rb, line 21 def delete(company, customer_id) delete_request("#{company}/AR/ARCustomers('#{customer_id}')") true end
list(company, **params)
click to toggle source
# File lib/sagekit/resources/AR/customers.rb, line 4 def list(company, **params) Collection.from_response get_request("#{company}/AR/ARCustomers?$count=true", params: params), type: Customer end
retreive(company, customer_id, **params)
click to toggle source
# File lib/sagekit/resources/AR/customers.rb, line 8 def retreive(company, customer_id, **params) Customer.new get_request("#{company}/AR/ARCustomers('#{customer_id}')", params: params).body end
update(company, customer_id, **attributes)
click to toggle source
# File lib/sagekit/resources/AR/customers.rb, line 16 def update(company, customer_id, **attributes) patch_request("#{company}/AR/ARCustomers('#{customer_id}')", body: attributes) true end