Skip to content

Commit 92e68d9

Browse files
author
Tom Hendrikx
committed
Add pagination tests for all Chargeback variants
1 parent a1af1a8 commit 92e68d9

14 files changed

+481
-10
lines changed

tests/responses/.coverage

52 KB
Binary file not shown.

tests/responses/chargebacks_list.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"type": "application/hal+json"
2727
},
2828
"documentation": {
29-
"href": "https://docs.mollie.com/reference/v2/chargebacks-api/get-chargeback",
29+
"href": "https://docs.mollie.com/reference/v2/chargebacks-api/get-payment-chargeback",
3030
"type": "text/html"
3131
}
3232
}
@@ -35,7 +35,11 @@
3535
},
3636
"_links": {
3737
"self": {
38-
"href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXS/chargebacks",
38+
"href": "https://api.mollie.com/v2/chargebacks",
39+
"type": "application/hal+json"
40+
},
41+
"next": {
42+
"href": "https://api.mollie.com/v2/chargebacks?from=chb_n9z0tq",
3943
"type": "application/hal+json"
4044
},
4145
"documentation": {
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"count": 1,
3+
"_embedded": {
4+
"chargebacks": [
5+
{
6+
"resource": "chargeback",
7+
"id": "chb_n9z0tq",
8+
"amount": {
9+
"currency": "USD",
10+
"value": "43.38"
11+
},
12+
"settlementAmount": {
13+
"currency": "EUR",
14+
"value": "35.07"
15+
},
16+
"createdAt": "2018-03-14T17:00:52.0Z",
17+
"reversedAt": null,
18+
"paymentId": "tr_7UhSN1zuXS",
19+
"_links": {
20+
"self": {
21+
"href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXT/chargebacks/chb_n9z0tq",
22+
"type": "application/hal+json"
23+
},
24+
"payment": {
25+
"href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXT",
26+
"type": "application/hal+json"
27+
},
28+
"documentation": {
29+
"href": "https://docs.mollie.com/reference/v2/chargebacks-api/get-payment-chargeback",
30+
"type": "text/html"
31+
}
32+
}
33+
}
34+
]
35+
},
36+
"_links": {
37+
"self": {
38+
"href": "https://api.mollie.com/v2/chargebacks?from=chb_n9z0tq",
39+
"type": "application/hal+json"
40+
},
41+
"previous": {
42+
"href": "https://api.mollie.com/v2/chargebacks",
43+
"type": "application/hal+json"
44+
},
45+
"documentation": {
46+
"href": "https://docs.mollie.com/reference/v2/chargebacks-api/list-chargebacks",
47+
"type": "text/html"
48+
}
49+
}
50+
}

tests/responses/chargeback_single.json renamed to tests/responses/payment_chargeback_single.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"type": "application/hal+json"
2727
},
2828
"documentation": {
29-
"href": "https://docs.mollie.com/reference/v2/chargebacks-api/get-chargeback",
29+
"href": "https://docs.mollie.com/reference/v2/chargebacks-api/get-payment-chargeback",
3030
"type": "text/html"
3131
}
3232
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"count": 1,
3+
"_embedded": {
4+
"chargebacks": [
5+
{
6+
"resource": "chargeback",
7+
"id": "chb_n9z0tp",
8+
"amount": {
9+
"currency": "USD",
10+
"value": "43.38"
11+
},
12+
"settlementAmount": {
13+
"currency": "EUR",
14+
"value": "35.07"
15+
},
16+
"createdAt": "2018-03-14T17:00:52.0Z",
17+
"reversedAt": null,
18+
"paymentId": "tr_7UhSN1zuXS",
19+
"_links": {
20+
"self": {
21+
"href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXS/chargebacks/chb_n9z0tp",
22+
"type": "application/hal+json"
23+
},
24+
"payment": {
25+
"href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXS",
26+
"type": "application/hal+json"
27+
},
28+
"documentation": {
29+
"href": "https://docs.mollie.com/reference/v2/chargebacks-api/get-payment-chargeback",
30+
"type": "text/html"
31+
}
32+
}
33+
}
34+
]
35+
},
36+
"_links": {
37+
"self": {
38+
"href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXS/chargebacks",
39+
"type": "application/hal+json"
40+
},
41+
"next": {
42+
"href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXS/chargebacks?from=chb_n9z0tq",
43+
"type": "application/hal+json"
44+
},
45+
"documentation": {
46+
"href": "https://docs.mollie.com/reference/v2/chargebacks-api/list-payment-chargebacks",
47+
"type": "text/html"
48+
}
49+
}
50+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"count": 1,
3+
"_embedded": {
4+
"chargebacks": [
5+
{
6+
"resource": "chargeback",
7+
"id": "chb_n9z0tq",
8+
"amount": {
9+
"currency": "USD",
10+
"value": "43.38"
11+
},
12+
"settlementAmount": {
13+
"currency": "EUR",
14+
"value": "35.07"
15+
},
16+
"createdAt": "2018-03-14T17:00:52.0Z",
17+
"reversedAt": null,
18+
"paymentId": "tr_7UhSN1zuXS",
19+
"_links": {
20+
"self": {
21+
"href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXS/chargebacks/chb_n9z0tq",
22+
"type": "application/hal+json"
23+
},
24+
"payment": {
25+
"href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXS",
26+
"type": "application/hal+json"
27+
},
28+
"documentation": {
29+
"href": "https://docs.mollie.com/reference/v2/chargebacks-api/get-payment-chargeback",
30+
"type": "text/html"
31+
}
32+
}
33+
}
34+
]
35+
},
36+
"_links": {
37+
"self": {
38+
"href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXS/chargebacks?from=chb_n9z0tq",
39+
"type": "application/hal+json"
40+
},
41+
"previous": {
42+
"href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXS/chargebacks",
43+
"type": "application/hal+json"
44+
},
45+
"documentation": {
46+
"href": "https://docs.mollie.com/reference/v2/chargebacks-api/list-payment-chargebacks",
47+
"type": "text/html"
48+
}
49+
}
50+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"count": 1,
3+
"_embedded": {
4+
"chargebacks": [
5+
{
6+
"resource": "chargeback",
7+
"id": "chb_n9z0tp",
8+
"amount": {
9+
"currency": "USD",
10+
"value": "43.38"
11+
},
12+
"settlementAmount": {
13+
"currency": "EUR",
14+
"value": "35.07"
15+
},
16+
"createdAt": "2018-03-14T17:00:52.0Z",
17+
"reversedAt": null,
18+
"paymentId": "tr_7UhSN1zuXS",
19+
"_links": {
20+
"self": {
21+
"href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXS/chargebacks/chb_n9z0tp?profileId=pfl_v9hTwCvYqw",
22+
"type": "application/hal+json"
23+
},
24+
"payment": {
25+
"href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXS",
26+
"type": "application/hal+json"
27+
},
28+
"documentation": {
29+
"href": "https://docs.mollie.com/reference/v2/chargebacks-api/get-payment-chargeback",
30+
"type": "text/html"
31+
}
32+
}
33+
}
34+
]
35+
},
36+
"_links": {
37+
"self": {
38+
"href": "https://api.mollie.com/v2/chargebacks?profileId=pfl_v9hTwCvYqw",
39+
"type": "application/hal+json"
40+
},
41+
"next": {
42+
"href": "https://api.mollie.com/v2/chargebacks?profileId=pfl_v9hTwCvYqw&from=chb_n9z0tq",
43+
"type": "application/hal+json"
44+
},
45+
"documentation": {
46+
"href": "https://docs.mollie.com/reference/v2/chargebacks-api/list-chargebacks",
47+
"type": "text/html"
48+
}
49+
}
50+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"count": 1,
3+
"_embedded": {
4+
"chargebacks": [
5+
{
6+
"resource": "chargeback",
7+
"id": "chb_n9z0tq",
8+
"amount": {
9+
"currency": "USD",
10+
"value": "43.38"
11+
},
12+
"settlementAmount": {
13+
"currency": "EUR",
14+
"value": "35.07"
15+
},
16+
"createdAt": "2018-03-14T17:00:52.0Z",
17+
"reversedAt": null,
18+
"paymentId": "tr_7UhSN1zuXS",
19+
"_links": {
20+
"self": {
21+
"href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXT/chargebacks/chb_n9z0tq?profileId=pfl_v9hTwCvYqw",
22+
"type": "application/hal+json"
23+
},
24+
"payment": {
25+
"href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXT",
26+
"type": "application/hal+json"
27+
},
28+
"documentation": {
29+
"href": "https://docs.mollie.com/reference/v2/chargebacks-api/get-payment-chargeback",
30+
"type": "text/html"
31+
}
32+
}
33+
}
34+
]
35+
},
36+
"_links": {
37+
"self": {
38+
"href": "https://api.mollie.com/v2/chargebacks?profileId=pfl_v9hTwCvYqw&from=chb_n9z0tq",
39+
"type": "application/hal+json"
40+
},
41+
"previous": {
42+
"href": "https://api.mollie.com/v2/chargebacks?profileId=pfl_v9hTwCvYqw",
43+
"type": "application/hal+json"
44+
},
45+
"documentation": {
46+
"href": "https://docs.mollie.com/reference/v2/chargebacks-api/list-chargebacks",
47+
"type": "text/html"
48+
}
49+
}
50+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"count": 1,
3+
"_embedded": {
4+
"chargebacks": [
5+
{
6+
"resource": "chargeback",
7+
"id": "chb_n9z0tp",
8+
"amount": {
9+
"currency": "USD",
10+
"value": "43.38"
11+
},
12+
"settlementAmount": {
13+
"currency": "EUR",
14+
"value": "35.07"
15+
},
16+
"createdAt": "2018-03-14T17:00:52.0Z",
17+
"reversedAt": null,
18+
"paymentId": "tr_7UhSN1zuXS",
19+
"_links": {
20+
"self": {
21+
"href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXS/chargebacks/chb_n9z0tp",
22+
"type": "application/hal+json"
23+
},
24+
"payment": {
25+
"href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXS",
26+
"type": "application/hal+json"
27+
},
28+
"documentation": {
29+
"href": "https://docs.mollie.com/reference/v2/chargebacks-api/get-payment-chargeback",
30+
"type": "text/html"
31+
}
32+
}
33+
}
34+
]
35+
},
36+
"_links": {
37+
"self": {
38+
"href": "https://api.mollie.com/v2/settlements/stl_jDk30akdN/chargebacks",
39+
"type": "application/hal+json"
40+
},
41+
"next": {
42+
"href": "https://api.mollie.com/v2/settlements/stl_jDk30akdN/chargebacks?from=chb_n9z0tq",
43+
"type": "application/hal+json"
44+
},
45+
"documentation": {
46+
"href": "https://docs.mollie.com/reference/v2/settlements-api/list-settlement-chargebacks",
47+
"type": "text/html"
48+
}
49+
}
50+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"count": 1,
3+
"_embedded": {
4+
"chargebacks": [
5+
{
6+
"resource": "chargeback",
7+
"id": "chb_n9z0tq",
8+
"amount": {
9+
"currency": "USD",
10+
"value": "43.38"
11+
},
12+
"settlementAmount": {
13+
"currency": "EUR",
14+
"value": "35.07"
15+
},
16+
"createdAt": "2018-03-14T17:00:52.0Z",
17+
"reversedAt": null,
18+
"paymentId": "tr_7UhSN1zuXS",
19+
"_links": {
20+
"self": {
21+
"href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXS/chargebacks/chb_n9z0tq",
22+
"type": "application/hal+json"
23+
},
24+
"payment": {
25+
"href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXS",
26+
"type": "application/hal+json"
27+
},
28+
"documentation": {
29+
"href": "https://docs.mollie.com/reference/v2/chargebacks-api/get-payment-chargeback",
30+
"type": "text/html"
31+
}
32+
}
33+
}
34+
]
35+
},
36+
"_links": {
37+
"self": {
38+
"href": "https://api.mollie.com/v2/settlements/stl_jDk30akdN/chargebacks?from=chb_n9z0tq",
39+
"type": "application/hal+json"
40+
},
41+
"previous": {
42+
"href": "https://api.mollie.com/v2/settlements/stl_jDk30akdN/chargebacks",
43+
"type": "application/hal+json"
44+
},
45+
"documentation": {
46+
"href": "https://docs.mollie.com/reference/v2/settlements-api/list-settlement-chargebacks",
47+
"type": "text/html"
48+
}
49+
}
50+
}

0 commit comments

Comments
 (0)