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

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

        data = data.copy()

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

        if data.get('openTradeFinancings') is not None:
            data['openTradeFinancings'] = [
                ctx.transaction.OpenTradeFinancing.from_dict(d, ctx)
                for d in data.get('openTradeFinancings')
            ]

        return PositionFinancing(**data)