Skip to content

Instantly share code, notes, and snippets.

@tristansokol
Created October 19, 2017 21:59
Show Gist options
  • Save tristansokol/3ace668e015fab7121ef399852d85d37 to your computer and use it in GitHub Desktop.
Save tristansokol/3ace668e015fab7121ef399852d85d37 to your computer and use it in GitHub Desktop.
# use Square's SDK to make your job easier
import squareconnect
from squareconnect.apis.v1_employees_api import V1EmployeesApi
from squareconnect.models.v1_employee import V1Employee
# setup authorization with your access token
squareconnect.configuration.access_token = 'sq0atp-XXXXXXXX'
# create an instance of the Location API class
api_instance = V1EmployeesApi()
employee = V1Employee()
employee.first_name = 'Sam'
employee.last_name = 'Smiths'
employee.email = '[email protected]'
# call the API to create the employee and print the results
api_response = api_instance.create_employee(employee)
print (api_response)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment