class Button::Customers

www.usebutton.com/developers/api-reference/

Public Instance Methods

create(customer) click to toggle source

Create a Customer

@param [Hash] customer the customer to create @return [Button::Response] the API response

# File lib/button/resources/customers.rb, line 26
def create(customer)
  api_post(path, customer)
end
get(customer_id) click to toggle source

Gets a customer

@param [String] customer_id the customer id @return [Button::Response] the API response

# File lib/button/resources/customers.rb, line 17
def get(customer_id)
  api_get(path(customer_id))
end
path(customer_id = nil) click to toggle source
# File lib/button/resources/customers.rb, line 7
def path(customer_id = nil)
  return "/v1/customers/#{customer_id}" if customer_id
  '/v1/customers'
end