Order.fromJson constructor

Order.fromJson(
  1. Map json_
)

Implementation

Order.fromJson(core.Map json_)
    : this(
        acknowledged: json_.containsKey('acknowledged')
            ? json_['acknowledged'] as core.bool
            : null,
        annotations: json_.containsKey('annotations')
            ? (json_['annotations'] as core.List)
                .map((value) => OrderOrderAnnotation.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        billingAddress: json_.containsKey('billingAddress')
            ? OrderAddress.fromJson(json_['billingAddress']
                as core.Map<core.String, core.dynamic>)
            : null,
        customer: json_.containsKey('customer')
            ? OrderCustomer.fromJson(
                json_['customer'] as core.Map<core.String, core.dynamic>)
            : null,
        deliveryDetails: json_.containsKey('deliveryDetails')
            ? OrderDeliveryDetails.fromJson(json_['deliveryDetails']
                as core.Map<core.String, core.dynamic>)
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        lineItems: json_.containsKey('lineItems')
            ? (json_['lineItems'] as core.List)
                .map((value) => OrderLineItem.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        merchantId: json_.containsKey('merchantId')
            ? json_['merchantId'] as core.String
            : null,
        merchantOrderId: json_.containsKey('merchantOrderId')
            ? json_['merchantOrderId'] as core.String
            : null,
        netPriceAmount: json_.containsKey('netPriceAmount')
            ? Price.fromJson(json_['netPriceAmount']
                as core.Map<core.String, core.dynamic>)
            : null,
        netTaxAmount: json_.containsKey('netTaxAmount')
            ? Price.fromJson(
                json_['netTaxAmount'] as core.Map<core.String, core.dynamic>)
            : null,
        paymentStatus: json_.containsKey('paymentStatus')
            ? json_['paymentStatus'] as core.String
            : null,
        pickupDetails: json_.containsKey('pickupDetails')
            ? OrderPickupDetails.fromJson(
                json_['pickupDetails'] as core.Map<core.String, core.dynamic>)
            : null,
        placedDate: json_.containsKey('placedDate')
            ? json_['placedDate'] as core.String
            : null,
        promotions: json_.containsKey('promotions')
            ? (json_['promotions'] as core.List)
                .map((value) => OrderPromotion.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        refunds: json_.containsKey('refunds')
            ? (json_['refunds'] as core.List)
                .map((value) => OrderRefund.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        shipments: json_.containsKey('shipments')
            ? (json_['shipments'] as core.List)
                .map((value) => OrderShipment.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        shippingCost: json_.containsKey('shippingCost')
            ? Price.fromJson(
                json_['shippingCost'] as core.Map<core.String, core.dynamic>)
            : null,
        shippingCostTax: json_.containsKey('shippingCostTax')
            ? Price.fromJson(json_['shippingCostTax']
                as core.Map<core.String, core.dynamic>)
            : null,
        status: json_.containsKey('status')
            ? json_['status'] as core.String
            : null,
        taxCollector: json_.containsKey('taxCollector')
            ? json_['taxCollector'] as core.String
            : null,
      );