updated transactions ruby code for new api