fromGraphJson static method

Order fromGraphJson(
  1. Map<String, dynamic> json
)

Implementation

static Order fromGraphJson(Map<String, dynamic> json) {
  return Order(
    id: json['node']['id'],
    email: json['node']['email'],
    currencyCode: json['node']['currencyCode'],
    customerUrl: json['node']['customerUrl'],
    lineItems: LineItemsOrder.fromGraphJson(json['node']['lineItems']),
    name: json['node']['name'],
    orderNumber: json['node']['orderNumber'] ?? 0,
    phone: json['node']['phone'],
    processedAt: json['node']['processedAt'],
    financialStatus: json['node']['financialStatus'],
    fulfillmentStatus: json['node']['fulfillmentStatus'],
    shippingAddress:
        ShippingAddress.fromJson(json['node']['shippingAddress']),
    statusUrl: json['node']['statusUrl'],
    subtotalPriceV2: PriceV2.fromJson(json['node']['subtotalPriceV2']),
    totalPriceV2: PriceV2.fromJson(json['node']['totalPriceV2']),
    totalRefundedV2: PriceV2.fromJson(json['node']['totalRefundedV2']),
    totalShippingPriceV2:
        PriceV2.fromJson(json['node']['totalShippingPriceV2']),
    totalTaxV2: PriceV2.fromJson(json['node']['totalTaxV2']),
    cursor: json['cursor'],
  );
}