Passed
Push — main ( 7d3d2e...96cb70 )
by Acho
01:29
created

stubs.DstvPackageResponse   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
nop 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
package stubs
2
3
// CheckDstvUserResponse is a dummy JSOn response for checking a dstv user
4
func CheckDstvUserResponse() string {
5
	return `
6
	{
7
		"details": {
8
			"accountStatus":"OPEN",
9
			"firstName":"ESU",
10
			"lastName":"INI OBONG BASSEY",
11
			"customerType":"SUD",
12
			"invoicePeriod":1,
13
			"dueDate":"2018-11-13T00:00:00+01:00",
14
			"customerNumber":275953782
15
		}
16
	}
17
`
18
}
19
20
// PayDstvBillResponse is a dummy JSON response for paying a DStv bill
21
func PayDstvBillResponse() string {
22
	return `
23
	{
24
		"trans_id":"122790223",
25
		"details": {
26
			"service":"DSTV",
27
			"package":"DStv Mobile MAXI",
28
			"smartno":"4131953321",
29
			"price":"790",
30
			"status":"SUCCESSFUL",
31
			"balance":"7931"
32
		}
33
	}`
34
}
35
36
// QueryDstvTransactionResponse is a dummy JSON response for querying a dstv transaction
37
func QueryDstvTransactionResponse() string {
38
	return `
39
	{
40
		"trans_id":"122790223",
41
		"details": {
42
			"service":"DSTV",
43
			"package":"DStv Mobile MAXI",
44
			"smartno":"4131953321",
45
			"price":"790",
46
			"status":"SUCCESSFUL",
47
			"balance":"7931"
48
		}
49
	}`
50
}
51
52
// DstvPackageResponse is a dummy JSON response querying the dstv package
53
func DstvPackageResponse() string {
54
	return `
55
	{
56
		"packageName":"DStv French Touch Add-on Bouquet E36 + DStv Yanga Bouquet E36"
57
	}`
58
}
59
60
// ErrorResponse is a dummy JSOn response when there is an error
61
func ErrorResponse() string {
62
	return `
63
	{
64
		"code": "ERR101",
65
		"description": "Invalid username or api_key"
66
	}
67
`
68
}
69