Skip to content

Commit

Permalink
[NEW] Check IRIS Balance
Browse files Browse the repository at this point in the history
  • Loading branch information
andhikamaheva committed Jan 9, 2019
1 parent db59953 commit 56b302e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions iris.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ func (gateway *IrisGateway) Call(method, path string, body io.Reader, v interfac
return gateway.Client.ExecuteRequest(req, v)
}

// CheckBalance : get current balance information
func (gateway *IrisGateway) CheckBalance() (map[string]interface{}, error) {
var resp map[string]interface{}

err := gateway.Call("GET", "api/v1/balance", nil, &resp, gateway.Client.ApproverKey)
if err != nil {
gateway.Client.Logger.Println("Error Check Balance: ", err)
return resp, err
}

return resp, nil
}

// CreateBeneficiaries : Perform transaction using ChargeReq
func (gateway *IrisGateway) CreateBeneficiaries(req *BeneficiariesReq) (map[string]interface{}, error) {
var resp map[string]interface{}
Expand Down

0 comments on commit 56b302e

Please sign in to comment.