Skip to content

Commit 8651e1b

Browse files
committed
Add propertyClass to Organisation endpoint
Update Organisation model Update version Fix link in README
1 parent 695ddad commit 8651e1b

3 files changed

Lines changed: 80 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ Start by deciding which type of Xero app you'll be building [Private](http://dev
6969

7070
### Add Xero-Java Dependency
7171

72-
Add the dependency to your pom.xml. Gradle, sbt and other build tools can be found on [maven central](https://search.maven.org/artifact/com.github.xeroapi/xero-java/2.1.0/jar).
72+
Add the dependency to your pom.xml. Gradle, sbt and other build tools can be found on [maven central](https://search.maven.org/search?q=g:com.github.xeroapi).
7373

7474
<dependency>
7575
<groupId>com.github.xeroapi</groupId>
7676
<artifactId>xero-java</artifactId>
77-
<version>2.1.1</version>
77+
<version>2.1.2</version>
7878
</dependency>
7979

8080

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.1]";
134+
return USER_AGENT + " " + CONSUMER_KEY + " [Xero-Java-2.1.2]";
135135
}
136136

137137
@Override

src/main/java/com/xero/models/accounting/Organisation.java

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,62 @@ public static OrganisationEntityTypeEnum fromValue(String text) {
248248
@JsonProperty("ShortCode")
249249
private String shortCode = null;
250250

251+
/**
252+
* Organisation Classes describe which plan the Xero organisation is on (e.g. DEMO, TRIAL, PREMIUM)
253+
*/
254+
public enum PropertyClassEnum {
255+
DEMO("DEMO"),
256+
257+
TRIAL("TRIAL"),
258+
259+
STARTER("STARTER"),
260+
261+
STANDARD("STANDARD"),
262+
263+
PREMIUM("PREMIUM"),
264+
265+
PREMIUM_20("PREMIUM_20"),
266+
267+
PREMIUM_50("PREMIUM_50"),
268+
269+
PREMIUM_100("PREMIUM_100"),
270+
271+
LEDGER("LEDGER"),
272+
273+
GST_CASHBOOK("GST_CASHBOOK"),
274+
275+
NON_GST_CASHBOOK("NON_GST_CASHBOOK");
276+
277+
private String value;
278+
279+
PropertyClassEnum(String value) {
280+
this.value = value;
281+
}
282+
283+
@JsonValue
284+
public String getValue() {
285+
return value;
286+
}
287+
288+
@Override
289+
public String toString() {
290+
return String.valueOf(value);
291+
}
292+
293+
@JsonCreator
294+
public static PropertyClassEnum fromValue(String text) {
295+
for (PropertyClassEnum b : PropertyClassEnum.values()) {
296+
if (String.valueOf(b.value).equals(text)) {
297+
return b;
298+
}
299+
}
300+
return null;
301+
}
302+
}
303+
304+
@JsonProperty("Class")
305+
private PropertyClassEnum propertyClass = null;
306+
251307
@JsonProperty("LineOfBusiness")
252308
private String lineOfBusiness = null;
253309

@@ -695,6 +751,24 @@ public void setShortCode(String shortCode) {
695751
this.shortCode = shortCode;
696752
}
697753

754+
public Organisation propertyClass(PropertyClassEnum propertyClass) {
755+
this.propertyClass = propertyClass;
756+
return this;
757+
}
758+
759+
/**
760+
* Organisation Classes describe which plan the Xero organisation is on (e.g. DEMO, TRIAL, PREMIUM)
761+
* @return propertyClass
762+
**/
763+
@ApiModelProperty(value = "Organisation Classes describe which plan the Xero organisation is on (e.g. DEMO, TRIAL, PREMIUM)")
764+
public PropertyClassEnum getPropertyClass() {
765+
return propertyClass;
766+
}
767+
768+
public void setPropertyClass(PropertyClassEnum propertyClass) {
769+
this.propertyClass = propertyClass;
770+
}
771+
698772
public Organisation lineOfBusiness(String lineOfBusiness) {
699773
this.lineOfBusiness = lineOfBusiness;
700774
return this;
@@ -843,6 +917,7 @@ public boolean equals(java.lang.Object o) {
843917
Objects.equals(this.timezone, organisation.timezone) &&
844918
Objects.equals(this.organisationEntityType, organisation.organisationEntityType) &&
845919
Objects.equals(this.shortCode, organisation.shortCode) &&
920+
Objects.equals(this.propertyClass, organisation.propertyClass) &&
846921
Objects.equals(this.lineOfBusiness, organisation.lineOfBusiness) &&
847922
Objects.equals(this.addresses, organisation.addresses) &&
848923
Objects.equals(this.phones, organisation.phones) &&
@@ -852,7 +927,7 @@ public boolean equals(java.lang.Object o) {
852927

853928
@Override
854929
public int hashCode() {
855-
return Objects.hash(apIKey, name, legalName, paysTax, version, organisationType, baseCurrency, countryCode, isDemoCompany, organisationStatus, registrationNumber, taxNumber, financialYearEndDay, financialYearEndMonth, salesTaxBasis, salesTaxPeriod, defaultSalesTax, defaultPurchasesTax, periodLockDate, endOfYearLockDate, createdDateUTC, timezone, organisationEntityType, shortCode, lineOfBusiness, addresses, phones, externalLinks, paymentTerms);
930+
return Objects.hash(apIKey, name, legalName, paysTax, version, organisationType, baseCurrency, countryCode, isDemoCompany, organisationStatus, registrationNumber, taxNumber, financialYearEndDay, financialYearEndMonth, salesTaxBasis, salesTaxPeriod, defaultSalesTax, defaultPurchasesTax, periodLockDate, endOfYearLockDate, createdDateUTC, timezone, organisationEntityType, shortCode, propertyClass, lineOfBusiness, addresses, phones, externalLinks, paymentTerms);
856931
}
857932

858933

@@ -885,6 +960,7 @@ public String toString() {
885960
sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n");
886961
sb.append(" organisationEntityType: ").append(toIndentedString(organisationEntityType)).append("\n");
887962
sb.append(" shortCode: ").append(toIndentedString(shortCode)).append("\n");
963+
sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n");
888964
sb.append(" lineOfBusiness: ").append(toIndentedString(lineOfBusiness)).append("\n");
889965
sb.append(" addresses: ").append(toIndentedString(addresses)).append("\n");
890966
sb.append(" phones: ").append(toIndentedString(phones)).append("\n");

0 commit comments

Comments
 (0)