CouponResponse.fromMap constructor

CouponResponse.fromMap(
  1. Map<String, dynamic> json
)

Implementation

factory CouponResponse.fromMap(Map<String, dynamic> json) => CouponResponse(
      id: json["id"],
      eventId: json["event_id"],
      code: json["code"],
      discount: json["discount"],
      validFrom: json["valid_from"],
      validTill: json["valid_till"],
      usageLimit: json["usage_limit"],
      isRestricatedPerUser: json["is_restricated_per_user"],
      deletedAt: json["deleted_at"],
      createdAt: json["created_at"],
      updatedAt: json["updated_at"],
    );