toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  return {
    'id': id,
    'due_date': dueDate,
    'currency': currency,
    'discount_cents': discountCents,
    'email': email,
    'items_total_cents': itemsTotalCents,
    'notification_url': notificationUrl,
    'return_url': returnUrl,
    'status': status,
    'tax_cents': taxCents,
    'updated_at': updatedAt,
    'total_cents': totalCents,
    'total_paid': totalPaid,
    'total_paid_cents': totalPaidCents,
    'paid_at': paidAt,
    'paid_cents': paidCents,
    'paid': paid,
    'secure_id': secureId,
    'secure_url': secureUrl,
    'customer_id': customerId,
    'user_id': userId,
    'total': total,
    'taxes_paid': taxesPaid,
    'interest': interest,
    'discount': discount,
    'created_at': createdAt,
    'refundable': refundable,
    'installments': installments,
    'bank_slip': bankSlip,
    'items': items?.map((x) => x.toMap()).toList(),
    'variables': variables?.map((x) => x.toMap()).toList(),
    'custom_variables': customVariables?.map((x) => x.toMap()).toList(),
    'early_payment_discount': earlyPaymentDiscount,
    'early_payment_discounts': earlyPaymentDiscounts?.map((x) => x.toMap()).toList(),
    'logs': logs?.map((x) => x.toMap()).toList(),
  };
}