Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/main/java/org/zendesk/client/v2/Zendesk.java
Original file line number Diff line number Diff line change
Expand Up @@ -1616,6 +1616,12 @@ public SatisfactionRating createSatisfactionRating(Ticket ticket, SatisfactionRa
// Action methods for Help Center
//////////////////////////////////////////////////////////////////////

public List<String> getHelpCenterLocales() {
return complete(submit(
req("GET", cnst("/help_center/locales.json")),
handle(List.class, "locales")));
}

/**
* Get all articles from help center.
*
Expand Down Expand Up @@ -1730,7 +1736,7 @@ public Category updateCategory(Category category) {

public Translation createCategoryTranslation(Long categoryId, Translation translation) {
checkHasCategoryId(categoryId);
return complete(submit(req("POST", tmpl("/help_center/categories/{id}/translation.json").set("id", categoryId),
return complete(submit(req("POST", tmpl("/help_center/categories/{id}/translations.json").set("id", categoryId),
JSON, json(Collections.singletonMap("translation", translation))), handle(Translation.class, "translation")));
}

Expand Down Expand Up @@ -1782,7 +1788,7 @@ public Section updateSection(Section section) {

public Translation createSectionTranslation(Long sectionId, Translation translation) {
checkHasSectionId(sectionId);
return complete(submit(req("POST", tmpl("/help_center/sections/{id}/translation.json").set("id", sectionId),
return complete(submit(req("POST", tmpl("/help_center/sections/{id}/translations.json").set("id", sectionId),
JSON, json(Collections.singletonMap("translation", translation))), handle(Translation.class, "translation")));
}

Expand Down
12 changes: 12 additions & 0 deletions src/main/java/org/zendesk/client/v2/model/hc/Section.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ public class Section {
/** The name of the section */
private String name;

/** The description of the section */
private String description;

/** The locale in which the section is displayed */
private String locale;

Expand Down Expand Up @@ -64,6 +67,14 @@ public void setName(String name) {
this.name = name;
}

public String getDescription() {
return description;
}

public void setDescription(String description) {
this.description = description;
}

public String getLocale() {
return locale;
}
Expand Down Expand Up @@ -149,6 +160,7 @@ public String toString() {
return "Section{" +
"id=" + id +
", name='" + name + '\'' +
", description='" + description + '\'' +
", locale='" + locale + '\'' +
", sourceLocale='" + sourceLocale + '\'' +
", url='" + url + '\'' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class Translation {
@JsonProperty("source_id")
private Long sourceId;

/* The type of the item that has this translation. Can be Article, Section, orCategory */
/* The type of the item that has this translation. Can be Article, Section, orCategory */
@JsonProperty("source_type")
private String sourceType;

Expand Down Expand Up @@ -184,4 +184,4 @@ public String toString() {
", createdById=" + createdById + '\'' +
'}';
}
}
}