-- | Creates an object in Netsuite.
createNS
    :: (IsNsRestletConfig cfg, IsNsType t, IsNsData d, IsNsSublistData sd)
    => cfg -- ^ Restlet configuration
    -> t -- ^ NetSuite entity type
    -> d -- ^ Data to assign to new entity
    -> sd -- ^ Sublist data to assign to new entity
    -> IO (Either RestletError Value)
createNS cfg t d sd =
    doNS (toNsRestletConfig cfg) $
        NsActCreate (toNsType t)
                    (toNsData d)
                    (toNsSublistData sd)
                    (typeFields (toNsRestletConfig cfg) $ toNsType t)
createNS
    :: (IsNsRestletConfig cfg, IsNsType t, IsNsData d, IsNsSublistData sd)
    => cfg -- ^ Restlet configuration
    -> t -- ^ NetSuite entity type
    -> d -- ^ Data to assign to new entity
    -> sd -- ^ Sublist data to assign to new entity
    -> IO (Either RestletError Value)
createNS cfg t d sd =
    doNS (toNsRestletConfig cfg) $
        NsActCreate (toNsType t)
                    (toNsData d)
                    (toNsSublistData sd)
                    (typeFields (toNsRestletConfig cfg) $ toNsType t)
createNS cfg t d sd =
    doNS (toNsRestletConfig cfg) $
        NsActCreate (toNsType t)
                    (toNsData d)
                    (toNsSublistData sd)
                    (typeFields (toNsRestletConfig cfg) $ toNsType t)