File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 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 Http = require ( '../http/http' )
10+
11+ const Params = require ( '../../util/params' )
12+
13+ class Supports {
14+ /**
15+ * @param {Object } payload
16+ * @returns {Promise.<Object> }
17+ * @description Add Supports Ticket.
18+ */
19+ static addSupportsTicket ( payload ) {
20+ const body = Params . destructParams ( payload , [ 'message' , 'mailType' , 'subject' ] )
21+
22+ const options = {
23+ method : 'POST' ,
24+ endpoint : `${ Supports . API_PREFIX } /supports/ticket` ,
25+ body
26+ }
27+ return Http . authorizedRequest ( options )
28+ }
29+ }
30+
31+ Supports . API_PREFIX = '/api/v1'
32+
33+ module . exports = Supports
You can’t perform that action at this time.
0 commit comments