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

stubs.BillPayWithError   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 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