Skip to content

Commit 6ce48b5

Browse files
committed
Add missing Payment property on Credti Note Object
1 parent d7d7086 commit 6ce48b5

4 files changed

Lines changed: 37 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Add the dependency to your pom.xml. Gradle, sbt and other build tools can be fo
7979
<dependency>
8080
<groupId>com.github.xeroapi</groupId>
8181
<artifactId>xero-java</artifactId>
82-
<version>2.2.15</version>
82+
<version>2.2.16</version>
8383
</dependency>
8484

8585

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.15</version>
7+
<version>2.2.16</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
@@ -15,7 +15,7 @@
1515

1616
public class JsonConfig implements Config {
1717

18-
private String SDK_VERSION = "2.2.15";
18+
private String SDK_VERSION = "2.2.16";
1919
private String APP_TYPE = "Public";
2020
private String USER_AGENT = "Xero-Java-SDK";
2121
private String ACCEPT = "application/xml";

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

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import com.xero.models.accounting.CurrencyCode;
2424
import com.xero.models.accounting.LineAmountTypes;
2525
import com.xero.models.accounting.LineItem;
26+
import com.xero.models.accounting.Payment;
2627
import io.swagger.annotations.ApiModel;
2728
import io.swagger.annotations.ApiModelProperty;
2829
import java.util.ArrayList;
@@ -193,6 +194,10 @@ public static StatusEnum fromValue(String text) {
193194
private List<Allocation> allocations = null;
194195

195196

197+
@JsonProperty("Payments")
198+
private List<Payment> payments = null;
199+
200+
196201
@JsonProperty("BrandingThemeID")
197202
private UUID brandingThemeID;
198203

@@ -549,6 +554,32 @@ public void setAllocations(List<Allocation> allocations) {
549554
this.allocations = allocations;
550555
}
551556

557+
public CreditNote payments(List<Payment> payments) {
558+
this.payments = payments;
559+
return this;
560+
}
561+
562+
public CreditNote addPaymentsItem(Payment paymentsItem) {
563+
if (this.payments == null) {
564+
this.payments = new ArrayList<Payment>();
565+
}
566+
this.payments.add(paymentsItem);
567+
return this;
568+
}
569+
570+
/**
571+
* See Payments
572+
* @return payments
573+
**/
574+
@ApiModelProperty(value = "See Payments")
575+
public List<Payment> getPayments() {
576+
return payments;
577+
}
578+
579+
public void setPayments(List<Payment> payments) {
580+
this.payments = payments;
581+
}
582+
552583
public CreditNote brandingThemeID(UUID brandingThemeID) {
553584
this.brandingThemeID = brandingThemeID;
554585
return this;
@@ -614,13 +645,14 @@ public boolean equals(java.lang.Object o) {
614645
Objects.equals(this.currencyRate, creditNote.currencyRate) &&
615646
Objects.equals(this.remainingCredit, creditNote.remainingCredit) &&
616647
Objects.equals(this.allocations, creditNote.allocations) &&
648+
Objects.equals(this.payments, creditNote.payments) &&
617649
Objects.equals(this.brandingThemeID, creditNote.brandingThemeID) &&
618650
Objects.equals(this.hasAttachments, creditNote.hasAttachments);
619651
}
620652

621653
@Override
622654
public int hashCode() {
623-
return Objects.hash(type, contact, date, status, lineAmountTypes, lineItems, subTotal, totalTax, total, updatedDateUTC, currencyCode, fullyPaidOnDate, creditNoteID, creditNoteNumber, reference, sentToContact, currencyRate, remainingCredit, allocations, brandingThemeID, hasAttachments);
655+
return Objects.hash(type, contact, date, status, lineAmountTypes, lineItems, subTotal, totalTax, total, updatedDateUTC, currencyCode, fullyPaidOnDate, creditNoteID, creditNoteNumber, reference, sentToContact, currencyRate, remainingCredit, allocations, payments, brandingThemeID, hasAttachments);
624656
}
625657

626658

@@ -648,6 +680,7 @@ public String toString() {
648680
sb.append(" currencyRate: ").append(toIndentedString(currencyRate)).append("\n");
649681
sb.append(" remainingCredit: ").append(toIndentedString(remainingCredit)).append("\n");
650682
sb.append(" allocations: ").append(toIndentedString(allocations)).append("\n");
683+
sb.append(" payments: ").append(toIndentedString(payments)).append("\n");
651684
sb.append(" brandingThemeID: ").append(toIndentedString(brandingThemeID)).append("\n");
652685
sb.append(" hasAttachments: ").append(toIndentedString(hasAttachments)).append("\n");
653686
sb.append("}");

0 commit comments

Comments
 (0)