PaymentRequest.fromMap constructor

PaymentRequest.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory PaymentRequest.fromMap(Map<String, dynamic> map) {
  return PaymentRequest(
    map['merchant_uuid'] as String,
    map['merchant_op_id'] as String,
    map['description'] as String,
    Details.fromMap(map['details'] as Map<String,dynamic>),
    map['return_url'] as String,
    map['cancel_url'] as String,
    map['currency'] as Currency,
    List<Product>.from((map['items'] as List<int>).map<Product>((x) => Product.fromMap(x as Map<String,dynamic>),),),
    map['invoice_number'] as String,
    map['terminal_id'] as String,
  );
}