Skip to content

Commit df11566

Browse files
Merge pull request #46 from renderforest/implement-examples-for-supports-api
add example for addSupportsTicket() of supports API.
2 parents 61c2cca + 33bf2b0 commit df11566

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Copyright (c) 2018-present, Renderforest, LLC.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the license found in the
6+
* LICENSE file in the root directory.
7+
*/
8+
9+
const Renderforest = require('../../src/lib/renderforest')
10+
11+
const options = { signKey: 'mock-signKey', clientId: -1 }
12+
const renderforest = new Renderforest(options)
13+
14+
const payload = {
15+
message: 'I need to...',
16+
mailType: 'Creative team',
17+
subject: 'Some help in ..'
18+
}
19+
renderforest.addSupportsTicket(payload)
20+
.then(console.log) // handle the success
21+
.catch(console.error) // handle the error

0 commit comments

Comments
 (0)