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

internal/stubs/account.go   A

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 5
dl 0
loc 16
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A stubs.AccountBalanceWithError 0 2 1
A stubs.AccountBalance 0 2 1
1
package stubs
2
3
// AccountBalanceWithError is a dummy json response for the `/api/account/agent/balance/v2/` endpoint with an error
4
func AccountBalanceWithError() []byte {
5
	return []byte(`
6
		{
7
			"code": 500,
8
			"message": "412: bad password",
9
			"result": null
10
		}
11
`)
12
}
13
14
// AccountBalance is a dummy json response for the `/api/account/agent/balance/v2/` endpoint
15
func AccountBalance() []byte {
16
	return []byte(`
17
		{
18
			"code":200,
19
			"message":"Success",
20
			"result":{
21
				"name":"COMPANY_NAME",
22
				"mainbalance":"100",
23
				"maindeposit":"200"
24
			}
25
		}
26
`)
27
}
28