OrderShipment.fromJson constructor

OrderShipment.fromJson(
  1. Map json_
)

Implementation

OrderShipment.fromJson(core.Map json_)
    : this(
        carrier: json_.containsKey('carrier')
            ? json_['carrier'] as core.String
            : null,
        creationDate: json_.containsKey('creationDate')
            ? json_['creationDate'] as core.String
            : null,
        deliveryDate: json_.containsKey('deliveryDate')
            ? json_['deliveryDate'] as core.String
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        lineItems: json_.containsKey('lineItems')
            ? (json_['lineItems'] as core.List)
                .map((value) => OrderShipmentLineItemShipment.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        scheduledDeliveryDetails:
            json_.containsKey('scheduledDeliveryDetails')
                ? OrderShipmentScheduledDeliveryDetails.fromJson(
                    json_['scheduledDeliveryDetails']
                        as core.Map<core.String, core.dynamic>)
                : null,
        shipmentGroupId: json_.containsKey('shipmentGroupId')
            ? json_['shipmentGroupId'] as core.String
            : null,
        status: json_.containsKey('status')
            ? json_['status'] as core.String
            : null,
        trackingId: json_.containsKey('trackingId')
            ? json_['trackingId'] as core.String
            : null,
      );