Skip to content

Commit b58c7e4

Browse files
committed
Add missing AddressType
1 parent fcc4e19 commit b58c7e4

4 files changed

Lines changed: 65 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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.2</version>
77+
<version>2.1.3</version>
7878
</dependency>
7979

8080

pom.xml

Lines changed: 1 addition & 1 deletion
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.2</version>
7+
<version>2.1.3</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>

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

137137
@Override

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

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,46 @@
2626
*/
2727

2828
public class Address {
29+
/**
30+
* define the type of address
31+
*/
32+
public enum AddressTypeEnum {
33+
POBOX("POBOX"),
34+
35+
STREET("STREET"),
36+
37+
DELIVERY("DELIVERY");
38+
39+
private String value;
40+
41+
AddressTypeEnum(String value) {
42+
this.value = value;
43+
}
44+
45+
@JsonValue
46+
public String getValue() {
47+
return value;
48+
}
49+
50+
@Override
51+
public String toString() {
52+
return String.valueOf(value);
53+
}
54+
55+
@JsonCreator
56+
public static AddressTypeEnum fromValue(String text) {
57+
for (AddressTypeEnum b : AddressTypeEnum.values()) {
58+
if (String.valueOf(b.value).equals(text)) {
59+
return b;
60+
}
61+
}
62+
return null;
63+
}
64+
}
65+
66+
@JsonProperty("AddressType")
67+
private AddressTypeEnum addressType = null;
68+
2969
@JsonProperty("AddressLine1")
3070
private String addressLine1 = null;
3171

@@ -53,6 +93,24 @@ public class Address {
5393
@JsonProperty("AttentionTo")
5494
private String attentionTo = null;
5595

96+
public Address addressType(AddressTypeEnum addressType) {
97+
this.addressType = addressType;
98+
return this;
99+
}
100+
101+
/**
102+
* define the type of address
103+
* @return addressType
104+
**/
105+
@ApiModelProperty(value = "define the type of address")
106+
public AddressTypeEnum getAddressType() {
107+
return addressType;
108+
}
109+
110+
public void setAddressType(AddressTypeEnum addressType) {
111+
this.addressType = addressType;
112+
}
113+
56114
public Address addressLine1(String addressLine1) {
57115
this.addressLine1 = addressLine1;
58116
return this;
@@ -225,7 +283,8 @@ public boolean equals(java.lang.Object o) {
225283
return false;
226284
}
227285
Address address = (Address) o;
228-
return Objects.equals(this.addressLine1, address.addressLine1) &&
286+
return Objects.equals(this.addressType, address.addressType) &&
287+
Objects.equals(this.addressLine1, address.addressLine1) &&
229288
Objects.equals(this.addressLine2, address.addressLine2) &&
230289
Objects.equals(this.addressLine3, address.addressLine3) &&
231290
Objects.equals(this.addressLine4, address.addressLine4) &&
@@ -238,7 +297,7 @@ public boolean equals(java.lang.Object o) {
238297

239298
@Override
240299
public int hashCode() {
241-
return Objects.hash(addressLine1, addressLine2, addressLine3, addressLine4, city, region, postalCode, country, attentionTo);
300+
return Objects.hash(addressType, addressLine1, addressLine2, addressLine3, addressLine4, city, region, postalCode, country, attentionTo);
242301
}
243302

244303

@@ -247,6 +306,7 @@ public String toString() {
247306
StringBuilder sb = new StringBuilder();
248307
sb.append("class Address {\n");
249308

309+
sb.append(" addressType: ").append(toIndentedString(addressType)).append("\n");
250310
sb.append(" addressLine1: ").append(toIndentedString(addressLine1)).append("\n");
251311
sb.append(" addressLine2: ").append(toIndentedString(addressLine2)).append("\n");
252312
sb.append(" addressLine3: ").append(toIndentedString(addressLine3)).append("\n");

0 commit comments

Comments
 (0)