A two-time ODI World Cup winning batsman has decided to call time on his international and first-class career.