use of com.fitpay.android.paymentdevice.events.NotificationSyncRequest in project fitpay-android-sdk by fitpay.
the class DeviceService method syncData.
/**
* @param user current user with hypermedia data
* @param device device object with hypermedia data
* @param connector payment device connector
* @param syncRequest data provided in sync request
* Sync data between FitPay server and payment device
* <p>
* This is an asynchronous operation.
*/
public void syncData(@NonNull User user, @NonNull Device device, @NonNull IPaymentDeviceConnector connector, @NonNull NotificationSyncRequest syncRequest) {
if (null == syncRequest.getSyncInfo()) {
FPLog.d(TAG, "NotificationSyncRequest did not contain sync info.");
}
if (syncManager != null) {
SyncRequest request = new SyncRequest.Builder().setSyncId(null != syncRequest.getSyncInfo() ? syncRequest.getSyncInfo().getSyncId() : null).setUser(user).setDevice(device).setConnector(connector).setSyncInfo(syncRequest.getSyncInfo()).build();
syncManager.add(request);
} else {
Log.e(TAG, "syncManager is null");
}
}
use of com.fitpay.android.paymentdevice.events.NotificationSyncRequest in project fitpay-android-sdk by fitpay.
the class DeviceService method syncData.
/**
* @param user current user with hypermedia data
* @param device device object with hypermedia data
* Sync data between FitPay server and payment device
* <p>
* This is an asynchronous operation.
*/
public void syncData(@NonNull User user, @NonNull Device device) {
this.user = user;
this.device = device;
syncData(user, device, paymentDeviceConnector, new NotificationSyncRequest());
}
Aggregations