mxhero-api 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. data/VERSION +1 -1
  2. data/lib/communication.rb +35 -0
  3. data/lib/groups.rb +178 -0
  4. data/lib/mxhero-api.rb +288 -312
  5. data/lib/urls.rb +19 -0
  6. data/mxhero-api.gemspec +4 -4
  7. data/test/fixtures/api/account_properties.yml +12 -13
  8. data/test/fixtures/api/account_properties_not_found.yml +9 -9
  9. data/test/fixtures/api/accounts.yml +39 -0
  10. data/test/fixtures/api/accounts_filtered.yml +57 -42
  11. data/test/fixtures/api/accounts_from_domain.yml +10 -10
  12. data/test/fixtures/api/accounts_from_domain_paginated.yml +10 -10
  13. data/test/fixtures/api/accounts_without_group.yml +75 -0
  14. data/test/fixtures/api/add_an_inexistent_account_to_group.yml +39 -0
  15. data/test/fixtures/api/add_and_remove_account.yml +219 -0
  16. data/test/fixtures/api/all_groups.yml +39 -0
  17. data/test/fixtures/api/create_rule_for_domain.yml +95 -21
  18. data/test/fixtures/api/delete_group.yml +75 -0
  19. data/test/fixtures/api/delete_rule.yml +21 -61
  20. data/test/fixtures/api/domain_by_id.yml +10 -10
  21. data/test/fixtures/api/domain_by_id_not_found.yml +9 -9
  22. data/test/fixtures/api/domain_rule.yml +62 -76
  23. data/test/fixtures/api/domains.yml +10 -10
  24. data/test/fixtures/api/remove_account_from_group_twice.yml +150 -0
  25. data/test/fixtures/api/remove_inexistente_account_from_group.yml +39 -0
  26. data/test/fixtures/api/rules_for_domain.yml +11 -57
  27. data/test/fixtures/api/rules_for_domain_by_component.yml +6 -8
  28. data/test/fixtures/api/save_group.yml +119 -0
  29. data/test/fixtures/api/update_account_properties.yml +35 -33
  30. data/test/fixtures/api/update_rule.yml +35 -76
  31. data/test/helper.rb +1 -1
  32. data/test/test_groups.rb +104 -0
  33. data/test/test_mxhero_api.rb +49 -27
  34. metadata +26 -7
  35. data/test/fixtures/api/create_rule_alredy_exist.yml +0 -81
  36. data/test/fixtures/api/create_rule_success.yml +0 -41
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://admin:password@localhost:8080/webapi/api/v1/domains
5
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -19,21 +19,21 @@ http_interactions:
19
19
  message: !binary |-
20
20
  T0s=
21
21
  headers:
22
+ !binary "RGF0ZQ==":
23
+ - !binary |-
24
+ VGh1LCAxMiBTZXAgMjAxMyAyMToyMToxMSBHTVQ=
22
25
  !binary "U2VydmVy":
23
26
  - !binary |-
24
- QXBhY2hlLUNveW90ZS8xLjE=
27
+ QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
28
+ !binary "Q29udGVudC1MZW5ndGg=":
29
+ - !binary |-
30
+ MTAyOA==
25
31
  !binary "Q29udGVudC1UeXBl":
26
32
  - !binary |-
27
33
  YXBwbGljYXRpb24vanNvbg==
28
- !binary "VHJhbnNmZXItRW5jb2Rpbmc=":
29
- - !binary |-
30
- Y2h1bmtlZA==
31
- !binary "RGF0ZQ==":
32
- - !binary |-
33
- RnJpLCAwOSBBdWcgMjAxMyAwNjozNDowNCBHTVQ=
34
34
  body:
35
35
  encoding: US-ASCII
