Skip to content

Commit de56bd0

Browse files
authored
Merge pull request #268 from mwarzybok-sumoheavy/feature/SP-737
SP-737 Type Review: Java
2 parents 8a2cca2 + 515daf7 commit de56bd0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+713
-371
lines changed

src/main/java/com/bitpay/sdk/model/Facade.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public enum Facade {
3636
*/
3737
POS("pos");
3838

39-
private final String value;
39+
protected final String value;
4040

4141
Facade(String value) {
4242
this.value = value;

src/main/java/com/bitpay/sdk/model/Policy.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
@JsonIgnoreProperties(ignoreUnknown = true)
1919
public class Policy {
2020

21-
private String policy;
22-
private String method;
23-
private List<String> params;
21+
protected String policy;
22+
protected String method;
23+
protected List<String> params;
2424

2525
/**
2626
* Instantiates a new Policy.

src/main/java/com/bitpay/sdk/model/Token.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@
1919
@JsonIgnoreProperties(ignoreUnknown = true)
2020
public class Token {
2121

22-
private String guid;
23-
private String id;
24-
private String pairingCode;
25-
private Long pairingExpiration;
26-
private String facade;
27-
private String label;
28-
private Integer count = 0;
29-
private List<Policy> policies;
30-
private String resource;
31-
private String value;
32-
private Long dateCreated;
22+
protected String guid;
23+
protected String id;
24+
protected String pairingCode;
25+
protected Long pairingExpiration;
26+
protected String facade;
27+
protected String label;
28+
protected Integer count = 0;
29+
protected List<Policy> policies;
30+
protected String resource;
31+
protected String value;
32+
protected Long dateCreated;
3333

3434
/**
3535
* Instantiates a new Token.

src/main/java/com/bitpay/sdk/model/bill/Bill.java

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,27 @@
2929
@JsonIgnoreProperties(ignoreUnknown = true)
3030
public class Bill {
3131

32-
private String currency = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
33-
private String token = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
34-
private String email = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
35-
private List<Item> items;
36-
private String number = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
37-
private String name = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
38-
private String address1 = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
39-
private String address2 = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
40-
private String city = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
41-
private String state = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
42-
private String zip = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
43-
private String country = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
44-
private List<String> cc;
45-
private String phone = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
46-
private ZonedDateTime dueDate;
47-
private Boolean passProcessingFee;
48-
private String status = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
49-
private String url = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
50-
private ZonedDateTime createdDate;
51-
private String id = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
52-
private String merchant = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
32+
protected String currency = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
33+
protected String token = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
34+
protected String email = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
35+
protected List<Item> items;
36+
protected String number = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
37+
protected String name = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
38+
protected String address1 = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
39+
protected String address2 = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
40+
protected String city = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
41+
protected String state = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
42+
protected String zip = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
43+
protected String country = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
44+
protected List<String> cc;
45+
protected String phone = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
46+
protected ZonedDateTime dueDate;
47+
protected Boolean passProcessingFee;
48+
protected String status = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
49+
protected String url = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
50+
protected ZonedDateTime createdDate;
51+
protected String id = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
52+
protected String merchant = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
5353

5454
/**
5555
* Constructor, create an empty Bill object.

src/main/java/com/bitpay/sdk/model/bill/Item.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
@JsonIgnoreProperties(ignoreUnknown = true)
2020
public class Item {
2121

22-
private String id;
23-
private String description = DEFAULT_NON_SENT_VALUE;
24-
private Double price;
25-
private Integer quantity;
22+
protected String id;
23+
protected String description = DEFAULT_NON_SENT_VALUE;
24+
protected Double price;
25+
protected Integer quantity;
2626

2727
/**
2828
* Instantiates a new Item.

src/main/java/com/bitpay/sdk/model/invoice/Buyer.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
@JsonIgnoreProperties(ignoreUnknown = true)
1919
public class Buyer {
2020

21-
private String name = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
22-
private String address1 = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
23-
private String address2 = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
24-
private String locality = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
25-
private String region = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
26-
private String postalCode = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
27-
private String country = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
28-
private String email = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
29-
private String phone = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
30-
private Boolean notify;
21+
protected String name = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
22+
protected String address1 = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
23+
protected String address2 = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
24+
protected String locality = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
25+
protected String region = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
26+
protected String postalCode = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
27+
protected String country = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
28+
protected String email = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
29+
protected String phone = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
30+
protected Boolean notify;
3131

3232
/**
3333
* Instantiates a new Buyer.

src/main/java/com/bitpay/sdk/model/invoice/Invoice.java

Lines changed: 67 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import java.util.ArrayList;
1919
import java.util.Hashtable;
2020
import java.util.List;
21+
import java.util.Map;
2122

2223
/**
2324
* The type Invoice.
@@ -27,70 +28,70 @@
2728
@JsonIgnoreProperties(ignoreUnknown = true)
2829
public class Invoice {
2930

30-
private String currency = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
31-
32-
private String guid;
33-
private String token;
34-
35-
private Double price;
36-
private String posData;
37-
private String notificationUrl = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
38-
private String transactionSpeed = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
39-
private Boolean fullNotifications;
40-
private String notificationEmail = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
41-
private String redirectUrl = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
42-
private String closeUrl = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
43-
private String orderId = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
44-
private String itemDesc = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
45-
private String itemCode = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
46-
private Boolean physical;
47-
private List<String> paymentCurrencies;
48-
private Integer acceptanceWindow;
49-
private Buyer buyer;
50-
private String buyerSms = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
51-
private String merchantName = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
52-
private String selectedTransactionCurrency = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
53-
private String forcedBuyerSelectedWallet = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
54-
private InvoiceUniversalCodes universalCodes;
55-
private List<InvoiceItemizedDetails> itemizedDetails;
56-
private Boolean autoRedirect;
57-
58-
private String id;
59-
private String url = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
60-
private String status = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
61-
private Boolean lowFeeDetected;
62-
private Long invoiceTime;
63-
private Long expirationTime;
64-
private Long currentTime;
65-
private String exceptionStatus = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
66-
private Integer targetConfirmations;
67-
private List<InvoiceTransaction> transactions;
68-
private ArrayList refundAddresses;
69-
private Boolean refundAddressRequestPending;
70-
private String buyerProvidedEmail = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
71-
private InvoiceBuyerProvidedInfo invoiceBuyerProvidedInfo;
72-
private SupportedTransactionCurrencies supportedTransactionCurrencies;
73-
private MinerFees minerFees;
74-
private Shopper shopper;
75-
private String billId = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
76-
private ArrayList<RefundInfo> refundInfo;
77-
private Boolean extendedNotifications;
78-
private String transactionCurrency = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
79-
private String forcedBuyerSelectedTransactionCurrency = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
80-
private BigDecimal amountPaid;
81-
private String displayAmountPaid;
82-
private Hashtable<String, Hashtable<String, BigDecimal>> exchangeRates;
83-
private Boolean isCancelled;
84-
private Boolean bitpayIdRequired;
85-
private Hashtable<String, BigInteger> paymentSubtotals;
86-
private Hashtable<String, BigInteger> paymentTotals;
87-
private Hashtable<String, String> paymentDisplayTotals;
88-
private Hashtable<String, String> paymentDisplaySubTotals;
89-
private Boolean nonPayProPaymentReceived;
90-
private Boolean jsonPayProRequired;
91-
private BigDecimal underpaidAmount;
92-
private BigDecimal overpaidAmount;
93-
private Hashtable<String, Hashtable<String, String>> paymentCodes;
31+
protected String currency = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
32+
33+
protected String guid;
34+
protected String token;
35+
36+
protected Double price;
37+
protected String posData;
38+
protected String notificationUrl = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
39+
protected String transactionSpeed = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
40+
protected Boolean fullNotifications;
41+
protected String notificationEmail = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
42+
protected String redirectUrl = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
43+
protected String closeUrl = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
44+
protected String orderId = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
45+
protected String itemDesc = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
46+
protected String itemCode = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
47+
protected Boolean physical;
48+
protected List<String> paymentCurrencies;
49+
protected Integer acceptanceWindow;
50+
protected Buyer buyer;
51+
protected String buyerSms = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
52+
protected String merchantName = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
53+
protected String selectedTransactionCurrency = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
54+
protected String forcedBuyerSelectedWallet = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
55+
protected InvoiceUniversalCodes universalCodes;
56+
protected List<InvoiceItemizedDetails> itemizedDetails;
57+
protected Boolean autoRedirect;
58+
59+
protected String id;
60+
protected String url = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
61+
protected String status = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
62+
protected Boolean lowFeeDetected;
63+
protected Long invoiceTime;
64+
protected Long expirationTime;
65+
protected Long currentTime;
66+
protected String exceptionStatus = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
67+
protected Integer targetConfirmations;
68+
protected List<InvoiceTransaction> transactions;
69+
protected List<Map<String, InvoiceRefundAddresses>> refundAddresses;
70+
protected Boolean refundAddressRequestPending;
71+
protected String buyerProvidedEmail = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
72+
protected InvoiceBuyerProvidedInfo invoiceBuyerProvidedInfo;
73+
protected SupportedTransactionCurrencies supportedTransactionCurrencies;
74+
protected MinerFees minerFees;
75+
protected Shopper shopper;
76+
protected String billId = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
77+
protected ArrayList<RefundInfo> refundInfo;
78+
protected Boolean extendedNotifications;
79+
protected String transactionCurrency = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
80+
protected String forcedBuyerSelectedTransactionCurrency = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
81+
protected BigDecimal amountPaid;
82+
protected String displayAmountPaid;
83+
protected Hashtable<String, Hashtable<String, BigDecimal>> exchangeRates;
84+
protected Boolean isCancelled;
85+
protected Boolean bitpayIdRequired;
86+
protected Hashtable<String, BigInteger> paymentSubtotals;
87+
protected Hashtable<String, BigInteger> paymentTotals;
88+
protected Hashtable<String, String> paymentDisplayTotals;
89+
protected Hashtable<String, String> paymentDisplaySubTotals;
90+
protected Boolean nonPayProPaymentReceived;
91+
protected Boolean jsonPayProRequired;
92+
protected BigDecimal underpaidAmount;
93+
protected BigDecimal overpaidAmount;
94+
protected Hashtable<String, Hashtable<String, String>> paymentCodes;
9495

9596
/**
9697
* Constructor, create an empty Invoice object.
@@ -1168,7 +1169,7 @@ public void setTargetConfirmations(final Integer targetConfirmations) {
11681169
* @return the refund addresses
11691170
*/
11701171
@JsonIgnore
1171-
public ArrayList getRefundAddresses() {
1172+
public List<Map<String, InvoiceRefundAddresses>> getRefundAddresses() {
11721173
return this.refundAddresses;
11731174
}
11741175

@@ -1179,7 +1180,7 @@ public ArrayList getRefundAddresses() {
11791180
* @param refundAddresses the refund addresses
11801181
*/
11811182
@JsonProperty("refundAddresses")
1182-
public void setRefundAddresses(final ArrayList refundAddresses) {
1183+
public void setRefundAddresses(final List<Map<String, InvoiceRefundAddresses>> refundAddresses) {
11831184
this.refundAddresses = refundAddresses;
11841185
}
11851186

src/main/java/com/bitpay/sdk/model/invoice/InvoiceBuyerProvidedInfo.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
@JsonIgnoreProperties(ignoreUnknown = true)
1919
public class InvoiceBuyerProvidedInfo {
2020

21-
private String name = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
22-
private String phoneNumber = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
23-
private String selectedTransactionCurrency = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
24-
private String emailAddress = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
25-
private String selectedWallet = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
26-
private String sms = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
27-
private Boolean smsVerified;
21+
protected String name = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
22+
protected String phoneNumber = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
23+
protected String selectedTransactionCurrency = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
24+
protected String emailAddress = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
25+
protected String selectedWallet = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
26+
protected String sms = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
27+
protected Boolean smsVerified;
2828

2929
/**
3030
* Instantiates a new Invoice buyer provided info.

src/main/java/com/bitpay/sdk/model/invoice/InvoiceEventToken.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
*/
1717
public class InvoiceEventToken {
1818

19-
private String token = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
20-
private List<String> events;
21-
private List<String> actions;
19+
protected String token = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
20+
protected List<String> events;
21+
protected List<String> actions;
2222

2323
/**
2424
* Instantiates a new Invoice event token.

src/main/java/com/bitpay/sdk/model/invoice/InvoiceItemizedDetails.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
*/
1818
@JsonIgnoreProperties(ignoreUnknown = true)
1919
public class InvoiceItemizedDetails {
20-
private Double amount;
21-
private String description = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
22-
private Boolean isFee;
20+
protected Double amount;
21+
protected String description = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
22+
protected Boolean isFee;
2323

2424
/**
2525
* Instantiates a new Invoice itemized details.

0 commit comments

Comments
 (0)