File tree 1 file changed +15
-1
lines changed
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ class TicketFields extends Client {
47
47
48
48
/**
49
49
* Lists all ticket fields.
50
- * @returns {Promise<Array<TicketField>> }> } Returns an array of ticket fields.
50
+ * @returns {Promise<Array<TicketField>> }} Returns an array of ticket fields.
51
51
* @async
52
52
* @throws {Error } Throws an error if the request fails.
53
53
* @see {@link https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_fields/#list-ticket-fields }
@@ -59,6 +59,20 @@ class TicketFields extends Client {
59
59
return this . getAll ( [ 'ticket_fields' ] ) ;
60
60
}
61
61
62
+ /**
63
+ * Lists all ticket fields with locale.
64
+ * @returns {Promise<Array<TicketField>> }} Returns an array of ticket fields by locale.
65
+ * @async
66
+ * @throws {Error } Throws an error if the request fails.
67
+ * @see {@link https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_fields/#list-ticket-fields }
68
+ * @example
69
+ * const client = createClient({...});
70
+ * const fields = await client.ticketfields.listWithLocale('sv');
71
+ */
72
+ async listWithLocale ( locale ) {
73
+ return this . getAll ( [ 'ticket_fields' , { locale } ] ) ;
74
+ }
75
+
62
76
/**
63
77
* Retrieves a specific ticket field by ID.
64
78
* @param {number } ticketFieldId - The ID of the ticket field to retrieve.
You can’t perform that action at this time.
0 commit comments