def from_dict(data, ctx):
        """
        Instantiate a new GuaranteedStopLossOrderEntryData from a dict
        (generally from loading a JSON response). The data used to instantiate
        the GuaranteedStopLossOrderEntryData is a shallow copy of the dict
        passed in, with any complex child types instantiated appropriately.
        """

        data = data.copy()

        if data.get('minimumDistance') is not None:
            data['minimumDistance'] = ctx.convert_decimal_number(
                data.get('minimumDistance')
            )

        if data.get('premium') is not None:
            data['premium'] = ctx.convert_decimal_number(
                data.get('premium')
            )

        if data.get('levelRestriction') is not None:
            data['levelRestriction'] = \
                ctx.primitives.GuaranteedStopLossOrderLevelRestriction.from_dict(
                    data['levelRestriction'], ctx
                )

        return GuaranteedStopLossOrderEntryData(**data)