Skip to content

Commit e981abf

Browse files
committed
Fix BatchPayment details on Contact
data type changed from string to object BankPaymentDetails
1 parent 2d00ece commit e981abf

5 files changed

Lines changed: 208 additions & 7 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.2.6</version>
77+
<version>2.2.7</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.2.6</version>
7+
<version>2.2.7</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
@@ -132,7 +132,7 @@ public String getAccessTokenUrl() {
132132

133133
@Override
134134
public String getUserAgent() {
135-
return USER_AGENT + " " + CONSUMER_KEY + " [Xero-Java-2.2.6]";
135+
return USER_AGENT + " " + CONSUMER_KEY + " [Xero-Java-2.2.7]";
136136
}
137137

138138
@Override
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
/*
2+
* Accounting API
3+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4+
*
5+
* OpenAPI spec version: 2.0.0
6+
* Contact: api@xero.com
7+
*
8+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9+
* https://openapi-generator.tech
10+
* Do not edit the class manually.
11+
*/
12+
13+
14+
package com.xero.models.accounting;
15+
16+
import java.util.Objects;
17+
import java.util.Arrays;
18+
import com.fasterxml.jackson.annotation.JsonProperty;
19+
import com.fasterxml.jackson.annotation.JsonCreator;
20+
import com.fasterxml.jackson.annotation.JsonValue;
21+
import io.swagger.annotations.ApiModel;
22+
import io.swagger.annotations.ApiModelProperty;
23+
24+
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
25+
26+
/**
27+
* Bank details for use on a batch payment stored with each contact
28+
*/
29+
@ApiModel(description = "Bank details for use on a batch payment stored with each contact")
30+
31+
public class BatchPaymentDetails {
32+
33+
@JsonProperty("BankAccountNumber")
34+
private String bankAccountNumber = null;
35+
36+
37+
@JsonProperty("BankAccountName")
38+
private String bankAccountName = null;
39+
40+
41+
@JsonProperty("Details")
42+
private String details = null;
43+
44+
45+
@JsonProperty("Code")
46+
private String code = null;
47+
48+
49+
@JsonProperty("Reference")
50+
private String reference = null;
51+
52+
public BatchPaymentDetails bankAccountNumber(String bankAccountNumber) {
53+
this.bankAccountNumber = bankAccountNumber;
54+
return this;
55+
}
56+
57+
/**
58+
* Bank account number for use with Batch Payments
59+
* @return bankAccountNumber
60+
**/
61+
@ApiModelProperty(example = "123-456-1111111", value = "Bank account number for use with Batch Payments")
62+
public String getBankAccountNumber() {
63+
return bankAccountNumber;
64+
}
65+
66+
public void setBankAccountNumber(String bankAccountNumber) {
67+
this.bankAccountNumber = bankAccountNumber;
68+
}
69+
70+
public BatchPaymentDetails bankAccountName(String bankAccountName) {
71+
this.bankAccountName = bankAccountName;
72+
return this;
73+
}
74+
75+
/**
76+
* Name of bank for use with Batch Payments
77+
* @return bankAccountName
78+
**/
79+
@ApiModelProperty(example = "ACME Bank", value = "Name of bank for use with Batch Payments")
80+
public String getBankAccountName() {
81+
return bankAccountName;
82+
}
83+
84+
public void setBankAccountName(String bankAccountName) {
85+
this.bankAccountName = bankAccountName;
86+
}
87+
88+
public BatchPaymentDetails details(String details) {
89+
this.details = details;
90+
return this;
91+
}
92+
93+
/**
94+
* (Non-NZ Only) These details are sent to the org’s bank as a reference for the batch payment transaction. They will also show with the batch payment transaction in the bank reconciliation Find &amp; Match screen. Depending on your individual bank, the detail may also show on the bank statement imported into Xero. Maximum field length &#x3D; 18
95+
* @return details
96+
**/
97+
@ApiModelProperty(example = "Hello World", value = "(Non-NZ Only) These details are sent to the org’s bank as a reference for the batch payment transaction. They will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement imported into Xero. Maximum field length = 18")
98+
public String getDetails() {
99+
return details;
100+
}
101+
102+
public void setDetails(String details) {
103+
this.details = details;
104+
}
105+
106+
public BatchPaymentDetails code(String code) {
107+
this.code = code;
108+
return this;
109+
}
110+
111+
/**
112+
* (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find &amp; Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
113+
* @return code
114+
**/
115+
@ApiModelProperty(example = "ABC", value = "(NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.")
116+
public String getCode() {
117+
return code;
118+
}
119+
120+
public void setCode(String code) {
121+
this.code = code;
122+
}
123+
124+
public BatchPaymentDetails reference(String reference) {
125+
this.reference = reference;
126+
return this;
127+
}
128+
129+
/**
130+
* (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find &amp; Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
131+
* @return reference
132+
**/
133+
@ApiModelProperty(example = "Foobar", value = "(NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.")
134+
public String getReference() {
135+
return reference;
136+
}
137+
138+
public void setReference(String reference) {
139+
this.reference = reference;
140+
}
141+
142+
143+
@Override
144+
public boolean equals(java.lang.Object o) {
145+
if (this == o) {
146+
return true;
147+
}
148+
if (o == null || getClass() != o.getClass()) {
149+
return false;
150+
}
151+
BatchPaymentDetails batchPaymentDetails = (BatchPaymentDetails) o;
152+
return Objects.equals(this.bankAccountNumber, batchPaymentDetails.bankAccountNumber) &&
153+
Objects.equals(this.bankAccountName, batchPaymentDetails.bankAccountName) &&
154+
Objects.equals(this.details, batchPaymentDetails.details) &&
155+
Objects.equals(this.code, batchPaymentDetails.code) &&
156+
Objects.equals(this.reference, batchPaymentDetails.reference);
157+
}
158+
159+
@Override
160+
public int hashCode() {
161+
return Objects.hash(bankAccountNumber, bankAccountName, details, code, reference);
162+
}
163+
164+
165+
@Override
166+
public String toString() {
167+
StringBuilder sb = new StringBuilder();
168+
sb.append("class BatchPaymentDetails {\n");
169+
170+
sb.append(" bankAccountNumber: ").append(toIndentedString(bankAccountNumber)).append("\n");
171+
sb.append(" bankAccountName: ").append(toIndentedString(bankAccountName)).append("\n");
172+
sb.append(" details: ").append(toIndentedString(details)).append("\n");
173+
sb.append(" code: ").append(toIndentedString(code)).append("\n");
174+
sb.append(" reference: ").append(toIndentedString(reference)).append("\n");
175+
sb.append("}");
176+
return sb.toString();
177+
}
178+
179+
/**
180+
* Convert the given object to string with each line indented by 4 spaces
181+
* (except the first line).
182+
*/
183+
private String toIndentedString(java.lang.Object o) {
184+
if (o == null) {
185+
return "null";
186+
}
187+
return o.toString().replace("\n", "\n ");
188+
}
189+
190+
}
191+

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import com.fasterxml.jackson.annotation.JsonValue;
2121
import com.xero.models.accounting.Address;
2222
import com.xero.models.accounting.Balances;
23+
import com.xero.models.accounting.BatchPaymentDetails;
2324
import com.xero.models.accounting.BrandingTheme;
2425
import com.xero.models.accounting.ContactGroup;
2526
import com.xero.models.accounting.ContactPerson;
@@ -206,7 +207,7 @@ public static ContactStatusEnum fromValue(String text) {
206207

207208

208209
@JsonProperty("BatchPayments")
209-
private String batchPayments = null;
210+
private BatchPaymentDetails batchPayments = null;
210211

211212

212213
@JsonProperty("Discount")
@@ -812,15 +813,24 @@ public void setBrandingTheme(BrandingTheme brandingTheme) {
812813
this.brandingTheme = brandingTheme;
813814
}
814815

816+
public Contact batchPayments(BatchPaymentDetails batchPayments) {
817+
this.batchPayments = batchPayments;
818+
return this;
819+
}
820+
815821
/**
816-
* batch payment details for contact (read only)
822+
* Get batchPayments
817823
* @return batchPayments
818824
**/
819-
@ApiModelProperty(value = "batch payment details for contact (read only)")
820-
public String getBatchPayments() {
825+
@ApiModelProperty(value = "")
826+
public BatchPaymentDetails getBatchPayments() {
821827
return batchPayments;
822828
}
823829

830+
public void setBatchPayments(BatchPaymentDetails batchPayments) {
831+
this.batchPayments = batchPayments;
832+
}
833+
824834
/**
825835
* The default discount rate for the contact (read only)
826836
* @return discount

0 commit comments

Comments
 (0)