Skip to content

Commit 0401bf0

Browse files
Add missing fields to models
1 parent c9a6f67 commit 0401bf0

File tree

15 files changed

+434
-875
lines changed

15 files changed

+434
-875
lines changed

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class Bill {
4040
private boolean passProcessingFee;
4141
private String status = DEFAULT_NON_SENT_VALUE;
4242
private String url = DEFAULT_NON_SENT_VALUE;
43-
private String createDate = DEFAULT_NON_SENT_VALUE;
43+
private String createdDate = DEFAULT_NON_SENT_VALUE;
4444
private String id = DEFAULT_NON_SENT_VALUE;
4545
private String merchant = DEFAULT_NON_SENT_VALUE;
4646

@@ -470,18 +470,19 @@ public void setUrl(String url) {
470470
* @return the create date
471471
*/
472472
@JsonIgnore
473-
public String getCreateDate() {
474-
return this.createDate;
473+
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
474+
public String getCreatedDate() {
475+
return this.createdDate;
475476
}
476477

477478
/**
478479
* Sets date and time of Bill creation, ISO-8601 format yyyy-mm-ddThh:mm:ssZ. (UTC).
479480
*
480-
* @param createDate the create date
481+
* @param createdDate the create date
481482
*/
482-
@JsonProperty("createDate")
483-
public void setCreateDate(String createDate) {
484-
this.createDate = createDate;
483+
@JsonProperty("createdDate")
484+
public void setCreatedDate(String createdDate) {
485+
this.createdDate = createdDate;
485486
}
486487

487488
/**

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

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ public class Refund {
3434
private String reference = DEFAULT_NON_SENT_VALUE;
3535
private Double refundFee;
3636
private Date lastRefundNotification;
37+
private String notificationUrl = DEFAULT_NON_SENT_VALUE;
38+
private String refundAddress = DEFAULT_NON_SENT_VALUE;
39+
private String supportRequest = DEFAULT_NON_SENT_VALUE;
40+
private String txid = DEFAULT_NON_SENT_VALUE;
41+
private String type = DEFAULT_NON_SENT_VALUE;
3742

3843
/**
3944
* Amount to be refunded in terms of the transaction currency.
@@ -55,6 +60,7 @@ public class Refund {
5560
private Date requestDate;
5661
private String status = DEFAULT_NON_SENT_VALUE;
5762

63+
5864
/**
5965
* Instantiates a new Refund.
6066
*/
@@ -419,4 +425,125 @@ public Double getRefundFee() {
419425
public void setRefundFee(Double refundFee) {
420426
this.refundFee = refundFee;
421427
}
428+
429+
/**
430+
* Gets URL to which BitPay sends webhook notifications. HTTPS is mandatory.
431+
*
432+
* @return notification url
433+
*/
434+
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
435+
public String getNotificationUrl() {
436+
return notificationUrl;
437+
}
438+
439+
/**
440+
* Sets URL to which BitPay sends webhook notifications. HTTPS is mandatory.
441+
*
442+
* @param notificationURL Notification url.
443+
*/
444+
@JsonProperty("notificationURL")
445+
public void setNotificationUrl(String notificationURL) {
446+
this.notificationUrl = notificationURL;
447+
}
448+
449+
/**
450+
* Gets the wallet address that the refund will return the funds to, added by the customer.
451+
*
452+
* @return refund address
453+
*/
454+
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
455+
public String getRefundAddress() {
456+
return refundAddress;
457+
}
458+
459+
/**
460+
* Sets the wallet address that the refund will return the funds to, added by the customer.
461+
*
462+
* @param refundAddress refund address
463+
*/
464+
@JsonProperty("refundAddress")
465+
public void setRefundAddress(String refundAddress) {
466+
this.refundAddress = refundAddress;
467+
}
468+
469+
/**
470+
* Gets the ID of the associated support request for the refund.
471+
*
472+
* @return support request
473+
*/
474+
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
475+
public String getSupportRequest() {
476+
return supportRequest;
477+
}
478+
479+
/**
480+
* Sets the ID of the associated support request for the refund.
481+
*
482+
* @param supportRequest support request
483+
*/
484+
@JsonProperty("supportRequest")
485+
public void setSupportRequest(String supportRequest) {
486+
this.supportRequest = supportRequest;
487+
}
488+
489+
/**
490+
*
491+
* Gets the transaction ID of the refund once executed.
492+
*
493+
* @return transaction id
494+
*/
495+
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
496+
public String getTxid() {
497+
return txid;
498+
}
499+
500+
/**
501+
* Sets the transaction ID of the refund once executed.
502+
*
503+
* @param txid transaction id
504+
*/
505+
@JsonProperty("txid")
506+
public void setTxid(String txid) {
507+
this.txid = txid;
508+
}
509+
510+
/**
511+
* <p>Gets the type of refund.</p>
512+
* <ul>
513+
* <li>full (current rate): A full refund of the amount paid at the current rate.</li>
514+
* <li>full (fixed rate): A full refund of the amount paid at the fixed rate.
515+
* Note: deprecated refund implementation only.</li>
516+
* <li>partial: Part of the invoice is being refunded, rather than the full invoie amount.</li>
517+
* <li>underpayment: The payment was underpaid, a refund in the amount paid will be executed.</li>
518+
* <li>overpayment: The payment was overpaid, a refund in the amount that was overpaid from the invoice price
519+
* will be executed.</li>
520+
* <li>declined: The payment was declined, a refund in the full amount paid will be excuted.</li>
521+
* </ul>
522+
*
523+
* @return type
524+
*/
525+
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
526+
public String getType() {
527+
return type;
528+
}
529+
530+
/**
531+
* <p>Sets the type of refund.</p>
532+
* <ul>
533+
* <li>full (current rate): A full refund of the amount paid at the current rate.</li>
534+
* <li>full (fixed rate): A full refund of the amount paid at the fixed rate.
535+
* Note: deprecated refund implementation only.</li>
536+
* <li>partial: Part of the invoice is being refunded, rather than the full invoie amount.</li>
537+
* <li>underpayment: The payment was underpaid, a refund in the amount paid will be executed.</li>
538+
* <li>overpayment: The payment was overpaid, a refund in the amount that was overpaid from the invoice price
539+
* will be executed.</li>
540+
* <li>declined: The payment was declined, a refund in the full amount paid will be excuted.</li>
541+
* </ul>
542+
*
543+
* @param type type
544+
*/
545+
@JsonProperty("type")
546+
public void setType(String type) {
547+
this.type = type;
548+
}
422549
}

src/main/java/com/bitpay/sdk/model/Ledger/LedgerEntry.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.fasterxml.jackson.annotation.JsonIgnore;
44
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
5+
import com.fasterxml.jackson.annotation.JsonInclude;
56
import com.fasterxml.jackson.annotation.JsonProperty;
67

78
/**
@@ -25,6 +26,7 @@ public class LedgerEntry {
2526
private String invoiceCurrency;
2627
private String transactionCurrency;
2728
private String id;
29+
private String supportRequest;
2830

2931
/**
3032
* Instantiates a new Ledger entry.
@@ -320,4 +322,22 @@ public String getId() {
320322
public void setId(String id) {
321323
this.id = id;
322324
}
325+
326+
/**
327+
* Gets the refund requestId.
328+
* @return refund requestId
329+
*/
330+
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
331+
public String getSupportRequest() {
332+
return supportRequest;
333+
}
334+
335+
/**
336+
* Sets the refund requestId.
337+
* @param supportRequest refund request id
338+
*/
339+
@JsonProperty("supportRequest")
340+
public void setSupportRequest(String supportRequest) {
341+
this.supportRequest = supportRequest;
342+
}
323343
}

0 commit comments

Comments
 (0)