Skip to content

Commit

Permalink
misc(payment): Add reasonCode to HyperwalletPayment (#212)
Browse files Browse the repository at this point in the history
* misc(payment): Add reasonCode to HyperwalletPayment

* Add model test
  • Loading branch information
oualidsr authored Jul 4, 2024
1 parent bdda6cb commit 6484267
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class HyperwalletPayment extends HyperwalletBaseMonitor {

private String token;
private String status;

private String reasonCode;
private Date createdOn;
private Double amount;
private String currency;
Expand Down Expand Up @@ -73,6 +73,27 @@ public HyperwalletPayment clearStatus() {
return this;
}

public String getReasonCode() {
return this.reasonCode;
}

public void setReasonCode(String reasonCode) {
addField("reasonCode", reasonCode);
this.reasonCode = reasonCode;
}

public HyperwalletPayment reasonCode(String reasonCode) {
addField("reasonCode", reasonCode);
this.reasonCode = reasonCode;
return this;
}

public HyperwalletPayment clearReasonCode() {
clearField("reasonCode");
reasonCode = null;
return this;
}

public String getClientPaymentId() {
return clientPaymentId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ protected HyperwalletPayment createBaseModel() {
payment
.status("COMPLETED")
.token("test-token")
.reasonCode("PAYEE_ACCOUNT_LIMITATION")
.createdOn(new Date())
.amount(15.99)
.currency("test-currency")
Expand Down

0 comments on commit 6484267

Please sign in to comment.