Skip to content

Commit a2aaaf1

Browse files
authored
Merge pull request #144 from messagebird/Issue_143_addPriceOnMessageResponse
added price field on message response #Issue_143
2 parents 38aa6ad + 646db06 commit a2aaaf1

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

api/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@
108108
<version>2.21.0</version>
109109
<scope>test</scope>
110110
</dependency>
111+
<dependency>
112+
<groupId>org.jetbrains</groupId>
113+
<artifactId>annotations</artifactId>
114+
<version>13.0</version>
115+
</dependency>
111116
</dependencies>
112117

113118
<distributionManagement>

api/src/main/java/com/messagebird/objects/MessageResponse.java

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.messagebird.objects;
22

3+
import org.jetbrains.annotations.Nullable;
4+
35
import java.io.Serializable;
46
import java.math.BigInteger;
57
import java.util.Date;
@@ -260,6 +262,8 @@ static public class Items implements Serializable {
260262
private BigInteger recipient;
261263
private String status;
262264
private Date statusDatetime;
265+
@Nullable
266+
private Price price;
263267

264268
public Items() {
265269
}
@@ -270,6 +274,7 @@ public String toString() {
270274
"recipient=" + recipient +
271275
", status='" + status + '\'' +
272276
", statusDatetime=" + statusDatetime +
277+
", price=" + price +
273278
"}";
274279
}
275280

@@ -300,6 +305,41 @@ public Date getStatusDatetime() {
300305
return statusDatetime;
301306
}
302307

308+
public Price getPrice() {
309+
return price;
310+
}
311+
312+
}
313+
314+
/**
315+
* Response price of items
316+
*/
317+
static public class Price implements Serializable {
318+
319+
private static final long serialVersionUID = -4104837036540050532L;
320+
321+
private float amount;
322+
private String currency;
323+
324+
public Price() {
325+
}
326+
327+
@Override
328+
public String toString() {
329+
return "Price{" +
330+
"amount=" + amount +
331+
", currency=" + currency +
332+
"}";
333+
}
334+
335+
public float getAmount() {
336+
return amount;
337+
}
338+
339+
public String getCurrency() {
340+
return currency;
341+
}
342+
303343
}
304344
}
305345

0 commit comments

Comments
 (0)