Created
September 21, 2017 09:22
-
-
Save tristansokol/c5dce50f18bc7f1118f5a722fd2467ac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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