Skip to content

Instantly share code, notes, and snippets.

@tristansokol
Created September 21, 2017 09:22
Show Gist options
  • Save tristansokol/c5dce50f18bc7f1118f5a722fd2467ac to your computer and use it in GitHub Desktop.
Save tristansokol/c5dce50f18bc7f1118f5a722fd2467ac to your computer and use it in GitHub Desktop.
# load the gem
require 'square_connect'
# setup authorization with a personal access token
SquareConnect.configure do |config|
config.access_token = 'sq0atp-XXXXXXXXXXXXX'
end
#create a new API instance
api_instance = SquareConnect::CustomersApi.new
#Create a new customer request object and add information to it
customer = SquareConnect::CreateCustomerRequest.new
customer.given_name = 'Tom'
customer.family_name = 'Jones'
customer.email_address = '[email protected]'
#Create the customer and print the results.
result = api_instance.create_customer(customer)
p result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment