Skip to content

Commit 9fa6173

Browse files
committed
Merge branch 'tetrapod'
Conflicts: src/main/java/org/zendesk/client/v2/Zendesk.java
2 parents 2670b04 + 0edc9a1 commit 9fa6173

19 files changed

+1279
-140
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ Here is the status of the various API components:
4343
* [Requests](http://developer.zendesk.com/documentation/rest_api/requests.html)
4444
* [User Identities](http://developer.zendesk.com/documentation/rest_api/user_identities.html)
4545
* [Groups](http://developer.zendesk.com/documentation/rest_api/groups.html)
46-
* [Group Membership](http://developer.zendesk.com/documentation/rest_api/group_memberships.html)
46+
* [Group Membership](http://developer.zendesk.com/documentation/rest_api/group_memberships.html)
4747
* [Custom Agent Roles](http://developer.zendesk.com/documentation/rest_api/custom_roles.html)
4848
* [Organizations](http://developer.zendesk.com/documentation/rest_api/organizations.html)*except for related info*
4949
* [Search](http://developer.zendesk.com/documentation/rest_api/search.html)*except for topics and sort ordering*
5050
* [Tags](http://developer.zendesk.com/documentation/rest_api/tags.html)
51-
* [Forums](http://developer.zendesk.com/documentation/rest_api/forums.html)
51+
* [Forums](http://developer.zendesk.com/documentation/rest_api/forums.html)
5252
* [Forum Subscriptions](http://developer.zendesk.com/documentation/rest_api/forum_subscriptions.html)
5353
* [Categories](http://developer.zendesk.com/documentation/rest_api/categories.html)
54-
* [Topics](http://developer.zendesk.com/documentation/rest_api/topics.html)
54+
* [Topics](http://developer.zendesk.com/documentation/rest_api/topics.html)
5555
* [Topic Comments](http://developer.zendesk.com/documentation/rest_api/topic_comments.html)
5656
* [Topic Subscriptions](http://developer.zendesk.com/documentation/rest_api/topic_subscriptions.html)
5757
* [Topic Votes](http://developer.zendesk.com/documentation/rest_api/topic_votes.html)
@@ -67,7 +67,7 @@ Here is the status of the various API components:
6767
* [Satisfaction Ratings](http://developer.zendesk.com/documentation/rest_api/satisfaction_ratings.html)
6868
* [Sharing Agreements](http://developer.zendesk.com/documentation/rest_api/sharing_agreements.html)
6969
* [Suspended Tickets](http://developer.zendesk.com/documentation/rest_api/suspended_tickets.html)
70-
* [Triggers](http://developer.zendesk.com/documentation/rest_api/triggers.html)
70+
* [Triggers](http://developer.zendesk.com/documentation/rest_api/triggers.html)
7171

7272
History
7373
-------

src/main/java/org/zendesk/client/v2/Zendesk.java

Lines changed: 404 additions & 93 deletions
Large diffs are not rendered by default.

src/main/java/org/zendesk/client/v2/ZendeskResponseException.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package org.zendesk.client.v2;
22

3+
import com.ning.http.client.Response;
4+
35
import java.io.IOException;
46
import java.text.MessageFormat;
57

6-
import com.ning.http.client.Response;
7-
88
/**
99
* {@link ZendeskException} specialisation for HTTP non-2xx responses
1010
*/
@@ -14,9 +14,9 @@ public class ZendeskResponseException extends ZendeskException {
1414
private String body;
1515

1616
public ZendeskResponseException(Response resp) throws IOException {
17-
this(resp.getStatusCode(), resp.getStatusText(), resp.getResponseBody());
17+
this(resp.getStatusCode(), resp.getStatusText(), resp.getResponseBody());
1818
}
19-
19+
2020
public ZendeskResponseException(int statusCode, String statusText, String body) {
2121
super(MessageFormat.format("HTTP/{0}: {1}", statusCode, statusText));
2222
this.statusCode = statusCode;
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
package org.zendesk.client.v2.model;
2+
3+
import com.fasterxml.jackson.annotation.JsonProperty;
4+
5+
import java.util.Date;
6+
import java.util.List;
7+
8+
public class Forum {
9+
private Long id;
10+
private String url;
11+
private String name;
12+
private String description;
13+
private Long categoryId;
14+
private Long organizationId;
15+
private Long localeId;
16+
private Boolean locked;
17+
private Long unansweredTopics;
18+
private Long position;
19+
private TopicType forumType;
20+
private Access access;
21+
private List<String> tags;
22+
private Date createdAt;
23+
private Date updatedAt;
24+
25+
public Long getId() {
26+
return id;
27+
}
28+
29+
public void setId(final Long id) {
30+
this.id = id;
31+
}
32+
33+
public String getUrl() {
34+
return url;
35+
}
36+
37+
public void setUrl(final String url) {
38+
this.url = url;
39+
}
40+
41+
public String getName() {
42+
return name;
43+
}
44+
45+
public void setName(final String name) {
46+
this.name = name;
47+
}
48+
49+
public String getDescription() {
50+
return description;
51+
}
52+
53+
public void setDescription(final String description) {
54+
this.description = description;
55+
}
56+
57+
@JsonProperty("category_id")
58+
public Long getCategoryId() {
59+
return categoryId;
60+
}
61+
62+
public void setCategoryId(final Long categoryId) {
63+
this.categoryId = categoryId;
64+
}
65+
66+
@JsonProperty("organization_id")
67+
public Long getOrganizationId() {
68+
return organizationId;
69+
}
70+
71+
public void setOrganizationId(final Long organizationId) {
72+
this.organizationId = organizationId;
73+
}
74+
75+
@JsonProperty("locale_id")
76+
public Long getLocaleId() {
77+
return localeId;
78+
}
79+
80+
public void setLocaleId(final Long localeId) {
81+
this.localeId = localeId;
82+
}
83+
84+
public Boolean getLocked() {
85+
return locked;
86+
}
87+
88+
public void setLocked(final Boolean locked) {
89+
this.locked = locked;
90+
}
91+
92+
@JsonProperty("unanswered_topics")
93+
public Long getUnansweredTopics() {
94+
return unansweredTopics;
95+
}
96+
97+
public void setUnansweredTopics(final Long unansweredTopics) {
98+
this.unansweredTopics = unansweredTopics;
99+
}
100+
101+
public Long getPosition() {
102+
return position;
103+
}
104+
105+
public void setPosition(final Long position) {
106+
this.position = position;
107+
}
108+
109+
@JsonProperty("forum_type")
110+
public TopicType getForumType() {
111+
return forumType;
112+
}
113+
114+
public void setForumType(final TopicType forumType) {
115+
this.forumType = forumType;
116+
}
117+
118+
public Access getAccess() {
119+
return access;
120+
}
121+
122+
public void setAccess(final Access access) {
123+
this.access = access;
124+
}
125+
126+
public List<String> getTags() {
127+
return tags;
128+
}
129+
130+
public void setTags(final List<String> tags) {
131+
this.tags = tags;
132+
}
133+
134+
@JsonProperty("created_at")
135+
public Date getCreatedAt() {
136+
return createdAt;
137+
}
138+
139+
public void setCreatedAt(final Date createdAt) {
140+
this.createdAt = createdAt;
141+
}
142+
143+
@JsonProperty("updated_at")
144+
public Date getUpdatedAt() {
145+
return updatedAt;
146+
}
147+
148+
public void setUpdatedAt(final Date updatedAt) {
149+
this.updatedAt = updatedAt;
150+
}
151+
152+
public static enum Access {
153+
EVERYBODY("everybody"),
154+
LOGGED_IN("logged-in users"),
155+
AGENTS_ONLY("agents only");
156+
157+
private final String name;
158+
159+
private Access(String name) {
160+
this.name = name;
161+
}
162+
163+
@Override
164+
public String toString() {
165+
return name;
166+
}
167+
}
168+
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
package org.zendesk.client.v2.model;
2+
3+
import com.fasterxml.jackson.annotation.JsonProperty;
4+
5+
import java.util.Date;
6+
7+
public class GroupMembership {
8+
private Long id;
9+
private String url;
10+
private Long userId;
11+
private Long groupId;
12+
private Boolean _default;
13+
private Date createdAt;
14+
private Date updatedAt;
15+
16+
public GroupMembership() {
17+
}
18+
19+
public Long getId() {
20+
return id;
21+
}
22+
23+
public void setId(final Long id) {
24+
this.id = id;
25+
}
26+
27+
public String getUrl() {
28+
return url;
29+
}
30+
31+
public void setUrl(final String url) {
32+
this.url = url;
33+
}
34+
35+
@JsonProperty("user_id")
36+
public Long getUserId() {
37+
return userId;
38+
}
39+
40+
public void setUserId(final Long userId) {
41+
this.userId = userId;
42+
}
43+
44+
@JsonProperty("group_id")
45+
public Long getGroupId() {
46+
return groupId;
47+
}
48+
49+
public void setGroupId(final Long groupId) {
50+
this.groupId = groupId;
51+
}
52+
53+
@JsonProperty("default")
54+
public Boolean get_default() {
55+
return _default;
56+
}
57+
58+
public void set_default(final Boolean _default) {
59+
this._default = _default;
60+
}
61+
62+
@JsonProperty("created_at")
63+
public Date getCreatedAt() {
64+
return createdAt;
65+
}
66+
67+
public void setCreatedAt(final Date createdAt) {
68+
this.createdAt = createdAt;
69+
}
70+
71+
@JsonProperty("updated_at")
72+
public Date getUpdatedAt() {
73+
return updatedAt;
74+
}
75+
76+
public void setUpdatedAt(final Date updatedAt) {
77+
this.updatedAt = updatedAt;
78+
}
79+
}

src/main/java/org/zendesk/client/v2/model/Identity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
import java.util.Date;
66

77
/**
8-
* @author stephenc
9-
* @since 09/04/2013 14:37
10-
*/
8+
* @author stephenc
9+
* @since 09/04/2013 14:37
10+
*/
1111
public class Identity {
1212
private Long id;
1313
private String url;

src/main/java/org/zendesk/client/v2/model/Organization.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import java.util.Date;
66
import java.util.List;
7+
import java.util.Map;
78

89
/**
910
* @author stephenc
@@ -22,6 +23,7 @@ public class Organization implements SearchResultEntity {
2223
private Boolean sharedTickets;
2324
private Boolean sharedComments;
2425
private List<String> tags;
26+
private Map<String, Object> organizationFields;
2527

2628
public Organization() {
2729
}
@@ -129,6 +131,15 @@ public void setUpdatedAt(Date updatedAt) {
129131
this.updatedAt = updatedAt;
130132
}
131133

134+
@JsonProperty("organization_fields")
135+
public Map<String, Object> getOrganizationFields() {
136+
return organizationFields;
137+
}
138+
139+
public void setOrganizationFields(Map<String, Object> organizationFields) {
140+
this.organizationFields = organizationFields;
141+
}
142+
132143
@Override
133144
public String toString() {
134145
final StringBuilder sb = new StringBuilder("Organization{");

0 commit comments

Comments
 (0)