Skip to content

Commit

Permalink
knowm#4726 add originators for DepositStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
zdary committed May 29, 2023
1 parent 1706a79 commit b262de5
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
package org.knowm.xchange.kraken.dto.account;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Optional;

public class DepostitStatus {

Expand All @@ -17,6 +21,7 @@ public class DepostitStatus {
private final Date timestamp;
private final String status;
private final String statusProp;
private List<String> originators;

public DepostitStatus(
@JsonProperty("method") String method,
Expand All @@ -29,7 +34,8 @@ public DepostitStatus(
@JsonProperty("fee") BigDecimal fee,
@JsonProperty("time") long unixTimestamp,
@JsonProperty("status") String status,
@JsonProperty("status-prop") String statusProp) {
@JsonProperty("status-prop") String statusProp,
@JsonProperty("originators") List<String> originators) {
super();
this.method = method;
this.aclass = aclass;
Expand All @@ -42,6 +48,7 @@ public DepostitStatus(
this.timestamp = new Date(unixTimestamp * 1000);
this.status = status;
this.statusProp = statusProp;
this.originators = originators;
}

public String getMethod() {
Expand Down Expand Up @@ -88,6 +95,10 @@ public String getStatusProp() {
return statusProp;
}

public List<String> getOriginators() {
return originators;
}

@Override
public String toString() {
return "DepostitStatus [method="
Expand All @@ -112,6 +123,8 @@ public String toString() {
+ status
+ ", statusProp="
+ statusProp
+ ", originators="
+ String.join(",", Optional.ofNullable(originators).orElse(new ArrayList<>()))
+ "]";
}
}

0 comments on commit b262de5

Please sign in to comment.