This commit is contained in:
Nicolás Sánchez 2025-03-11 14:43:39 -03:00
parent 7e41c48337
commit 6963e31dc8
2 changed files with 9 additions and 7 deletions

View File

@ -66,8 +66,8 @@ public class EarnerInterface {
jsonEarner.get("minimum_amount_in_trading_account").getAsDouble(),
jsonEarner.get("time_between_subscriptions").getAsDouble(),
jsonEarner.get("time_between_redemptions").getAsDouble(),
jsonEarner.get("last_subscription").getAsDouble(),
jsonEarner.get("last_redemption").getAsDouble()
jsonEarner.get("last_subscription").getAsJsonObject(),
jsonEarner.get("last_redemption").getAsJsonObject()
));
}
}

View File

@ -1,5 +1,7 @@
package com.example.dcav2gui.ui.earners;
import com.google.gson.JsonObject;
public class EarnerData {
private final String brokerName;
private final double tradingBalance;
@ -10,11 +12,11 @@ public class EarnerData {
private final double minimumAmountInTradingAccount;
private final double timeBetweenSubscriptions;
private final double timeBetweenRedemptions;
private final double lastSubscription;
private final double lastRedemption;
private final JsonObject lastSubscription;
private final JsonObject lastRedemption;
public EarnerData(String brokerName, double tradingBalance, double earningBalance, boolean isPaused, double stepSize, double percentage, double minimumAmountInTradingAccount,
double timeBetweenSubscriptions, double timeBetweenRedemptions, double lastSubscription, double lastRedemption) {
double timeBetweenSubscriptions, double timeBetweenRedemptions, JsonObject lastSubscription, JsonObject lastRedemption) {
this.brokerName = brokerName;
this.tradingBalance = tradingBalance;
this.earningBalance = earningBalance;
@ -37,7 +39,7 @@ public class EarnerData {
public double getMinimumAmountInTradingAccount() {return minimumAmountInTradingAccount;}
public double getTimeBetweenSubscriptions() {return timeBetweenSubscriptions;}
public double getTimeBetweenRedemptions() {return timeBetweenRedemptions;}
public double getLastSubscription() {return lastSubscription;}
public double getLastRedemption() {return lastRedemption;}
public JsonObject getLastSubscription() {return lastSubscription;}
public JsonObject getLastRedemption() {return lastRedemption;}
}