discontinuedPackage hipay has been discontinued.
CreateTransactionRequest.fromMap constructor
CreateTransactionRequest.fromMap(
- Map<String, dynamic> map
)
Implementation
factory CreateTransactionRequest.fromMap(Map<String, dynamic> map) {
return CreateTransactionRequest(
amount: map['amount']?.toInt() ?? 0,
paymentMethod: HipayPaymentMethod.fromMap(map['paymentMethod']),
description: map['description'] ?? '',
customerId: map['customerId'],
customer: map['customer'] != null ? Customer.fromMap(map['customer']) : null,
expiresIn: DateTime.fromMillisecondsSinceEpoch(map['expiresIn']),
splits: map['splits'] != null ? List<HipaySplit>.from(map['splits']?.map((x) => HipaySplit.fromMap(x))) : null,
);
}