36
- string: ! '{"elements":[{"domain":"tesla.com","server":"tesla.com","creationDate":1369837819000,"updatedDate":1369837819000,"aliases":null,"ldap":null}],"totalElements":1,"totalPages":1,"actualPage":1}'
36
+ string: ! '{"elements":[{"domain":"developex.local","server":"kiev1.devx.kiev.ua","creationDate":1375362819000,"updatedDate":1375362901000,"aliases":null,"ldap":null},{"domain":"ex-test.local","server":"kiev1.devx.kiev.ua","creationDate":1375277105000,"updatedDate":1375362897000,"aliases":null,"ldap":null},{"domain":"example.com","server":"sssss.example.com","creationDate":1374780606000,"updatedDate":1374858041000,"aliases":null,"ldap":null},{"domain":"mxhero.com","server":"gmail.mxhero.com","creationDate":1371220326000,"updatedDate":1375909534000,"aliases":null,"ldap":null},{"domain":"tesla.com","server":"tesla.com","creationDate":1370265722000,"updatedDate":1370265722000,"aliases":null,"ldap":null},{"domain":"test.test.com","server":"test.test.com","creationDate":1373919751000,"updatedDate":1373919762000,"aliases":null,"ldap":null},{"domain":"zimbra.mxhero.com","server":"zimbra.mxhero.net","creationDate":1368126468000,"updatedDate":1375135409000,"aliases":null,"ldap":null}],"totalElements":7,"totalPages":1,"actualPage":1}'
37
37
  http_version:
38
- recorded_at: Tue, 13 Aug 2013 16:33:59 GMT
38
+ recorded_at: Thu, 12 Sep 2013 21:21:11 GMT
39
39
  recorded_with: VCR 2.5.0
