MerchantOrderReturnItem.fromJson constructor

MerchantOrderReturnItem.fromJson(
  1. Map json_
)

Implementation

MerchantOrderReturnItem.fromJson(core.Map json_)
    : this(
        customerReturnReason: json_.containsKey('customerReturnReason')
            ? CustomerReturnReason.fromJson(json_['customerReturnReason']
                as core.Map<core.String, core.dynamic>)
            : null,
        itemId: json_.containsKey('itemId')
            ? json_['itemId'] as core.String
            : null,
        merchantRejectionReason: json_.containsKey('merchantRejectionReason')
            ? MerchantRejectionReason.fromJson(
                json_['merchantRejectionReason']
                    as core.Map<core.String, core.dynamic>)
            : null,
        merchantReturnReason: json_.containsKey('merchantReturnReason')
            ? RefundReason.fromJson(json_['merchantReturnReason']
                as core.Map<core.String, core.dynamic>)
            : null,
        product: json_.containsKey('product')
            ? OrderLineItemProduct.fromJson(
                json_['product'] as core.Map<core.String, core.dynamic>)
            : null,
        refundableAmount: json_.containsKey('refundableAmount')
            ? MonetaryAmount.fromJson(json_['refundableAmount']
                as core.Map<core.String, core.dynamic>)
            : null,
        returnItemId: json_.containsKey('returnItemId')
            ? json_['returnItemId'] as core.String
            : null,
        returnShipmentIds: json_.containsKey('returnShipmentIds')
            ? (json_['returnShipmentIds'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        shipmentGroupId: json_.containsKey('shipmentGroupId')
            ? json_['shipmentGroupId'] as core.String
            : null,
        shipmentUnitId: json_.containsKey('shipmentUnitId')
            ? json_['shipmentUnitId'] as core.String
            : null,
        state:
            json_.containsKey('state') ? json_['state'] as core.String : null,
      );