class ReceiptBackupListener extends DatabaseBackupListener<Receipt> {

    @Override
    public void onUpdateSuccess(@NonNull Receipt oldReceipt, @NonNull Receipt newReceipt, @NonNull DatabaseOperationMetadata databaseOperationMetadata) {
        if (newReceipt.getFile() != null) {
            mDriveDatabaseManager.syncDatabase();
        }
        if (databaseOperationMetadata.getOperationFamilyType() != OperationFamilyType.Sync) {
            mDriveReceiptsManager.handleInsertOrUpdate(newReceipt);
        }
    }

    public  ReceiptBackupListener(@NonNull DriveDatabaseManager driveDatabaseManager, @NonNull DriveReceiptsManager driveReceiptsManager);

}