-
Notifications
You must be signed in to change notification settings - Fork 0
/
rules.config
49 lines (49 loc) · 4.8 KB
/
rules.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#{rules => #{'GET' => #{[<<"provs">>] => #{response => [{200, [], <<"[{\"shortId\":\"2222\",\"longIds\":[\"+41790000000\",\"+41790000001\"],\"customerName\":\"fdsfdsf fdsfsd\",\"password\":\"fdsfsdfsdfsdf\",\"senderDomains\":[\"fdsf.foo\",\"fdsfds.bar\"]
,\"smsDomains\":[\"sms.fdsfsf.foo\",\"sms.ffsfdsf.bar\"],\"sessions\":4,\"defaultSender\":\"fdsfdsfsd\",\"reply\":true,\"createDateTime\":\"2015-04-01T12:00:00.000Z\",\"updateDateTime\":\"2015-05-01T12:00:00.000Z\"},{\"shortId\":\"50800\",\"longIds\":[\"+41790000002\",\"+41790000003\",\"+41790000004\"],\"customerName\":\"fdsfdsfdfsfds\",\"password\":\"fdfsdfdsfsdf\",\"senderDomains\":[\"fdsfsfd.bar\",\"fdfsd.fd\",\"fdsf.fds\",\"fdsfs.fdsf\"],\"smsDomains\":[\"sms.fdf.bar\",\"sms.fdsf.fd\",\"sms.fds.fdsf\",\"sms.fdsf.fdsfsd\"],\"sessions\":2,\"defaultSender\":\"fdsfsdfsdfd\",\"reply\":false,\"createDateTime\":\"2015-04-01T12:00:00.000Z\",\"updateDateTime\":\"2015-05-01T12:00:00.000Z\"}]">>},
{500, [], <<"{\"errorCode\":1234,\"errorMessage\":\"Internal Server Error\",\"errorDetails\":\"don't know\"}">>},
{400, [], <<"{\"errorCode\":1234,\"errorMessage\":\"Mal formed Request\",\"errorDetails\":\"don't know\"}">>}
],
auth => [basic, "test", "test"]
},
[<<"provs">>, <<"50800">>] => #{response => [{200, [], <<"{\"code\":1234,\"data\":\"Internal Server Error\",\"details\":\"don't know\"}">>},
{400, [], <<"{\"errorCode\":1234,\"errorMessage\":\"Mal formed Request\",\"errorDetails\":\"don't know\"}">>},
{404, [], <<"{\"errorCode\":1234,\"errorMessage\":\"Not Found\",\"errorDetails\":\"don't know\"}">>},
{409, [], <<"{\"errorCode\":1234,\"errorMessage\":\"Conflict\",\"errorDetails\":\"don't know\"}">>},
{500, [], <<"{\"errorCode\":1234,\"errorMessage\":\"Internal Server Error\",\"errorDetails\":\"don't know\"}">>}
],
auth => [basic, "test", "test"]
}
},
'POST' => #{[<<"provs">>] => #{data => [<<"shortId">>, <<"longIds">>, <<"customerName">>, <<"password">>, <<"senderDomains">>, <<"smsDomains">>, <<"sessions">>, <<"defaultSender">>, <<"reply">>],
response => [{200, [], <<"{\"statusCode\": 0, \"statusMessage\": \"OK\", \"statusDetails\": \"\"}">>},
{500, [], <<"{\"errorCode\":1234,\"errorMessage\":\"Internal Server Error\",\"errorDetails\":\"don't know\"}">>},
{400, [], <<"{\"errorCode\":1234,\"errorMessage\":\"Mal formed Request\",\"errorDetails\":\"don't know\"}">>}
],
auth => [basic, "test", "test"]
}
},
'PUT' => #{[<<"provs">>, <<"50800">>] => #{data => [<<"shortId">>, <<"longIds">>, <<"customerName">>, <<"password">>, <<"senderDomains">>, <<"smsDomains">>, <<"sessions">>, <<"defaultSender">>, <<"reply">>],
response => [{200, [], <<"{\"statusCode\": 0, \"statusMessage\": \"OK\", \"statusDetails\": \"\"}">>},
{400, [], <<"{\"errorCode\":1234,\"errorMessage\":\"Mal formed Request\",\"errorDetails\":\"don't know\"}">>},
{404, [], <<"{\"errorCode\":1234,\"errorMessage\":\"Not Found\",\"errorDetails\":\"don't know\"}">>},
{409, [], <<"{\"errorCode\":1234,\"errorMessage\":\"Conflict\",\"errorDetails\":\"don't know\"}">>},
{500, [], <<"{\"errorCode\":1234,\"errorMessage\":\"Internal Server Error\",\"errorDetails\":\"don't know\"}">>}
],
auth => [basic, "test", "test"]
}
},
'DELETE' => #{[<<"provs">>, <<"50800">>] => #{response => [{200, [], <<"{\"statusCode\": 0, \"statusMessage\": \"OK\", \"statusDetails\": \"\"}">>},
{400, [], <<"{\"errorCode\":1234,\"errorMessage\":\"Mal formed Request\",\"errorDetails\":\"don't know\"}">>},
{404, [], <<"{\"errorCode\":1234,\"errorMessage\":\"Not Found\",\"errorDetails\":\"don't know\"}">>},
{500, [], <<"{\"errorCode\":1234,\"errorMessage\":\"Internal Server Error\",\"errorDetails\":\"don't know\"}">>}
],
auth => [basic, "test", "test"]
}
}
},
responses => #{'GET' => [#{[<<"provs">>] => 200}, #{[<<"provs">>, <<"50800">>] => 200}],
'DELETE' => [#{[<<"provs">>, <<"50800">>] => 200}],
'PUT' => [#{[<<"provs">>, <<"50800">>] => 200}],
'POST' => [#{[<<"provs">>] => 200}]
}
}.