Created
November 15, 2014 23:21
-
-
Save tstachl/38513076b76d64349d93 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
# configure the client | |
client = DeskApi::Client.new username: '[email protected]', password: '$uper$ecretP@ssword', endpoint: 'https://example.desk.com' | |
# create the customer using a plain request | |
resp = client.post('/api/v2/customers', { | |
first_name: 'John', | |
last_name: 'Doe', | |
emails: [{ type: 'home', value: '[email protected]' }] | |
}) | |
# creating customer using advanced resource | |
customer = client.customers.create({ | |
first_name: 'John', | |
last_name: 'Doe', | |
emails: [{ type: 'home', value: '[email protected]' }] | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment