Skip to content

Instantly share code, notes, and snippets.

@tstachl
Created March 7, 2014 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tstachl/9417842 to your computer and use it in GitHub Desktop.
Save tstachl/9417842 to your computer and use it in GitHub Desktop.
Creating a QNA case using the ruby wrapper ...
require 'desk_api'
DeskApi.configure do |config|
config.username = 'me@support.com'
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