internal/stubs/contact.go   A
last analyzed

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A stubs.ContactsCreateResponse 0 2 1
A stubs.ContactsListResponse 0 2 1
1
package stubs
2
3
// ContactsCreateResponse returns a stubbed response for creating a contact
4
func ContactsCreateResponse() []byte {
5
	return []byte(`
6
{
7
	"id": "string",
8
	"email": "[email protected]",
9
	"subscribed": true,
10
	"projectId": "44654d15-35aa-4573-a767-616015403763",
11
	"data": {
12
		"firstName": "John",
13
		"lastName": "Doe",
14
		"plan": "premium"
15
	},
16
	"createdAt": "2019-08-24T14:15:22Z",
17
	"updatedAt": "2019-08-24T14:15:22Z",
18
	"_meta": {
19
		"isNew":false,
20
		"isUpdate":false
21
	}
22
}
23
`)
24
}
25
26
// ContactsListResponse returns a stubbed response for listing a contact
27
func ContactsListResponse() []byte {
28
	return []byte(`
29
{
30
  "data": [
31
    {
32
      "id": "7d195254-bc27-4937-a73d-370ec0fb39b2",
33
      "email": "[email protected]",
34
      "data": {
35
        "firstName": "John",
36
        "lastName": "Doe",
37
        "plan": "premium"
38
      },
39
      "subscribed": true,
40
      "projectId": "44654d15-35aa-4573-a767-616015403763",
41
      "createdAt": "2025-12-16T17:53:23.347Z",
42
      "updatedAt": "2026-01-05T20:19:54.936Z"
43
    }
44
  ],
45
  "total": 1,
46
  "nextCursor": null,
47
  "hasMore": false
48
}
49
`)
50
}
51