You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I was trying to update a custom drop-down ticket field.
The request JSON isn't serializing properly.
It's currently being serialized as: {"custom_field_options" : [{"name" : "Option 1", "value" : "option_1"},{"name" : "Option 2", "value" : "option_2"}]}
It should however be serialized as: {"ticket_field": {"custom_field_options" : [{"name" : "Option 1", "value" : "option_1"},{"name" : "Option 2", "value" : "option_2"}]}}
As far as I can see the TicketField needs to be wrapped just as the response is. (See the CURL Example on the ZenDesk Developer Portal)
Either the IndividualTicketFieldResponse class should be used or a IndividualTicketFieldRequest class should be made which would be identical to the IndividualTicketFieldResponse class.
Currently when executing the request I'm receiving the X-Zendesk-API-Warn header with the following header value: Removed restricted keys ["url", "created_at", "updated_at", "type", "title", "description", "position", "active", "required", "collapsed_for_agents", "title_in_portal", "visible_in_portal", "editable_in_portal", "required_in_portal", "custom_field_options"] from parameters according to whitelist
The text was updated successfully, but these errors were encountered:
I am not able to replicate your issue. I do have a test case for this that can be found here
If you are abele to create a test that can replicate your issue and submit it as a pull request I would me more than happy to troubleshoot the issue more.
As I'm not that experienced with Github so haven't been able to create a pull request.
If you however make a copy of the unit test you referenced and use the Async methods the unit test will fail.
It probably would have been handy if I had mentioned in my initial post that I'm using the Async methods.
Hello,
Today I was trying to update a custom drop-down ticket field.
The request JSON isn't serializing properly.
It's currently being serialized as:
{"custom_field_options" : [{"name" : "Option 1", "value" : "option_1"},{"name" : "Option 2", "value" : "option_2"}]}
It should however be serialized as:
{"ticket_field": {"custom_field_options" : [{"name" : "Option 1", "value" : "option_1"},{"name" : "Option 2", "value" : "option_2"}]}}
As far as I can see the TicketField needs to be wrapped just as the response is. (See the CURL Example on the ZenDesk Developer Portal)
Either the IndividualTicketFieldResponse class should be used or a IndividualTicketFieldRequest class should be made which would be identical to the IndividualTicketFieldResponse class.
Currently when executing the request I'm receiving the
X-Zendesk-API-Warn
header with the following header value:Removed restricted keys ["url", "created_at", "updated_at", "type", "title", "description", "position", "active", "required", "collapsed_for_agents", "title_in_portal", "visible_in_portal", "editable_in_portal", "required_in_portal", "custom_field_options"] from parameters according to whitelist
The text was updated successfully, but these errors were encountered: