Re-implemented credit client as restful client