Test Setup Failed
Push — main ( 619eb5...304cab )
by Acho
02:39
created

internal/stubs/disbursement.go   A

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 7
dl 0
loc 33
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A stubs.DisbursementTransferStatus 0 2 1
A stubs.DisbursementToken 0 2 1
A stubs.DisbursementAccountBalance 0 2 1
1
package stubs
2
3
// DisbursementToken is a dummy json response for the `/disbursement/token/` endpoint
4
func DisbursementToken() []byte {
5
	return []byte(`
6
		{
7
			"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
8
			"token_type": "access_token",
9
			"expires_in": 3600
10
        }
11
`)
12
}
13
14
// DisbursementTransferStatus is a dummy json response for the `/disbursement/v1_0/transfer/{referenceId}` endpoint
15
func DisbursementTransferStatus() []byte {
16
	return []byte(`
17
		{
18
			"amount": "100",
19
			"currency": "UGX",
20
			"financialTransactionId": "23503452",
21
			"externalId": "947354",
22
			"payee": {
23
				"partyIdType": "MSISDN",
24
				"partyId": "4656473839"
25
			},
26
			"status": "SUCCESSFUL"
27
		}
28
`)
29
}
30
31
// DisbursementAccountBalance is a dummy json response for the `/disbursement/v1_0/account/balance` endpoint
32
func DisbursementAccountBalance() []byte {
33
	return []byte(`
34
		{
35
			"availableBalance": "1000",
36
			"currency": "EUR"
37
		}
38
`)
39
}
40