toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() => {
      'method': method,
      'token': token,
      'customer_payment_method_id': customerPaymentMethodId,
      'customer_id': customerId,
      'invoice_id': invoiceId,
      'email': email,
      'months': months,
      'discount_cents': discountCents,
      'items': invoiceItems?.map((x) => x.toMap()).toList(),
      'payer': payerCustomer?.toMap(),
      'restrict_payment_method': restrictPaymentMethod,
      'bank_slip_extra_days': bankSlipExtraDays,
      'keep_dunning': keepDunning,
    }..removeWhere((key, value) => value == null || value == '');