Skip to content

Commit 8409252

Browse files
authored
Merge pull request #26 from roaldnefs/develop
2 parents 6e2d75d + fcc980b commit 8409252

7 files changed

Lines changed: 568 additions & 71 deletions

File tree

tests/fixtures/account.json

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
[
2+
{
3+
"method": "GET",
4+
"url": "https://api.transip.nl/v6/invoices",
5+
"json": {
6+
"invoices": [
7+
{
8+
"invoiceNumber": "F0000.1911.0000.0004",
9+
"creationDate": "2020-01-01",
10+
"payDate": "2020-01-01",
11+
"dueDate": "2020-02-01",
12+
"invoiceStatus": "waitsforpayment",
13+
"currency": "EUR",
14+
"totalAmount": 1000,
15+
"totalAmountInclVat": 1240
16+
}
17+
]
18+
},
19+
"status": 200,
20+
"content_type": "application/json"
21+
},
22+
{
23+
"method": "GET",
24+
"url": "https://api.transip.nl/v6/invoices/F0000.1911.0000.0004",
25+
"json": {
26+
"invoice": {
27+
"invoiceNumber": "F0000.1911.0000.0004",
28+
"creationDate": "2020-01-01",
29+
"payDate": "2020-01-01",
30+
"dueDate": "2020-02-01",
31+
"invoiceStatus": "waitsforpayment",
32+
"currency": "EUR",
33+
"totalAmount": 1000,
34+
"totalAmountInclVat": 1240
35+
}
36+
},
37+
"status": 200,
38+
"content_type": "application/json"
39+
},
40+
{
41+
"method": "GET",
42+
"url": "https://api.transip.nl/v6/invoices/F0000.1911.0000.0004/invoice-items",
43+
"json": {
44+
"invoiceItems": [
45+
{
46+
"product": "Big Storage Disk 2000 GB",
47+
"description": "Big Storage Disk 2000 GB (example-bigstorage)",
48+
"isRecurring": false,
49+
"date": "2020-01-01",
50+
"quantity": 1,
51+
"price": 1000,
52+
"priceInclVat": 1210,
53+
"vat": 210,
54+
"vatPercentage": 21,
55+
"discounts": [
56+
{
57+
"description": "Korting (20% Black Friday)",
58+
"amount": -500
59+
}
60+
]
61+
}
62+
]
63+
},
64+
"status": 200,
65+
"content_type": "application/json"
66+
},
67+
{
68+
"method": "GET",
69+
"url": "https://api.transip.nl/v6/invoices/F0000.1911.0000.0004/pdf",
70+
"json": {
71+
"pdf": "Y205elpYTWdZWEpsSUhKbFpDd2dabXh2ZDJWeWN5QmhjbVVnWW14MVpTd2dkR2hsY21VZ2MyaHZkV3hrSUdKbElHRWdjR1JtSUdobGNtVWdZblYwSUdsMElHbHpJR2RzZFdVdQ==="
72+
},
73+
"status": 200,
74+
"content_type": "application/json"
75+
},
76+
{
77+
"method": "GET",
78+
"url": "https://api.transip.nl/v6/ssh-keys",
79+
"json": {
80+
"sshKeys": [
81+
{
82+
"id": 123,
83+
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDf2pxWX/yhUBDyk2LPhvRtI0LnVO8PyR5Zt6AHrnhtLGqK+8YG9EMlWbCCWrASR+Q1hFQG example",
84+
"description": "Jim key",
85+
"creationDate": "2020-12-01 15:25:01",
86+
"fingerprint": "bb:22:43:69:2b:0d:3e:16:58:91:27:8a:62:29:97:d1"
87+
}
88+
]
89+
},
90+
"status": 200,
91+
"content_type": "application/json"
92+
},
93+
{
94+
"method": "GET",
95+
"url": "https://api.transip.nl/v6/ssh-keys/123",
96+
"json": {
97+
"sshKey": {
98+
"id": 123,
99+
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDf2pxWX/yhUBDyk2LPhvRtI0LnVO8PyR5Zt6AHrnhtLGqK+8YG9EMlWbCCWrASR+Q1hFQG example",
100+
"description": "Jim key",
101+
"creationDate": "2020-12-01 15:25:01",
102+
"fingerprint": "bb:22:43:69:2b:0d:3e:16:58:91:27:8a:62:29:97:d1"
103+
}
104+
},
105+
"status": 200,
106+
"content_type": "application/json"
107+
},
108+
{
109+
"method": "POST",
110+
"url": "https://api.transip.nl/v6/ssh-keys",
111+
"status": 201,
112+
"content_type": "application/json",
113+
"match_json": {
114+
"sshKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDf2pxWX/yhUBDyk2LPhvRtI0LnVO8PyR5Zt6AHrnhtLGqK+8YG9EMlWbCCWrASR+Q1hFQG example",
115+
"description": "Jim key"
116+
}
117+
},
118+
{
119+
"method": "PUT",
120+
"url": "https://api.transip.nl/v6/ssh-keys/123",
121+
"status": 204,
122+
"content_type": "application/json",
123+
"match_json": {
124+
"description": "Jim key"
125+
}
126+
},
127+
{
128+
"method": "DELETE",
129+
"url": "https://api.transip.nl/v6/ssh-keys/123",
130+
"status": 204,
131+
"content_type": "application/json"
132+
}
133+
]

