fromEntity static method

Future<PayConfirmationModel?> fromEntity(
  1. String documentID,
  2. PayConfirmationEntity? entity
)

Implementation

static Future<PayConfirmationModel?> fromEntity(
    String documentID, PayConfirmationEntity? entity) async {
  if (entity == null) return null;
  return PayConfirmationModel(
    documentID: documentID,
    appId: entity.appId ?? '',
    description: entity.description,
    backToShopAction: await ActionModel.fromEntity(entity.backToShopAction),
    conditions: await StorageConditionsModel.fromEntity(entity.conditions),
  );
}