Passed
Push — main ( 1d4b72...0c6738 )
by Acho
01:55
created

internal/stubs/bill.go   A

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A stubs.BillPay 0 2 1
A stubs.BillPayWithError 0 2 1
1
package stubs
2
3
// BillPay is a dummy json response for the `/api/bill/v2/` endpoint
4
func BillPay() []byte {
5
	return []byte(`
6
		{
7
		   "code":200,
8
		   "message":"success",
9
		   "result":{
10
			  "operatorid":"xxxx-xxxx-xxxx-xxxx-5286 : 0000000000068 : 8.8 Kwh",
11
			  "txnid":"5xxxx",
12
			  "status":"PENDING",
13
			  "date":"2022-04-19 18:00:06",
14
			  "referenceid":null,
15
			  "processingnumber":"aaba045a-d571-41e9-9ea4-54cd78782e03"
16
		   }
17
		}
18
`)
19
}
20
21
// BillPayWithError is a dummy json response for the `/api/airtime/v2/` endpoint with an error
22
func BillPayWithError() []byte {
23
	return []byte(`
24
		{
25
		   "code":500,
26
		   "message":"General Failure",
27
		   "result":null
28
		}
29
`)
30
}
31