Passed
Push — main ( 4001cc...ce495e )
by Acho
02:18
created

stubs.BillsGetStatusVerboseResponse   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
// BillsCreateDStvPaymentResponse is a dummy JSOn response for checking a dstv user
4
func BillsCreateDStvPaymentResponse() string {
5
	return `
6
	{
7
		"status": "success",
8
		"message": "Bill payment successful",
9
		"data": {
10
			"phone_number": "+23490803840303",
11
			"amount": 500,
12
			"network": "9MOBILE",
13
			"flw_ref": "CF-FLYAPI-20200311081921359990",
14
			"tx_ref": "BPUSSD1583957963415840"
15
		}
16
	}
17
`
18
}
19
20
// BillsValidateDstvResponse is a dummy response for validating a DStv payment
21
func BillsValidateDstvResponse() string {
22
	return `
23
	{
24
		"status": "success",
25
		"message": "Item validated successfully",
26
		"data": {
27
			"response_code": "00",
28
			"address": null,
29
			"response_message": "Successful",
30
			"name": "MTN",
31
			"biller_code": "BIL099",
32
			"customer": "08038291822",
33
			"product_code": "AT099",
34
			"email": null,
35
			"fee": 100,
36
			"maximum": 0,
37
			"minimum": 0
38
		}
39
	}
40
`
41
}
42
43
// BillsGetStatusVerboseResponse is a dummy response of a verbose bill status
44
func BillsGetStatusVerboseResponse() string {
45
	return `
46
	{
47
		"status": "success",
48
		"message": "Bill status fetch successful",
49
		"data": {
50
			"currency": "NGN",
51
			"customer_id": "+23490803840303",
52
			"frequency": "One Time",
53
			"amount": "500.0000",
54
			"product": "AIRTIME",
55
			"product_name": "9MOBILE",
56
			"commission": 10,
57
			"transaction_date": "2020-03-11T20:19:21.27Z",
58
			"country": "NG",
59
			"tx_ref": "CF-FLYAPI-20200311081921359990",
60
			"extra": null,
61
			"product_details": "FLY-API-NG-AIRTIME-9MOBILE",
62
			"status": "successful"
63
		}
64
	}
65
`
66
}
67
68
// TransactionRefundResponse is a dummy response for refunding a transaction
69
func TransactionRefundResponse() []byte {
70
	return []byte(`
71
{
72
  "status": "success",
73
  "message": "Transaction refund initiated",
74
  "data": {
75
    "id": 75923,
76
    "account_id": 73362,
77
    "tx_id": 908790,
78
    "flw_ref": "URF_1577867664541_3572735",
79
    "wallet_id": 74639,
80
    "amount_refunded": 6900,
81
    "status": "completed",
82
    "destination": "payment_source",
83
    "meta": {
84
      "source": "availablebalance"
85
    },
86
    "created_at": "2021-01-24T09:18:37.366Z"
87
  }
88
}
89
`)
90
}
91