org.knowm.xchange.coinbase.dto.account.CoinbaseToken Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xchange-coinbase Show documentation
Show all versions of xchange-coinbase Show documentation
XChange implementation for Coinbase
package org.knowm.xchange.coinbase.dto.account;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import org.knowm.xchange.coinbase.dto.CoinbaseBaseResponse;
/** @author jamespedwards42 */
public class CoinbaseToken extends CoinbaseBaseResponse {
private final CoinbaseTokenInfo token;
private CoinbaseToken(
@JsonProperty("token") final CoinbaseTokenInfo token,
@JsonProperty("success") final boolean success,
@JsonProperty("errors") final List errors) {
super(success, errors);
this.token = token;
}
public String getTokenId() {
return token.getTokenId();
}
public String getAddress() {
return token.getAddress();
}
@Override
public String toString() {
return "CoinbaseToken [token=" + token + "]";
}
private static class CoinbaseTokenInfo {
private final String tokenId;
private final String address;
private CoinbaseTokenInfo(
@JsonProperty("token_id") final String tokenId,
@JsonProperty("address") final String address) {
this.tokenId = tokenId;
this.address = address;
}
private String getTokenId() {
return tokenId;
}
private String getAddress() {
return address;
}
@Override
public String toString() {
return "CoinbaseTokenInfo [tokenId=" + tokenId + ", address=" + address + "]";
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy