From 9f9fba87d83398a211e5ed8d0464ab5644758605 Mon Sep 17 00:00:00 2001 From: Marcin Warzybok Date: Tue, 23 Jan 2024 14:15:33 +0100 Subject: [PATCH 1/3] SP-737 Type Review: Java --- .../java/com/bitpay/sdk/model/Facade.java | 2 +- .../java/com/bitpay/sdk/model/Policy.java | 6 +- src/main/java/com/bitpay/sdk/model/Token.java | 22 +- .../java/com/bitpay/sdk/model/bill/Bill.java | 42 ++-- .../java/com/bitpay/sdk/model/bill/Item.java | 8 +- .../com/bitpay/sdk/model/invoice/Buyer.java | 20 +- .../com/bitpay/sdk/model/invoice/Invoice.java | 133 ++++++------ .../invoice/InvoiceBuyerProvidedInfo.java | 14 +- .../sdk/model/invoice/InvoiceEventToken.java | 6 +- .../model/invoice/InvoiceItemizedDetails.java | 6 +- .../model/invoice/InvoiceRefundAddresses.java | 43 ++++ .../sdk/model/invoice/InvoiceTransaction.java | 14 +- .../model/invoice/InvoiceUniversalCodes.java | 4 +- .../sdk/model/invoice/InvoiceWebhook.java | 18 ++ .../bitpay/sdk/model/invoice/MinerFees.java | 28 +-- .../sdk/model/invoice/MinerFeesItem.java | 6 +- .../com/bitpay/sdk/model/invoice/Refund.java | 42 ++-- .../bitpay/sdk/model/invoice/RefundInfo.java | 6 +- .../sdk/model/invoice/RefundWebhook.java | 189 +++++++++++++++++- .../com/bitpay/sdk/model/invoice/Shopper.java | 2 +- .../SupportedTransactionCurrencies.java | 42 ++-- .../invoice/SupportedTransactionCurrency.java | 4 +- .../com/bitpay/sdk/model/ledger/Buyer.java | 20 +- .../com/bitpay/sdk/model/ledger/Ledger.java | 4 +- .../bitpay/sdk/model/ledger/LedgerEntry.java | 30 +-- .../com/bitpay/sdk/model/payout/Payout.java | 48 ++--- .../bitpay/sdk/model/payout/PayoutGroup.java | 4 +- .../sdk/model/payout/PayoutRecipient.java | 16 +- .../sdk/model/payout/PayoutRecipients.java | 6 +- .../sdk/model/payout/PayoutTransaction.java | 12 +- .../sdk/model/payout/PayoutWebhook.java | 27 +++ .../java/com/bitpay/sdk/model/rate/Rate.java | 6 +- .../java/com/bitpay/sdk/model/rate/Rates.java | 2 +- .../sdk/model/settlement/InvoiceData.java | 16 +- .../sdk/model/settlement/PayoutInfo.java | 48 ++--- .../sdk/model/settlement/RefundInfo.java | 6 +- .../sdk/model/settlement/Settlement.java | 34 ++-- .../settlement/SettlementLedgerEntry.java | 12 +- .../sdk/model/settlement/WithHoldings.java | 12 +- .../bitpay/sdk/model/wallet/Currencies.java | 16 +- .../bitpay/sdk/model/wallet/CurrencyQr.java | 4 +- .../com/bitpay/sdk/model/wallet/Wallet.java | 12 +- src/test/java/com/bitpay/sdk/ClientTest.java | 1 + .../bitpay/sdk/client/PayoutClientTest.java | 2 +- .../sdk/json/createInvoiceResponse.json | 10 +- .../bitpay/sdk/model/invoice/InvoiceTest.java | 3 +- .../sdk/model/invoice/InvoiceWebhookTest.java | 18 ++ 47 files changed, 655 insertions(+), 371 deletions(-) create mode 100644 src/main/java/com/bitpay/sdk/model/invoice/InvoiceRefundAddresses.java diff --git a/src/main/java/com/bitpay/sdk/model/Facade.java b/src/main/java/com/bitpay/sdk/model/Facade.java index 7806d197..beeaf8ce 100644 --- a/src/main/java/com/bitpay/sdk/model/Facade.java +++ b/src/main/java/com/bitpay/sdk/model/Facade.java @@ -36,7 +36,7 @@ public enum Facade { */ POS("pos"); - private final String value; + protected final String value; Facade(String value) { this.value = value; diff --git a/src/main/java/com/bitpay/sdk/model/Policy.java b/src/main/java/com/bitpay/sdk/model/Policy.java index 220300e5..1c3d5cd5 100644 --- a/src/main/java/com/bitpay/sdk/model/Policy.java +++ b/src/main/java/com/bitpay/sdk/model/Policy.java @@ -18,9 +18,9 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class Policy { - private String policy; - private String method; - private List params; + protected String policy; + protected String method; + protected List params; /** * Instantiates a new Policy. diff --git a/src/main/java/com/bitpay/sdk/model/Token.java b/src/main/java/com/bitpay/sdk/model/Token.java index d12e9b76..1f8dc124 100644 --- a/src/main/java/com/bitpay/sdk/model/Token.java +++ b/src/main/java/com/bitpay/sdk/model/Token.java @@ -19,17 +19,17 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class Token { - private String guid; - private String id; - private String pairingCode; - private Long pairingExpiration; - private String facade; - private String label; - private Integer count = 0; - private List policies; - private String resource; - private String value; - private Long dateCreated; + protected String guid; + protected String id; + protected String pairingCode; + protected Long pairingExpiration; + protected String facade; + protected String label; + protected Integer count = 0; + protected List policies; + protected String resource; + protected String value; + protected Long dateCreated; /** * Instantiates a new Token. diff --git a/src/main/java/com/bitpay/sdk/model/bill/Bill.java b/src/main/java/com/bitpay/sdk/model/bill/Bill.java index ec33e2f6..e99d9d39 100644 --- a/src/main/java/com/bitpay/sdk/model/bill/Bill.java +++ b/src/main/java/com/bitpay/sdk/model/bill/Bill.java @@ -29,27 +29,27 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class Bill { - private String currency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String token = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String email = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private List items; - private String number = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String name = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String address1 = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String address2 = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String city = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String state = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String zip = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String country = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private List cc; - private String phone = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private ZonedDateTime dueDate; - private Boolean passProcessingFee; - private String status = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String url = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private ZonedDateTime createdDate; - private String id = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String merchant = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String currency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String token = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String email = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected List items; + protected String number = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String name = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String address1 = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String address2 = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String city = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String state = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String zip = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String country = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected List cc; + protected String phone = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected ZonedDateTime dueDate; + protected Boolean passProcessingFee; + protected String status = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String url = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected ZonedDateTime createdDate; + protected String id = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String merchant = ModelConfiguration.DEFAULT_NON_SENT_VALUE; /** * Constructor, create an empty Bill object. diff --git a/src/main/java/com/bitpay/sdk/model/bill/Item.java b/src/main/java/com/bitpay/sdk/model/bill/Item.java index 441e744a..89bff2f0 100644 --- a/src/main/java/com/bitpay/sdk/model/bill/Item.java +++ b/src/main/java/com/bitpay/sdk/model/bill/Item.java @@ -19,10 +19,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class Item { - private String id; - private String description = DEFAULT_NON_SENT_VALUE; - private Double price; - private Integer quantity; + protected String id; + protected String description = DEFAULT_NON_SENT_VALUE; + protected Double price; + protected Integer quantity; /** * Instantiates a new Item. diff --git a/src/main/java/com/bitpay/sdk/model/invoice/Buyer.java b/src/main/java/com/bitpay/sdk/model/invoice/Buyer.java index 240ae9f1..e19c4d4a 100644 --- a/src/main/java/com/bitpay/sdk/model/invoice/Buyer.java +++ b/src/main/java/com/bitpay/sdk/model/invoice/Buyer.java @@ -18,16 +18,16 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class Buyer { - private String name = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String address1 = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String address2 = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String locality = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String region = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String postalCode = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String country = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String email = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String phone = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private Boolean notify; + protected String name = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String address1 = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String address2 = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String locality = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String region = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String postalCode = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String country = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String email = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String phone = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected Boolean notify; /** * Instantiates a new Buyer. diff --git a/src/main/java/com/bitpay/sdk/model/invoice/Invoice.java b/src/main/java/com/bitpay/sdk/model/invoice/Invoice.java index 87818c21..ac751d23 100644 --- a/src/main/java/com/bitpay/sdk/model/invoice/Invoice.java +++ b/src/main/java/com/bitpay/sdk/model/invoice/Invoice.java @@ -18,6 +18,7 @@ import java.util.ArrayList; import java.util.Hashtable; import java.util.List; +import java.util.Map; /** * The type Invoice. @@ -27,70 +28,70 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class Invoice { - private String currency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - - private String guid; - private String token; - - private Double price; - private String posData; - private String notificationUrl = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String transactionSpeed = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private Boolean fullNotifications; - private String notificationEmail = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String redirectUrl = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String closeUrl = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String orderId = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String itemDesc = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String itemCode = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private Boolean physical; - private List paymentCurrencies; - private Integer acceptanceWindow; - private Buyer buyer; - private String buyerSms = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String merchantName = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String selectedTransactionCurrency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String forcedBuyerSelectedWallet = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private InvoiceUniversalCodes universalCodes; - private List itemizedDetails; - private Boolean autoRedirect; - - private String id; - private String url = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String status = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private Boolean lowFeeDetected; - private Long invoiceTime; - private Long expirationTime; - private Long currentTime; - private String exceptionStatus = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private Integer targetConfirmations; - private List transactions; - private ArrayList refundAddresses; - private Boolean refundAddressRequestPending; - private String buyerProvidedEmail = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private InvoiceBuyerProvidedInfo invoiceBuyerProvidedInfo; - private SupportedTransactionCurrencies supportedTransactionCurrencies; - private MinerFees minerFees; - private Shopper shopper; - private String billId = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private ArrayList refundInfo; - private Boolean extendedNotifications; - private String transactionCurrency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String forcedBuyerSelectedTransactionCurrency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private BigDecimal amountPaid; - private String displayAmountPaid; - private Hashtable> exchangeRates; - private Boolean isCancelled; - private Boolean bitpayIdRequired; - private Hashtable paymentSubtotals; - private Hashtable paymentTotals; - private Hashtable paymentDisplayTotals; - private Hashtable paymentDisplaySubTotals; - private Boolean nonPayProPaymentReceived; - private Boolean jsonPayProRequired; - private BigDecimal underpaidAmount; - private BigDecimal overpaidAmount; - private Hashtable> paymentCodes; + protected String currency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + + protected String guid; + protected String token; + + protected Double price; + protected String posData; + protected String notificationUrl = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String transactionSpeed = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected Boolean fullNotifications; + protected String notificationEmail = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String redirectUrl = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String closeUrl = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String orderId = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String itemDesc = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String itemCode = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected Boolean physical; + protected List paymentCurrencies; + protected Integer acceptanceWindow; + protected Buyer buyer; + protected String buyerSms = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String merchantName = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String selectedTransactionCurrency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String forcedBuyerSelectedWallet = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected InvoiceUniversalCodes universalCodes; + protected List itemizedDetails; + protected Boolean autoRedirect; + + protected String id; + protected String url = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String status = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected Boolean lowFeeDetected; + protected Long invoiceTime; + protected Long expirationTime; + protected Long currentTime; + protected String exceptionStatus = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected Integer targetConfirmations; + protected List transactions; + protected List> refundAddresses; + protected Boolean refundAddressRequestPending; + protected String buyerProvidedEmail = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected InvoiceBuyerProvidedInfo invoiceBuyerProvidedInfo; + protected SupportedTransactionCurrencies supportedTransactionCurrencies; + protected MinerFees minerFees; + protected Shopper shopper; + protected String billId = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected ArrayList refundInfo; + protected Boolean extendedNotifications; + protected String transactionCurrency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String forcedBuyerSelectedTransactionCurrency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected BigDecimal amountPaid; + protected String displayAmountPaid; + protected Hashtable> exchangeRates; + protected Boolean isCancelled; + protected Boolean bitpayIdRequired; + protected Hashtable paymentSubtotals; + protected Hashtable paymentTotals; + protected Hashtable paymentDisplayTotals; + protected Hashtable paymentDisplaySubTotals; + protected Boolean nonPayProPaymentReceived; + protected Boolean jsonPayProRequired; + protected BigDecimal underpaidAmount; + protected BigDecimal overpaidAmount; + protected Hashtable> paymentCodes; /** * Constructor, create an empty Invoice object. @@ -1168,7 +1169,7 @@ public void setTargetConfirmations(final Integer targetConfirmations) { * @return the refund addresses */ @JsonIgnore - public ArrayList getRefundAddresses() { + public List> getRefundAddresses() { return this.refundAddresses; } @@ -1179,7 +1180,7 @@ public ArrayList getRefundAddresses() { * @param refundAddresses the refund addresses */ @JsonProperty("refundAddresses") - public void setRefundAddresses(final ArrayList refundAddresses) { + public void setRefundAddresses(final List> refundAddresses) { this.refundAddresses = refundAddresses; } diff --git a/src/main/java/com/bitpay/sdk/model/invoice/InvoiceBuyerProvidedInfo.java b/src/main/java/com/bitpay/sdk/model/invoice/InvoiceBuyerProvidedInfo.java index 4ec0d0ca..11abeaca 100644 --- a/src/main/java/com/bitpay/sdk/model/invoice/InvoiceBuyerProvidedInfo.java +++ b/src/main/java/com/bitpay/sdk/model/invoice/InvoiceBuyerProvidedInfo.java @@ -18,13 +18,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class InvoiceBuyerProvidedInfo { - private String name = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String phoneNumber = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String selectedTransactionCurrency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String emailAddress = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String selectedWallet = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String sms = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private Boolean smsVerified; + protected String name = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String phoneNumber = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String selectedTransactionCurrency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String emailAddress = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String selectedWallet = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String sms = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected Boolean smsVerified; /** * Instantiates a new Invoice buyer provided info. diff --git a/src/main/java/com/bitpay/sdk/model/invoice/InvoiceEventToken.java b/src/main/java/com/bitpay/sdk/model/invoice/InvoiceEventToken.java index f1f59744..af0c16a1 100644 --- a/src/main/java/com/bitpay/sdk/model/invoice/InvoiceEventToken.java +++ b/src/main/java/com/bitpay/sdk/model/invoice/InvoiceEventToken.java @@ -16,9 +16,9 @@ */ public class InvoiceEventToken { - private String token = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private List events; - private List actions; + protected String token = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected List events; + protected List actions; /** * Instantiates a new Invoice event token. diff --git a/src/main/java/com/bitpay/sdk/model/invoice/InvoiceItemizedDetails.java b/src/main/java/com/bitpay/sdk/model/invoice/InvoiceItemizedDetails.java index ab6854a4..778c31db 100644 --- a/src/main/java/com/bitpay/sdk/model/invoice/InvoiceItemizedDetails.java +++ b/src/main/java/com/bitpay/sdk/model/invoice/InvoiceItemizedDetails.java @@ -17,9 +17,9 @@ */ @JsonIgnoreProperties(ignoreUnknown = true) public class InvoiceItemizedDetails { - private Double amount; - private String description = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private Boolean isFee; + protected Double amount; + protected String description = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected Boolean isFee; /** * Instantiates a new Invoice itemized details. diff --git a/src/main/java/com/bitpay/sdk/model/invoice/InvoiceRefundAddresses.java b/src/main/java/com/bitpay/sdk/model/invoice/InvoiceRefundAddresses.java new file mode 100644 index 00000000..cf85a944 --- /dev/null +++ b/src/main/java/com/bitpay/sdk/model/invoice/InvoiceRefundAddresses.java @@ -0,0 +1,43 @@ +package com.bitpay.sdk.model.invoice; + +import java.time.ZonedDateTime; + +public class InvoiceRefundAddresses { + + protected String type; + protected ZonedDateTime date; + protected Integer tag; + protected String email; + + public String getType() { + return this.type; + } + + public void setType(String type) { + this.type = type; + } + + public ZonedDateTime getDate() { + return this.date; + } + + public void setDate(ZonedDateTime date) { + this.date = date; + } + + public Integer getTag() { + return this.tag; + } + + public void setTag(Integer tag) { + this.tag = tag; + } + + public String getEmail() { + return this.email; + } + + public void setEmail(String email) { + this.email = email; + } +} diff --git a/src/main/java/com/bitpay/sdk/model/invoice/InvoiceTransaction.java b/src/main/java/com/bitpay/sdk/model/invoice/InvoiceTransaction.java index 4ec840a0..714bb530 100644 --- a/src/main/java/com/bitpay/sdk/model/invoice/InvoiceTransaction.java +++ b/src/main/java/com/bitpay/sdk/model/invoice/InvoiceTransaction.java @@ -28,13 +28,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class InvoiceTransaction { - private BigDecimal amount; - private Integer confirmations; - private ZonedDateTime time; - private ZonedDateTime receivedTime; - private String txid = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private Map exRates; - private Integer outputIndex; + protected BigDecimal amount; + protected Integer confirmations; + protected ZonedDateTime time; + protected ZonedDateTime receivedTime; + protected String txid = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected Map exRates; + protected Integer outputIndex; /** * Instantiates a new Invoice transaction. diff --git a/src/main/java/com/bitpay/sdk/model/invoice/InvoiceUniversalCodes.java b/src/main/java/com/bitpay/sdk/model/invoice/InvoiceUniversalCodes.java index 569b86a7..7dcff55f 100644 --- a/src/main/java/com/bitpay/sdk/model/invoice/InvoiceUniversalCodes.java +++ b/src/main/java/com/bitpay/sdk/model/invoice/InvoiceUniversalCodes.java @@ -18,8 +18,8 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class InvoiceUniversalCodes { - private String paymentString = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String verificationLink = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String paymentString = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String verificationLink = ModelConfiguration.DEFAULT_NON_SENT_VALUE; /** * Instantiates a new Invoice universal codes. diff --git a/src/main/java/com/bitpay/sdk/model/invoice/InvoiceWebhook.java b/src/main/java/com/bitpay/sdk/model/invoice/InvoiceWebhook.java index 79938bf1..b0ed0320 100644 --- a/src/main/java/com/bitpay/sdk/model/invoice/InvoiceWebhook.java +++ b/src/main/java/com/bitpay/sdk/model/invoice/InvoiceWebhook.java @@ -34,6 +34,8 @@ class InvoiceWebhook { protected Double amountPaid; protected String orderId; protected String transactionCurrency; + protected String inInvoiceId; + protected String inPaymentRequest; public String getId() { return this.id; @@ -163,4 +165,20 @@ public String getTransactionCurrency() { public void setTransactionCurrency(String transactionCurrency) { this.transactionCurrency = transactionCurrency; } + + public String getInInvoiceId() { + return this.inInvoiceId; + } + + public void setInInvoiceId(String inInvoiceId) { + this.inInvoiceId = inInvoiceId; + } + + public String getInPaymentRequest() { + return this.inPaymentRequest; + } + + public void setInPaymentRequest(String inPaymentRequest) { + this.inPaymentRequest = inPaymentRequest; + } } diff --git a/src/main/java/com/bitpay/sdk/model/invoice/MinerFees.java b/src/main/java/com/bitpay/sdk/model/invoice/MinerFees.java index 88b1d28b..0e4d7e53 100644 --- a/src/main/java/com/bitpay/sdk/model/invoice/MinerFees.java +++ b/src/main/java/com/bitpay/sdk/model/invoice/MinerFees.java @@ -20,20 +20,20 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class MinerFees { - private MinerFeesItem btc = new MinerFeesItem(); - private MinerFeesItem bch = new MinerFeesItem(); - private MinerFeesItem eth = new MinerFeesItem(); - private MinerFeesItem usdc = new MinerFeesItem(); - private MinerFeesItem gusd = new MinerFeesItem(); - private MinerFeesItem pax = new MinerFeesItem(); - private MinerFeesItem busd = new MinerFeesItem(); - private MinerFeesItem xrp = new MinerFeesItem(); - private MinerFeesItem doge = new MinerFeesItem(); - private MinerFeesItem ltc = new MinerFeesItem(); - private MinerFeesItem dai = new MinerFeesItem(); - private MinerFeesItem wbtc = new MinerFeesItem(); - private MinerFeesItem matic = new MinerFeesItem(); - private MinerFeesItem usdcM = new MinerFeesItem(); + protected MinerFeesItem btc = new MinerFeesItem(); + protected MinerFeesItem bch = new MinerFeesItem(); + protected MinerFeesItem eth = new MinerFeesItem(); + protected MinerFeesItem usdc = new MinerFeesItem(); + protected MinerFeesItem gusd = new MinerFeesItem(); + protected MinerFeesItem pax = new MinerFeesItem(); + protected MinerFeesItem busd = new MinerFeesItem(); + protected MinerFeesItem xrp = new MinerFeesItem(); + protected MinerFeesItem doge = new MinerFeesItem(); + protected MinerFeesItem ltc = new MinerFeesItem(); + protected MinerFeesItem dai = new MinerFeesItem(); + protected MinerFeesItem wbtc = new MinerFeesItem(); + protected MinerFeesItem matic = new MinerFeesItem(); + protected MinerFeesItem usdcM = new MinerFeesItem(); /** * Instantiates a new Miner fees. diff --git a/src/main/java/com/bitpay/sdk/model/invoice/MinerFeesItem.java b/src/main/java/com/bitpay/sdk/model/invoice/MinerFeesItem.java index 26a75324..0e9e319c 100644 --- a/src/main/java/com/bitpay/sdk/model/invoice/MinerFeesItem.java +++ b/src/main/java/com/bitpay/sdk/model/invoice/MinerFeesItem.java @@ -17,9 +17,9 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class MinerFeesItem { - private Integer satoshisPerByte; - private Integer totalFee; - private Double fiatAmount; + protected Integer satoshisPerByte; + protected Integer totalFee; + protected Double fiatAmount; /** * Instantiates a new Miner fees item. diff --git a/src/main/java/com/bitpay/sdk/model/invoice/Refund.java b/src/main/java/com/bitpay/sdk/model/invoice/Refund.java index 334fd684..b02c68d8 100644 --- a/src/main/java/com/bitpay/sdk/model/invoice/Refund.java +++ b/src/main/java/com/bitpay/sdk/model/invoice/Refund.java @@ -27,27 +27,27 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class Refund { - private String guid; - private Double amount; - private String currency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String invoice = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private Boolean preview; - private Boolean immediate; - private Boolean buyerPaysRefundFee; - private String reference = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private Double refundFee; - private ZonedDateTime requestDate; - private ZonedDateTime lastRefundNotification; - private String notificationUrl = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String refundAddress = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String supportRequest = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String txid = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String type = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private BigDecimal transactionAmount; - private BigDecimal transactionRefundFee; - private String transactionCurrency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String id; - private String status = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String guid; + protected Double amount; + protected String currency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String invoice = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected Boolean preview; + protected Boolean immediate; + protected Boolean buyerPaysRefundFee; + protected String reference = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected Double refundFee; + protected ZonedDateTime requestDate; + protected ZonedDateTime lastRefundNotification; + protected String notificationUrl = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String refundAddress = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String supportRequest = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String txid = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String type = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected BigDecimal transactionAmount; + protected BigDecimal transactionRefundFee; + protected String transactionCurrency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String id; + protected String status = ModelConfiguration.DEFAULT_NON_SENT_VALUE; /** diff --git a/src/main/java/com/bitpay/sdk/model/invoice/RefundInfo.java b/src/main/java/com/bitpay/sdk/model/invoice/RefundInfo.java index 2041260a..aab16113 100644 --- a/src/main/java/com/bitpay/sdk/model/invoice/RefundInfo.java +++ b/src/main/java/com/bitpay/sdk/model/invoice/RefundInfo.java @@ -23,9 +23,9 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class RefundInfo { - private String supportRequest = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String currency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private Hashtable amounts; + protected String supportRequest = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String currency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected Hashtable amounts; /** * Instantiates a new Refund info. diff --git a/src/main/java/com/bitpay/sdk/model/invoice/RefundWebhook.java b/src/main/java/com/bitpay/sdk/model/invoice/RefundWebhook.java index 2621a18b..2da771cc 100644 --- a/src/main/java/com/bitpay/sdk/model/invoice/RefundWebhook.java +++ b/src/main/java/com/bitpay/sdk/model/invoice/RefundWebhook.java @@ -23,17 +23,25 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class RefundWebhook { - private String id; - private String invoice = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String supportRequest = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String status = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private Double amount; - private String currency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private ZonedDateTime lastRefundNotification; - private Double refundFee; - private Boolean immediate; - private Boolean buyerPaysRefundFee; - private ZonedDateTime requestDate; + protected String id; + protected String invoice = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String supportRequest = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String status = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected Double amount; + protected String currency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected ZonedDateTime lastRefundNotification; + protected Double refundFee; + protected Boolean immediate; + protected Boolean buyerPaysRefundFee; + protected ZonedDateTime requestDate; + protected String reference; + protected String guid; + protected String refundAddress; + protected String type; + protected String txid; + protected String transactionCurrency; + protected Double transactionAmount; + protected Double transactionRefundFee; /** * Instantiates a new Refund webhook. @@ -280,4 +288,163 @@ public void setRequestDate(ZonedDateTime requestDate) { this.requestDate = requestDate; } + /** + * Gets reference. + * + * @return String + */ + @JsonProperty("reference") + public String getReference() { + return this.reference; + } + + /** + * Sets reference. + * + * @param reference string + */ + @JsonProperty("reference") + public void setReference(String reference) { + this.reference = reference; + } + + /** + * Gets guid. + * + * @return string + */ + @JsonProperty("guid") + public String getGuid() { + return this.guid; + } + + /** + * Sets guid. + * + * @param guid string + */ + @JsonProperty("guid") + public void setGuid(String guid) { + this.guid = guid; + } + + /** + * Gets refund address. + * + * @return string + */ + @JsonProperty("refundAddress") + public String getRefundAddress() { + return this.refundAddress; + } + + /** + * Sets refund address. + * + * @param refundAddress string + */ + @JsonProperty("refundAddress") + public void setRefundAddress(String refundAddress) { + this.refundAddress = refundAddress; + } + + /** + * Gets type. + * + * @return string + */ + @JsonProperty("type") + public String getType() { + return this.type; + } + + /** + * Sets type. + * + * @param type string + */ + @JsonProperty("type") + public void setType(String type) { + this.type = type; + } + + /** + * Gets txid. + * + * @return string + */ + @JsonProperty("txid") + public String getTxid() { + return this.txid; + } + + /** + * Sets txid. + * + * @param txid string + */ + @JsonProperty("txid") + public void setTxid(String txid) { + this.txid = txid; + } + + /** + * Gets transaction currency. + * + * @return string + */ + @JsonProperty("transactionCurrency") + public String getTransactionCurrency() { + return this.transactionCurrency; + } + + /** + * Sets transaction currency. + * + * @param transactionCurrency string + */ + @JsonProperty("transactionCurrency") + public void setTransactionCurrency(String transactionCurrency) { + this.transactionCurrency = transactionCurrency; + } + + /** + * Gets transaction amount. + * + * @return double + */ + @JsonProperty("transactionAmount") + public Double getTransactionAmount() { + return this.transactionAmount; + } + + /** + * Sets transaction amount. + * + * @param transactionAmount double + */ + @JsonProperty("transactionAmount") + public void setTransactionAmount(Double transactionAmount) { + this.transactionAmount = transactionAmount; + } + + /** + * Gets transaction refund fee. + * + * @return double + */ + @JsonProperty("transactionRefundFee") + public Double getTransactionRefundFee() { + return this.transactionRefundFee; + } + + /** + * Sets transaction refund fee. + * + * @param transactionRefundFee double + */ + @JsonProperty("transactionRefundFee") + public void setTransactionRefundFee(Double transactionRefundFee) { + this.transactionRefundFee = transactionRefundFee; + } } diff --git a/src/main/java/com/bitpay/sdk/model/invoice/Shopper.java b/src/main/java/com/bitpay/sdk/model/invoice/Shopper.java index e28f7ed1..74aa8d37 100644 --- a/src/main/java/com/bitpay/sdk/model/invoice/Shopper.java +++ b/src/main/java/com/bitpay/sdk/model/invoice/Shopper.java @@ -19,7 +19,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class Shopper { - private String user = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String user = ModelConfiguration.DEFAULT_NON_SENT_VALUE; /** * Instantiates a new Shopper. diff --git a/src/main/java/com/bitpay/sdk/model/invoice/SupportedTransactionCurrencies.java b/src/main/java/com/bitpay/sdk/model/invoice/SupportedTransactionCurrencies.java index b91594f3..d4e07637 100644 --- a/src/main/java/com/bitpay/sdk/model/invoice/SupportedTransactionCurrencies.java +++ b/src/main/java/com/bitpay/sdk/model/invoice/SupportedTransactionCurrencies.java @@ -17,27 +17,27 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SupportedTransactionCurrencies { - private SupportedTransactionCurrency btc = new SupportedTransactionCurrency(); - private SupportedTransactionCurrency bch = new SupportedTransactionCurrency(); - private SupportedTransactionCurrency eth = new SupportedTransactionCurrency(); - private SupportedTransactionCurrency usdc = new SupportedTransactionCurrency(); - private SupportedTransactionCurrency gusd = new SupportedTransactionCurrency(); - private SupportedTransactionCurrency pax = new SupportedTransactionCurrency(); - private SupportedTransactionCurrency xrp = new SupportedTransactionCurrency(); - private SupportedTransactionCurrency busd = new SupportedTransactionCurrency(); - private SupportedTransactionCurrency doge = new SupportedTransactionCurrency(); - private SupportedTransactionCurrency ltc = new SupportedTransactionCurrency(); - private SupportedTransactionCurrency wbtc = new SupportedTransactionCurrency(); - private SupportedTransactionCurrency dai = new SupportedTransactionCurrency(); - private SupportedTransactionCurrency euroc = new SupportedTransactionCurrency(); - private SupportedTransactionCurrency matic = new SupportedTransactionCurrency(); - private SupportedTransactionCurrency maticE = new SupportedTransactionCurrency(); - private SupportedTransactionCurrency ethM = new SupportedTransactionCurrency(); - private SupportedTransactionCurrency usdcM = new SupportedTransactionCurrency(); - private SupportedTransactionCurrency busdM = new SupportedTransactionCurrency(); - private SupportedTransactionCurrency daiM = new SupportedTransactionCurrency(); - private SupportedTransactionCurrency wbtcM = new SupportedTransactionCurrency(); - private SupportedTransactionCurrency shibM = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency btc = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency bch = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency eth = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency usdc = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency gusd = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency pax = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency xrp = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency busd = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency doge = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency ltc = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency wbtc = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency dai = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency euroc = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency matic = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency maticE = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency ethM = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency usdcM = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency busdM = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency daiM = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency wbtcM = new SupportedTransactionCurrency(); + protected SupportedTransactionCurrency shibM = new SupportedTransactionCurrency(); /** * Instantiates a new Supported transaction currencies. diff --git a/src/main/java/com/bitpay/sdk/model/invoice/SupportedTransactionCurrency.java b/src/main/java/com/bitpay/sdk/model/invoice/SupportedTransactionCurrency.java index 92194db1..9ba5cab2 100644 --- a/src/main/java/com/bitpay/sdk/model/invoice/SupportedTransactionCurrency.java +++ b/src/main/java/com/bitpay/sdk/model/invoice/SupportedTransactionCurrency.java @@ -20,8 +20,8 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SupportedTransactionCurrency { - private Boolean enabled; - private String reason = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected Boolean enabled; + protected String reason = ModelConfiguration.DEFAULT_NON_SENT_VALUE; /** * Instantiates a new Supported transaction currency. diff --git a/src/main/java/com/bitpay/sdk/model/ledger/Buyer.java b/src/main/java/com/bitpay/sdk/model/ledger/Buyer.java index 95a3463d..9a5134af 100644 --- a/src/main/java/com/bitpay/sdk/model/ledger/Buyer.java +++ b/src/main/java/com/bitpay/sdk/model/ledger/Buyer.java @@ -19,16 +19,16 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class Buyer { - private String name = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String address1 = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String address2 = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String city = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String state = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String zip = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String country = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String phone = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private Boolean notify; - private String email = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String name = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String address1 = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String address2 = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String city = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String state = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String zip = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String country = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String phone = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected Boolean notify; + protected String email = ModelConfiguration.DEFAULT_NON_SENT_VALUE; /** * Instantiates a new Buyer. diff --git a/src/main/java/com/bitpay/sdk/model/ledger/Ledger.java b/src/main/java/com/bitpay/sdk/model/ledger/Ledger.java index c0c78f91..adbd3940 100644 --- a/src/main/java/com/bitpay/sdk/model/ledger/Ledger.java +++ b/src/main/java/com/bitpay/sdk/model/ledger/Ledger.java @@ -19,8 +19,8 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class Ledger { - private String currency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private Double balance; + protected String currency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected Double balance; /** * Instantiates a new Ledger. diff --git a/src/main/java/com/bitpay/sdk/model/ledger/LedgerEntry.java b/src/main/java/com/bitpay/sdk/model/ledger/LedgerEntry.java index 390d5351..1f18e197 100644 --- a/src/main/java/com/bitpay/sdk/model/ledger/LedgerEntry.java +++ b/src/main/java/com/bitpay/sdk/model/ledger/LedgerEntry.java @@ -24,21 +24,21 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class LedgerEntry { - private String type; - private BigInteger amount; - private Integer code; - private String description; - private ZonedDateTime timestamp; - private String txType; - private BigInteger scale; - private String invoiceId; - private Buyer buyer; - private Double invoiceAmount; - private String invoiceCurrency; - private String transactionCurrency; - private String id; - private String supportRequest; - private String currency; + protected String type; + protected BigInteger amount; + protected Integer code; + protected String description; + protected ZonedDateTime timestamp; + protected String txType; + protected BigInteger scale; + protected String invoiceId; + protected Buyer buyer; + protected Double invoiceAmount; + protected String invoiceCurrency; + protected String transactionCurrency; + protected String id; + protected String supportRequest; + protected String currency; /** * Instantiates a new Ledger entry. diff --git a/src/main/java/com/bitpay/sdk/model/payout/Payout.java b/src/main/java/com/bitpay/sdk/model/payout/Payout.java index d2a6b915..6916925b 100644 --- a/src/main/java/com/bitpay/sdk/model/payout/Payout.java +++ b/src/main/java/com/bitpay/sdk/model/payout/Payout.java @@ -35,30 +35,30 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class Payout { - private String token = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - - private Double amount; - private String currency; - private ZonedDateTime effectiveDate; - - private String reference = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String notificationEmail = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String notificationUrl = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String ledgerCurrency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String groupId = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String id; - private String shopperId = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String recipientId; - private Map> exchangeRates; - private String accountId = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String email; - private String label; - private String status; - private String message; - private ZonedDateTime requestDate; - private ZonedDateTime dateExecuted; - private Integer code; - private List transactions = Collections.emptyList(); + protected String token = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + + protected Double amount; + protected String currency; + protected ZonedDateTime effectiveDate; + + protected String reference = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String notificationEmail = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String notificationUrl = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String ledgerCurrency = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String groupId = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String id; + protected String shopperId = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String recipientId; + protected Map> exchangeRates; + protected String accountId = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String email; + protected String label; + protected String status; + protected String message; + protected ZonedDateTime requestDate; + protected ZonedDateTime dateExecuted; + protected Integer code; + protected List transactions = Collections.emptyList(); public Boolean ignoreEmails; /** diff --git a/src/main/java/com/bitpay/sdk/model/payout/PayoutGroup.java b/src/main/java/com/bitpay/sdk/model/payout/PayoutGroup.java index a62b496e..e4f8a870 100644 --- a/src/main/java/com/bitpay/sdk/model/payout/PayoutGroup.java +++ b/src/main/java/com/bitpay/sdk/model/payout/PayoutGroup.java @@ -20,8 +20,8 @@ public class PayoutGroup { @JsonProperty("created") @JsonAlias("cancelled") - private List payouts = Collections.emptyList(); - private List failed = Collections.emptyList(); + protected List payouts = Collections.emptyList(); + protected List failed = Collections.emptyList(); public PayoutGroup() { } diff --git a/src/main/java/com/bitpay/sdk/model/payout/PayoutRecipient.java b/src/main/java/com/bitpay/sdk/model/payout/PayoutRecipient.java index 656be325..2613e910 100644 --- a/src/main/java/com/bitpay/sdk/model/payout/PayoutRecipient.java +++ b/src/main/java/com/bitpay/sdk/model/payout/PayoutRecipient.java @@ -37,14 +37,14 @@ */ @JsonIgnoreProperties(ignoreUnknown = true) public class PayoutRecipient { - private String email = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String guid; - private String label = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String notificationUrl = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String status = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String id = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String shopperId = ModelConfiguration.DEFAULT_NON_SENT_VALUE; - private String token = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String email = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String guid; + protected String label = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String notificationUrl = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String status = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String id = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String shopperId = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String token = ModelConfiguration.DEFAULT_NON_SENT_VALUE; /** * Constructor, create a minimal Recipient object. diff --git a/src/main/java/com/bitpay/sdk/model/payout/PayoutRecipients.java b/src/main/java/com/bitpay/sdk/model/payout/PayoutRecipients.java index e2bc2835..497ef4ea 100644 --- a/src/main/java/com/bitpay/sdk/model/payout/PayoutRecipients.java +++ b/src/main/java/com/bitpay/sdk/model/payout/PayoutRecipients.java @@ -16,9 +16,9 @@ * @see REST API Payouts */ public class PayoutRecipients { - private String guid; - private List recipients; - private String token = ModelConfiguration.DEFAULT_NON_SENT_VALUE; + protected String guid; + protected List recipients; + protected String token = ModelConfiguration.DEFAULT_NON_SENT_VALUE; /** * Constructor, create an recipient-full request PayoutBatch object. diff --git a/src/main/java/com/bitpay/sdk/model/payout/PayoutTransaction.java b/src/main/java/com/bitpay/sdk/model/payout/PayoutTransaction.java index e931d202..f4f1d512 100644 --- a/src/main/java/com/bitpay/sdk/model/payout/PayoutTransaction.java +++ b/src/main/java/com/bitpay/sdk/model/payout/PayoutTransaction.java @@ -22,10 +22,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class PayoutTransaction { - private String txid; - private Double amount; - private ZonedDateTime date; - private String confirmations; + protected String txid; + protected Double amount; + protected ZonedDateTime date; + protected Integer confirmations; /** * Instantiates a new Payout instruction transaction. @@ -103,7 +103,7 @@ public void setDate(final ZonedDateTime date) { * @return confirmations */ @JsonIgnore - public String getConfirmations() { + public Integer getConfirmations() { return this.confirmations; } @@ -113,7 +113,7 @@ public String getConfirmations() { * @param confirmations confirmations */ @JsonProperty("confirmations") - public void setConfirmations(final String confirmations) { + public void setConfirmations(final Integer confirmations) { this.confirmations = confirmations; } } diff --git a/src/main/java/com/bitpay/sdk/model/payout/PayoutWebhook.java b/src/main/java/com/bitpay/sdk/model/payout/PayoutWebhook.java index a2b8fc8c..b25b474d 100644 --- a/src/main/java/com/bitpay/sdk/model/payout/PayoutWebhook.java +++ b/src/main/java/com/bitpay/sdk/model/payout/PayoutWebhook.java @@ -38,6 +38,9 @@ class PayoutWebhook { protected ZonedDateTime requestDate; protected String status; protected List transactions; + protected String accountId; + protected ZonedDateTime dateExecuted; + protected String groupId; public String getId() { return this.id; @@ -172,4 +175,28 @@ public List getTransactions() { public void setTransactions(List transactions) { this.transactions = transactions; } + + public String getAccountId() { + return this.accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + public ZonedDateTime getDateExecuted() { + return this.dateExecuted; + } + + public void setDateExecuted(ZonedDateTime dateExecuted) { + this.dateExecuted = dateExecuted; + } + + public String getGroupId() { + return this.groupId; + } + + public void setGroupId(String groupId) { + this.groupId = groupId; + } } diff --git a/src/main/java/com/bitpay/sdk/model/rate/Rate.java b/src/main/java/com/bitpay/sdk/model/rate/Rate.java index 613cff83..c9259361 100644 --- a/src/main/java/com/bitpay/sdk/model/rate/Rate.java +++ b/src/main/java/com/bitpay/sdk/model/rate/Rate.java @@ -40,7 +40,7 @@ public class Rate { * for a list of ISO 4217 currency codes. * */ - private String code; + protected String code; /** * The name of the currency or cryptocurrency. @@ -48,13 +48,13 @@ public class Rate { * Refer to ISO Standards * for a list of ISO 4217 currency codes. */ - private String name; + protected String name; /** * The value of the rate, returned in the JSON as "rate" and to a precision * of two decimal places. */ - private Double value; + protected Double value; /** * Class constructor. diff --git a/src/main/java/com/bitpay/sdk/model/rate/Rates.java b/src/main/java/com/bitpay/sdk/model/rate/Rates.java index 1c53333e..57ca307c 100644 --- a/src/main/java/com/bitpay/sdk/model/rate/Rates.java +++ b/src/main/java/com/bitpay/sdk/model/rate/Rates.java @@ -19,7 +19,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class Rates { - private List rates; + protected List rates; /** * Instantiates a new Rates. diff --git a/src/main/java/com/bitpay/sdk/model/settlement/InvoiceData.java b/src/main/java/com/bitpay/sdk/model/settlement/InvoiceData.java index bf009949..8a004460 100644 --- a/src/main/java/com/bitpay/sdk/model/settlement/InvoiceData.java +++ b/src/main/java/com/bitpay/sdk/model/settlement/InvoiceData.java @@ -22,14 +22,14 @@ */ @JsonIgnoreProperties(ignoreUnknown = true) public class InvoiceData { - private String orderId; - private ZonedDateTime date; - private Float price; - private String currency; - private String transactionCurrency; - private Float overpaidAmount; - private Map payoutPercentage; - private RefundInfo refundInfo; + protected String orderId; + protected ZonedDateTime date; + protected Float price; + protected String currency; + protected String transactionCurrency; + protected Float overpaidAmount; + protected Map payoutPercentage; + protected RefundInfo refundInfo; /** * Instantiates a new Invoice data. diff --git a/src/main/java/com/bitpay/sdk/model/settlement/PayoutInfo.java b/src/main/java/com/bitpay/sdk/model/settlement/PayoutInfo.java index c7447515..0bd47694 100644 --- a/src/main/java/com/bitpay/sdk/model/settlement/PayoutInfo.java +++ b/src/main/java/com/bitpay/sdk/model/settlement/PayoutInfo.java @@ -17,30 +17,30 @@ */ @JsonIgnoreProperties(ignoreUnknown = true) public class PayoutInfo { - private String name; - private String account; - private String routing; - private String merchantEin; - private String label; - private String bankCountry; - private String bank; - private String swift; - private String address; - private String city; - private String postal; - private String sort; - private Boolean wire; - private String bankName; - private String bankAddress; - private String bankAddress2; - private String iban; - private String additionalInformation; - private String accountHolderName; - private String accountHolderAddress; - private String accountHolderAddress2; - private String accountHolderPostalCode; - private String accountHolderCity; - private String accountHolderCountry; + protected String name; + protected String account; + protected String routing; + protected String merchantEin; + protected String label; + protected String bankCountry; + protected String bank; + protected String swift; + protected String address; + protected String city; + protected String postal; + protected String sort; + protected Boolean wire; + protected String bankName; + protected String bankAddress; + protected String bankAddress2; + protected String iban; + protected String additionalInformation; + protected String accountHolderName; + protected String accountHolderAddress; + protected String accountHolderAddress2; + protected String accountHolderPostalCode; + protected String accountHolderCity; + protected String accountHolderCountry; /** * Instantiates a new Payout info. diff --git a/src/main/java/com/bitpay/sdk/model/settlement/RefundInfo.java b/src/main/java/com/bitpay/sdk/model/settlement/RefundInfo.java index b398c60a..7084a5cc 100644 --- a/src/main/java/com/bitpay/sdk/model/settlement/RefundInfo.java +++ b/src/main/java/com/bitpay/sdk/model/settlement/RefundInfo.java @@ -18,9 +18,9 @@ */ @JsonIgnoreProperties(ignoreUnknown = true) public class RefundInfo { - private String supportRequest; - private String currency; - private Hashtable amounts; + protected String supportRequest; + protected String currency; + protected Hashtable amounts; /** * Instantiates a new Refund info. diff --git a/src/main/java/com/bitpay/sdk/model/settlement/Settlement.java b/src/main/java/com/bitpay/sdk/model/settlement/Settlement.java index a75e0d42..9d7c5f13 100644 --- a/src/main/java/com/bitpay/sdk/model/settlement/Settlement.java +++ b/src/main/java/com/bitpay/sdk/model/settlement/Settlement.java @@ -23,23 +23,23 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class Settlement { - private String id; - private String accountId; - private String currency; - private PayoutInfo payoutInfo; - private String status; - private ZonedDateTime dateCreated; - private ZonedDateTime dateExecuted; - private ZonedDateTime dateCompleted; - private ZonedDateTime openingDate; - private ZonedDateTime closingDate; - private Float openingBalance; - private Float ledgerEntriesSum; - private List withHoldings; - private Float withHoldingsSum; - private Float totalAmount; - private List ledgerEntries; - private String token; + protected String id; + protected String accountId; + protected String currency; + protected PayoutInfo payoutInfo; + protected String status; + protected ZonedDateTime dateCreated; + protected ZonedDateTime dateExecuted; + protected ZonedDateTime dateCompleted; + protected ZonedDateTime openingDate; + protected ZonedDateTime closingDate; + protected Float openingBalance; + protected Float ledgerEntriesSum; + protected List withHoldings; + protected Float withHoldingsSum; + protected Float totalAmount; + protected List ledgerEntries; + protected String token; /** * Instantiates a new Settlement. diff --git a/src/main/java/com/bitpay/sdk/model/settlement/SettlementLedgerEntry.java b/src/main/java/com/bitpay/sdk/model/settlement/SettlementLedgerEntry.java index 015a3aec..ef4c4433 100644 --- a/src/main/java/com/bitpay/sdk/model/settlement/SettlementLedgerEntry.java +++ b/src/main/java/com/bitpay/sdk/model/settlement/SettlementLedgerEntry.java @@ -21,12 +21,12 @@ */ @JsonIgnoreProperties(ignoreUnknown = true) public class SettlementLedgerEntry { - private Integer code; - private String invoiceId; - private Float amount; - private ZonedDateTime timestamp; - private String description; - private InvoiceData invoiceData; + protected Integer code; + protected String invoiceId; + protected Float amount; + protected ZonedDateTime timestamp; + protected String description; + protected InvoiceData invoiceData; /** * Instantiates a new Settlement ledger entry. diff --git a/src/main/java/com/bitpay/sdk/model/settlement/WithHoldings.java b/src/main/java/com/bitpay/sdk/model/settlement/WithHoldings.java index e3858353..a9f87977 100644 --- a/src/main/java/com/bitpay/sdk/model/settlement/WithHoldings.java +++ b/src/main/java/com/bitpay/sdk/model/settlement/WithHoldings.java @@ -16,12 +16,12 @@ */ @JsonIgnoreProperties(ignoreUnknown = true) public class WithHoldings { - private Float amount; - private String code; - private String description; - private String notes; - private String label; - private String bankCountry; + protected Float amount; + protected String code; + protected String description; + protected String notes; + protected String label; + protected String bankCountry; /** * Instantiates a new With holdings. diff --git a/src/main/java/com/bitpay/sdk/model/wallet/Currencies.java b/src/main/java/com/bitpay/sdk/model/wallet/Currencies.java index c7fe812d..d6ffadd4 100644 --- a/src/main/java/com/bitpay/sdk/model/wallet/Currencies.java +++ b/src/main/java/com/bitpay/sdk/model/wallet/Currencies.java @@ -17,14 +17,14 @@ */ @JsonIgnoreProperties(ignoreUnknown = true) public class Currencies { - private String code; - private Boolean p2p; - private Boolean dappBrowser; - private Boolean payPro; - private CurrencyQr qr; - private String image; - private String withdrawalFee; - private Boolean walletConnect; + protected String code; + protected Boolean p2p; + protected Boolean dappBrowser; + protected Boolean payPro; + protected CurrencyQr qr; + protected String image; + protected String withdrawalFee; + protected Boolean walletConnect; /** * Instantiates a new Currencies. diff --git a/src/main/java/com/bitpay/sdk/model/wallet/CurrencyQr.java b/src/main/java/com/bitpay/sdk/model/wallet/CurrencyQr.java index f682377d..12613546 100644 --- a/src/main/java/com/bitpay/sdk/model/wallet/CurrencyQr.java +++ b/src/main/java/com/bitpay/sdk/model/wallet/CurrencyQr.java @@ -16,8 +16,8 @@ */ @JsonIgnoreProperties(ignoreUnknown = true) public class CurrencyQr { - private String type; - private Boolean collapsed; + protected String type; + protected Boolean collapsed; /** * Instantiates a new Currency qr. diff --git a/src/main/java/com/bitpay/sdk/model/wallet/Wallet.java b/src/main/java/com/bitpay/sdk/model/wallet/Wallet.java index b832a173..85486dc1 100644 --- a/src/main/java/com/bitpay/sdk/model/wallet/Wallet.java +++ b/src/main/java/com/bitpay/sdk/model/wallet/Wallet.java @@ -17,12 +17,12 @@ */ @JsonIgnoreProperties(ignoreUnknown = true) public class Wallet { - private String key; - private String displayName; - private String avatar; - private Boolean payPro; - private ArrayList currencies; - private String image; + protected String key; + protected String displayName; + protected String avatar; + protected Boolean payPro; + protected ArrayList currencies; + protected String image; /** * Instantiates a new Wallet. diff --git a/src/test/java/com/bitpay/sdk/ClientTest.java b/src/test/java/com/bitpay/sdk/ClientTest.java index 8c7f79bb..715ba8b2 100644 --- a/src/test/java/com/bitpay/sdk/ClientTest.java +++ b/src/test/java/com/bitpay/sdk/ClientTest.java @@ -255,6 +255,7 @@ public void it_should_test_create_invoice_by_merchant() "4qS4CzeRlGRu9VvUfVvuESfQXWTAQuFLjhj6osrGexKWZoadBPe1eiScsvTX99dkYi" ); Assertions.assertEquals("UZjwcYkWAKfTMn9J1yyfs4", result.getId()); + Assertions.assertEquals("2024-01-08T23:50:56.556Z", result.getRefundAddresses().get(0).get("n2MDYgEhxCAnuoVd1JpPmvxZShE6rQA6zv").getDate().toString()); } @Test diff --git a/src/test/java/com/bitpay/sdk/client/PayoutClientTest.java b/src/test/java/com/bitpay/sdk/client/PayoutClientTest.java index 9c588aa2..80bcf830 100644 --- a/src/test/java/com/bitpay/sdk/client/PayoutClientTest.java +++ b/src/test/java/com/bitpay/sdk/client/PayoutClientTest.java @@ -86,7 +86,7 @@ public void it_should_get_payout() throws BitPayException { Assertions.assertEquals("complete", result.getStatus()); Assertions.assertEquals("6RZSTPtnzEaroAe2X4YijenRiqteRDNvzbT8NjtcHjUVd9FUFwa7dsX8RFgRDDC5SL", result.getToken()); Assertions.assertEquals("db53d7e2bf3385a31257ce09396202d9c2823370a5ca186db315c45e24594057", result.getTransactions().get(0).getTxid()); - Assertions.assertEquals("6", result.getTransactions().get(0).getConfirmations()); + Assertions.assertEquals(6, result.getTransactions().get(0).getConfirmations()); } @Test diff --git a/src/test/java/com/bitpay/sdk/json/createInvoiceResponse.json b/src/test/java/com/bitpay/sdk/json/createInvoiceResponse.json index 98e76781..191c07df 100644 --- a/src/test/java/com/bitpay/sdk/json/createInvoiceResponse.json +++ b/src/test/java/com/bitpay/sdk/json/createInvoiceResponse.json @@ -31,7 +31,15 @@ "notify": true }, "autoRedirect": true, - "refundAddresses": [], + "refundAddresses": [ + { + "n2MDYgEhxCAnuoVd1JpPmvxZShE6rQA6zv": { + "type": "buyerSupplied", + "date": "2024-01-08T23:50:56.556Z", + "email": "email@email.com" + } + } + ], "refundAddressRequestPending": false, "buyerProvidedEmail": "m.warzybok@sumoheavy.com", "buyerProvidedInfo": { diff --git a/src/test/java/com/bitpay/sdk/model/invoice/InvoiceTest.java b/src/test/java/com/bitpay/sdk/model/invoice/InvoiceTest.java index f1256d04..ecd42551 100644 --- a/src/test/java/com/bitpay/sdk/model/invoice/InvoiceTest.java +++ b/src/test/java/com/bitpay/sdk/model/invoice/InvoiceTest.java @@ -12,6 +12,7 @@ import java.util.Collections; import java.util.Hashtable; import java.util.List; +import java.util.Map; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.mockito.Mockito; @@ -349,7 +350,7 @@ public void it_should_manipulate_transactions() { @Test public void it_should_manipulate_refundAddresses() { - ArrayList expected = new ArrayList(); + List> expected = new ArrayList>(); Invoice testedClass = this.getTestedClass(); testedClass.setRefundAddresses(expected); diff --git a/src/test/java/com/bitpay/sdk/model/invoice/InvoiceWebhookTest.java b/src/test/java/com/bitpay/sdk/model/invoice/InvoiceWebhookTest.java index 4a3c75aa..9330bd38 100644 --- a/src/test/java/com/bitpay/sdk/model/invoice/InvoiceWebhookTest.java +++ b/src/test/java/com/bitpay/sdk/model/invoice/InvoiceWebhookTest.java @@ -152,6 +152,24 @@ public void testManipulateTransactionCurrency() { Assertions.assertSame(expected, testedClass.getTransactionCurrency()); } + @Test + public void testManipulateInInvoiceId() { + InvoiceWebhook testedClass = this.getTestedClass(); + String expected = "someValue"; + testedClass.setInInvoiceId(expected); + + Assertions.assertSame(expected, testedClass.getInInvoiceId()); + } + + @Test + public void testManipulateInPaymentRequest() { + InvoiceWebhook testedClass = this.getTestedClass(); + String expected = "someValue"; + testedClass.setInPaymentRequest(expected); + + Assertions.assertSame(expected, testedClass.getInPaymentRequest()); + } + private InvoiceWebhook getTestedClass() { return new InvoiceWebhook(); } From a0f60b6d65643bfa7004ed7163cd811ef8976848 Mon Sep 17 00:00:00 2001 From: Marcin Warzybok Date: Tue, 23 Jan 2024 15:41:44 +0100 Subject: [PATCH 2/3] SP-737 Type Review: Java --- .../com/bitpay/sdk/model/invoice/InvoiceRefundAddresses.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/bitpay/sdk/model/invoice/InvoiceRefundAddresses.java b/src/main/java/com/bitpay/sdk/model/invoice/InvoiceRefundAddresses.java index cf85a944..5fdc56e7 100644 --- a/src/main/java/com/bitpay/sdk/model/invoice/InvoiceRefundAddresses.java +++ b/src/main/java/com/bitpay/sdk/model/invoice/InvoiceRefundAddresses.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2019 BitPay. + * All rights reserved. + */ + package com.bitpay.sdk.model.invoice; import java.time.ZonedDateTime; From 515daf74df839336af0045ccaa4e036d19c95d1e Mon Sep 17 00:00:00 2001 From: Marcin Warzybok Date: Tue, 23 Jan 2024 16:30:36 +0100 Subject: [PATCH 3/3] SP-737 Type Review: Java --- .../invoice/InvoiceRefundAddressesTest.java | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/test/java/com/bitpay/sdk/model/invoice/InvoiceRefundAddressesTest.java diff --git a/src/test/java/com/bitpay/sdk/model/invoice/InvoiceRefundAddressesTest.java b/src/test/java/com/bitpay/sdk/model/invoice/InvoiceRefundAddressesTest.java new file mode 100644 index 00000000..3982977a --- /dev/null +++ b/src/test/java/com/bitpay/sdk/model/invoice/InvoiceRefundAddressesTest.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2019 BitPay. + * All rights reserved. + */ + +package com.bitpay.sdk.model.invoice; + +import java.time.ZonedDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +public class InvoiceRefundAddressesTest { + + @Test + public void it_should_manipulate_type() { + String expected = "exampleType"; + InvoiceRefundAddresses testedClass = this.getTestedClass(); + + testedClass.setType(expected); + Assertions.assertSame(expected, testedClass.getType()); + } + + @Test + public void it_should_manipulate_date() { + ZonedDateTime expected = ZonedDateTime.now(); + InvoiceRefundAddresses testedClass = this.getTestedClass(); + + testedClass.setDate(expected); + Assertions.assertSame(expected, testedClass.getDate()); + } + + @Test + public void it_should_manipulate_tag() { + Integer expected = 123; + InvoiceRefundAddresses testedClass = this.getTestedClass(); + + testedClass.setTag(expected); + Assertions.assertSame(expected, testedClass.getTag()); + } + + @Test + public void it_should_manipulate_email() { + String expected = "example@email.com"; + InvoiceRefundAddresses testedClass = this.getTestedClass(); + + testedClass.setEmail(expected); + Assertions.assertSame(expected, testedClass.getEmail()); + } + + private InvoiceRefundAddresses getTestedClass() { + return new InvoiceRefundAddresses(); + } +}