Skip to content

Commit 833f6a0

Browse files
committed
Auto-generated v20 API changes
1 parent 7e7ca58 commit 833f6a0

File tree

62 files changed

+787
-222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+787
-222
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ section in the pom.xml file as follows:
1818
<dependency>
1919
<groupId>com.oanda.v20</groupId>
2020
<artifactId>v20</artifactId>
21-
<version>3.0.24</version>
21+
<version>3.0.25</version>
2222
</dependency>
2323
</dependencies>
2424
```
@@ -75,7 +75,7 @@ library:
7575

7676
- Group Id: `com.oanda.v20`
7777
- Artifact Id: `v20`
78-
- Version: `3.0.24`
78+
- Version: `3.0.25`
7979

8080
Click "OK" to complete adding the v20 library.
8181

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>com.oanda.v20</groupId>
44
<artifactId>v20</artifactId>
5-
<version>3.0.24</version>
5+
<version>3.0.25</version>
66

77
<packaging>jar</packaging>
88

@@ -41,7 +41,7 @@
4141
<scm>
4242
<connection>https://github.com/oanda/v20-java.git</connection>
4343
<developerConnection>https://github.com/oanda/v20-java.git</developerConnection>
44-
<tag>3.0.24</tag>
44+
<tag>3.0.25</tag>
4545
<url>https://github.com/oanda/v20-java</url>
4646
</scm>
4747

src/com/oanda/v20/Context.java

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,30 @@
2424
import com.google.gson.GsonBuilder;
2525
import com.google.gson.JsonSyntaxException;
2626

27-
import com.oanda.v20.account.AccountContext;
28-
import com.oanda.v20.order.OrderContext;
29-
import com.oanda.v20.order.Order;
30-
import com.oanda.v20.order.OrderAdapter;
27+
import com.oanda.v20.instrument.InstrumentContext;
3128
import com.oanda.v20.position.PositionContext;
32-
import com.oanda.v20.user.UserContext;
29+
import com.oanda.v20.trade.TradeContext;
30+
import com.oanda.v20.account.AccountContext;
3331
import com.oanda.v20.transaction.TransactionContext;
3432
import com.oanda.v20.transaction.Transaction;
3533
import com.oanda.v20.transaction.TransactionAdapter;
34+
import com.oanda.v20.user.UserContext;
3635
import com.oanda.v20.pricing.PricingContext;
37-
import com.oanda.v20.trade.TradeContext;
38-
import com.oanda.v20.instrument.InstrumentContext;
39-
import com.oanda.v20.primitives.NullableType;
36+
import com.oanda.v20.order.OrderContext;
37+
import com.oanda.v20.order.Order;
38+
import com.oanda.v20.order.OrderAdapter;
39+
import com.oanda.v20.primitives.NullableTypeAdapterFactory;
4040
import com.oanda.v20.primitives.AcceptDatetimeFormat;
4141

4242
public class Context {
43-
public AccountContext account;
44-
public OrderContext order;
43+
public InstrumentContext instrument;
4544
public PositionContext position;
46-
public UserContext user;
45+
public TradeContext trade;
46+
public AccountContext account;
4747
public TransactionContext transaction;
48+
public UserContext user;
4849
public PricingContext pricing;
49-
public TradeContext trade;
50-
public InstrumentContext instrument;
50+
public OrderContext order;
5151

5252
protected Gson gson;
5353

@@ -95,7 +95,7 @@ public Context(
9595
}
9696

9797
String oandaAgent = new String(
98-
"v20-java/3.0.24" + extensions
98+
"v20-java/3.0.25" + extensions
9999
);
100100

101101
this.headers.put("Content-Type", "application/json");
@@ -104,19 +104,33 @@ public Context(
104104

105105
this.gson = new GsonBuilder()
106106
.setPrettyPrinting()
107-
.registerTypeAdapter(Order.class, new OrderAdapter())
108107
.registerTypeAdapter(Transaction.class, new TransactionAdapter())
109-
.registerTypeAdapterFactory(new NullableType.NullableTypeAdapterFactory())
108+
.registerTypeAdapter(Order.class, new OrderAdapter())
109+
.registerTypeAdapterFactory(
110+
new NullableTypeAdapterFactory<com.oanda.v20.transaction.TakeProfitDetails>(
111+
com.oanda.v20.transaction.TakeProfitDetails.class
112+
)
113+
)
114+
.registerTypeAdapterFactory(
115+
new NullableTypeAdapterFactory<com.oanda.v20.transaction.StopLossDetails>(
116+
com.oanda.v20.transaction.StopLossDetails.class
117+
)
118+
)
119+
.registerTypeAdapterFactory(
120+
new NullableTypeAdapterFactory<com.oanda.v20.transaction.TrailingStopLossDetails>(
121+
com.oanda.v20.transaction.TrailingStopLossDetails.class
122+
)
123+
)
110124
.create();
111125

112-
this.account = new AccountContext(this);
113-
this.order = new OrderContext(this);
126+
this.instrument = new InstrumentContext(this);
114127
this.position = new PositionContext(this);
115-
this.user = new UserContext(this);
128+
this.trade = new TradeContext(this);
129+
this.account = new AccountContext(this);
116130
this.transaction = new TransactionContext(this);
131+
this.user = new UserContext(this);
117132
this.pricing = new PricingContext(this);
118-
this.trade = new TradeContext(this);
119-
this.instrument = new InstrumentContext(this);
133+
this.order = new OrderContext(this);
120134
}
121135

122136
/**

src/com/oanda/v20/ExecuteException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
public class ExecuteException extends Exception {
44

5-
private static final long serialVersionUID = 7594856474065153336L;
5+
private static final long serialVersionUID = -9108619579059959148L;
66

77
public ExecuteException(Throwable cause) {
88
super(cause);

src/com/oanda/v20/RequestException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
public class RequestException extends Exception {
66

7-
private static final long serialVersionUID = -312816903998781226L;
7+
private static final long serialVersionUID = 5034421099988970354L;
88

99
protected int status;
1010

src/com/oanda/v20/account/Account.java

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package com.oanda.v20.account;
22

3+
import java.util.ArrayList;
34
import java.util.Collection;
4-
import java.util.List;
55
import java.math.BigDecimal;
6-
import java.util.ArrayList;
6+
import java.util.List;
77

88
import com.google.gson.annotations.SerializedName;
99

@@ -75,6 +75,7 @@ public Account(Account other) {
7575
{
7676
this.hedgingEnabled = new Boolean(other.hedgingEnabled);
7777
}
78+
this.lastOrderFillTimestamp = other.lastOrderFillTimestamp;
7879
this.unrealizedPL = other.unrealizedPL;
7980
this.nAV = other.nAV;
8081
this.marginUsed = other.marginUsed;
@@ -1069,6 +1070,48 @@ public Account setHedgingEnabled(Boolean hedgingEnabled) {
10691070
return this;
10701071
}
10711072

1073+
@SerializedName("lastOrderFillTimestamp") private DateTime lastOrderFillTimestamp;
1074+
1075+
/**
1076+
* Get the Last Order Fill timestamp.
1077+
* <p>
1078+
* The date/time of the last order that was filled for this account.
1079+
* <p>
1080+
* @return the Last Order Fill timestamp.
1081+
* @see DateTime
1082+
*/
1083+
public DateTime getLastOrderFillTimestamp() {
1084+
return this.lastOrderFillTimestamp;
1085+
}
1086+
1087+
/**
1088+
* Set the Last Order Fill timestamp.
1089+
* <p>
1090+
* The date/time of the last order that was filled for this account.
1091+
* <p>
1092+
* @param lastOrderFillTimestamp the Last Order Fill timestamp. as a
1093+
* DateTime
1094+
* @return {@link Account Account}
1095+
* @see DateTime
1096+
*/
1097+
public Account setLastOrderFillTimestamp(DateTime lastOrderFillTimestamp) {
1098+
this.lastOrderFillTimestamp = lastOrderFillTimestamp;
1099+
return this;
1100+
}
1101+
/**
1102+
* Set the Last Order Fill timestamp.
1103+
* <p>
1104+
* The date/time of the last order that was filled for this account.
1105+
* <p>
1106+
* @param lastOrderFillTimestamp the Last Order Fill timestamp. as a String
1107+
* @return {@link Account Account}
1108+
* @see DateTime
1109+
*/
1110+
public Account setLastOrderFillTimestamp(String lastOrderFillTimestamp) {
1111+
this.lastOrderFillTimestamp = new DateTime(lastOrderFillTimestamp);
1112+
return this;
1113+
}
1114+
10721115
@SerializedName("unrealizedPL") private AccountUnits unrealizedPL;
10731116

10741117
/**
@@ -2192,6 +2235,8 @@ public String toString() {
21922235
(pendingOrderCount == null ? "null" : pendingOrderCount.toString()) + ", " +
21932236
"hedgingEnabled=" +
21942237
(hedgingEnabled == null ? "null" : hedgingEnabled.toString()) + ", " +
2238+
"lastOrderFillTimestamp=" +
2239+
(lastOrderFillTimestamp == null ? "null" : lastOrderFillTimestamp.toString()) + ", " +
21952240
"unrealizedPL=" +
21962241
(unrealizedPL == null ? "null" : unrealizedPL.toString()) + ", " +
21972242
"NAV=" +

src/com/oanda/v20/account/AccountChanges.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.oanda.v20.account;
22

3-
import java.util.Collection;
4-
import java.util.List;
53
import java.util.ArrayList;
4+
import java.util.List;
5+
import java.util.Collection;
66

77
import com.google.gson.annotations.SerializedName;
88

src/com/oanda/v20/account/AccountChangesState.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package com.oanda.v20.account;
22

3+
import java.util.ArrayList;
34
import java.util.Collection;
4-
import java.util.List;
55
import java.math.BigDecimal;
6-
import java.util.ArrayList;
6+
import java.util.List;
77

88
import com.google.gson.annotations.SerializedName;
99

src/com/oanda/v20/account/AccountConfigure400RequestException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
public class AccountConfigure400RequestException extends RequestException {
1313

14-
private static final long serialVersionUID = 7162555077094829904L;
14+
private static final long serialVersionUID = -6799520103822227394L;
1515

1616
/**
1717
* AccountConfigure400RequestException Constructor

src/com/oanda/v20/account/AccountConfigure403RequestException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
public class AccountConfigure403RequestException extends RequestException {
1313

14-
private static final long serialVersionUID = 805928918983216675L;
14+
private static final long serialVersionUID = -6940302184740441977L;
1515

1616
/**
1717
* AccountConfigure403RequestException Constructor

0 commit comments

Comments
 (0)