Skip to content

Commit

Permalink
fixed forgemo#4 - Models now have toString for easier logging purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
jansoren committed Jul 30, 2018
1 parent 1615aab commit a8d6d28
Show file tree
Hide file tree
Showing 17 changed files with 233 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>de.elbatya.cryptocoins</groupId>
<artifactId>bittrex-client</artifactId>
<version>2.0</version>
<version>2.0.1-SNAPSHOT</version>

<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,17 @@ public String getUuid() {
public void setUuid(String uuid) {
this.uuid = uuid;
}

@Override
public String toString() {
return "Balance{" +
"currency='" + currency + '\'' +
", balance=" + balance +
", available=" + available +
", pending=" + pending +
", cryptoAddress='" + cryptoAddress + '\'' +
", requested=" + requested +
", uuid='" + uuid + '\'' +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,12 @@ public String getAddress() {
public void setAddress(String address) {
this.address = address;
}

@Override
public String toString() {
return "DepositAddress{" +
"currency='" + currency + '\'' +
", address='" + address + '\'' +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,24 @@ public Boolean getIsInvalidAddress() {
public void setIsInvalidAddress(Boolean invalidAddress) {
this.invalidAddress = invalidAddress;
}

@Override
public String toString() {
return "DepositHistoryEntry{" +
"id='" + id + '\'' +
", confirmations=" + confirmations +
", lastUpdated=" + lastUpdated +
", paymentUuid='" + paymentUuid + '\'' +
", currency='" + currency + '\'' +
", amount=" + amount +
", cryptoAddress='" + cryptoAddress + '\'' +
", opened=" + opened +
", authorized=" + authorized +
", pendingPayment=" + pendingPayment +
", txCost=" + txCost +
", txId='" + txId + '\'' +
", canceled=" + canceled +
", invalidAddress=" + invalidAddress +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,33 @@ public String getConditionTarget() {
public void setConditionTarget(String conditionTarget) {
this.conditionTarget = conditionTarget;
}

@Override
public String toString() {
return "Order{" +
"accountId='" + accountId + '\'' +
", orderUuid='" + orderUuid + '\'' +
", exchange='" + exchange + '\'' +
", type='" + type + '\'' +
", quantity=" + quantity +
", quantityRemaining=" + quantityRemaining +
", limit=" + limit +
", reserved=" + reserved +
", reserveRemaining=" + reserveRemaining +
", commissionReserved=" + commissionReserved +
", commissionReserveRemaining=" + commissionReserveRemaining +
", commissionPaid=" + commissionPaid +
", price=" + price +
", pricePerUnit=" + pricePerUnit +
", opened=" + opened +
", closed=" + closed +
", isOpen=" + isOpen +
", sentinel='" + sentinel + '\'' +
", cancelInitiated=" + cancelInitiated +
", immediateOrCancel=" + immediateOrCancel +
", isConditional=" + isConditional +
", condition='" + condition + '\'' +
", conditionTarget='" + conditionTarget + '\'' +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,25 @@ public LocalDateTime getClosed() {
public void setClosed(LocalDateTime closed) {
this.closed = closed;
}

@Override
public String toString() {
return "OrderHistoryEntry{" +
"orderUuid='" + orderUuid + '\'' +
", exchange='" + exchange + '\'' +
", timeStamp=" + timeStamp +
", orderType='" + orderType + '\'' +
", limit=" + limit +
", quantity=" + quantity +
", quantityRemaining=" + quantityRemaining +
", commission=" + commission +
", price=" + price +
", pricePerUnit=" + pricePerUnit +
", isConditional=" + isConditional +
", condition='" + condition + '\'' +
", conditionTarget='" + conditionTarget + '\'' +
", immediateOrCancel=" + immediateOrCancel +
", closed=" + closed +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,21 @@ public Boolean getInvalidAddress() {
public void setInvalidAddress(Boolean invalidAddress) {
this.invalidAddress = invalidAddress;
}

@Override
public String toString() {
return "WithdrawalHistoryEntry{" +
"paymentUuid='" + paymentUuid + '\'' +
", currency='" + currency + '\'' +
", amount='" + amount + '\'' +
", address='" + address + '\'' +
", opened=" + opened +
", authorized=" + authorized +
", pendingPayment=" + pendingPayment +
", txCost=" + txCost +
", txId='" + txId + '\'' +
", canceled=" + canceled +
", invalidAddress=" + invalidAddress +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,11 @@ public String getUuid() {
public void setUuid(String uuid) {
this.uuid = uuid;
}

@Override
public String toString() {
return "WithdrawalRequested{" +
"uuid='" + uuid + '\'' +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,27 @@ public String getConditionTarget() {
public void setConditionTarget(String conditionTarget) {
this.conditionTarget = conditionTarget;
}

@Override
public String toString() {
return "OpenOrder{" +
"uuid='" + uuid + '\'' +
", orderUuid='" + orderUuid + '\'' +
", exchange='" + exchange + '\'' +
", orderType='" + orderType + '\'' +
", quantity=" + quantity +
", quantityRemaining=" + quantityRemaining +
", limit=" + limit +
", commissionPaid=" + commissionPaid +
", price=" + price +
", pricePerUnit=" + pricePerUnit +
", opened=" + opened +
", closed=" + closed +
", cancelInitiated=" + cancelInitiated +
", immediateOrCancel=" + immediateOrCancel +
", isConditional=" + isConditional +
", condition='" + condition + '\'' +
", conditionTarget='" + conditionTarget + '\'' +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,11 @@ public String getUuid() {
public void setUuid(String uuid) {
this.uuid = uuid;
}

@Override
public String toString() {
return "OrderCreated{" +
"uuid='" + uuid + '\'' +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,17 @@ public void setNotice(String notice) {
this.notice = notice;
}


@Override
public String toString() {
return "Currency{" +
"currency='" + currency + '\'' +
", currencyLong='" + currencyLong + '\'' +
", minConfirmation=" + minConfirmation +
", txFee=" + txFee +
", isActive=" + isActive +
", coinType='" + coinType + '\'' +
", baseAddress='" + baseAddress + '\'' +
", notice='" + notice + '\'' +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,21 @@ public String getLogoUrl() {
public void setLogoUrl(String logoUrl) {
this.logoUrl = logoUrl;
}

@Override
public String toString() {
return "Market{" +
"marketCurrency='" + marketCurrency + '\'' +
", marketCurrencyLong='" + marketCurrencyLong + '\'' +
", baseCurrency='" + baseCurrency + '\'' +
", baseCurrencyLong='" + baseCurrencyLong + '\'' +
", minTradeSize=" + minTradeSize +
", marketName='" + marketName + '\'' +
", isActive=" + isActive +
", created=" + created +
", notice='" + notice + '\'' +
", isSponsored=" + isSponsored +
", logoUrl='" + logoUrl + '\'' +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,17 @@ public String getOrderType() {
public void setOrderType(String orderType) {
this.orderType = orderType;
}

@Override
public String toString() {
return "MarketHistoryEntry{" +
"id=" + id +
", timeStamp=" + timeStamp +
", quantity=" + quantity +
", price=" + price +
", total=" + total +
", fillType='" + fillType + '\'' +
", orderType='" + orderType + '\'' +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,23 @@ public LocalDateTime getCreated() {
public void setCreated(LocalDateTime created) {
this.created = created;
}

@Override
public String toString() {
return "MarketSummary{" +
"marketName='" + marketName + '\'' +
", high=" + high +
", low=" + low +
", volume=" + volume +
", last=" + last +
", baseVolume=" + baseVolume +
", timeStamp=" + timeStamp +
", bid=" + bid +
", ask=" + ask +
", openBuyOrders=" + openBuyOrders +
", openSellOrders=" + openSellOrders +
", prevDay=" + prevDay +
", created=" + created +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,12 @@ public List<OrderBookEntry> getSell() {
public void setSell(List<OrderBookEntry> sell) {
this.sell = sell;
}

@Override
public String toString() {
return "OrderBook{" +
"buy=" + buy +
", sell=" + sell +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,12 @@ public BigDecimal getRate() {
public void setRate(BigDecimal rate) {
Rate = rate;
}

@Override
public String toString() {
return "OrderBookEntry{" +
"Quantity=" + Quantity +
", Rate=" + Rate +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,13 @@ public BigDecimal getLast() {
public void setLast(BigDecimal last) {
this.last = last;
}

@Override
public String toString() {
return "Ticker{" +
"bid=" + bid +
", ask=" + ask +
", last=" + last +
'}';
}
}

0 comments on commit a8d6d28

Please sign in to comment.