fromMap static method

PayConfirmationEntity? fromMap(
  1. Object? o, {
  2. Map<String, String>? newDocumentIds,
})

Implementation

static PayConfirmationEntity? fromMap(Object? o,
    {Map<String, String>? newDocumentIds}) {
  if (o == null) return null;
  var map = o as Map<String, dynamic>;

  var backToShopActionFromMap = map['backToShopAction'];
  if (backToShopActionFromMap != null) {
    backToShopActionFromMap = ActionEntity.fromMap(backToShopActionFromMap,
        newDocumentIds: newDocumentIds);
  }
  var conditionsFromMap = map['conditions'];
  if (conditionsFromMap != null) {
    conditionsFromMap = StorageConditionsEntity.fromMap(conditionsFromMap,
        newDocumentIds: newDocumentIds);
  }

  return PayConfirmationEntity(
    appId: map['appId'],
    description: map['description'],
    shopId: map['shopId'],
    backToShopAction: backToShopActionFromMap,
    conditions: conditionsFromMap,
  );
}