@@ -0,0 +1,150 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains/tesla.com/groups/development/accounts
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Content-Type:
13
+ - application/json
14
+ Authorization:
15
+ - Basic YWRtaW46cGFzc3dvcmQ=
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: !binary |-
20
+ T0s=
21
+ headers:
22
+ !binary "RGF0ZQ==":
23
+ - !binary |-
24
+ RnJpLCAxMyBTZXAgMjAxMyAxOTowMTo1MSBHTVQ=
25
+ !binary "U2VydmVy":
26
+ - !binary |-
27
+ QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
28
+ !binary "Q29udGVudC1MZW5ndGg=":
29
+ - !binary |-
30
+ Mjgx
31
+ !binary "Q29udGVudC1UeXBl":
32
+ - !binary |-
33
+ YXBwbGljYXRpb24vanNvbg==
34
+ body:
35
+ encoding: US-ASCII
36
+ string: ! '{"elements":[{"account":"john.doe","domain":"tesla.com","createdDate":1378759081000,"updatedDate":1379098878000,"group":"development","aliases":[{"name":"john.doe","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"}],"totalElements":1,"totalPages":1,"actualPage":1}'
37
+ http_version:
38
+ recorded_at: Fri, 13 Sep 2013 19:01:51 GMT
39
+ - request:
40
+ method: delete
41
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains/tesla.com/groups/development/accounts/john.doe/remove
42
+ body:
43
+ encoding: US-ASCII
44
+ string: ''
45
+ headers:
46
+ Accept:
47
+ - application/json
48
+ Content-Type:
49
+ - application/json
50
+ Authorization:
51
+ - Basic YWRtaW46cGFzc3dvcmQ=
52
+ response:
53
+ status:
54
+ code: 200
55
+ message: !binary |-
56
+ T0s=
57
+ headers:
58
+ !binary "RGF0ZQ==":
59
+ - !binary |-
60
+ RnJpLCAxMyBTZXAgMjAxMyAxOTowMTo1MiBHTVQ=
61
+ !binary "U2VydmVy":
62
+ - !binary |-
63
+ QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
64
+ !binary "Q29udGVudC1MZW5ndGg=":
65
+ - !binary |-
66
+ MA==
67
+ !binary "Q29udGVudC1UeXBl":
68
+ - !binary |-
69
+ dGV4dC9wbGFpbg==
70
+ body:
71
+ encoding: US-ASCII
72
+ string: ''
73
+ http_version:
74
+ recorded_at: Fri, 13 Sep 2013 19:01:52 GMT
75
+ - request:
76
+ method: delete
77
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains/tesla.com/groups/development/accounts/john.doe/remove
78
+ body:
79
+ encoding: US-ASCII
80
+ string: ''
81
+ headers:
82
+ Accept:
83
+ - application/json
84
+ Content-Type:
85
+ - application/json
86
+ Authorization:
87
+ - Basic YWRtaW46cGFzc3dvcmQ=
88
+ response:
89
+ status:
90
+ code: 500
91
+ message: !binary |-
92
+ SW50ZXJuYWwgU2VydmVyIEVycm9y
93
+ headers:
94
+ !binary "RGF0ZQ==":
95
+ - !binary |-
96
+ RnJpLCAxMyBTZXAgMjAxMyAxOTowMTo1MiBHTVQ=
97
+ !binary "U2VydmVy":
98
+ - !binary |-
99
+ QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
100
+ !binary "Q29udGVudC1MZW5ndGg=":
101
+ - !binary |-
102
+ MTIy
103
+ !binary "Q29ubmVjdGlvbg==":
104
+ - !binary |-
105
+ Y2xvc2U=
106
+ !binary "Q29udGVudC1UeXBl":
107
+ - !binary |-
108
+ YXBwbGljYXRpb24vanNvbg==
109
+ body:
110
+ encoding: US-ASCII
111
+ string: ! '{"status":500,"code":500,"developerMessage":"domain.group.account.not.in.group","moreInfoUrl":"mailto:support@mxhero.com"}'
112
+ http_version:
113
+ recorded_at: Fri, 13 Sep 2013 19:01:52 GMT
114
+ - request:
115
+ method: post
116
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains/tesla.com/groups/development/accounts/john.doe/add
117
+ body:
118
+ encoding: US-ASCII
119
+ string: ''
120
+ headers:
121
+ Accept:
122
+ - application/json
123
+ Content-Type:
124
+ - application/json
125
+ Authorization:
126
+ - Basic YWRtaW46cGFzc3dvcmQ=
127
+ response:
128
+ status:
129
+ code: 201
130
+ message: !binary |-
131
+ Q3JlYXRlZA==
132
+ headers:
133
+ !binary "RGF0ZQ==":
134
+ - !binary |-
135
+ RnJpLCAxMyBTZXAgMjAxMyAxOTowMTo1MyBHTVQ=
136
+ !binary "U2VydmVy":
137
+ - !binary |-
138
+ QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
139
+ !binary "Q29udGVudC1MZW5ndGg=":
140
+ - !binary |-
141
+ MjE4
142
+ !binary "Q29udGVudC1UeXBl":
143
+ - !binary |-
144
+ YXBwbGljYXRpb24vanNvbg==
145
+ body:
146
+ encoding: US-ASCII
147
+ string: ! '{"account":"john.doe","domain":"tesla.com","createdDate":1378759081000,"updatedDate":1379098912000,"group":"development","aliases":[{"name":"john.doe","domain":"tesla.com","dataSource":"manual"}],"dataSource":"manual"}'
148
+ http_version:
149
+ recorded_at: Fri, 13 Sep 2013 19:01:53 GMT
150
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,39 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains/tesla.com/groups/development/accounts/non.existent.account/remove
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Content-Type:
13
+ - application/json
14
+ Authorization:
15
+ - Basic YWRtaW46cGFzc3dvcmQ=
16
+ response:
17
+ status:
18
+ code: 404
19
+ message: !binary |-
20
+ Tm90IEZvdW5k
21
+ headers:
22
+ !binary "RGF0ZQ==":
23
+ - !binary |-
24
+ RnJpLCAxMyBTZXAgMjAxMyAxOTowNDo1NCBHTVQ=
25
+ !binary "U2VydmVy":
26
+ - !binary |-
27
+ QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
28
+ !binary "Q29udGVudC1MZW5ndGg=":
29
+ - !binary |-
30
+ MTUw
31
+ !binary "Q29udGVudC1UeXBl":
32
+ - !binary |-
33
+ YXBwbGljYXRpb24vanNvbg==
34
+ body:
35
+ encoding: US-ASCII
36
+ string: ! '{"status":404,"code":404,"message":"domain.account.not.found","developerMessage":"domain.account.not.found","moreInfoUrl":"mailto:support@mxhero.com"}'
37
+ http_version:
38
+ recorded_at: Fri, 13 Sep 2013 19:04:54 GMT
39
+ recorded_with: VCR 2.5.0
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://admin:password@localhost:8080/webapi/api/v1/domains/tesla.com/rules
5
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains/tesla.com/rules
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -19,67 +19,21 @@ http_interactions:
19
19
  message: !binary |-
