Skip to content

Commit

Permalink
Merge pull request #697 from besbes/feature/voicecomment
Browse files Browse the repository at this point in the history
Add VoiceComment sub-type
  • Loading branch information
PierreBtz authored Jun 24, 2024
2 parents a2e569a + 3e332f1 commit 36dc24c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/org/zendesk/client/v2/model/Comment.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
package org.zendesk.client.v2.model;

import static com.fasterxml.jackson.annotation.JsonTypeInfo.As.EXTERNAL_PROPERTY;
import static com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import org.zendesk.client.v2.model.comments.VoiceComment;

/**
* @author stephenc
* @since 09/04/2013 15:09
*/
@JsonTypeInfo(use = NAME, include = EXTERNAL_PROPERTY, property = "type", visible = true)
@JsonSubTypes({
@JsonSubTypes.Type(value = Comment.class, name = "Comment"),
@JsonSubTypes.Type(value = VoiceComment.class, name = "VoiceComment")
})
public class Comment implements Serializable {

private static final long serialVersionUID = 1L;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.zendesk.client.v2.model.comments;

import com.fasterxml.jackson.annotation.JsonProperty;
import org.zendesk.client.v2.model.Comment;

public class VoiceComment extends Comment {

private VoiceCommentData data;

@JsonProperty("data")
public VoiceCommentData getData() {
return data;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.zendesk.client.v2.model.comments;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* @author besbes
* @since 05/03/2024 13:51
*/
public class VoiceCommentData {

private Long callDuration;

@JsonProperty("call_duration")
public Long getCallDuration() {
return callDuration;
}
}

0 comments on commit 36dc24c

Please sign in to comment.