toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
    "id": id == null ? null : id,
    "uuid": uuid == null ? null : uuid,
    "amount": amount == null ? null : amount,
    "currency": currency == null ? null : currency,
    "transaction_id": transactionId == null ? null : transactionId,
    "customer_id": customerId == null ? null : customerId,
    "merchant_id": merchantId == null ? null : merchantId,
    "shipping_fee": shippingFee == null ? null : shippingFee,
    "date_fulfilled": dateFulfilled,
    "country": country == null ? null : country,
    "state": state == null ? null : state,
    "city": city == null ? null : city,
    "street_address": streetAddress == null ? null : streetAddress,
    "zip": zip == null ? null : zip,
    "meta": meta == null ? null : meta,
    "status": status == null ? null : status,
    "deleted_at": deletedAt,
    "created_at": createdAt == null ? null : createdAt!.toIso8601String(),
    "updated_at": updatedAt == null ? null : updatedAt!.toIso8601String(),
    "products": products == null ? null : List<dynamic>.from(products!.map((x) => x.toJson())),
    "customer": customer == null ? null : customer!.toJson(),
};