Skip to content

Commit

Permalink
update bank feeds api
Browse files Browse the repository at this point in the history
Add error types to statement errors
change old schema dependency from github to maven central
  • Loading branch information
SidneyAllen committed Nov 24, 2018
1 parent d2cdcb2 commit 695ddad
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 19 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ We've made some big changes to our Java SDK with version 2.0. All code examples

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.

Our XSD schema files will also be deprecated in favor of OpenAPI spec 3.0 files now available on Github.
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).

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.

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


Expand Down
22 changes: 6 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.github.xeroapi</groupId>
<artifactId>xero-java</artifactId>
<packaging>jar</packaging>
<version>2.1.0</version>
<version>2.1.1</version>
<name>Xero-Java SDK</name>
<description>This is the official Java SDK for Xero API</description>
<url>https://github.com/XeroAPI/Xero-Java</url>
Expand Down Expand Up @@ -38,6 +38,11 @@
<url>http://github.com/XeroAPI/Xero-Java/tree/master</url>
</scm>
<dependencies>
<dependency>
<groupId>com.github.xeroapi</groupId>
<artifactId>xeroapi-schemas</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client</artifactId>
Expand All @@ -53,11 +58,6 @@
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>com.xero</groupId>
<artifactId>xero-accounting-api-schema</artifactId>
<version>0.1.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
Expand Down Expand Up @@ -135,16 +135,6 @@
<version>${jersey-common-version}</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>xero-accounting-api-schema-mvn-repo</id>
<url>https://raw.github.com/XeroAPI/XeroAPI-Schemas/mvn-repo/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<build>
<finalName>Xero-Java-SDK</finalName>
<plugins>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/xero/api/JsonConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public String getAccessTokenUrl() {

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

@Override
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/xero/api/client/BankFeedsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ public FeedConnections createFeedConnections(FeedConnections feedConnections) th
* <p><b>403</b> - Invalid application or feed connection
* <p><b>409</b> - Duplicate statement received
* <p><b>413</b> - Statement exceeds size limit
* <p><b>422</b> - Unprocessable Entity
* <p><b>500</b> - Intermittent Xero Error
* @param statements Feed Connection(s) to add
* @return Statements
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/com/xero/models/bankfeeds/Error.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ public enum TypeEnum {

DUPLICATE_STATEMENT("duplicate-statement"),

INVALID_END_BALANCE("invalid-end-balance"),

INVALID_START_AND_END_DATE("invalid-start-and-end-date"),

INVALID_START_DATE("invalid-start-date"),

INTERNAL_ERROR("internal-error");

private String value;
Expand Down

0 comments on commit 695ddad

Please sign in to comment.