class Sagekit::AR::CustomerGroupsResource

Public Instance Methods

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