code: def from_dict(data, ctx):
          
  
          data = data.copy()
  
          if data.get('default') is not None:
              data['default'] = \
                  ctx.order.UnitsAvailableDetails.from_dict(
                      data['default'], ctx
                  )
  
          if data.get('reduceFirst') is not None:
              data['reduceFirst'] = \
                  ctx.order.UnitsAvailableDetails.from_dict(
                      data['reduceFirst'], ctx
                  )
  
          if data.get('reduceOnly') is not None:
              data['reduceOnly'] = \
                  ctx.order.UnitsAvailableDetails.from_dict(
                      data['reduceOnly'], ctx
                  )
  
          if data.get('openOnly') is not None:
              data['openOnly'] = \
                  ctx.order.UnitsAvailableDetails.from_dict(
                      data['openOnly'], ctx
                  )
  
          return UnitsAvailable(**data)
docs: Instantiate a new UnitsAvailable from a dict (generally from loading a
          JSON response). The data used to instantiate the UnitsAvailable is a
          shallow copy of the dict passed in, with any complex child types
          instantiated appropriately.