ChargeRequestMessage.fromMap constructor

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

Implementation

factory ChargeRequestMessage.fromMap(Map<String, dynamic> map) {
  return ChargeRequestMessage(
    method: map['method'],
    token: map['token'],
    customerPaymentMethodId: map['customer_payment_method_id'],
    customerId: map['customer_id'],
    invoiceId: map['invoice_id'],
    email: map['email'],
    months: map['months'],
    discountCents: map['discount_cents'],
    invoiceItems: List<InvoiceItem>.from(map['items']?.map((x) => InvoiceItem.fromMap(x))),
    payerCustomer: PayerModel.fromMap(map['payer']),
    restrictPaymentMethod: map['restrict_payment_method'],
    bankSlipExtraDays: map['bank_slip_extra_days'],
    keepDunning: map['keep_dunning'],
  );
}