-- | Retrieves an object from Netsuite.
retrieveNS
    :: (IsNsRestletConfig cfg, IsNsType t, IsNsDataId a)
    => cfg -- ^ Restlet configuration
    -> t -- ^ NetSuite entity type
    -> a -- ^ Entity ID
    -> IO (Either RestletError Value)
retrieveNS cfg t i =
    doNS (toNsRestletConfig cfg) $
        NsActRetrieve (toNsType t)
                      (toNsDataId i)
                      (typeFields (toNsRestletConfig cfg) $ toNsType t)
retrieveNS
    :: (IsNsRestletConfig cfg, IsNsType t, IsNsDataId a)
    => cfg -- ^ Restlet configuration
    -> t -- ^ NetSuite entity type
    -> a -- ^ Entity ID
    -> IO (Either RestletError Value)
retrieveNS cfg t i =
    doNS (toNsRestletConfig cfg) $
        NsActRetrieve (toNsType t)
                      (toNsDataId i)
                      (typeFields (toNsRestletConfig cfg) $ toNsType t)
retrieveNS cfg t i =
    doNS (toNsRestletConfig cfg) $
        NsActRetrieve (toNsType t)
                      (toNsDataId i)
                      (typeFields (toNsRestletConfig cfg) $ toNsType t)