LocalInventory.fromJson constructor

LocalInventory.fromJson(
  1. Map json_
)

Implementation

LocalInventory.fromJson(core.Map json_)
    : this(
        availability: json_.containsKey('availability')
            ? json_['availability'] as core.String
            : null,
        customAttributes: json_.containsKey('customAttributes')
            ? (json_['customAttributes'] as core.List)
                .map((value) => CustomAttribute.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        instoreProductLocation: json_.containsKey('instoreProductLocation')
            ? json_['instoreProductLocation'] as core.String
            : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        pickupMethod: json_.containsKey('pickupMethod')
            ? json_['pickupMethod'] as core.String
            : null,
        pickupSla: json_.containsKey('pickupSla')
            ? json_['pickupSla'] as core.String
            : null,
        price: json_.containsKey('price')
            ? Price.fromJson(
                json_['price'] as core.Map<core.String, core.dynamic>)
            : null,
        quantity: json_.containsKey('quantity')
            ? json_['quantity'] as core.int
            : null,
        salePrice: json_.containsKey('salePrice')
            ? Price.fromJson(
                json_['salePrice'] as core.Map<core.String, core.dynamic>)
            : null,
        salePriceEffectiveDate: json_.containsKey('salePriceEffectiveDate')
            ? json_['salePriceEffectiveDate'] as core.String
            : null,
        storeCode: json_.containsKey('storeCode')
            ? json_['storeCode'] as core.String
            : null,
      );