Skip to content
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 VoiceComment sub-type #697

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

besbes
Copy link
Contributor

@besbes besbes commented Jun 3, 2024

In our project we need to access data about voice calls, which are represented by Zendesk as comments with a type VoiceComment (I added the discriminating property in #415 ). This PR adds a VoiceComment subclass which exposes the data attribute which in turn contains some additional information about voice comments (see Adding voice comments to tickets. In particular we need to access the call_duration attribute, hence this is the only one that is added at the moment.

Please let me know if you think we should add more (all?) attributes, as well as how to best test this. Thank you!

@besbes besbes requested review from duemir and PierreBtz as code owners June 3, 2024 16:06
@besbes besbes force-pushed the feature/voicecomment branch from 8f3c300 to 3e332f1 Compare June 3, 2024 16:11
@PierreBtz
Copy link
Collaborator

@besbes thanks for the contribution. I cannot find anywhere on the Zendesk API the exact format of a comment object. in #415 it was determined it was the same as a "normal" comment (#415 (comment)), but I don't see any data field in the comment object. How did you determine this field? Did you find some doc or you just looked at the json?

@besbes
Copy link
Contributor Author

besbes commented Jun 24, 2024

@PierreBtz Yes… the Zendesk docs are rather weak for this specific case. I looked at the JSON returned from the Zendesk API and there I could see the data field for every voice comment I was looking at. There are more attributes included in the data field next to call_duration but this one is the only one we need right now so I omitted the other ones. Let me know if you want me to add more fields (just FYI, other fields include from and to (phone numbers), recording_url, call_id, location, answered_by_id etc.).

@PierreBtz
Copy link
Collaborator

@besbes all good. Since you tested your specific case and we have a basic test to cover the more generic comment case, I'll go ahead and merge as is.

Thanks for the contribution!

@PierreBtz PierreBtz merged commit 36dc24c into cloudbees-oss:master Jun 24, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants