Skip to content

Commit

Permalink
SP-883 Fix class name InvoiceRefundAddresses to InvoiceRefundAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarzybok-sumoheavy committed Feb 28, 2024
1 parent 2b906dc commit 9637229
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/bitpay/sdk/model/invoice/Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class Invoice {
protected String exceptionStatus = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
protected Integer targetConfirmations;
protected List<InvoiceTransaction> transactions;
protected List<Map<String, InvoiceRefundAddresses>> refundAddresses;
protected List<Map<String, InvoiceRefundAddress>> refundAddresses;
protected Boolean refundAddressRequestPending;
protected String buyerProvidedEmail = ModelConfiguration.DEFAULT_NON_SENT_VALUE;
protected InvoiceBuyerProvidedInfo invoiceBuyerProvidedInfo;
Expand Down Expand Up @@ -1169,7 +1169,7 @@ public void setTargetConfirmations(final Integer targetConfirmations) {
* @return the refund addresses
*/
@JsonIgnore
public List<Map<String, InvoiceRefundAddresses>> getRefundAddresses() {
public List<Map<String, InvoiceRefundAddress>> getRefundAddresses() {
return this.refundAddresses;
}

Expand All @@ -1180,7 +1180,7 @@ public List<Map<String, InvoiceRefundAddresses>> getRefundAddresses() {
* @param refundAddresses the refund addresses
*/
@JsonProperty("refundAddresses")
public void setRefundAddresses(final List<Map<String, InvoiceRefundAddresses>> refundAddresses) {
public void setRefundAddresses(final List<Map<String, InvoiceRefundAddress>> refundAddresses) {
this.refundAddresses = refundAddresses;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import java.time.ZonedDateTime;

public class InvoiceRefundAddresses {
public class InvoiceRefundAddress {

protected String type;
protected ZonedDateTime date;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class InvoiceRefundAddressesTest {
public class InvoiceRefundAddressTest {

@Test
public void it_should_manipulate_type() {
String expected = "exampleType";
InvoiceRefundAddresses testedClass = this.getTestedClass();
InvoiceRefundAddress testedClass = this.getTestedClass();

testedClass.setType(expected);
Assertions.assertSame(expected, testedClass.getType());
Expand All @@ -23,7 +23,7 @@ public void it_should_manipulate_type() {
@Test
public void it_should_manipulate_date() {
ZonedDateTime expected = ZonedDateTime.now();
InvoiceRefundAddresses testedClass = this.getTestedClass();
InvoiceRefundAddress testedClass = this.getTestedClass();

testedClass.setDate(expected);
Assertions.assertSame(expected, testedClass.getDate());
Expand All @@ -32,7 +32,7 @@ public void it_should_manipulate_date() {
@Test
public void it_should_manipulate_tag() {
Integer expected = 123;
InvoiceRefundAddresses testedClass = this.getTestedClass();
InvoiceRefundAddress testedClass = this.getTestedClass();

testedClass.setTag(expected);
Assertions.assertSame(expected, testedClass.getTag());
Expand All @@ -41,13 +41,13 @@ public void it_should_manipulate_tag() {
@Test
public void it_should_manipulate_email() {
String expected = "[email protected]";
InvoiceRefundAddresses testedClass = this.getTestedClass();
InvoiceRefundAddress testedClass = this.getTestedClass();

testedClass.setEmail(expected);
Assertions.assertSame(expected, testedClass.getEmail());
}

private InvoiceRefundAddresses getTestedClass() {
return new InvoiceRefundAddresses();
private InvoiceRefundAddress getTestedClass() {
return new InvoiceRefundAddress();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ public void it_should_manipulate_transactions() {

@Test
public void it_should_manipulate_refundAddresses() {
List<Map<String, InvoiceRefundAddresses>> expected = new ArrayList<Map<String, InvoiceRefundAddresses>>();
List<Map<String, InvoiceRefundAddress>> expected = new ArrayList<Map<String, InvoiceRefundAddress>>();
Invoice testedClass = this.getTestedClass();

testedClass.setRefundAddresses(expected);
Expand Down

0 comments on commit 9637229

Please sign in to comment.