Skip to content

Commit 198a1c3

Browse files
committed
release 5.2.2
1 parent 2998501 commit 198a1c3

File tree

6 files changed

+48
-5
lines changed

6 files changed

+48
-5
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ Check out all the resources and all the Java code examples in the [Official Docu
4848

4949

5050
## Release notes
51+
v5.2.2
52+
- add constant for "Globals" in Emailv31
53+
5154
v5.2.1
5255
- update dependency versions
5356

@@ -81,7 +84,7 @@ Add the following in your `pom.xml`
8184
<dependency>
8285
<groupId>com.mailjet</groupId>
8386
<artifactId>mailjet-client</artifactId>
84-
<version>5.2.1</version>
87+
<version>5.2.2</version>
8588
</dependency>
8689
</dependencies>
8790
```

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<!--General configuration -->
77
<groupId>com.mailjet</groupId>
88
<artifactId>mailjet-client</artifactId>
9-
<version>5.2.1</version>
9+
<version>5.2.2</version>
1010
<packaging>jar</packaging>
1111
<name>Mailjet Client</name>
1212
<description>A Mailjet API Client</description>
@@ -27,7 +27,7 @@
2727
<connection>scm:git:https://github.com/mailjet/mailjet-apiv3-java.git</connection>
2828
<developerConnection>scm:git:https://github.com/mailjet/mailjet-apiv3-java.git</developerConnection>
2929
<url>[email protected]:mailjet/mailjet-apiv3-java.git</url>
30-
<tag>mailjet-client-5.2.1</tag>
30+
<tag>mailjet-client-5.2.2</tag>
3131
</scm>
3232
<!--License-->
3333
<licenses>

src/main/java/com/mailjet/client/MailjetClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class MailjetClient {
3838
private ClientOptions _options;
3939
private OkHttpClient _client;
4040

41-
private static final String userAgent = "mailjet-apiv3-java/v5.2.1";
41+
private static final String userAgent = "mailjet-apiv3-java/v5.2.2";
4242

4343
/**
4444
* Deprecated - please, use MailjetClient(ClientOptions clientOptions) ctor instead

src/main/java/com/mailjet/client/resource/Emailv31.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public class Emailv31 {
2020
public static String MESSAGES = "Messages";
2121
public static String SANDBOX_MODE = "SandboxMode";
2222
public static String ADVANCE_ERROR_HANDLING = "AdvanceErrorHandling";
23+
public static String GLOBALS = "Globals";
2324

2425
public static class Message {
2526
public static String EMAIL = "Email";
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package com.mailjet.client;
2+
3+
import org.json.JSONArray;
4+
import org.junit.Assert;
5+
import org.junit.Before;
6+
import org.junit.Ignore;
7+
import org.junit.Test;
8+
9+
import com.mailjet.client.errors.MailjetException;
10+
import com.mailjet.client.resource.StatisticsLinkclick;
11+
12+
import static org.junit.Assert.assertNotNull;
13+
14+
@Ignore
15+
public class StatisticsIT {
16+
private MailjetClient client;
17+
18+
@Before
19+
public void setUp() {
20+
client = TestHelper.getClient();
21+
}
22+
23+
@Test
24+
public void statisticsLinkClickTest() throws MailjetException {
25+
MailjetRequest request = new MailjetRequest(StatisticsLinkclick.resource)
26+
.filter(StatisticsLinkclick.CAMPAIGNID, "$Campaign_ID");
27+
28+
MailjetResponse response = client.get(request);
29+
30+
Assert.assertEquals(200, response.getStatus());
31+
Integer count = response.getInt("Count");
32+
assertNotNull(count);
33+
Integer total = response.getInt("Total");
34+
assertNotNull(total);
35+
JSONArray data = response.getJSONArray("Data");
36+
assertNotNull(data);
37+
}
38+
39+
}

src/test/java/com/mailjet/client/TemplateIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void a_createTemplate() throws MailjetException {
3939
// arrange
4040
MailjetRequest mailjetRequest = new MailjetRequest(Template.resource)
4141
.property(Template.AUTHOR, "John Doe")
42-
.property(Template.CATEGORIES, new JSONArray("[\"demo-category\"]"))
42+
.property(Template.CATEGORIES, new JSONArray("[\"welcome\"]"))
4343
.property(Template.COPYRIGHT, "Mailjet")
4444
.property(Template.DESCRIPTION, "Used to send out promo codes.")
4545
.property(Template.EDITMODE, 1)

0 commit comments

Comments
 (0)