mailroute 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (22) hide show
  1. data/.gitignore +1 -0
  2. data/lib/mailroute.rb +1 -0
  3. data/lib/mailroute/models/domain.rb +1 -1
  4. data/lib/mailroute/models/email_account.rb +18 -3
  5. data/lib/mailroute/models/timezone.rb +54 -0
  6. data/lib/mailroute/version.rb +1 -1
  7. data/spec/lib/mailroute/models/domain_spec.rb +15 -9
  8. data/spec/lib/mailroute/models/email_account_spec.rb +50 -6
  9. data/spec/lib/mailroute/models/policy_filter_spec.rb +1 -4
  10. data/spec/lib/mailroute/models/timezone_spec.rb +15 -0
  11. data/spec/vcr_cassettes/Mailroute_Domain/has_many_notification_tasks/should_be_able_to_create_a_new_task.yml +174 -0
  12. data/spec/vcr_cassettes/Mailroute_Domain/has_many_notification_tasks/should_have_many_notification_task.yml +172 -0
  13. data/spec/vcr_cassettes/Mailroute_EmailAccount/_set_password/should_set_the_password.yml +55 -63
  14. data/spec/vcr_cassettes/Mailroute_EmailAccount/has_many_notification_tasks/changing_active_notification_tasks/should_use_tasks_either_from_domain_or_from_the_email_account_itself.yml +341 -0
  15. data/spec/vcr_cassettes/Mailroute_EmailAccount/has_many_notification_tasks/should_be_able_to_create_a_new_task.yml +174 -0
  16. data/spec/vcr_cassettes/Mailroute_EmailAccount/has_many_notification_tasks/should_have_many_notification_task.yml +172 -0
  17. data/spec/vcr_cassettes/Mailroute_PolicyFilter/Mailroute_PolicyDomain/standard_mode/anti_spam_preset/.yml +104 -0
  18. data/spec/vcr_cassettes/Mailroute_PolicyFilter/Mailroute_PolicyUser/standard_mode/anti_spam_preset/.yml +104 -0
  19. metadata +21 -9
  20. data/Gemfile.lock +0 -87
  21. data/spec/vcr_cassettes/Mailroute_Domain/has_a_notification_task/should_have_notification_task.yml +0 -249
  22. data/spec/vcr_cassettes/Mailroute_EmailAccount/has_notification_task/should_have_notification_task.yml +0 -79
data/.gitignore CHANGED
@@ -16,3 +16,4 @@ test/version_tmp
16
16
  tmp
17
17
  tags
18
18
  vendor/bundle
19
+ Gemfile.lock
@@ -35,3 +35,4 @@ require 'mailroute/models/notification_domain_task'
35
35
  require 'mailroute/models/domain'
36
36
  require 'mailroute/models/customer_contact'
37
37
  require 'mailroute/models/customer'
38
+ require 'mailroute/models/timezone'
@@ -9,7 +9,7 @@ module Mailroute
9
9
  has_many :contacts, :class => DomainContact
10
10
  has_many :wblist, :class => WBList
11
11
  has_one :policy, :class => PolicyDomain
12
- has_one :notification_task, :class => NotificationDomainTask
12
+ has_many :notification_tasks, :class => NotificationDomainTask
13
13
 
14
14
  def blacklist
15
15
  WBList.filter(:domain => id, :wb => 'b').map(&:email)
@@ -3,7 +3,7 @@ module Mailroute
3
3
  self.collection_name = 'email_account'
4
4
  has_one :domain
5
5
  has_one :policy, :class => PolicyUser
6
- has_one :notification_task, :class => NotificationAccountTask
6
+ has_many :notification_tasks, :class => NotificationAccountTask
7
7
  has_one :contact, :class => EmailAccountContact
8
8
  has_many :wblist, :class => WBList
9
9
  has_many :aliases, :class => LocalpartAlias
@@ -25,9 +25,8 @@ module Mailroute
25
25
  end
26
26
 
27
27
  def set_password(new_password)
