1
|
|
|
package stubs |
2
|
|
|
|
3
|
|
|
// LicenseKeyInstanceGetResponse is a dummy response to the GET /v1/license-key-instances/:id endpoint |
4
|
|
|
func LicenseKeyInstanceGetResponse() []byte { |
5
|
|
|
return []byte(` |
6
|
|
|
{ |
7
|
|
|
"jsonapi": { |
8
|
|
|
"version": "1.0" |
9
|
|
|
}, |
10
|
|
|
"links": { |
11
|
|
|
"self": "https://api.lemonsqueezy.com/v1/license-key-instances/1" |
12
|
|
|
}, |
13
|
|
|
"data": { |
14
|
|
|
"type": "license-key-instances", |
15
|
|
|
"id": "1", |
16
|
|
|
"attributes": { |
17
|
|
|
"license_key_id": 1, |
18
|
|
|
"identifier": "f70a79fa-6054-433e-9c1b-6075344292e4", |
19
|
|
|
"name": "example.com", |
20
|
|
|
"created_at": "2022-11-14T11:45:39.000000Z", |
21
|
|
|
"updated_at": "2022-11-14T11:45:39.000000Z" |
22
|
|
|
}, |
23
|
|
|
"relationships": { |
24
|
|
|
"license-key": { |
25
|
|
|
"links": { |
26
|
|
|
"related": "https://api.lemonsqueezy.com/v1/license-key-instances/1/license-key", |
27
|
|
|
"self": "https://api.lemonsqueezy.com/v1/license-key-instances/1/relationships/license-key" |
28
|
|
|
} |
29
|
|
|
} |
30
|
|
|
}, |
31
|
|
|
"links": { |
32
|
|
|
"self": "https://api.lemonsqueezy.com/v1/license-key-instances/1" |
33
|
|
|
} |
34
|
|
|
} |
35
|
|
|
} |
36
|
|
|
`) |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
// LicenseKeyInstancesListResponse is a dummy response to GET /v1/license-key-instances |
40
|
|
|
func LicenseKeyInstancesListResponse() []byte { |
41
|
|
|
return []byte(` |
42
|
|
|
{ |
43
|
|
|
"meta": { |
44
|
|
|
"page": { |
45
|
|
|
"currentPage": 1, |
46
|
|
|
"from": 1, |
47
|
|
|
"lastPage": 1, |
48
|
|
|
"perPage": 10, |
49
|
|
|
"to": 10, |
50
|
|
|
"total": 10 |
51
|
|
|
} |
52
|
|
|
}, |
53
|
|
|
"jsonapi": { |
54
|
|
|
"version": "1.0" |
55
|
|
|
}, |
56
|
|
|
"links": { |
57
|
|
|
"first": "https://api.lemonsqueezy.com/v1/license-key-instances?page%5Bnumber%5D=1&page%5Bsize%5D=10&sort=id", |
58
|
|
|
"last": "https://api.lemonsqueezy.com/v1/license-key-instances?page%5Bnumber%5D=1&page%5Bsize%5D=10&sort=id" |
59
|
|
|
}, |
60
|
|
|
"data": [ |
61
|
|
|
{ |
62
|
|
|
"type": "license-key-instances", |
63
|
|
|
"id": "1", |
64
|
|
|
"attributes": { |
65
|
|
|
"license_key_id": 1, |
66
|
|
|
"identifier": "f70a79fa-6054-433e-9c1b-6075344292e4", |
67
|
|
|
"name": "example.com", |
68
|
|
|
"created_at": "2022-11-14T11:45:39.000000Z", |
69
|
|
|
"updated_at": "2022-11-14T11:45:39.000000Z" |
70
|
|
|
}, |
71
|
|
|
"relationships": { |
72
|
|
|
"license-key": { |
73
|
|
|
"links": { |
74
|
|
|
"related": "https://api.lemonsqueezy.com/v1/license-key-instances/1/license-key", |
75
|
|
|
"self": "https://api.lemonsqueezy.com/v1/license-key-instances/1/relationships/license-key" |
76
|
|
|
} |
77
|
|
|
} |
78
|
|
|
}, |
79
|
|
|
"links": { |
80
|
|
|
"self": "https://api.lemonsqueezy.com/v1/license-key-instances/1" |
81
|
|
|
} |
82
|
|
|
} |
83
|
|
|
] |
84
|
|
|
} |
85
|
|
|
`) |
86
|
|
|
} |
87
|
|
|
|