toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'id': id,
'type': type.value,
'status': status.value,
'paymentMethod': paymentMethod.value,
'token': token,
'credit': credit,
'price': price,
'createdAt': createdAt.toIso8601String(),
'updatedAt': updatedAt?.toIso8601String(),
'userId': userId,
'campaignId': campaignId,
'offerId': offerId,
'companyId': companyId,
'period': period?.value,
};
}