Skip to content

Commit

Permalink
SP-737 Type Review: Java
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarzybok-sumoheavy committed Dec 13, 2023
1 parent 381703f commit 34f4ac2
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 22 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/bitpay/sdk/model/invoice/BuyerFields.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
* Buyer Fields.
*
* @see <a href="https://developer.bitpay.com/reference/notifications-invoices">Invoice Webhook</a>
*/
@JsonIgnoreProperties(ignoreUnknown = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import java.util.Hashtable;

/**
* Invoice Webhook.
*
* @see <a href="https://developer.bitpay.com/reference/notifications-invoices">Invoice Webhook</a>
*/
@JsonIgnoreProperties(ignoreUnknown = true)
Expand Down Expand Up @@ -106,15 +108,15 @@ public void setExceptionStatus(String exceptionStatus) {
}

public BuyerFields getBuyerFields() {
return buyerFields;
return this.buyerFields;
}

public void setBuyerFields(BuyerFields buyerFields) {
this.buyerFields = buyerFields;
}

public Hashtable<String, BigInteger> getPaymentSubtotals() {
return paymentSubtotals;
return this.paymentSubtotals;
}

public void setPaymentSubtotals(Hashtable<String, BigInteger> paymentSubtotals) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/bitpay/sdk/model/invoice/MinerFees.java
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public void setWbtc(MinerFeesItem wbtc) {
*/
@JsonIgnore
public MinerFeesItem getMatic() {
return matic;
return this.matic;
}

/**
Expand All @@ -308,7 +308,7 @@ public void setMatic(MinerFeesItem matic) {
*/
@JsonIgnore
public MinerFeesItem getUsdcM() {
return usdcM;
return this.usdcM;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ public void setWbtcM(SupportedTransactionCurrency wbtcM) {
*/
@JsonIgnore
public SupportedTransactionCurrency getShibM() {
return shibM;
return this.shibM;
}

/**
Expand Down
22 changes: 12 additions & 10 deletions src/main/java/com/bitpay/sdk/model/payout/PayoutWebhook.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package com.bitpay.sdk.model.payout;

import com.fasterxml.jackson.annotation.JsonSetter;
import java.math.BigDecimal;
import java.time.ZonedDateTime;
import java.util.Hashtable;
Expand All @@ -27,7 +28,7 @@ class PayoutWebhook {
protected String email;
protected String reference;
protected String label;
protected String notificationURL;
protected String notificationUrl;
protected String notificationEmail;
protected ZonedDateTime effectiveDate;
protected ZonedDateTime requestDate;
Expand Down Expand Up @@ -115,48 +116,49 @@ public void setLabel(String label) {
this.label = label;
}

public String getNotificationURL() {
return this.notificationURL;
public String getNotificationUrl() {
return this.notificationUrl;
}

public void setNotificationURL(String notificationURL) {
this.notificationURL = notificationURL;
@JsonSetter("notificationURL")
public void setNotificationUrl(String notificationUrl) {
this.notificationUrl = notificationUrl;
}

public String getNotificationEmail() {
return notificationEmail;
return this.notificationEmail;
}

public void setNotificationEmail(String notificationEmail) {
this.notificationEmail = notificationEmail;
}

public ZonedDateTime getEffectiveDate() {
return effectiveDate;
return this.effectiveDate;
}

public void setEffectiveDate(ZonedDateTime effectiveDate) {
this.effectiveDate = effectiveDate;
}

public ZonedDateTime getRequestDate() {
return requestDate;
return this.requestDate;
}

public void setRequestDate(ZonedDateTime requestDate) {
this.requestDate = requestDate;
}

public String getStatus() {
return status;
return this.status;
}

public void setStatus(String status) {
this.status = status;
}

public List<PayoutTransaction> getTransactions() {
return transactions;
return this.transactions;
}

public void setTransactions(List<PayoutTransaction> transactions) {
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/bitpay/sdk/model/payout/RecipientWebhook.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,39 +22,39 @@ class RecipientWebhook {
protected String shopperId;

public String getEmail() {
return email;
return this.email;
}

public void setEmail(String email) {
this.email = email;
}

public String getLabel() {
return label;
return this.label;
}

public void setLabel(String label) {
this.label = label;
}

public String getStatus() {
return status;
return this.status;
}

public void setStatus(String status) {
this.status = status;
}

public String getId() {
return id;
return this.id;
}

public void setId(String id) {
this.id = id;
}

public String getShopperId() {
return shopperId;
return this.shopperId;
}

public void setShopperId(String shopperId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ public void testManipulateLabel() {
public void testManipulateNotificationURL() {
PayoutWebhook testedClass = this.getTestedClass();
String expected = "someValue";
testedClass.setNotificationURL(expected);
testedClass.setNotificationUrl(expected);

Assertions.assertSame(expected, testedClass.getNotificationURL());
Assertions.assertSame(expected, testedClass.getNotificationUrl());
}

@Test
Expand Down

0 comments on commit 34f4ac2

Please sign in to comment.