28
- self.password = new_password
28
+ self.password = self.confirm_password = new_password
29
29
  save!
30
- self
31
30
  end
32
31
 
33
32
  def regenerate_api_key
@@ -44,6 +43,22 @@ module Mailroute
44
43
  connection.post(element_path(prefix_options) + 'mass_add_aliases/', request_body, self.class.headers)
45
44
  end
46
45
 
46
+ def active_notification_tasks
47
+ if use_domain_notifications
48
+ domain.notification_tasks
49
+ else
50
+ notification_tasks
51
+ end
52
+ end
53
+
54
+ def use_domain_notifications!
55
+ update_attribute(:use_domain_notifications, true)
56
+ end
57
+
58
+ def use_self_notifications!
59
+ update_attribute(:use_domain_notifications, false)
60
+ end
61
+
47
62
  class << self
48
63
  alias_method :get_by_id, :get
49
64
  def get(*args)
@@ -0,0 +1,54 @@
1
+ module Mailroute
2
+ module Timezone
3
+ def self.define_const(modul, names, value)
4
+ if names.size == 1
5
+ modul.const_set(names.first, value)
6
+ else
7
+ new_module =
8
+ if modul.const_defined?(names.first)
9
+ modul.const_get(names.first)
10
+ else
11
+ modul.const_set(names.first, Module.new)
12
+ end
13
+
14
+ define_const(new_module, names[1..-1], value)
15
+ end
16
+ end
17
+
18
+ ALL = [
19
+ "Pacific/Kwajalein",
20
+ "Pacific/Midway",
21
+ "US/Hawaii",
22
+ "US/Alaska",
23
+ "US/Pacific",
24
+ "US/Mountain",
25
+ "US/Central",
26
+ "US/Eastern",
27
+ "Canada/Atlantic",
28
+ "Canada/Newfoundland",
29
+ "America/Argentina/Buenos_Aires",
30
+ "America/Noronha",
31
+ "Atlantic/Cape_Verde",
32
+ "Europe/London",
33
+ "Europe/Paris",
34
+ "Europe/Kaliningrad",
35
+ "Asia/Baghdad",
36
+ "Asia/Tehran",
37
+ "Asia/Muscat",
38
+ "Asia/Kabul",
39
+ "Asia/Yekaterinburg",
40
+ "Asia/Kolkata",
41
+ "Asia/Kathmandu",
42
+ "Asia/Colombo",
43
+ "Asia/Bangkok",
44
+ "Asia/Singapore",
45
+ "Asia/Tokyo",
46
+ "Australia/Adelaide",
47
+ "Asia/Vladivostok",
48
+ "Asia/Magadan",
49
+ "Pacific/Auckland"
50
+ ].each do |val|
51
+ define_const(self, val.split('/'), val)
52
+ end
53
+ end
54
+ end
@@ -1,3 +1,3 @@
1
1
  module Mailroute
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -184,18 +184,24 @@ describe Mailroute::Domain, :vcr => true do
184
184
  end
185
185
  end
186
186
 
187
- describe 'has a notification task' do
188
- it 'should have notification task' do
189
- domain = Mailroute::Domain.get(4555)
187
+ describe 'has many notification tasks' do
188
+ let(:domain) { Mailroute::Domain.get(8372) }
189
+ it 'should have many notification task' do
190
+ domain.notification_tasks.should_not be_empty
191
+ domain.notification_tasks.should all_be Mailroute::NotificationDomainTask
192
+
193
+ domain.notification_tasks.first.mon.should == true
194
+ domain.notification_tasks.first.mon = false
195
+ domain.notification_tasks.first.save!
190
196
 
191
- domain.notification_task.should be_a Mailroute::NotificationDomainTask
197
+ domain.reload.notification_tasks.first.mon.should == false
198
+ end
192
199
 
193
- domain.notification_task.mon.should == true
194
- domain.attributes['notification_task'].should == domain.notification_task.resource_uri
195
- domain.notification_task.mon = false
196
- domain.notification_task.save!
200
+ it 'should be able to create a new task' do
201
+ tasks = domain.notification_tasks
202
+ new_task = domain.create_notification_task(:hour => 10, :minute => 15)
197
203
 
