-- | Detaches an object from another in Netsuite.
detachNS
    :: (IsNsRestletConfig cfg, IsNsType t, IsNsId a)
    => cfg -- ^ Restlet configuration
    -> t -- ^ Type of entities to detach from
    -> [a] -- ^ Target entity IDs to detach from
    -> t -- ^ Type of entity to detach
    -> a -- ^ Entity ID to detach
    -> IO (Either RestletError Value)
detachNS cfg targetType targetIDs detType detID =
    doNS (toNsRestletConfig cfg) $
        NsActDetach (toNsType targetType)
                    (map toNsId targetIDs)
                    (toNsType detType)
                    (toNsId detID)
detachNS
    :: (IsNsRestletConfig cfg, IsNsType t, IsNsId a)
    => cfg -- ^ Restlet configuration
    -> t -- ^ Type of entities to detach from
    -> [a] -- ^ Target entity IDs to detach from
    -> t -- ^ Type of entity to detach
    -> a -- ^ Entity ID to detach
    -> IO (Either RestletError Value)
detachNS cfg targetType targetIDs detType detID =
    doNS (toNsRestletConfig cfg) $
        NsActDetach (toNsType targetType)
                    (map toNsId targetIDs)
                    (toNsType detType)
                    (toNsId detID)
detachNS cfg targetType targetIDs detType detID =
    doNS (toNsRestletConfig cfg) $
        NsActDetach (toNsType targetType)
                    (map toNsId targetIDs)
                    (toNsType detType)
                    (toNsId detID)