20
20
  T0s=
21
21
  headers:
22
- !binary "U2VydmVy":
22
+ !binary "RGF0ZQ==":
23
23
  - !binary |-
24
- QXBhY2hlLUNveW90ZS8xLjE=
25
- !binary "Q29udGVudC1UeXBl":
24
+ VGh1LCAxMiBTZXAgMjAxMyAyMToyMTowOSBHTVQ=
25
+ !binary "U2VydmVy":
26
26
  - !binary |-
27
- YXBwbGljYXRpb24vanNvbg==
28
- !binary "VHJhbnNmZXItRW5jb2Rpbmc=":
27
+ QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
28
+ !binary "Q29udGVudC1MZW5ndGg=":
29
29
  - !binary |-
30
- Y2h1bmtlZA==
31
- !binary "RGF0ZQ==":
30
+ MA==
31
+ !binary "Q29udGVudC1UeXBl":
32
32
  - !binary |-
33
- RnJpLCAwOSBBdWcgMjAxMyAwNjozNDowNCBHTVQ=
33
+ dGV4dC9wbGFpbg==
34
34
  body:
35
35
  encoding: US-ASCII
36
- string: ! '[{"id":114,"domain":"tesla.com","name":"blah","created":1376029845000,"updated":1376029845000,"enabled":true,"twoWays":false,"adminOrder":null,"component":"org.mxhero.feature.disclaimer","fromDirection":{"id":213,"directionType":"domain","freeValue":"tesla.com","domain":null,"account":null,"group":null},"toDirection":{"id":214,"directionType":"anyone","freeValue":"anyone","domain":null,"account":null,"group":null},"properties":[{"propertyKey":"return.message","propertyValue":"<BODY>\n <P
37
- STYLE=\"text-align:left;\">\n <SPAN STYLE=\"letter-spacing:0px;color:#000000;font-size:12px;font-family:''Arial'';\">This
38
- message is intended only for ${mxrecipient}. If you are not the intended recipient
39
- you are notified that disclosing, copying, distributing or taking any action
40
- in reliance on the contents of this information is strictly prohibited.</SPAN>\n </P>\n</BODY>"},{"propertyKey":"return.message.plain","propertyValue":"This
41
- message is intended only for ${mxrecipient}. If you are not the intended recipient
42
- you are notified that disclosing, copying, distributing or taking any action
43
- in reliance on the contents of this information is strictly prohibited."},{"propertyKey":"return.message.rte","propertyValue":"<TextFlow
44
- whiteSpaceCollapse=\"preserve\" version=\"2.0.0\" xmlns=\"http://ns.adobe.com/textLayout/2008\"><p><span>This
45
- message is intended only for ${mxrecipient}. If you are not the intended recipient
46
- you are notified that disclosing, copying, distributing or taking any action
47
- in reliance on the contents of this information is strictly prohibited.</span></p></TextFlow>"}]},{"id":115,"domain":"tesla.com","name":"another
48
- rule ","created":1376029963000,"updated":1376029963000,"enabled":true,"twoWays":false,"adminOrder":null,"component":"org.mxhero.feature.disclaimer","fromDirection":{"id":215,"directionType":"group","freeValue":"development","domain":"tesla.com","account":null,"group":"development"},"toDirection":{"id":216,"directionType":"anyone","freeValue":"anyone","domain":null,"account":null,"group":null},"properties":[{"propertyKey":"return.message","propertyValue":"<BODY>\n <P
49
- STYLE=\"text-align:left;\">\n <SPAN STYLE=\"letter-spacing:0px;color:#000000;font-size:12px;font-family:''Arial'';\">This
50
- message is intended only for ${mxrecipient}. If you are not the intended recipient
51
- you are notified that disclosing, copying, distributing or taking any action
52
- in reliance on the contents of this information is strictly prohibited.</SPAN>\n </P>\n</BODY>"},{"propertyKey":"return.message.plain","propertyValue":"This
53
- message is intended only for ${mxrecipient}. If you are not the intended recipient
54
- you are notified that disclosing, copying, distributing or taking any action
55
- in reliance on the contents of this information is strictly prohibited."},{"propertyKey":"return.message.rte","propertyValue":"<TextFlow
56
- whiteSpaceCollapse=\"preserve\" version=\"2.0.0\" xmlns=\"http://ns.adobe.com/textLayout/2008\"><p><span>This
57
- message is intended only for ${mxrecipient}. If you are not the intended recipient
58
- you are notified that disclosing, copying, distributing or taking any action
59
- in reliance on the contents of this information is strictly prohibited.</span></p></TextFlow>"}]},{"id":116,"domain":"tesla.com","name":"marketing
60
- rule","created":1376029996000,"updated":1376029996000,"enabled":true,"twoWays":false,"adminOrder":null,"component":"org.mxhero.feature.disclaimer","fromDirection":{"id":217,"directionType":"domain","freeValue":"tesla.com","domain":"tesla.com","account":null,"group":null},"toDirection":{"id":218,"directionType":"group","freeValue":"marketing","domain":"tesla.com","account":null,"group":"marketing"},"properties":[{"propertyKey":"return.message","propertyValue":"<BODY>\n <P
61
- STYLE=\"text-align:left;\">\n <SPAN STYLE=\"letter-spacing:0px;color:#000000;font-size:12px;font-family:''Arial'';\">This
62
- message is intended only for ${mxrecipient}. If you are not the intended recipient
63
- you are notified that disclosing, copying, distributing or taking any action
64
- in reliance on the contents of this information is strictly prohibited.</SPAN>\n </P>\n</BODY>"},{"propertyKey":"return.message.plain","propertyValue":"This
65
- message is intended only for ${mxrecipient}. If you are not the intended recipient
66
- you are notified that disclosing, copying, distributing or taking any action
67
- in reliance on the contents of this information is strictly prohibited."},{"propertyKey":"return.message.rte","propertyValue":"<TextFlow
68
- whiteSpaceCollapse=\"preserve\" version=\"2.0.0\" xmlns=\"http://ns.adobe.com/textLayout/2008\"><p><span>This
69
- message is intended only for ${mxrecipient}. If you are not the intended recipient
70
- you are notified that disclosing, copying, distributing or taking any action
71
- in reliance on the contents of this information is strictly prohibited.</span></p></TextFlow>"}]},{"id":117,"domain":"tesla.com","name":"marketing","created":1376030034000,"updated":1376030034000,"enabled":true,"twoWays":false,"adminOrder":null,"component":"org.mxhero.feature.disclaimer","fromDirection":{"id":219,"directionType":"group","freeValue":"marketing","domain":"tesla.com","account":null,"group":"marketing"},"toDirection":{"id":220,"directionType":"anyoneelse","freeValue":"anyoneelse","domain":null,"account":null,"group":null},"properties":[{"propertyKey":"return.message","propertyValue":"<BODY>\n <P
72
- STYLE=\"text-align:left;\">\n <SPAN STYLE=\"letter-spacing:0px;color:#000000;font-size:12px;font-family:''Arial'';\">This
73
- message is intended only for ${mxrecipient}. If you are not the intended recipient
74
- you are notified that disclosing, copying, distributing or taking any action
75
- in reliance on the contents of this information is strictly prohibited.</SPAN>\n </P>\n</BODY>"},{"propertyKey":"return.message.plain","propertyValue":"This
76
- message is intended only for ${mxrecipient}. If you are not the intended recipient
77
- you are notified that disclosing, copying, distributing or taking any action
78
- in reliance on the contents of this information is strictly prohibited."},{"propertyKey":"return.message.rte","propertyValue":"<TextFlow
79
- whiteSpaceCollapse=\"preserve\" version=\"2.0.0\" xmlns=\"http://ns.adobe.com/textLayout/2008\"><p><span>This
80
- message is intended only for ${mxrecipient}. If you are not the intended recipient
81
- you are notified that disclosing, copying, distributing or taking any action
82
- in reliance on the contents of this information is strictly prohibited.</span></p></TextFlow>"}]}]'
36
+ string: ''
83
37
  http_version:
