-
-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Support for UserFields in ZendeskApi_v2 #599
base: main
Are you sure you want to change the base?
Add Support for UserFields in ZendeskApi_v2 #599
Conversation
- Introduced constants for UserFieldTypes to ensure consistent usage across the codebase.
- Created models: GroupUserFieldResponse, IndividualUserFieldResponse, UserField. - These models handle the structure of data returned by UserField endpoints.
- Implemented sync and async methods to handle UserField endpoints.
- Added tests for sync and async UserField API methods. - Updated UsersTests to cover new UserField scenarios.
…nterface methods Corrected the parameter names in the async interface methods where ticketField was mistakenly used instead of userField.
Hi @mozts2005, I can address the issues flagged by CodeFactor. However, the test failures in the pipeline seem to be related to invalid or expired secrets. The pipeline output shows the following error:
It looks like the authentication details may need to be updated. Could you confirm if the secrets used in the pipeline are still valid? Thanks! |
Yes, I will update the pipeline secret and rerun the test. |
- Separated UserField classes into individual files. - Consolidated fields into a unified UserField class. - Moved CustomFieldOption to a shared folder for reuse. - Updated UserTests.cs to reflect structural changes.
-An opening brace should not be followed by a blank line. (SA1505)
Hi @mozts2005, I have resolved the CodeFactor issues, tests still failing due to authentication which I believe will be resolved with your secret update. Thanks! |
Hi @mozts2005 Hope you doing well, just following on the pull request and pipeline secrets issue. Thanks. |
Is there any movement on this? Or maybe a fork somewhere that has this already? I am stuck needing to update a user field and there's no support in the current version of the API. I either have to fork my own and add it myself following this PR, or I'm going to have to go raw http-request. I'd really rather not |
Summary:
This pull request adds support for managing UserFields within the ZendeskApi_v2 package. It includes both synchronous and asynchronous methods for CRUD operations on UserFields. The implementation aligns with the existing structure for managing TicketFields, ensuring consistency and ease of use.
Changes Include:
API Methods: Implemented sync and async methods for UserFields operations.
Models: Added UserField, GroupUserFieldResponse, and IndividualUserFieldResponse models to represent UserFields and responses.
Constants: Introduced UserFieldTypes constants for standardized handling of field types.
Requests Update: Extended Users requests to support the new UserFields functionality.
Unit Tests: Updated UsersTests to cover the new UserField methods, including both sync and async operations.
Testing:
Added comprehensive unit tests to ensure proper functionality for all new methods.
Tests include validation of input and output for the UserFields operations, ensuring they work as expected.