Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Commit 6484267

Browse files
authored
misc(payment): Add reasonCode to HyperwalletPayment (#212)
* misc(payment): Add reasonCode to HyperwalletPayment * Add model test
1 parent bdda6cb commit 6484267

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

src/main/java/com/hyperwallet/clientsdk/model/HyperwalletPayment.java

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class HyperwalletPayment extends HyperwalletBaseMonitor {
1616

1717
private String token;
1818
private String status;
19-
19+
private String reasonCode;
2020
private Date createdOn;
2121
private Double amount;
2222
private String currency;
@@ -73,6 +73,27 @@ public HyperwalletPayment clearStatus() {
7373
return this;
7474
}
7575

76+
public String getReasonCode() {
77+
return this.reasonCode;
78+
}
79+
80+
public void setReasonCode(String reasonCode) {
81+
addField("reasonCode", reasonCode);
82+
this.reasonCode = reasonCode;
83+
}
84+
85+
public HyperwalletPayment reasonCode(String reasonCode) {
86+
addField("reasonCode", reasonCode);
87+
this.reasonCode = reasonCode;
88+
return this;
89+
}
90+
91+
public HyperwalletPayment clearReasonCode() {
92+
clearField("reasonCode");
93+
reasonCode = null;
94+
return this;
95+
}
96+
7697
public String getClientPaymentId() {
7798
return clientPaymentId;
7899
}

src/test/java/com/hyperwallet/clientsdk/model/HyperwalletPaymentTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ protected HyperwalletPayment createBaseModel() {
1717
payment
1818
.status("COMPLETED")
1919
.token("test-token")
20+
.reasonCode("PAYEE_ACCOUNT_LIMITATION")
2021
.createdOn(new Date())
2122
.amount(15.99)
2223
.currency("test-currency")

0 commit comments

Comments
 (0)