84
- recorded_at: Tue, 13 Aug 2013 16:33:59 GMT
38
+ recorded_at: Thu, 12 Sep 2013 21:21:08 GMT
85
39
  recorded_with: VCR 2.5.0
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://admin:password@localhost:8080/webapi/api/v1/domains/tesla.com/rules?component=org.mxhero.feature.signature
5
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains/tesla.com/rules?component=org.mxhero.feature.signature
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -21,21 +21,19 @@ http_interactions:
21
21
  headers:
22
22
  !binary "RGF0ZQ==":
23
23
  - !binary |-
24
- U2F0LCAxNyBBdWcgMjAxMyAxNTowMDo0OSBHTVQ=
24
+ VGh1LCAxMiBTZXAgMjAxMyAyMToyMToxMiBHTVQ=
25
25
  !binary "U2VydmVy":
26
26
  - !binary |-
27
27
  QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
28
28
  !binary "Q29udGVudC1MZW5ndGg=":
29
29
  - !binary |-
30
- Nzk0
30
+ MA==
31
31
  !binary "Q29udGVudC1UeXBl":
32
32
  - !binary |-
33
- YXBwbGljYXRpb24vanNvbg==
33
+ dGV4dC9wbGFpbg==
34
34
  body:
35
35
  encoding: US-ASCII
36
- string: ! '[{"id":141,"domain":"tesla.com","name":"a test rule for auto signature","created":1376751456000,"updated":1376751456000,"enabled":true,"twoWays":false,"adminOrder":null,"component":"org.mxhero.feature.signature","fromDirection":{"id":280,"directionType":"domain","freeValue":"tesla.com","domain":"tesla.com","account":null,"group":null},"toDirection":{"id":281,"directionType":"anyoneelse","freeValue":"anyoneelse","domain":null,"account":null,"group":null},"properties":[{"propertyKey":"return.message","propertyValue":"<hr
37
- />${firstname} ${lastname}<br />Email: ${email}<br />My Company Example"},{"propertyKey":"return.message.plain","propertyValue":"\n----------------\n${firstname}
38
- ${lastname}\nEmail: ${email}\nMy Company Example"},{"propertyKey":"interParsing","propertyValue":"true"}]}]'
36
+ string: ''
39
37
  http_version:
40
- recorded_at: Sat, 17 Aug 2013 15:00:49 GMT
38
+ recorded_at: Thu, 12 Sep 2013 21:21:12 GMT
41
39
  recorded_with: VCR 2.5.0
@@ -0,0 +1,119 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains/tesla.com/groups
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Content-Type:
13
+ - application/json
14
+ Authorization:
15
+ - Basic YWRtaW46cGFzc3dvcmQ=
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: !binary |-
20
+ T0s=
21
+ headers:
22
+ !binary "RGF0ZQ==":
23
+ - !binary |-
24
+ VGh1LCAxMiBTZXAgMjAxMyAyMToyMTowNCBHTVQ=
25
+ !binary "U2VydmVy":
26
+ - !binary |-
27
+ QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
28
+ !binary "Q29udGVudC1MZW5ndGg=":
29
+ - !binary |-
30
+ NjM=
31
+ !binary "Q29udGVudC1UeXBl":
32
+ - !binary |-
33
+ YXBwbGljYXRpb24vanNvbg==
34
+ body:
35
+ encoding: US-ASCII
36
+ string: ! '{"elements":[],"totalElements":0,"totalPages":0,"actualPage":0}'
37
+ http_version:
38
+ recorded_at: Thu, 12 Sep 2013 21:21:04 GMT
39
+ - request:
40
+ method: post
41
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains/tesla.com/groups
42
+ body:
43
+ encoding: UTF-8
44
+ string: ! '{"name":"test","domain":"tesla.com","description":null}'
45
+ headers:
46
+ Accept:
47
+ - application/json
48
+ Content-Type:
49
+ - application/json
50
+ Authorization:
51
+ - Basic YWRtaW46cGFzc3dvcmQ=
52
+ response:
53
+ status:
54
+ code: 201
55
+ message: !binary |-
56
+ Q3JlYXRlZA==
57
+ headers:
58
+ !binary "RGF0ZQ==":
59
+ - !binary |-
60
+ VGh1LCAxMiBTZXAgMjAxMyAyMToyMTowNSBHTVQ=
61
+ !binary "U2VydmVy":
62
+ - !binary |-
63
+ QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
64
+ !binary "Q29udGVudC1MZW5ndGg=":
65
+ - !binary |-
66
+ MTEx
67
+ !binary "Q29udGVudC1UeXBl":
68
+ - !binary |-
69
+ YXBwbGljYXRpb24vanNvbg==
70
+ body:
71
+ encoding: US-ASCII
72
+ string: ! '{"name":"test","domain":"tesla.com","description":null,"createdDate":1379020865000,"updatedDate":1379020865000}'
73
+ http_version:
74
+ recorded_at: Thu, 12 Sep 2013 21:21:04 GMT
75
+ - request:
76
+ method: post
77
+ uri: http://admin:password@test.mxhero.com/webapi/api/v1/domains/tesla.com/groups
78
+ body:
79
+ encoding: UTF-8
80
+ string: ! '{"name":"test","domain":"tesla.com","description":null}'
81
+ headers:
82
+ Accept:
83
+ - application/json
84
+ Content-Type:
85
+ - application/json
86
+ Authorization:
87
+ - Basic YWRtaW46cGFzc3dvcmQ=
88
+ response:
89
+ status:
90
+ code: 409
91
+ message: !binary |-
92
+ Q29uZmxpY3Q=
93
+ headers:
94
+ !binary "RGF0ZQ==":
95
+ - !binary |-
96
+ VGh1LCAxMiBTZXAgMjAxMyAyMToyMTowNSBHTVQ=
97
+ !binary "U2VydmVy":
98
+ - !binary |-
99
+ QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
100
+ !binary "Q29udGVudC1MZW5ndGg=":
101
+ - !binary |-
102
+ Nzgy
103
+ !binary "Q29udGVudC1UeXBl":
104
+ - !binary |-
105
+ YXBwbGljYXRpb24vanNvbg==
106
+ body:
107
+ encoding: US-ASCII
108
+ string: ! '{"status":409,"code":409,"message":"PreparedStatementCallback; SQL
109
+ [INSERT INTO `mxhero`.`groups` (`domain_id`,`name`, `created`,`description`,
110
+ `updated`) VALUES(?,?,?,?,?) ;]; Duplicate entry ''tesla.com-test'' for key
111
+ ''PRIMARY''; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:
112
+ Duplicate entry ''tesla.com-test'' for key ''PRIMARY''","developerMessage":"PreparedStatementCallback;
113
+ SQL [INSERT INTO `mxhero`.`groups` (`domain_id`,`name`, `created`,`description`,
114
+ `updated`) VALUES(?,?,?,?,?) ;]; Duplicate entry ''tesla.com-test'' for key
115
+ ''PRIMARY''; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:
116
+ Duplicate entry ''tesla.com-test'' for key ''PRIMARY''","moreInfoUrl":"mailto:support@mxhero.com"}'
117
+ http_version:
118
+ recorded_at: Thu, 12 Sep 2013 21:21:05 GMT
119
+ recorded_with: VCR 2.5.0