-- | Gets the object from Bluesnap based on the given id.
retrieve :: Object o => (ObjectID o) -> Bluesnap o
retrieve oid = do
  let parser = responseParser (fakeObj oid)
  payload <- Client.get (fullPath oid)
  responseXML <- checkParse $ parse parser payload
  checkParse $ fromResponse responseXML

-- | Saves the object in Bluesnap and returns its id based on
-- the location header.
retrieve :: Object o => (ObjectID o) -> Bluesnap o
retrieve oid = do
  let parser = responseParser (fakeObj oid)
  payload <- Client.get (fullPath oid)
  responseXML <- checkParse $ parse parser payload
  checkParse $ fromResponse responseXML

-- | Saves the object in Bluesnap and returns its id based on
-- the location header.
retrieve oid = do
  let parser = responseParser (fakeObj oid)
  payload <- Client.get (fullPath oid)
  responseXML <- checkParse $ parse parser payload
  checkParse $ fromResponse responseXML

-- | Saves the object in Bluesnap and returns its id based on
-- the location header.