198
- domain.reload.notification_task.mon.should == false
204
+ domain.reload.notification_tasks.should =~ tasks + [new_task]
199
205
  end
200
206
  end
201
207
 
@@ -121,11 +121,55 @@ describe Mailroute::EmailAccount, :vcr => true do
121
121
  end
122
122
  end
123
123
 
124
- describe 'has notification task' do
125
- it 'should have notification task' do
126
- account = Mailroute::EmailAccount.get(53282)
127
- account.notification_task.id.should == 57820
124
+ describe 'has many notification tasks' do
125
+ let(:email_account) { Mailroute::EmailAccount.get(7721) }
126
+
127
+ it 'should have many notification task' do
128
+ email_account.notification_tasks.should_not be_empty
129
+ email_account.notification_tasks.should all_be Mailroute::NotificationAccountTask
130
+
131
+ email_account.notification_tasks.first.mon.should == true
132
+ email_account.notification_tasks.first.mon = false
133
+ email_account.notification_tasks.first.save!
134
+
135
+ email_account.reload.notification_tasks.first.mon.should == false
136
+ end
137
+
138
+ it 'should be able to create a new task' do
139
+ tasks = email_account.notification_tasks
140
+ new_task = email_account.create_notification_task(:hour => 10, :minute => 15)
141
+
142
+ email_account.reload.notification_tasks.should =~ tasks + [new_task]
143
+ end
144
+
145
+ context 'changing active notification tasks' do
146
+ it 'should use tasks either from domain or from the email account itself' do
147
+ email_account = Mailroute::EmailAccount.get(7721)
148
+
149
+ email_account.use_domain_notifications.should == true
150
+
151
+ email_account.active_notification_tasks.should_not == email_account.notification_tasks
152
+
153
+ email_account.active_notification_tasks.should == email_account.domain.notification_tasks
154
+
155
+ email_account.use_self_notifications!
156
+
157
+ email_account.reload.use_domain_notifications.should == false
158
+
159
+ email_account.active_notification_tasks.should == email_account.notification_tasks
160
+
161
+ email_account.active_notification_tasks.should_not == email_account.domain.notification_tasks
162
+
163
+ email_account.use_domain_notifications!
164
+
165
+ email_account.use_domain_notifications.should == true
166
+
167
+ email_account.active_notification_tasks.should_not == email_account.notification_tasks
168
+
169
+ email_account.active_notification_tasks.should == email_account.domain.notification_tasks
170
+ end
128
171
  end
172
+
129
173
  end
130
174
 
131
175
  describe 'has contact' do
@@ -157,9 +201,9 @@ describe Mailroute::EmailAccount, :vcr => true do
157
201
  end
158
202
 
159
203
  describe '#set_password' do
204
+ let(:account) {Mailroute::EmailAccount.get(7718) }
205
+
160
206
  it 'should set the password' do
161
- pending 'API responds with "Passwords don`t match"'
162
- account = Mailroute::EmailAccount.get(53282)
163
207
  expect {
164
208
  account.set_password("new_password")
165
209
  }.not_to raise_error
@@ -30,10 +30,7 @@ describe Mailroute::PolicyFilter, :vcr => true do
30
30
  end
31
31
 
32
32
  context 'standard mode' do
33
- before {
34
- pending 'API returns 500 (cant convert string to float)'
35
- policy.set_anti_spam_mode(Mailroute::AntiSpamModes::STANDARD)
36
- }
33
+ before { policy.set_anti_spam_mode(Mailroute::AntiSpamModes::STANDARD) }
37
34
  subject { policy.reload }
38
35
 
