Skip to content

Commit 1cc10ab

Browse files
authored
prep release v7.2.0 (#310)
1 parent 3807ef8 commit 1cc10ab

File tree

6 files changed

+7
-34
lines changed

6 files changed

+7
-34
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CHANGELOG
22

3-
## Next Release
3+
## v7.2.0 (2024-04-10)
44

55
- Adds `refund` function in Insurance service for requesting a refund for a standalone insurance
66
- Fix payment method funding and deletion failures due to undetermined payment method type

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Add this to your project's POM:
1616
<dependency>
1717
<groupId>com.easypost</groupId>
1818
<artifactId>easypost-api-client</artifactId>
19-
<version>7.1.1</version>
19+
<version>7.2.0</version>
2020
</dependency>
2121
```
2222

@@ -25,7 +25,7 @@ Add this to your project's POM:
2525
Add this to your project's build file:
2626

2727
```groovy
28-
implementation "com.easypost:easypost-api-client:7.1.1"
28+
implementation "com.easypost:easypost-api-client:7.2.0"
2929
```
3030

3131
**NOTE:** [Google Gson](http://code.google.com/p/google-gson/) is required.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.1.1
1+
7.2.0

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<groupId>com.easypost</groupId>
77
<artifactId>easypost-api-client</artifactId>
88

9-
<version>7.1.1</version>
9+
<version>7.2.0</version>
1010
<packaging>jar</packaging>
1111

1212
<name>com.easypost:easypost-api-client</name>

src/main/java/com/easypost/model/PaymentMethodObject.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ public PaymentMethodType getType() {
6060
return null;
6161
}
6262
String objectType = getObject();
63-
if (getId().startsWith("card_") || (objectType != null && objectType.equals("CreditCard"))) {
63+
if (objectType != null && objectType.equals("CreditCard")) {
6464
type = PaymentMethodType.CREDIT_CARD;
65-
} else if (getId().startsWith("bank_") || (objectType != null && objectType.equals("BankAccount"))) {
65+
} else if (objectType != null && objectType.equals("BankAccount")) {
6666
type = PaymentMethodType.BANK_ACCOUNT;
6767
}
6868
return type;

src/test/java/com/easypost/BillingTest.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
1515
import static org.junit.jupiter.api.Assertions.assertEquals;
1616
import static org.junit.jupiter.api.Assertions.assertNotNull;
17-
import static org.junit.jupiter.api.Assertions.assertNull;
1817
import static org.junit.jupiter.api.Assertions.assertTrue;
1918

2019
public final class BillingTest {
@@ -139,30 +138,4 @@ public void testDeterminePaymentMethodTypeByObjectType() throws EasyPostExceptio
139138
assertEquals("BankAccount", bankAccount.getObject());
140139
assertEquals(PaymentMethodObject.PaymentMethodType.BANK_ACCOUNT, bankAccount.getType());
141140
}
142-
143-
/**
144-
* Test determining a payment method type by its legacy prefix.
145-
*
146-
* @throws EasyPostException when the request fails.
147-
*/
148-
@Test
149-
public void testDeterminePaymentMethodTypeByLegacyPrefix() throws EasyPostException {
150-
requestMock.when(() -> Requestor.request(
151-
RequestMethod.GET, "payment_methods", null, PaymentMethod.class, vcr.client))
152-
.thenReturn(paymentMethodLegacyPrefixes);
153-
154-
// Should be a credit card with null object type and "card_" prefix
155-
PaymentMethodObject creditCard =
156-
vcr.client.billing.retrievePaymentMethods().getPrimaryPaymentMethod();
157-
assertTrue(creditCard.getId().startsWith("card_"));
158-
assertNull(creditCard.getObject());
159-
assertEquals(PaymentMethodObject.PaymentMethodType.CREDIT_CARD, creditCard.getType());
160-
161-
// Should be a bank account with null object type and "bank_" prefix
162-
PaymentMethodObject bankAccount =
163-
vcr.client.billing.retrievePaymentMethods().getSecondaryPaymentMethod();
164-
assertTrue(bankAccount.getId().startsWith("bank_"));
165-
assertNull(bankAccount.getObject());
166-
assertEquals(PaymentMethodObject.PaymentMethodType.BANK_ACCOUNT, bankAccount.getType());
167-
}
168141
}

0 commit comments

Comments
 (0)