Passed
Push — main ( 75c795...cad01e )
by Acho
01:47
created

client.AccountBalanceResponse.IsSuccessfull   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
dl 0
loc 2
rs 10
c 0
b 0
f 0
nop 0
1
package client
2
3
import "net/http"
4
5
// AccountBalanceResponse is the response when querying the account balance
6
type AccountBalanceResponse struct {
7
	Code    int             `json:"code"`
8
	Message string          `json:"message"`
9
	Result  *AccountBalance `json:"result,omitempty"`
10
}
11
12
// AccountBalance contains details about the account
13
type AccountBalance struct {
14
	Name        string `json:"name"`
15
	MainBalance string `json:"mainbalance"`
16
	MainDeposit string `json:"maindeposit"`
17
}
18
19
// IsSuccessfull determines if the transaction was successful
20
func (response AccountBalanceResponse) IsSuccessfull() bool {
21
	return response.Code == http.StatusOK
22
}
23