39
36
  its(:anti_spam_preset) { should == 'standard' }
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe Mailroute::Timezone do
4
+ {
5
+ Mailroute::Timezone::Pacific::Kwajalein => 'Pacific/Kwajalein',
6
+ Mailroute::Timezone::Pacific::Midway => 'Pacific/Midway',
7
+ Mailroute::Timezone::US::Hawaii => 'US/Hawaii',
8
+ Mailroute::Timezone::America::Argentina::Buenos_Aires => 'America/Argentina/Buenos_Aires',
9
+ Mailroute::Timezone::Pacific::Auckland => 'Pacific/Auckland'
10
+ }.each do |const, value|
11
+ it "should define constant #{value}" do
12
+ const.should == value
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,174 @@
1
+ ---
2
+ recorded_with: VCR 2.5.0
3
+ http_interactions:
4
+ - request:
5
+ method: get
6
+ uri: https://admin-dev.mailroute.net/api/v1/domain/8372/
7
+ body:
8
+ string: ""
9
+ headers:
10
+ Authorization:
11
+ - ApiKey blablablablabla@example.com:5f64xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx8262
12
+ Accept:
13
+ - application/json
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ Transfer-Encoding:
20
+ - chunked
21
+ Cache-Control:
22
+ - no-cache
23
+ Content-Type:
24
+ - application/json; charset=utf-8
25
+ Date:
26
+ - Mon, 20 May 2013 18:29:47 GMT
27
+ Server:
28
+ - nginx/1.2.6
29
+ Vary:
30
+ - Accept, Cookie
31
+ - Accept-Encoding
32
+ Connection:
33
+ - keep-alive
34
+ body:
35
+ string: "{\"absolute_url\": \"/domain/example.com/\", \"active\": true, \"created_at\": \"Tue, 30 Apr 2013 12:02:15 -0700\", \"customer\": \"/api/v1/customer/11371/\", \"deliveryport\": 25, \"hold_email\": false, \"id\": 8372, \"name\": \"example.com\", \"notification_tasks\": [\"/api/v1/notification_domain_task/16919/\", \"/api/v1/notification_domain_task/16926/\", \"/api/v1/notification_domain_task/16927/\"], \"outbound_enabled\": false, \"policy\": \"/api/v1/policy_domain/16390/\", \"resource_uri\": \"/api/v1/domain/8372/\", \"updated_at\": \"Sun, 5 May 2013 06:50:37 -0700\", \"userlist_complete\": true}"
36
+ http_version:
37
+ recorded_at: Mon, 20 May 2013 18:29:47 GMT
38
+ - request:
39
+ method: get
40
+ uri: https://admin-dev.mailroute.net/api/v1/notification_domain_task/?domain=8372
41
+ body:
42
+ string: ""
43
+ headers:
44
+ Authorization:
45
+ - ApiKey blablablablabla@example.com:5f64xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx8262
46
+ Accept:
47
+ - application/json
48
+ response:
49
+ status:
50
+ code: 200
51
+ message: OK
52
+ headers:
53
+ Transfer-Encoding:
54
+ - chunked
55
+ Cache-Control:
56
+ - no-cache
57
+ Content-Type:
58
+ - application/json; charset=utf-8
59
+ Date:
60
+ - Mon, 20 May 2013 18:29:48 GMT
61
+ Server:
62
+ - nginx/1.2.6
63
+ Vary:
64
+ - Accept, Cookie
65
+ - Accept-Encoding
66
+ Connection:
67
+ - keep-alive
68
+ body:
69
+ string: "{\"meta\": {\"limit\": 20, \"next\": null, \"offset\": 0, \"previous\": null, \"total_count\": 3}, \"objects\": [{\"domain\": \"/api/v1/domain/8372/\", \"domain_bounce_unlisted\": true, \"enabled\": false, \"fri\": true, \"hour\": 7, \"id\": 16919, \"minute\": 0, \"mon\": false, \"resource_uri\": \"/api/v1/notification_domain_task/16919/\", \"sat\": false, \"sun\": false, \"thu\": true, \"timezone\": null, \"tue\": true, \"wed\": true}, {\"domain\": \"/api/v1/domain/8372/\", \"domain_bounce_unlisted\": true, \"enabled\": false, \"fri\": false, \"hour\": 11, \"id\": 16926, \"minute\": 12, \"mon\": false, \"resource_uri\": \"/api/v1/notification_domain_task/16926/\", \"sat\": false, \"sun\": false, \"thu\": false, \"timezone\": null, \"tue\": false, \"wed\": false}, {\"domain\": \"/api/v1/domain/8372/\", \"domain_bounce_unlisted\": true, \"enabled\": false, \"fri\": false, \"hour\": 10, \"id\": 16927, \"minute\": 15, \"mon\": false, \"resource_uri\": \"/api/v1/notification_domain_task/16927/\", \"sat\": false, \"sun\": false, \"thu\": false, \"timezone\": null, \"tue\": false, \"wed\": false}]}"
70
+ http_version:
71
+ recorded_at: Mon, 20 May 2013 18:29:48 GMT
72
+ - request:
73
+ method: post
74
+ uri: https://admin-dev.mailroute.net/api/v1/notification_domain_task/
75
+ body:
76
+ string: "{\"domain\":\"/api/v1/domain/8372/\",\"minute\":15,\"hour\":10}"
77
+ headers:
78
+ Content-Type:
79
+ - application/json
80
+ Authorization:
81
+ - ApiKey blablablablabla@example.com:5f64xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx8262
82
+ Accept:
83
+ - "*/*"
84
+ response:
85
+ status:
86
+ code: 201
87
+ message: CREATED
88
+ headers:
89
+ Transfer-Encoding:
90
+ - chunked
91
+ Location:
92
+ - https://admin-dev.mailroute.net/api/v1/notification_domain_task/16928/
93
+ Content-Type:
94
+ - application/json; charset=utf-8
95
+ Date:
96
+ - Mon, 20 May 2013 18:29:49 GMT
97
+ Server:
98
+ - nginx/1.2.6
99
+ Vary:
100
+ - Accept, Cookie
101
+ Connection:
102
+ - keep-alive
103
+ body:
104
+ string: "{\"domain\": \"/api/v1/domain/8372/\", \"domain_bounce_unlisted\": true, \"enabled\": false, \"fri\": false, \"hour\": 10, \"id\": 16928, \"minute\": 15, \"mon\": false, \"resource_uri\": \"/api/v1/notification_domain_task/16928/\", \"sat\": false, \"sun\": false, \"thu\": false, \"timezone\": null, \"tue\": false, \"wed\": false}"
105
+ http_version:
106
+ recorded_at: Mon, 20 May 2013 18:29:49 GMT
107
+ - request:
108
+ method: get
109
+ uri: https://admin-dev.mailroute.net/api/v1/domain/8372/
110
+ body:
111
+ string: ""
112
+ headers:
113
+ Authorization:
114
+ - ApiKey blablablablabla@example.com:5f64xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx8262
115
+ Accept:
116
+ - application/json
117
+ response:
118
+ status:
119
+ code: 200
120
+ message: OK
121
+ headers:
122
+ Transfer-Encoding:
123
+ - chunked
124
+ Cache-Control:
125
+ - no-cache
126
+ Content-Type:
127
+ - application/json; charset=utf-8
128
+ Date:
129
+ - Mon, 20 May 2013 18:29:51 GMT
130
+ Server:
131
+ - nginx/1.2.8
132
+ Vary:
133
+ - Accept, Cookie
134
+ - Accept-Encoding
135
+ Connection:
136
+ - keep-alive
137
+ body:
138
+ string: "{\"absolute_url\": \"/domain/example.com/\", \"active\": true, \"created_at\": \"Tue, 30 Apr 2013 12:02:15 -0700\", \"customer\": \"/api/v1/customer/11371/\", \"deliveryport\": 25, \"hold_email\": false, \"id\": 8372, \"name\": \"example.com\", \"notification_tasks\": [\"/api/v1/notification_domain_task/16919/\", \"/api/v1/notification_domain_task/16926/\", \"/api/v1/notification_domain_task/16927/\", \"/api/v1/notification_domain_task/16928/\"], \"outbound_enabled\": false, \"policy\": \"/api/v1/policy_domain/16390/\", \"resource_uri\": \"/api/v1/domain/8372/\", \"updated_at\": \"Sun, 5 May 2013 06:50:37 -0700\", \"userlist_complete\": true}"
139
+ http_version:
140
+ recorded_at: Mon, 20 May 2013 18:29:51 GMT
141
+ - request:
142
+ method: get
143
+ uri: https://admin-dev.mailroute.net/api/v1/notification_domain_task/?domain=8372
144
+ body:
145
+ string: ""
146
+ headers:
147
+ Authorization:
148
+ - ApiKey blablablablabla@example.com:5f64xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx8262
149
+ Accept:
150
+ - application/json
151
+ response:
152
+ status:
153
+ code: 200
154
+ message: OK
155
+ headers:
156
+ Transfer-Encoding:
157
+ - chunked
158
+ Cache-Control:
159
+ - no-cache
160
+ Content-Type:
161
+ - application/json; charset=utf-8
162
+ Date:
163
+ - Mon, 20 May 2013 18:29:52 GMT
164
+ Server:
165
+ - nginx/1.2.6
166
+ Vary:
167
+ - Accept, Cookie
168
+ - Accept-Encoding
169
+ Connection:
170
+ - keep-alive
171
+ body:
172
+ string: "{\"meta\": {\"limit\": 20, \"next\": null, \"offset\": 0, \"previous\": null, \"total_count\": 4}, \"objects\": [{\"domain\": \"/api/v1/domain/8372/\", \"domain_bounce_unlisted\": true, \"enabled\": false, \"fri\": true, \"hour\": 7, \"id\": 16919, \"minute\": 0, \"mon\": false, \"resource_uri\": \"/api/v1/notification_domain_task/16919/\", \"sat\": false, \"sun\": false, \"thu\": true, \"timezone\": null, \"tue\": true, \"wed\": true}, {\"domain\": \"/api/v1/domain/8372/\", \"domain_bounce_unlisted\": true, \"enabled\": false, \"fri\": false, \"hour\": 11, \"id\": 16926, \"minute\": 12, \"mon\": false, \"resource_uri\": \"/api/v1/notification_domain_task/16926/\", \"sat\": false, \"sun\": false, \"thu\": false, \"timezone\": null, \"tue\": false, \"wed\": false}, {\"domain\": \"/api/v1/domain/8372/\", \"domain_bounce_unlisted\": true, \"enabled\": false, \"fri\": false, \"hour\": 10, \"id\": 16927, \"minute\": 15, \"mon\": false, \"resource_uri\": \"/api/v1/notification_domain_task/16927/\", \"sat\": false, \"sun\": false, \"thu\": false, \"timezone\": null, \"tue\": false, \"wed\": false}, {\"domain\": \"/api/v1/domain/8372/\", \"domain_bounce_unlisted\": true, \"enabled\": false, \"fri\": false, \"hour\": 10, \"id\": 16928, \"minute\": 15, \"mon\": false, \"resource_uri\": \"/api/v1/notification_domain_task/16928/\", \"sat\": false, \"sun\": false, \"thu\": false, \"timezone\": null, \"tue\": false, \"wed\": false}]}"
173
+ http_version:
174
+ recorded_at: Mon, 20 May 2013 18:29:52 GMT
@@ -0,0 +1,172 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://admin-dev.mailroute.net/api/v1/domain/8372/
6
+ body:
7
+ string: ""
8
+ headers:
9
+ Accept:
10
+ - application/json
11
+ Authorization:
12
+ - ApiKey blablablablabla@example.com:5f64xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx8262
13
+ response:
14
+ status:
15
+ code: 200
16
+ message: OK
17
+ headers:
18
+ Date:
19
+ - Mon, 20 May 2013 18:13:49 GMT
20
+ Transfer-Encoding:
21
+ - chunked
22
+ Vary:
23
+ - Accept, Cookie
24
+ - Accept-Encoding
25
+ Cache-Control:
26
+ - no-cache
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Server:
30
+ - nginx/1.2.6
31
+ Connection:
32
+ - keep-alive
33
+ body:
34
+ string: "{\"absolute_url\": \"/domain/example.com/\", \"active\": true, \"created_at\": \"Tue, 30 Apr 2013 12:02:15 -0700\", \"customer\": \"/api/v1/customer/11371/\", \"deliveryport\": 25, \"hold_email\": false, \"id\": 8372, \"name\": \"example.com\", \"notification_tasks\": [\"/api/v1/notification_domain_task/16919/\"], \"outbound_enabled\": false, \"policy\": \"/api/v1/policy_domain/16390/\", \"resource_uri\": \"/api/v1/domain/8372/\", \"updated_at\": \"Sun, 5 May 2013 06:50:37 -0700\", \"userlist_complete\": true}"
35
+ http_version:
36
+ recorded_at: Mon, 20 May 2013 18:13:50 GMT
37
+ - request:
38
+ method: get
39
+ uri: https://admin-dev.mailroute.net/api/v1/notification_domain_task/?domain=8372
40
+ body:
41
+ string: ""
42
+ headers:
43
+ Accept:
44
+ - application/json
45
+ Authorization:
46
+ - ApiKey blablablablabla@example.com:5f64xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx8262
47
+ response:
48
+ status:
49
+ code: 200
50
+ message: OK
51
+ headers:
52
+ Date:
53
+ - Mon, 20 May 2013 18:13:51 GMT
54
+ Transfer-Encoding:
55
+ - chunked
56
+ Vary:
57
+ - Accept, Cookie
58
+ - Accept-Encoding
59
+ Cache-Control:
60
+ - no-cache
61
+ Content-Type:
62
+ - application/json; charset=utf-8
63
+ Server:
64
+ - nginx/1.2.6
65
+ Connection:
66
+ - keep-alive
67
+ body:
68
+ string: "{\"meta\": {\"limit\": 20, \"next\": null, \"offset\": 0, \"previous\": null, \"total_count\": 1}, \"objects\": [{\"domain\": \"/api/v1/domain/8372/\", \"domain_bounce_unlisted\": true, \"enabled\": false, \"fri\": true, \"hour\": 7, \"id\": 16919, \"minute\": 0, \"mon\": true, \"resource_uri\": \"/api/v1/notification_domain_task/16919/\", \"sat\": false, \"sun\": false, \"thu\": true, \"timezone\": null, \"tue\": true, \"wed\": true}]}"
69
+ http_version:
70
+ recorded_at: Mon, 20 May 2013 18:13:51 GMT
71
+ - request:
72
+ method: put
73
+ uri: https://admin-dev.mailroute.net/api/v1/notification_domain_task/16919/
74
+ body:
75
+ string: "{\"tue\":true,\"timezone\":null,\"mon\":false,\"domain\":\"/api/v1/domain/8372/\",\"thu\":true,\"domain_bounce_unlisted\":true,\"enabled\":false,\"sun\":false,\"minute\":0,\"hour\":7,\"wed\":true,\"sat\":false,\"id\":16919,\"fri\":true,\"resource_uri\":\"/api/v1/notification_domain_task/16919/\"}"
76
+ headers:
77
+ Accept:
78
+ - "*/*"
79
+ Authorization:
80
+ - ApiKey blablablablabla@example.com:5f64xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx8262
81
+ Content-Type:
82
+ - application/json
83
+ response:
84
+ status:
85
+ code: 202
86
+ message: ACCEPTED
87
+ headers:
88
+ Date:
89
+ - Mon, 20 May 2013 18:13:52 GMT
90
+ Transfer-Encoding:
91
+ - chunked
92
+ Vary:
93
+ - Accept, Cookie
94
+ Content-Type:
95
+ - application/json; charset=utf-8
96
+ Server:
97
+ - nginx/1.2.6
98
+ Connection:
99
+ - keep-alive
100
+ body:
101
+ string: "{\"domain\": \"/api/v1/domain/8372/\", \"domain_bounce_unlisted\": true, \"enabled\": false, \"fri\": true, \"hour\": 7, \"id\": 16919, \"minute\": 0, \"mon\": false, \"resource_uri\": \"/api/v1/notification_domain_task/16919/\", \"sat\": false, \"sun\": false, \"thu\": true, \"timezone\": null, \"tue\": true, \"wed\": true}"
102
+ http_version:
103
+ recorded_at: Mon, 20 May 2013 18:13:52 GMT
104
+ - request:
105
+ method: get
106
+ uri: https://admin-dev.mailroute.net/api/v1/domain/8372/
107
+ body:
108
+ string: ""
109
+ headers:
110
+ Accept:
111
+ - application/json
112
+ Authorization:
113
+ - ApiKey blablablablabla@example.com:5f64xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx8262
114
+ response:
115
+ status:
116
+ code: 200
117
+ message: OK
118
+ headers:
119
+ Date:
120
+ - Mon, 20 May 2013 18:13:53 GMT
121
+ Transfer-Encoding:
122
+ - chunked
123
+ Vary:
124
+ - Accept, Cookie
125
+ - Accept-Encoding
126
+ Cache-Control:
127
+ - no-cache
128
+ Content-Type:
129
+ - application/json; charset=utf-8
130
+ Server:
131
+ - nginx/1.2.6
132
+ Connection:
133
+ - keep-alive
134
+ body:
135
+ string: "{\"absolute_url\": \"/domain/example.com/\", \"active\": true, \"created_at\": \"Tue, 30 Apr 2013 12:02:15 -0700\", \"customer\": \"/api/v1/customer/11371/\", \"deliveryport\": 25, \"hold_email\": false, \"id\": 8372, \"name\": \"example.com\", \"notification_tasks\": [\"/api/v1/notification_domain_task/16919/\"], \"outbound_enabled\": false, \"policy\": \"/api/v1/policy_domain/16390/\", \"resource_uri\": \"/api/v1/domain/8372/\", \"updated_at\": \"Sun, 5 May 2013 06:50:37 -0700\", \"userlist_complete\": true}"
136
+ http_version:
137
+ recorded_at: Mon, 20 May 2013 18:13:54 GMT
138
+ - request:
139
+ method: get
140
+ uri: https://admin-dev.mailroute.net/api/v1/notification_domain_task/?domain=8372
141
+ body:
142
+ string: ""
143
+ headers:
144
+ Accept:
145
+ - application/json
146
+ Authorization:
147
+ - ApiKey blablablablabla@example.com:5f64xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx8262
148
+ response:
149
+ status:
150
+ code: 200
151
+ message: OK
152
+ headers:
153
+ Date:
154
+ - Mon, 20 May 2013 18:13:55 GMT
155
+ Transfer-Encoding:
156
+ - chunked
157
+ Vary:
158
+ - Accept, Cookie
159
+ - Accept-Encoding
160
+ Cache-Control:
161
+ - no-cache
162
+ Content-Type:
163
+ - application/json; charset=utf-8
164
+ Server:
165
+ - nginx/1.2.6
166
+ Connection:
167
+ - keep-alive
168
+ body:
169
+ string: "{\"meta\": {\"limit\": 20, \"next\": null, \"offset\": 0, \"previous\": null, \"total_count\": 1}, \"objects\": [{\"domain\": \"/api/v1/domain/8372/\", \"domain_bounce_unlisted\": true, \"enabled\": false, \"fri\": true, \"hour\": 7, \"id\": 16919, \"minute\": 0, \"mon\": false, \"resource_uri\": \"/api/v1/notification_domain_task/16919/\", \"sat\": false, \"sun\": false, \"thu\": true, \"timezone\": null, \"tue\": true, \"wed\": true}]}"
170
+ http_version:
171
+ recorded_at: Mon, 20 May 2013 18:13:55 GMT
172
+ recorded_with: VCR 2.5.0