Created
March 7, 2014 19:12
-
-
Save tstachl/9417842 to your computer and use it in GitHub Desktop.
Creating a QNA case using the ruby wrapper ...
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
require 'desk_api' | |
DeskApi.configure do |config| | |
config.username = '[email protected]' | |
config.password = 'MyReallySecretPassword' | |
config.subdomain = 'syncmade' | |
end | |
DeskApi.cases.create({ | |
type: 'qna', | |
subject: 'QNA Case', | |
status: 'new', | |
labels: ['QNA'], | |
message: { | |
subject: 'QNA Case', | |
body: 'Some question', | |
_links: { | |
topic: { | |
href: '/api/v2/topics/627189', | |
class: 'topic' | |
} | |
} | |
}, | |
_links: { | |
customer: { | |
href: '/api/v2/customers/160402180', | |
class: 'customer' | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment