How can I get the updated date from a braintree usBankAccount payment method through the Braintreee API using JAVA

26 Views Asked by At

Using JAVA:

This works for credit card payment methods:

 CreditCard card = (CreditCard) paymentMethodToken;
 Calendar cal2  = card.getUpdatedAt();

But this fails with a maven build error:

 UsBankAccount usBankAccount = (UsBankAccount) paymentMethodToken;
 Calendar cal3  = usBankAccount.getUpdatedAt();

Error:

/C:/lplr/zmmpnb/JavaProject/src/main/java/org/nazarene/zmmpnb/ZGLOBAL1_Operation.java:[1439,40] cannot find symbol
[ERROR] symbol: method getUpdatedAt()
[ERROR] location: variable usBankAccount of type
com.braintreegateway.UsBankAccount

I am using import com.braintreegateway.*;

When I look at the braintree repo for usBankAccount on git (https://github.com/braintree/braintree_java) there does not seem to be a reference to getUpdatedAt() even though the Braintree developer docs says getUpdatedAt() is one of the attributes of usBankAccount. (https://developer.paypal.com/braintree/docs/reference/response/us-bank-account/java)

1

There are 1 best solutions below

1
Ken P On

Upgraded to BrainTree JDK 3.29.0 and getUpdatedAt() now works for US Bank Accounts