fromEntity static method

Future<PayModel?> fromEntity(
  1. String documentID,
  2. PayEntity? entity
)

Implementation

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