cherry picked from original repo (https://github.com/zuorasc/zuora) the commit that added the amend call