use of com.fitpay.android.api.models.device.PaymentDevice in project fitpay-android-sdk by fitpay.
the class Steps method getPaymentDevice.
public void getPaymentDevice() throws InterruptedException {
Assert.assertNotNull(currentUser);
final CountDownLatch latch = new CountDownLatch(1);
currentUser.getPaymentDevice(new ApiCallback<Device>() {
@Override
public void onSuccess(Device result) {
paymentDevice = result;
latch.countDown();
}
@Override
public void onFailure(@ResultCode.Code int errorCode, String errorMessage) {
latch.countDown();
}
});
latch.await(TIMEOUT, TimeUnit.SECONDS);
Assert.assertNotNull("paymentDevice should not be null", paymentDevice);
}
Aggregations