Skip to content

Commit cc6638c

Browse files
Merge pull request #7 from telstra/maintain/v3
Update getting reports
2 parents bda874d + f707a30 commit cc6638c

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Add this dependency to your project's POM:
6868
<dependency>
6969
<groupId>com.telstra.messaging</groupId>
7070
<artifactId>telstra-messaging</artifactId>
71-
<version>3.1-SNAPSHOT</version>
71+
<version>3.2-SNAPSHOT</version>
7272
</dependency>
7373
```
7474

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>telstra-messaging</artifactId>
66
<packaging>jar</packaging>
77
<name>telstra-messaging</name>
8-
<version>3.1-SNAPSHOT</version>
8+
<version>3.2-SNAPSHOT</version>
99
<url>https://github.com/swagger-api/swagger-codegen</url>
1010
<description>Swagger Java</description>
1111
<scm>

src/main/java/com/telstra/GetReports200ResponseReportsInner.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212

1313
package com.telstra;
1414

15+
1516
import java.util.Objects;
1617

1718
import com.google.gson.annotations.SerializedName;
1819
import io.swagger.v3.oas.annotations.media.Schema;
1920

2021
import java.util.UUID;
21-
import org.threeten.bp.LocalDate;
22+
2223
/**
2324
* GetReports200ResponseReportsInner
2425
*/
@@ -35,7 +36,7 @@ public class GetReports200ResponseReportsInner {
3536
private String reportType = null;
3637

3738
@SerializedName("reportExpiry")
38-
private LocalDate reportExpiry = null;
39+
private String reportExpiry = null;
3940

4041
public GetReports200ResponseReportsInner reportId(UUID reportId) {
4142
this.reportId = reportId;
@@ -91,7 +92,7 @@ public void setReportType(String reportType) {
9192
this.reportType = reportType;
9293
}
9394

94-
public GetReports200ResponseReportsInner reportExpiry(LocalDate reportExpiry) {
95+
public GetReports200ResponseReportsInner reportExpiry(String reportExpiry) {
9596
this.reportExpiry = reportExpiry;
9697
return this;
9798
}
@@ -101,11 +102,11 @@ public GetReports200ResponseReportsInner reportExpiry(LocalDate reportExpiry) {
101102
* @return reportExpiry
102103
**/
103104
@Schema(description = "The expiry date of your report. After this date, you will be unable to download your report. ")
104-
public LocalDate getReportExpiry() {
105+
public String getReportExpiry() {
105106
return reportExpiry;
106107
}
107108

108-
public void setReportExpiry(LocalDate reportExpiry) {
109+
public void setReportExpiry(String reportExpiry) {
109110
this.reportExpiry = reportExpiry;
110111
}
111112

src/test/java/com/telstra/messaging/MessagesApiTest.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import static org.junit.Assert.assertEquals;
2323
import static org.junit.Assert.assertNotNull;
2424
import java.time.ZonedDateTime;
25-
26-
25+
import java.time.format.DateTimeFormatter;
26+
import java.time.ZoneOffset;
2727

2828
/**
2929
* API tests for MessagesApi
@@ -155,10 +155,10 @@ public void sendMessagesTest() {
155155

156156
Integer retryTimeout = 10;
157157

158-
String scheduleSend = "2024-08-15T20:48:47.096Z";
159-
ZonedDateTime zdt = ZonedDateTime.parse(scheduleSend);
158+
ZonedDateTime zdt = ZonedDateTime.now(ZoneOffset.UTC);
160159
ZonedDateTime zdtPlusTwoDays = zdt.plusDays(2);
161-
scheduleSend = zdtPlusTwoDays.toString();
160+
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSX");
161+
String scheduleSend = zdtPlusTwoDays.format(formatter);
162162

163163
Boolean deliveryNotification = false;
164164
String statusCallbackUrl = "http://www.example.com";
@@ -229,10 +229,10 @@ public void updateMessageByIdTest() {
229229

230230
Integer retryTimeout = 10;
231231

232-
String scheduleSend = "2024-08-15T20:48:47.096Z";
233-
ZonedDateTime zdt = ZonedDateTime.parse(scheduleSend);
232+
ZonedDateTime zdt = ZonedDateTime.now(ZoneOffset.UTC);
234233
ZonedDateTime zdtPlusTwoDays = zdt.plusDays(2);
235-
scheduleSend = zdtPlusTwoDays.toString();
234+
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSX");
235+
String scheduleSend = zdtPlusTwoDays.format(formatter);
236236

237237
Boolean deliveryNotification = false;
238238
String statusCallbackUrl = "http://www.example.com";

0 commit comments

Comments
 (0)