Skip to content

Commit

Permalink
rebasing with master
Browse files Browse the repository at this point in the history
  • Loading branch information
Thumpala Vinay Kumar authored and Thumpala Vinay Kumar committed Mar 1, 2024
2 parents 4a20d7c + 2ef6452 commit dac3a3a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
**Feature - Import Campaign API**
- Import Campaign API


## [5.38.3](https://github.com/plivo/plivo-java/tree/v5.38.3) (2024-02-28)
**Feature - Log Redaction Enhancement**
- Added log attribute in GET and List MDR response
- Change log field from bool to string in send SMS

## [5.38.2](https://github.com/plivo/plivo-java/tree/v5.38.2) (2024-01-15)
**Feature - Made meta object consistent for List Powerpacks, List Media, List Numbers, List Shortcodes, List Tollfree API**
- Made meta object consistent in API response
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/plivo/api/models/message/Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class Message extends BaseResource {
private String conversationID;
private String conversationOrigin;
private String conversationExpirationTimestamp;
private String log;

public static MessageCreator creator(String source, String destination) {
return new MessageCreator(source, destination);
Expand Down Expand Up @@ -174,6 +175,10 @@ public String getConversationOrigin() {
public String getConversationExpirationTimestamp() {
return conversationExpirationTimestamp;
}

public String getLog() {
return log;
}

@Override
public String getId() {
Expand Down
14 changes: 10 additions & 4 deletions src/main/java/com/plivo/api/models/message/MessageCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class MessageCreator extends Creator < MessageCreateResponse > {
private MessageType type = null;
private URL url = null;
private String method = "POST";
private Boolean log = null;
private String log = "true";
private Boolean trackable = null;
private String[] media_urls = null;
private String[] media_ids = null;
Expand Down Expand Up @@ -135,7 +135,7 @@ public String method() {
return this.method;
}

public Boolean log() {
public String log() {
return this.log;
}

Expand Down Expand Up @@ -191,8 +191,14 @@ public MessageCreator method(final String method) {
* @param log If set to false, the content of this message will not be logged on the Plivo
* infrastructure and the dst value will be masked
*/
public MessageCreator log(final Boolean log) {
this.log = log;
public MessageCreator log(final Object log) {
if (log instanceof Boolean) {
this.log = ((Boolean) log).toString();
} else if (log instanceof String) {
this.log = (String) log;
} else {
throw new IllegalArgumentException("Invalid log value. Expected boolean or string.");
}
return this;
}

Expand Down

0 comments on commit dac3a3a

Please sign in to comment.