|
1
|
|
|
package stubs |
|
2
|
|
|
|
|
3
|
|
|
// DiscountRedemptionGetResponse is a dummy response to the GET /v1/discount-redemption/:id endpoint |
|
4
|
|
|
func DiscountRedemptionGetResponse() []byte { |
|
5
|
|
|
return []byte(` |
|
6
|
|
|
{ |
|
7
|
|
|
"jsonapi": { |
|
8
|
|
|
"version": "1.0" |
|
9
|
|
|
}, |
|
10
|
|
|
"links": { |
|
11
|
|
|
"self": "https://api.lemonsqueezy.com/v1/discount-redemptions/1" |
|
12
|
|
|
}, |
|
13
|
|
|
"data": { |
|
14
|
|
|
"type": "discount-redemptions", |
|
15
|
|
|
"id": "1", |
|
16
|
|
|
"attributes": { |
|
17
|
|
|
"discount_id": 1, |
|
18
|
|
|
"order_id": 1, |
|
19
|
|
|
"discount_name": "10%", |
|
20
|
|
|
"discount_code": "10PERC", |
|
21
|
|
|
"discount_amount": 10, |
|
22
|
|
|
"discount_amount_type": "percent", |
|
23
|
|
|
"amount": 999, |
|
24
|
|
|
"created_at": "2023-02-07T10:30:01.000000Z", |
|
25
|
|
|
"updated_at": "2023-02-07T10:30:01.000000Z" |
|
26
|
|
|
}, |
|
27
|
|
|
"relationships": { |
|
28
|
|
|
"discount": { |
|
29
|
|
|
"links": { |
|
30
|
|
|
"related": "https://api.lemonsqueezy.com/v1/discount-redemptions/1/discount", |
|
31
|
|
|
"self": "https://api.lemonsqueezy.com/v1/discount-redemptions/1/relationships/discount" |
|
32
|
|
|
} |
|
33
|
|
|
}, |
|
34
|
|
|
"order": { |
|
35
|
|
|
"links": { |
|
36
|
|
|
"related": "https://api.lemonsqueezy.com/v1/discount-redemptions/1/order", |
|
37
|
|
|
"self": "https://api.lemonsqueezy.com/v1/discount-redemptions/1/relationships/order" |
|
38
|
|
|
} |
|
39
|
|
|
} |
|
40
|
|
|
}, |
|
41
|
|
|
"links": { |
|
42
|
|
|
"self": "https://api.lemonsqueezy.com/v1/discount-redemptions/1" |
|
43
|
|
|
} |
|
44
|
|
|
} |
|
45
|
|
|
} |
|
46
|
|
|
`) |
|
47
|
|
|
} |
|
48
|
|
|
|
|
49
|
|
|
// DiscountRedemptionsListResponse is a dummy response to GET /v1/discount-redemption |
|
50
|
|
|
func DiscountRedemptionsListResponse() []byte { |
|
51
|
|
|
return []byte(` |
|
52
|
|
|
{ |
|
53
|
|
|
"meta": { |
|
54
|
|
|
"page": { |
|
55
|
|
|
"currentPage": 1, |
|
56
|
|
|
"from": 1, |
|
57
|
|
|
"lastPage": 1, |
|
58
|
|
|
"perPage": 10, |
|
59
|
|
|
"to": 10, |
|
60
|
|
|
"total": 10 |
|
61
|
|
|
} |
|
62
|
|
|
}, |
|
63
|
|
|
"jsonapi": { |
|
64
|
|
|
"version": "1.0" |
|
65
|
|
|
}, |
|
66
|
|
|
"links": { |
|
67
|
|
|
"first": "https://api.lemonsqueezy.com/v1/discount-redemptions?page%5Bnumber%5D=1&page%5Bsize%5D=10&sort=-createdAt", |
|
68
|
|
|
"last": "https://api.lemonsqueezy.com/v1/discount-redemptions?page%5Bnumber%5D=1339&page%5Bsize%5D=10&sort=-createdAt", |
|
69
|
|
|
"next": "https://api.lemonsqueezy.com/v1/discount-redemptions?page%5Bnumber%5D=2&page%5Bsize%5D=10&sort=-createdAt" |
|
70
|
|
|
}, |
|
71
|
|
|
"data": [ |
|
72
|
|
|
{ |
|
73
|
|
|
"type": "discount-redemptions", |
|
74
|
|
|
"id": "1", |
|
75
|
|
|
"attributes": { |
|
76
|
|
|
"discount_id": 1, |
|
77
|
|
|
"order_id": 1, |
|
78
|
|
|
"discount_name": "10%", |
|
79
|
|
|
"discount_code": "10PERC", |
|
80
|
|
|
"discount_amount": 10, |
|
81
|
|
|
"discount_amount_type": "percent", |
|
82
|
|
|
"amount": 999, |
|
83
|
|
|
"created_at": "2023-02-07T10:30:01.000000Z", |
|
84
|
|
|
"updated_at": "2023-02-07T10:30:01.000000Z" |
|
85
|
|
|
}, |
|
86
|
|
|
"relationships": { |
|
87
|
|
|
"discount": { |
|
88
|
|
|
"links": { |
|
89
|
|
|
"related": "https://api.lemonsqueezy.com/v1/discount-redemptions/1/discount", |
|
90
|
|
|
"self": "https://api.lemonsqueezy.com/v1/discount-redemptions/1/relationships/discount" |
|
91
|
|
|
} |
|
92
|
|
|
}, |
|
93
|
|
|
"order": { |
|
94
|
|
|
"links": { |
|
95
|
|
|
"related": "https://api.lemonsqueezy.com/v1/discount-redemptions/1/order", |
|
96
|
|
|
"self": "https://api.lemonsqueezy.com/v1/discount-redemptions/1/relationships/order" |
|
97
|
|
|
} |
|
98
|
|
|
} |
|
99
|
|
|
}, |
|
100
|
|
|
"links": { |
|
101
|
|
|
"self": "https://api.lemonsqueezy.com/v1/discount-redemptions/1" |
|
102
|
|
|
} |
|
103
|
|
|
} |
|
104
|
|
|
] |
|
105
|
|
|
} |
|
106
|
|
|
`) |
|
107
|
|
|
} |
|
108
|
|
|
|