From f3fb6623d283e6f6675babe8c4ba3c512f206272 Mon Sep 17 00:00:00 2001 From: Zuzanna Maczek Date: Tue, 20 Dec 2022 16:53:39 +0100 Subject: [PATCH] fix MO field operator mapping --- src/main/java/com/sinch/xms/api/MoSms.java | 1 + src/test/java/com/sinch/xms/api/MoTextSmsTest.java | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sinch/xms/api/MoSms.java b/src/main/java/com/sinch/xms/api/MoSms.java index 25ec694..83f5128 100644 --- a/src/main/java/com/sinch/xms/api/MoSms.java +++ b/src/main/java/com/sinch/xms/api/MoSms.java @@ -67,6 +67,7 @@ public abstract class MoSms { * @return an MCCMNC or null if none is available */ @Nullable + @JsonProperty("operator_id") public abstract String operator(); /** diff --git a/src/test/java/com/sinch/xms/api/MoTextSmsTest.java b/src/test/java/com/sinch/xms/api/MoTextSmsTest.java index e2b3574..dc67a9b 100644 --- a/src/test/java/com/sinch/xms/api/MoTextSmsTest.java +++ b/src/test/java/com/sinch/xms/api/MoTextSmsTest.java @@ -48,6 +48,7 @@ public void canSerializeJson() throws Exception { .id(smsId) .keyword("KWD") .receivedAt(receivedAt) + .operator("operatorId") .build(); String expected = @@ -60,7 +61,8 @@ public void canSerializeJson() throws Exception { " \"id\": \"" + smsId + "\",", " \"received_at\": " + receivedAtString + ",", " \"body\": \"Здравей, свят!\",", - " \"keyword\": \"KWD\"", + " \"keyword\": \"KWD\",", + " \"operator_id\": \"operatorId\"", "}"); String actual = json.writeValueAsString(input); @@ -80,6 +82,7 @@ public void canDeserializeJson() throws Exception { .body("Hello, world!") .id(smsId) .receivedAt(receivedAt) + .operator("operatorId") .build(); String input = json.writeValueAsString(expected);