PromotionCodeOrId.fromJson constructor

PromotionCodeOrId.fromJson(
  1. Object? json
)

Implementation

factory PromotionCodeOrId.fromJson(Object? json) {
  if (json is String) {
    return PromotionCodeId(id: json);
  }
  return PromotionCode.fromJson(json);
}