EncoreClaimedOffer.fromMap constructor

EncoreClaimedOffer.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory EncoreClaimedOffer.fromMap(Map<String, dynamic> map) {
  return EncoreClaimedOffer(
    offerId: map['offerId'] as String?,
    campaignId: map['campaignId'] as String? ?? '',
    advertiserName: map['advertiserName'] as String? ?? '',
    transactionId: map['transactionId'] as String?,
    // Only an explicit true grants: a missing or unreadable flag is the
    // absence of a confirmation, never one.
    userConfirmedCompletion: map['userConfirmedCompletion'] == true,
    claimUrl: _nonEmptyString(map['claimUrl']),
  );
}