tests/fixtures/colocations.json

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
[
2+
{
3+
"method": "GET",
4+
"url": "https://api.transip.nl/v6/colocations",
5+
"json": {
6+
"colocations": [
7+
{
8+
"name": "example2",
9+
"ipRanges": ["2a01:7c8:c038:6::/64"]
10+
}
11+
]
12+
},
13+
"status": 200,
14+
"content_type": "application/json"
15+
},
16+
{
17+
"method": "GET",
18+
"url": "https://api.transip.nl/v6/colocations/example2",
19+
"json": {
20+
"colocation": {
21+
"name": "example2",
22+
"ipRanges": ["2a01:7c8:c038:6::/64"]
23+
}
24+
},
25+
"status": 200,
26+
"content_type": "application/json"
27+
},
28+
{
29+
"method": "GET",
30+
"url": "https://api.transip.nl/v6/colocations/example2/ip-addresses",
31+
"json": {
32+
"ipAddresses": [
33+
{
34+
"address": "37.97.254.6",
35+
"subnetMask": "255.255.255.0",
36+
"gateway": "37.97.254.1",
37+
"dnsResolvers": [
38+
"195.8.195.8",
39+
"195.135.195.135"
40+
],
41+
"reverseDns": "example.com"
42+
}
43+
]
44+
},
45+
"status": 200,
46+
"content_type": "application/json"
47+
},
48+
{
49+
"method": "GET",
50+
"url": "https://api.transip.nl/v6/colocations/example2/ip-addresses/37.97.254.6",
51+
"json": {
52+
"ipAddress": {
53+
"address": "37.97.254.6",
54+
"subnetMask": "255.255.255.0",
55+
"gateway": "37.97.254.1",
56+
"dnsResolvers": [
57+
"195.8.195.8",
58+
"195.135.195.135"
59+
],
60+
"reverseDns": "example.com"
61+
}
62+
},
63+
"status": 200,
64+
"content_type": "application/json"
65+
},
66+
{
67+
"method": "POST",
68+
"url": "https://api.transip.nl/v6/colocations/example2/ip-addresses",
69+
"status": 201,
70+
"content_type": "application/json",
71+
"match_json": {
72+
"ipAddress": "2a01:7c8:3:1337::6",
73+
"reverseDns": "example.com"
74+
}
75+
},
76+
{
77+
"method": "PUT",
78+
"url": "https://api.transip.nl/v6/colocations/example2/ip-addresses/37.97.254.6",
79+
"status": 204,
80+
"content_type": "application/json",
81+
"match_json": {
82+
"ipAddress": {
83+
"address": "37.97.254.6",
84+
"subnetMask": "255.255.255.0",
85+
"gateway": "37.97.254.1",
86+
"dnsResolvers": [
87+
"195.8.195.8",
88+
"195.135.195.135"
89+
],
90+
"reverseDns": "example.com"
91+
}
92+
}
93+
},
94+
{
95+
"method": "DELETE",
96+
"url": "https://api.transip.nl/v6/colocations/example2/ip-addresses/37.97.254.6",
97+
"status": 204,
98+
"content_type": "application/json"
99+
},
100+
{
101+
"method": "POST",
102+
"url": "https://api.transip.nl/v6/colocations/example2/remote-hands",
103+
"status": 201,
104+
"content_type": "application/json",
105+
"match_json": {
106+
"remoteHands": {
107+
"coloName": "example2",
108+
"contactName": "Herman Kaakdorst",
109+
"phoneNumber": "+31 612345678",
110+
"expectedDuration": 15,
111+
"instructions": "Reboot server with label Loadbalancer0"
112+
}
113+
}
114+
}
115+
]

0 commit comments

Comments
 (0)