TestOrder.fromJson constructor

TestOrder.fromJson(
  1. Map json_
)

Implementation

TestOrder.fromJson(core.Map json_)
    : this(
        deliveryDetails: json_.containsKey('deliveryDetails')
            ? TestOrderDeliveryDetails.fromJson(json_['deliveryDetails']
                as core.Map<core.String, core.dynamic>)
            : null,
        enableOrderinvoices: json_.containsKey('enableOrderinvoices')
            ? json_['enableOrderinvoices'] as core.bool
            : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        lineItems: json_.containsKey('lineItems')
            ? (json_['lineItems'] as core.List)
                .map((value) => TestOrderLineItem.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        notificationMode: json_.containsKey('notificationMode')
            ? json_['notificationMode'] as core.String
            : null,
        pickupDetails: json_.containsKey('pickupDetails')
            ? TestOrderPickupDetails.fromJson(
                json_['pickupDetails'] as core.Map<core.String, core.dynamic>)
            : null,
        predefinedBillingAddress:
            json_.containsKey('predefinedBillingAddress')
                ? json_['predefinedBillingAddress'] as core.String
                : null,
        predefinedDeliveryAddress:
            json_.containsKey('predefinedDeliveryAddress')
                ? json_['predefinedDeliveryAddress'] as core.String
                : null,
        predefinedEmail: json_.containsKey('predefinedEmail')
            ? json_['predefinedEmail'] as core.String
            : null,
        predefinedPickupDetails: json_.containsKey('predefinedPickupDetails')
            ? json_['predefinedPickupDetails'] 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,
        shippingCost: json_.containsKey('shippingCost')
            ? Price.fromJson(
                json_['shippingCost'] as core.Map<core.String, core.dynamic>)
            : null,
        shippingOption: json_.containsKey('shippingOption')
            ? json_['shippingOption'] as core.String
            : null,
      );