Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SP-883 Fix class name InvoiceRefundAddresses to InvoiceRefundAddress #277

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading