mxhero-api 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.6
data/lib/mxhero-api.rb CHANGED
@@ -188,6 +188,14 @@ module MxHero
188
188
  json_parse(response.content)
189
189
  end
190
190
 
191
+ # @return [Boolean] true when operation it's ok
192
+ def delete_rule(domain, id)
193
+ url = domain_rule_url(domain, id)
194
+ response = call(:delete, url)
195
+ return true if response.status == 200
196
+ return false
197
+ end
198
+
191
199
  private
192
200
 
193
201
  # @return [MxHero::API::Response] a response object
data/mxhero-api.gemspec CHANGED
@@ -2,20 +2,20 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "mxhero-api"
5
- s.version = "0.1.5"
5
+ s.version = "0.1.6"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Maximiliano Dello Russo", "Juan Pablo Royo", "mxHero"]
9
- s.date = "2013-08-09"
9
+ s.date = "2013-08-13"
10
10
  s.description = "A gem to provide easy access to the API of MxHero platform (http://www.mxhero.com/)"
11
11
  s.email = ["maxidr@mxhero.com", "juanpablo.royo@gmail.com", "mxhero@mxhero.com"]
12
- s.files = [".gitignore", ".rvmrc", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "VERSION", "lib/mxhero-api.rb", "mxhero-api.gemspec", "test/fixtures/api/accounts_from_domain.yml", "test/fixtures/api/create_rule_alredy_exist.yml", "test/fixtures/api/create_rule_for_domain.yml", "test/fixtures/api/create_rule_success.yml", "test/fixtures/api/domain_by_id.yml", "test/fixtures/api/domain_by_id_not_found.yml", "test/fixtures/api/domain_rule.yml", "test/fixtures/api/domains.yml", "test/fixtures/api/rules_for_domain.yml", "test/fixtures/api/service_create_footer.yml", "test/fixtures/api/service_footer_for_domain.yml", "test/fixtures/api/update_rule.yml", "test/helper.rb", "test/test_mxhero_api.rb", "test/test_mxhero_api_response.rb"]
12
+ s.files = [".gitignore", ".rvmrc", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "VERSION", "lib/mxhero-api.rb", "mxhero-api.gemspec", "test/fixtures/api/accounts_from_domain.yml", "test/fixtures/api/create_rule_alredy_exist.yml", "test/fixtures/api/create_rule_for_domain.yml", "test/fixtures/api/create_rule_success.yml", "test/fixtures/api/delete_rule.yml", "test/fixtures/api/domain_by_id.yml", "test/fixtures/api/domain_by_id_not_found.yml", "test/fixtures/api/domain_rule.yml", "test/fixtures/api/domains.yml", "test/fixtures/api/rules_for_domain.yml", "test/fixtures/api/update_rule.yml", "test/helper.rb", "test/test_mxhero_api.rb", "test/test_mxhero_api_response.rb"]
13
13
  s.homepage = "http://github.com/mxhero/mxhero-api"
14
14
  s.licenses = ["GPL-3"]
15
15
  s.require_paths = ["lib"]
16
16
  s.rubygems_version = "1.8.25"
17
17
  s.summary = "A MxHero API client for ruby"
18
- s.test_files = ["test/fixtures/api/accounts_from_domain.yml", "test/fixtures/api/create_rule_alredy_exist.yml", "test/fixtures/api/create_rule_for_domain.yml", "test/fixtures/api/create_rule_success.yml", "test/fixtures/api/domain_by_id.yml", "test/fixtures/api/domain_by_id_not_found.yml", "test/fixtures/api/domain_rule.yml", "test/fixtures/api/domains.yml", "test/fixtures/api/rules_for_domain.yml", "test/fixtures/api/service_create_footer.yml", "test/fixtures/api/service_footer_for_domain.yml", "test/fixtures/api/update_rule.yml", "test/helper.rb", "test/test_mxhero_api.rb", "test/test_mxhero_api_response.rb"]
18
+ s.test_files = ["test/fixtures/api/accounts_from_domain.yml", "test/fixtures/api/create_rule_alredy_exist.yml", "test/fixtures/api/create_rule_for_domain.yml", "test/fixtures/api/create_rule_success.yml", "test/fixtures/api/delete_rule.yml", "test/fixtures/api/domain_by_id.yml", "test/fixtures/api/domain_by_id_not_found.yml", "test/fixtures/api/domain_rule.yml", "test/fixtures/api/domains.yml", "test/fixtures/api/rules_for_domain.yml", "test/fixtures/api/update_rule.yml", "test/helper.rb", "test/test_mxhero_api.rb", "test/test_mxhero_api_response.rb"]
19
19
 
20
20
  if s.respond_to? :specification_version then
21
21
  s.specification_version = 3
@@ -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/mxhero.com/accounts
5
+ uri: http://admin:password@localhost:8080/webapi/api/v1/domains/tesla.com/accounts
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
- V2VkLCAwNyBBdWcgMjAxMyAyMTo0MjoyMyBHTVQ=
25
22
  !binary "U2VydmVy":
26
23
  - !binary |-
27
- QXBhY2hlLzIuMi4xNCAoVWJ1bnR1KQ==
28
- !binary "Q29udGVudC1MZW5ndGg=":
29
- - !binary |-
30
- MjkwMg==
24
+ QXBhY2hlLUNveW90ZS8xLjE=
31
25
  !binary "Q29udGVudC1UeXBl":
32
26
  - !binary |-
33
27
  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":[{"account":"alex","domain":"mxhero.com","createdDate":1375909565000,"updatedDate":1375909565000,"group":null,"aliases":[{"name":"alex","domain":"hero.mx","dataSource":"manual"},{"name":"alex","domain":"mxhero.com","dataSource":"manual"},{"name":"alex","domain":"mxhero.net","dataSource":"manual"},{"name":"alex","domain":"mxhero.org","dataSource":"manual"}],"dataSource":"manual"},{"account":"bruno","domain":"mxhero.com","createdDate":1375909591000,"updatedDate":1375909591000,"group":null,"aliases":[{"name":"bcsantos","domain":"hero.mx","dataSource":"manual"},{"name":"bcsantos","domain":"mxhero.com","dataSource":"manual"},{"name":"bcsantos","domain":"mxhero.net","dataSource":"manual"},{"name":"bcsantos","domain":"mxhero.org","dataSource":"manual"},{"name":"bruno","domain":"mxhero.com","dataSource":"manual"}],"dataSource":"manual"},{"account":"gussoler","domain":"mxhero.com","createdDate":1375909608000,"updatedDate":1375909608000,"group":null,"aliases":[{"name":"gussoler","domain":"hero.mx","dataSource":"manual"},{"name":"gussoler","domain":"mxhero.com","dataSource":"manual"},{"name":"gussoler","domain":"mxhero.net","dataSource":"manual"},{"name":"gussoler","domain":"mxhero.org","dataSource":"manual"}],"dataSource":"manual"},{"account":"jproyo","domain":"mxhero.com","createdDate":1375909608000,"updatedDate":1375909608000,"group":null,"aliases":[{"name":"jproyo","domain":"hero.mx","dataSource":"manual"},{"name":"jproyo","domain":"mxhero.com","dataSource":"manual"},{"name":"jproyo","domain":"mxhero.net","dataSource":"manual"}],"dataSource":"manual"},{"account":"martinm","domain":"mxhero.com","createdDate":1375909591000,"updatedDate":1375909591000,"group":null,"aliases":[{"name":"martinm","domain":"hero.mx","dataSource":"manual"},{"name":"martinm","domain":"mxhero.com","dataSource":"manual"},{"name":"martinm","domain":"mxhero.net","dataSource":"manual"}],"dataSource":"manual"},{"account":"maxidr","domain":"mxhero.com","createdDate":1375909624000,"updatedDate":1375909624000,"group":null,"aliases":[{"name":"maxidr","domain":"hero.mx","dataSource":"manual"},{"name":"maxidr","domain":"mxhero.com","dataSource":"manual"},{"name":"maxidr","domain":"mxhero.net","dataSource":"manual"},{"name":"maxidr","domain":"mxhero.org","dataSource":"manual"}],"dataSource":"manual"},{"account":"mmarmol","domain":"mxhero.com","createdDate":1375909565000,"updatedDate":1375909565000,"group":null,"aliases":[{"name":"mmarmol","domain":"hero.mx","dataSource":"manual"},{"name":"mmarmol","domain":"mxhero.com","dataSource":"manual"},{"name":"mmarmol","domain":"mxhero.net","dataSource":"manual"}],"dataSource":"manual"},{"account":"test","domain":"mxhero.com","createdDate":1375741652000,"updatedDate":1375741652000,"group":"development","aliases":[{"name":"test","domain":"mxhero.com","dataSource":"manual"}],"dataSource":"manual"}],"totalElements":8,"totalPages":1,"actualPage":1}'
36
+ string: ! '{"elements":[],"totalElements":0,"totalPages":0,"actualPage":0}'
37
37
  http_version:
38
- recorded_at: Wed, 07 Aug 2013 21:42:22 GMT
38
+ recorded_at: Tue, 13 Aug 2013 16:33:59 GMT
39
39
  recorded_with: VCR 2.5.0
@@ -12,6 +12,8 @@ http_interactions:
12
12
  - application/json
13
13
  Content-Type:
14
14
  - application/json
15
+ Authorization:
16
+ - Basic YWRtaW46cGFzc3dvcmQ=
15
17
  response:
16
18
  status:
17
19
  code: 201
@@ -29,24 +31,13 @@ http_interactions:
29
31
  Y2h1bmtlZA==
30
32
  !binary "RGF0ZQ==":
31
33
  - !binary |-
32
- VHVlLCAyOCBNYXkgMjAxMyAyMDowOTowNCBHTVQ=
34
+ RnJpLCAwOSBBdWcgMjAxMyAwNzo0NTowOCBHTVQ=
33
35
  body:
34
- encoding: ASCII-8BIT
35
- string: !binary |-
36
- eyJpZCI6OTEsImRvbWFpbiI6bnVsbCwibmFtZSI6IkVtYWlsIGZvb3RlciIs
37
- ImNyZWF0ZWQiOjEzNjk3NzE3NDQwMDAsInVwZGF0ZWQiOjEzNjk3NzE3NDQw
38
- MDAsImVuYWJsZWQiOnRydWUsInR3b1dheXMiOmZhbHNlLCJhZG1pbk9yZGVy
39
- IjpudWxsLCJjb21wb25lbnQiOiJvcmcubXhoZXJvLmZlYXR1cmUuZGlzY2xh
40
- aW1lciIsImZyb21EaXJlY3Rpb24iOnsiaWQiOjE4MSwiZGlyZWN0aW9uVHlw
41
- ZSI6ImRvbWFpbiIsImZyZWVWYWx1ZSI6InRlc2xhLmNvbSIsImRvbWFpbiI6
42
- InRlc2xhLmNvbSIsImFjY291bnQiOm51bGwsImdyb3VwIjpudWxsfSwidG9E
43
- aXJlY3Rpb24iOnsiaWQiOjE4MiwiZGlyZWN0aW9uVHlwZSI6ImRvbWFpbiIs
44
- ImZyZWVWYWx1ZSI6InRlc2xhLmNvbSIsImRvbWFpbiI6InRlc2xhLmNvbSIs
45
- ImFjY291bnQiOm51bGwsImdyb3VwIjpudWxsfSwicHJvcGVydGllcyI6W3si
46
- cHJvcGVydHlLZXkiOiJyZXR1cm4ubWVzc2FnZSIsInByb3BlcnR5VmFsdWUi
47
- OiJmb290ZXIgY29udGVudCJ9XX0=
36
+ encoding: US-ASCII
37
+ string: ! '{"id":121,"domain":null,"name":"Email footer","created":1376034308000,"updated":1376034308000,"enabled":true,"twoWays":false,"adminOrder":null,"component":"org.mxhero.feature.disclaimer","fromDirection":{"id":227,"directionType":"domain","freeValue":"tesla.com","domain":"tesla.com","account":null,"group":null},"toDirection":{"id":228,"directionType":"domain","freeValue":"tesla.com","domain":"tesla.com","account":null,"group":null},"properties":[{"propertyKey":"return.message","propertyValue":"footer
38
+ content"}]}'
48
39
  http_version:
49
- recorded_at: Tue, 28 May 2013 20:08:42 GMT
40
+ recorded_at: Tue, 13 Aug 2013 18:28:46 GMT
50
41
  - request:
51
42
  method: post
52
43
  uri: http://admin:password@localhost:8080/webapi/api/v1/rules
@@ -59,6 +50,8 @@ http_interactions:
59
50
  - application/json
60
51
  Content-Type:
61
52
  - application/json
53
+ Authorization:
54
+ - Basic YWRtaW46cGFzc3dvcmQ=
62
55
  response:
63
56
  status:
64
57
  code: 500
@@ -76,16 +69,13 @@ http_interactions:
76
69
  Y2h1bmtlZA==
77
70
  !binary "RGF0ZQ==":
78
71
  - !binary |-
79
- VHVlLCAyOCBNYXkgMjAxMyAyMDowOTowNCBHTVQ=
72
+ RnJpLCAwOSBBdWcgMjAxMyAwNzo0NTowOCBHTVQ=
80
73
  !binary "Q29ubmVjdGlvbg==":
81
74
  - !binary |-
82
75
  Y2xvc2U=
83
76
  body:
84
- encoding: ASCII-8BIT
85
- string: !binary |-
86
- eyJzdGF0dXMiOjUwMCwiY29kZSI6NTAwLCJkZXZlbG9wZXJNZXNzYWdlIjoi
87
- cnVsZXMuYWxyZWFkeS5leGlzdHMuZm9yLmNvbXBvbmVudCIsIm1vcmVJbmZv
88
- VXJsIjoibWFpbHRvOnN1cHBvcnRAbXhoZXJvLmNvbSJ9
77
+ encoding: US-ASCII
78
+ string: ! '{"status":500,"code":500,"developerMessage":"rules.already.exists.for.component","moreInfoUrl":"mailto:support@mxhero.com"}'
89
79
  http_version:
90
- recorded_at: Tue, 28 May 2013 20:08:42 GMT
80
+ recorded_at: Tue, 13 Aug 2013 18:28:46 GMT
91
81
  recorded_with: VCR 2.5.0
@@ -33,14 +33,14 @@ http_interactions:
33
33
  Y2h1bmtlZA==
34
34
  !binary "RGF0ZQ==":
35
35
  - !binary |-
36
- VGh1LCAwOCBBdWcgMjAxMyAwODozMDo1OCBHTVQ=
36
+ RnJpLCAwOSBBdWcgMjAxMyAwNzo0MToxOCBHTVQ=
37
37
  body:
38
38
  encoding: US-ASCII
39
- string: ! '{"id":111,"domain":"tesla.com","name":"The rules for sales","created":1375950658000,"updated":1375950658000,"enabled":true,"twoWays":false,"adminOrder":null,"component":"org.mxhero.feature.disclaimer","fromDirection":{"id":207,"directionType":"domain","freeValue":"tesla.com","domain":"tesla.com","account":null,"group":null},"toDirection":{"id":208,"directionType":"anyone","freeValue":"Anyone","domain":"tesla.com","account":null,"group":null},"properties":[{"propertyKey":"return.message","propertyValue":"<hr
39
+ string: ! '{"id":120,"domain":"tesla.com","name":"The rules for sales","created":1376034078000,"updated":1376034078000,"enabled":true,"twoWays":false,"adminOrder":null,"component":"org.mxhero.feature.disclaimer","fromDirection":{"id":225,"directionType":"domain","freeValue":"tesla.com","domain":"tesla.com","account":null,"group":null},"toDirection":{"id":226,"directionType":"anyone","freeValue":"Anyone","domain":"tesla.com","account":null,"group":null},"properties":[{"propertyKey":"return.message","propertyValue":"<hr
40
40
  /><p><em><span style=\"color:green\">Think before you print and save a tree.</span></em></p>"},{"propertyKey":"return.message.plain","propertyValue":"\n----------------\nThink
41
41
  before you print and save a tree.r\n\n"},{"propertyKey":"interParsing","propertyValue":"true"}]}'
42
42
  http_version:
43
- recorded_at: Thu, 08 Aug 2013 23:06:49 GMT
43
+ recorded_at: Tue, 13 Aug 2013 18:24:57 GMT
44
44
  - request:
45
45
  method: post
46
46
  uri: http://admin:password@localhost:8080/webapi/api/v1/domains/tesla.com/rules
@@ -74,7 +74,7 @@ http_interactions:
74
74
  Y2h1bmtlZA==
75
75
  !binary "RGF0ZQ==":
76
76
  - !binary |-
77
- VGh1LCAwOCBBdWcgMjAxMyAwODozMDo1OCBHTVQ=
77
+ RnJpLCAwOSBBdWcgMjAxMyAwNzo0MToxOCBHTVQ=
78
78
  !binary "Q29ubmVjdGlvbg==":
79
79
  - !binary |-
80
80
  Y2xvc2U=
@@ -82,5 +82,5 @@ http_interactions:
82
82
  encoding: US-ASCII
83
83
  string: ! '{"status":500,"code":500,"developerMessage":"rules.already.exists.for.component","moreInfoUrl":"mailto:support@mxhero.com"}'
84
84
  http_version:
85
- recorded_at: Thu, 08 Aug 2013 23:06:49 GMT
85
+ recorded_at: Tue, 13 Aug 2013 18:24:57 GMT
86
86
  recorded_with: VCR 2.5.0
@@ -5,13 +5,15 @@ http_interactions:
5
5
  uri: http://admin:password@localhost:8080/webapi/api/v1/rules
6
6
  body:
7
7
  encoding: UTF-8
8
- string: ! '{"twoWays":false,"enabled":true,"name":"Email footer","created":"1369682598000","fromDirection":{"directionType":"domain","domain":"tesla.com","freeValue":"tesla.com"},"toDirection":{"directionType":"domain","domain":"tesla.com","freeValue":"tesla.com"},"properties":[{"propertyKey":"return.message","propertyValue":"footer
8
+ string: ! '{"twoWays":false,"enabled":true,"name":"Email footer","created":1369682598000,"fromDirection":{"directionType":"domain","domain":"tesla.com","freeValue":"tesla.com"},"toDirection":{"directionType":"domain","domain":"tesla.com","freeValue":"tesla.com"},"properties":[{"propertyKey":"return.message","propertyValue":"footer
9
9
  content"}],"component":"org.mxhero.feature.disclaimer"}'
10
10
  headers:
11
11
  Accept:
12
12
  - application/json
13
13
  Content-Type:
14
14
  - application/json
15
+ Authorization:
16
+ - Basic YWRtaW46cGFzc3dvcmQ=
15
17
  response:
16
18
  status:
17
19
  code: 201
@@ -29,22 +31,11 @@ http_interactions:
29
31
  Y2h1bmtlZA==
30
32
  !binary "RGF0ZQ==":
31
33
  - !binary |-
32
- VHVlLCAyOCBNYXkgMjAxMyAxMzozNzowOCBHTVQ=
34
+ RnJpLCAwOSBBdWcgMjAxMyAwNzozOToxNiBHTVQ=
33
35
  body:
34
- encoding: ASCII-8BIT
35
- string: !binary |-
36
- eyJpZCI6ODIsImRvbWFpbiI6bnVsbCwibmFtZSI6IkVtYWlsIGZvb3RlciIs
37
- ImNyZWF0ZWQiOjEzNjk3NDgyMjgwMDAsInVwZGF0ZWQiOjEzNjk3NDgyMjgw
38
- MDAsImVuYWJsZWQiOnRydWUsInR3b1dheXMiOmZhbHNlLCJhZG1pbk9yZGVy
39
- IjpudWxsLCJjb21wb25lbnQiOiJvcmcubXhoZXJvLmZlYXR1cmUuZGlzY2xh
40
- aW1lciIsImZyb21EaXJlY3Rpb24iOnsiaWQiOjE2MywiZGlyZWN0aW9uVHlw
41
- ZSI6ImRvbWFpbiIsImZyZWVWYWx1ZSI6InRlc2xhLmNvbSIsImRvbWFpbiI6
42
- InRlc2xhLmNvbSIsImFjY291bnQiOm51bGwsImdyb3VwIjpudWxsfSwidG9E
43
- aXJlY3Rpb24iOnsiaWQiOjE2NCwiZGlyZWN0aW9uVHlwZSI6ImRvbWFpbiIs
44
- ImZyZWVWYWx1ZSI6InRlc2xhLmNvbSIsImRvbWFpbiI6InRlc2xhLmNvbSIs
45
- ImFjY291bnQiOm51bGwsImdyb3VwIjpudWxsfSwicHJvcGVydGllcyI6W3si
46
- cHJvcGVydHlLZXkiOiJyZXR1cm4ubWVzc2FnZSIsInByb3BlcnR5VmFsdWUi
47
- OiJmb290ZXIgY29udGVudCJ9XX0=
36
+ encoding: US-ASCII
37
+ string: ! '{"id":119,"domain":null,"name":"Email footer","created":1376033956000,"updated":1376033956000,"enabled":true,"twoWays":false,"adminOrder":null,"component":"org.mxhero.feature.disclaimer","fromDirection":{"id":223,"directionType":"domain","freeValue":"tesla.com","domain":"tesla.com","account":null,"group":null},"toDirection":{"id":224,"directionType":"domain","freeValue":"tesla.com","domain":"tesla.com","account":null,"group":null},"properties":[{"propertyKey":"return.message","propertyValue":"footer
38
+ content"}]}'
48
39
  http_version:
49
- recorded_at: Tue, 28 May 2013 13:36:51 GMT
40
+ recorded_at: Tue, 13 Aug 2013 18:22:55 GMT
50
41
  recorded_with: VCR 2.5.0
@@ -0,0 +1,118 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://admin:password@localhost:8080/webapi/api/v1/domains/tesla.com/rules
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 "U2VydmVy":
23
+ - !binary |-
24
+ QXBhY2hlLUNveW90ZS8xLjE=
25
+ !binary "Q29udGVudC1UeXBl":
26
+ - !binary |-
27
+ YXBwbGljYXRpb24vanNvbg==
28
+ !binary "VHJhbnNmZXItRW5jb2Rpbmc=":
29
+ - !binary |-
30
+ Y2h1bmtlZA==
31
+ !binary "RGF0ZQ==":
32
+ - !binary |-
33
+ RnJpLCAwOSBBdWcgMjAxMyAwNjozNDowNCBHTVQ=
34
+ body:
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>"}]}]'
83
+ http_version:
84
+ recorded_at: Tue, 13 Aug 2013 16:33:59 GMT
85
+ - request:
86
+ method: delete
87
+ uri: http://admin:password@localhost:8080/webapi/api/v1/domains/tesla.com/rules/114
88
+ body:
89
+ encoding: US-ASCII
90
+ string: ''
91
+ headers:
92
+ Accept:
93
+ - application/json
94
+ Content-Type:
95
+ - application/json
96
+ Authorization:
97
+ - Basic YWRtaW46cGFzc3dvcmQ=
98
+ response:
99
+ status:
100
+ code: 200
101
+ message: !binary |-
102
+ T0s=
103
+ headers:
104
+ !binary "U2VydmVy":
105
+ - !binary |-
106
+ QXBhY2hlLUNveW90ZS8xLjE=
107
+ !binary "Q29udGVudC1MZW5ndGg=":
108
+ - !binary |-
109
+ MA==
110
+ !binary "RGF0ZQ==":
111
+ - !binary |-
112
+ RnJpLCAwOSBBdWcgMjAxMyAwNjozNDowNCBHTVQ=
113
+ body:
114
+ encoding: US-ASCII
115
+ string: ''
116
+ http_version:
117
+ recorded_at: Tue, 13 Aug 2013 16:33:59 GMT
118
+ 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/test.com/
5
+ uri: http://admin:password@localhost:8080/webapi/api/v1/domains/tesla.com/
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -19,18 +19,21 @@ http_interactions:
19
19
  message: !binary |-
20
20
  T0s=
21
21
  headers:
22
+ !binary "U2VydmVy":
23
+ - !binary |-
24
+ QXBhY2hlLUNveW90ZS8xLjE=
22
25
  !binary "Q29udGVudC1UeXBl":
23
26
  - !binary |-
24
27
  YXBwbGljYXRpb24vanNvbg==
25
28
  !binary "VHJhbnNmZXItRW5jb2Rpbmc=":
26
29
  - !binary |-
27
30
  Y2h1bmtlZA==
28
- !binary "U2VydmVy":
31
+ !binary "RGF0ZQ==":
29
32
  - !binary |-
30
- SmV0dHkoNi4xLjEwKQ==
33
+ RnJpLCAwOSBBdWcgMjAxMyAwNjozNDowNCBHTVQ=
31
34
  body:
32
35
  encoding: US-ASCII
33
- string: ! '{"domain":"test.com","server":"smtp.server","creationDate":1360096371000,"updatedDate":1360096371000,"aliases":["test.com"],"ldap":null}'
36
+ string: ! '{"domain":"tesla.com","server":"tesla.com","creationDate":1369837819000,"updatedDate":1369837819000,"aliases":["tesla.com"],"ldap":null}'
34
37
  http_version:
35
- recorded_at: Wed, 07 Aug 2013 17:55:32 GMT
38
+ recorded_at: Tue, 13 Aug 2013 16:33:59 GMT
36
39
  recorded_with: VCR 2.5.0
@@ -19,18 +19,21 @@ http_interactions:
19
19
  message: !binary |-
20
20
  Tm90IEZvdW5k
21
21
  headers:
22
+ !binary "U2VydmVy":
23
+ - !binary |-
24
+ QXBhY2hlLUNveW90ZS8xLjE=
22
25
  !binary "Q29udGVudC1UeXBl":
23
26
  - !binary |-
24
27
  YXBwbGljYXRpb24vanNvbg==
25
28
  !binary "VHJhbnNmZXItRW5jb2Rpbmc=":
26
29
  - !binary |-
27
30
  Y2h1bmtlZA==
28
- !binary "U2VydmVy":
31
+ !binary "RGF0ZQ==":
29
32
  - !binary |-
30
- SmV0dHkoNi4xLjEwKQ==
33
+ RnJpLCAwOSBBdWcgMjAxMyAwNjozNDowNCBHTVQ=
31
34
  body:
32
35
  encoding: US-ASCII
33
36
  string: ! '{"status":404,"code":404,"message":"domain.not.found","developerMessage":"domain.not.found","moreInfoUrl":"mailto:support@mxhero.com"}'
34
37
  http_version:
35
- recorded_at: Wed, 07 Aug 2013 18:00:41 GMT
38
+ recorded_at: Tue, 13 Aug 2013 16:33:58 GMT
36
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/97
5
+ uri: http://admin:password@localhost:8080/webapi/api/v1/domains/tesla.com/rules
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -11,6 +11,8 @@ http_interactions:
11
11
  - application/json
12
12
  Content-Type:
13
13
  - application/json
14
+ Authorization:
15
+ - Basic YWRtaW46cGFzc3dvcmQ=
14
16
  response:
15
17
  status:
16
18
  code: 200
@@ -28,25 +30,103 @@ http_interactions:
28
30
  Y2h1bmtlZA==
29
31
  !binary "RGF0ZQ==":
30
32
  - !binary |-
31
- V2VkLCAyOSBNYXkgMjAxMyAxOTo0MTozMSBHTVQ=
33
+ RnJpLCAwOSBBdWcgMjAxMyAwNjozNDowNCBHTVQ=
32
34
  body:
33
- encoding: ASCII-8BIT
34
- string: !binary |-
35
- eyJpZCI6OTcsImRvbWFpbiI6InRlc2xhLmNvbSIsIm5hbWUiOiJFbWFpbCBm
36
- b290ZXIgLSBJbnNpZGUiLCJjcmVhdGVkIjoxMzY5ODM4NTY5MDAwLCJ1cGRh
37
- dGVkIjoxMzY5ODM4NTY5MDAwLCJlbmFibGVkIjp0cnVlLCJ0d29XYXlzIjpm
38
- YWxzZSwiYWRtaW5PcmRlciI6bnVsbCwiY29tcG9uZW50Ijoib3JnLm14aGVy
39
- by5mZWF0dXJlLmRpc2NsYWltZXIiLCJmcm9tRGlyZWN0aW9uIjp7ImlkIjox
40
- OTMsImRpcmVjdGlvblR5cGUiOiJkb21haW4iLCJmcmVlVmFsdWUiOiJ0ZXNs
41
- YS5jb20iLCJkb21haW4iOiJ0ZXNsYS5jb20iLCJhY2NvdW50IjpudWxsLCJn
42
- cm91cCI6bnVsbH0sInRvRGlyZWN0aW9uIjp7ImlkIjoxOTQsImRpcmVjdGlv
43
- blR5cGUiOiJkb21haW4iLCJmcmVlVmFsdWUiOiJ0ZXNsYS5jb20iLCJkb21h
44
- aW4iOiJ0ZXNsYS5jb20iLCJhY2NvdW50IjpudWxsLCJncm91cCI6bnVsbH0s
45
- InByb3BlcnRpZXMiOlt7InByb3BlcnR5S2V5IjoicmV0dXJuLm1lc3NhZ2Ui
46
- LCJwcm9wZXJ0eVZhbHVlIjoidGVzdCB0aGUmbmJzcDs8Yj50ZW1wbGF0ZSZu
47
- YnNwOzwvYj5vZiB0aGUmbmJzcDs8aT5mb290ZXI8L2k+PGJyPiJ9LHsicHJv
48
- cGVydHlLZXkiOiJpbnRlclBhcnNpbmciLCJwcm9wZXJ0eVZhbHVlIjoiZmFs
49
- c2UifV19
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>"}]}]'
83
+ http_version:
84
+ recorded_at: Tue, 13 Aug 2013 16:33:58 GMT
85
+ - request:
86
+ method: get
87
+ uri: http://admin:password@localhost:8080/webapi/api/v1/domains/tesla.com/rules/114
88
+ body:
89
+ encoding: US-ASCII
90
+ string: ''
91
+ headers:
92
+ Accept:
93
+ - application/json
94
+ Content-Type:
95
+ - application/json
96
+ Authorization:
97
+ - Basic YWRtaW46cGFzc3dvcmQ=
98
+ response:
99
+ status:
100
+ code: 200
101
+ message: !binary |-
102
+ T0s=
103
+ headers:
104
+ !binary "U2VydmVy":
105
+ - !binary |-
106
+ QXBhY2hlLUNveW90ZS8xLjE=
107
+ !binary "Q29udGVudC1UeXBl":
108
+ - !binary |-
109
+ YXBwbGljYXRpb24vanNvbg==
110
+ !binary "VHJhbnNmZXItRW5jb2Rpbmc=":
111
+ - !binary |-
112
+ Y2h1bmtlZA==
113
+ !binary "RGF0ZQ==":
114
+ - !binary |-
115
+ RnJpLCAwOSBBdWcgMjAxMyAwNjozNDowNCBHTVQ=
116
+ body:
117
+ encoding: US-ASCII
118
+ 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
119
+ STYLE=\"text-align:left;\">\n <SPAN STYLE=\"letter-spacing:0px;color:#000000;font-size:12px;font-family:''Arial'';\">This
120
+ message is intended only for ${mxrecipient}. If you are not the intended recipient
121
+ you are notified that disclosing, copying, distributing or taking any action
122
+ in reliance on the contents of this information is strictly prohibited.</SPAN>\n </P>\n</BODY>"},{"propertyKey":"return.message.plain","propertyValue":"This
123
+ message is intended only for ${mxrecipient}. If you are not the intended recipient
124
+ you are notified that disclosing, copying, distributing or taking any action
125
+ in reliance on the contents of this information is strictly prohibited."},{"propertyKey":"return.message.rte","propertyValue":"<TextFlow
126
+ whiteSpaceCollapse=\"preserve\" version=\"2.0.0\" xmlns=\"http://ns.adobe.com/textLayout/2008\"><p><span>This
127
+ message is intended only for ${mxrecipient}. If you are not the intended recipient
128
+ you are notified that disclosing, copying, distributing or taking any action
129
+ in reliance on the contents of this information is strictly prohibited.</span></p></TextFlow>"}]}'
50
130
  http_version:
51
- recorded_at: Wed, 29 May 2013 19:40:50 GMT
131
+ recorded_at: Tue, 13 Aug 2013 16:33:59 GMT
52
132
  recorded_with: VCR 2.5.0