Skip to content

Commit 695ddad

Browse files
committed
update bank feeds api
Add error types to statement errors change old schema dependency from github to maven central
1 parent d2cdcb2 commit 695ddad

5 files changed

Lines changed: 16 additions & 19 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ We've made some big changes to our Java SDK with version 2.0. All code examples
1010

1111
2.0 implements requests and responses for accounting API endpoints using JSON only. Don't worry we won't be removing any of the existing methods for XML, but will mark them as deprecated in favor of JSON.
1212

13-
Our XSD schema files will also be deprecated in favor of OpenAPI spec 3.0 files now available on Github.
13+
Our XSD schema files will also be deprecated in favor of [OpenAPI spec 3.0 files now available on Github](https://github.com/XeroAPI/Xero-OpenAPI).
1414

1515
Lastly, our trusty XeroClient class that holds methods for interacting with each endpoint will be deprecated in favor of clients for each major API group at Xero. See below.
1616

@@ -74,7 +74,7 @@ Add the dependency to your pom.xml. Gradle, sbt and other build tools can be fo
7474
<dependency>
7575
<groupId>com.github.xeroapi</groupId>
7676
<artifactId>xero-java</artifactId>
77-
<version>2.1.0</version>
77+
<version>2.1.1</version>
7878
</dependency>
7979

8080

pom.xml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.github.xeroapi</groupId>
55
<artifactId>xero-java</artifactId>
66
<packaging>jar</packaging>
7-
<version>2.1.0</version>
7+
<version>2.1.1</version>
88
<name>Xero-Java SDK</name>
99
<description>This is the official Java SDK for Xero API</description>
1010
<url>https://github.com/XeroAPI/Xero-Java</url>
@@ -38,6 +38,11 @@
3838
<url>http://github.com/XeroAPI/Xero-Java/tree/master</url>
3939
</scm>
4040
<dependencies>
41+
<dependency>
42+
<groupId>com.github.xeroapi</groupId>
43+
<artifactId>xeroapi-schemas</artifactId>
44+
<version>1.0.0</version>
45+
</dependency>
4146
<dependency>
4247
<groupId>com.google.api-client</groupId>
4348
<artifactId>google-api-client</artifactId>
@@ -53,11 +58,6 @@
5358
<artifactId>commons-io</artifactId>
5459
<version>2.5</version>
5560
</dependency>
56-
<dependency>
57-
<groupId>com.xero</groupId>
58-
<artifactId>xero-accounting-api-schema</artifactId>
59-
<version>0.1.2</version>
60-
</dependency>
6161
<dependency>
6262
<groupId>javax.servlet</groupId>
6363
<artifactId>javax.servlet-api</artifactId>
@@ -135,16 +135,6 @@
135135
<version>${jersey-common-version}</version>
136136
</dependency>
137137
</dependencies>
138-
<repositories>
139-
<repository>
140-
<id>xero-accounting-api-schema-mvn-repo</id>
141-
<url>https://raw.github.com/XeroAPI/XeroAPI-Schemas/mvn-repo/</url>
142-
<snapshots>
143-
<enabled>true</enabled>
144-
<updatePolicy>always</updatePolicy>
145-
</snapshots>
146-
</repository>
147-
</repositories>
148138
<build>
149139
<finalName>Xero-Java-SDK</finalName>
150140
<plugins>

src/main/java/com/xero/api/JsonConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public String getAccessTokenUrl() {
131131

132132
@Override
133133
public String getUserAgent() {
134-
return USER_AGENT + " " + CONSUMER_KEY + " [Xero-Java-2.1.0]";
134+
return USER_AGENT + " " + CONSUMER_KEY + " [Xero-Java-2.1.1]";
135135
}
136136

137137
@Override

src/main/java/com/xero/api/client/BankFeedsApi.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ public FeedConnections createFeedConnections(FeedConnections feedConnections) th
241241
* <p><b>403</b> - Invalid application or feed connection
242242
* <p><b>409</b> - Duplicate statement received
243243
* <p><b>413</b> - Statement exceeds size limit
244+
* <p><b>422</b> - Unprocessable Entity
244245
* <p><b>500</b> - Intermittent Xero Error
245246
* @param statements Feed Connection(s) to add
246247
* @return Statements

src/main/java/com/xero/models/bankfeeds/Error.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ public enum TypeEnum {
4848

4949
DUPLICATE_STATEMENT("duplicate-statement"),
5050

51+
INVALID_END_BALANCE("invalid-end-balance"),
52+
53+
INVALID_START_AND_END_DATE("invalid-start-and-end-date"),
54+
55+
INVALID_START_DATE("invalid-start-date"),
56+
5157
INTERNAL_ERROR("internal-error");
5258

5359
private String value;

0 commit comments

Comments
 (0)