mandrill-rb 1.0.52 → 1.0.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,43 @@
1
+ module Mandrill
2
+ class Whitelists
3
+ attr_accessor :master
4
+
5
+ def initialize(master)
6
+ @master = master
7
+ end
8
+
9
+ # Adds an email to your email rejection whitelist. If the address is currently on your blacklist, that blacklist entry will be removed automatically.
10
+ # @param [String] email an email address to add to the whitelist
11
+ # @param [String] comment an optional description of why the email was whitelisted
12
+ # @return [Hash] a status object containing the address and the result of the operation
13
+ # - [String] email the email address you provided
14
+ # - [Boolean] added whether the operation succeeded
15
+ def add(email, comment=nil)
16
+ _params = {:email => email, :comment => comment}
17
+ return @master.call 'whitelists/add', _params
18
+ end
19
+
20
+ # Retrieves your email rejection whitelist. You can provide an email address or search prefix to limit the results. Returns up to 1000 results.
21
+ # @param [String] email an optional email address or prefix to search by
22
+ # @return [Array] up to 1000 whitelist entries
23
+ # - [Hash] return[] the information for each whitelist entry
24
+ # - [String] email the email that is whitelisted
25
+ # - [String] detail a description of why the email was whitelisted
26
+ # - [String] created_at when the email was added to the whitelist
27
+ def list(email=nil)
28
+ _params = {:email => email}
29
+ return @master.call 'whitelists/list', _params
30
+ end
31
+
32
+ # Removes an email address from the whitelist.
33
+ # @param [String] email the email address to remove from the whitelist
34
+ # @return [Hash] a status object containing the address and whether the deletion succeeded
35
+ # - [String] email the email address that was removed from the blacklist
36
+ # - [Boolean] deleted whether the address was deleted successfully
37
+ def delete(email)
38
+ _params = {:email => email}
39
+ return @master.call 'whitelists/delete', _params
40
+ end
41
+
42
+ end
43
+ end
@@ -0,0 +1,22 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'mandrill/version'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = 'mandrill-rb'
8
+ s.version = Mandrill::VERSION
9
+ s.summary = 'A Ruby API library for the Mandrill email as a service platform.'
10
+ s.description = s.summary
11
+ s.authors = ['Mandrill Devs']
12
+ s.email = 'community@mandrill.com'
13
+ s.files = `git ls-files -z`.split("\x0")
14
+ s.require_paths = ["lib"]
15
+ s.homepage = 'https://github.com/jasonayre/mandrill-rb'
16
+ s.add_dependency 'json', '>= 1.7.7', '< 2.0'
17
+ s.add_dependency 'excon', '>= 0.16.0', '< 1.0'
18
+
19
+ s.add_development_dependency "bundler"
20
+ s.add_development_dependency "rake"
21
+ s.add_development_dependency "rspec"
22
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mandrill-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.52
4
+ version: 1.0.53
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mandrill Devs
@@ -98,8 +98,32 @@ executables: []
98
98
  extensions: []
99
99
  extra_rdoc_files: []
100
100
  files:
101
+ - .gitignore
102
+ - Gemfile
103
+ - Gemfile.lock
104
+ - LICENSE
105
+ - README.md
106
+ - Rakefile
101
107
  - lib/mandrill.rb
102
108
  - lib/mandrill/api.rb
109
+ - lib/mandrill/error.rb
110
+ - lib/mandrill/exports.rb
111
+ - lib/mandrill/inbound.rb
112
+ - lib/mandrill/internal.rb
113
+ - lib/mandrill/ips.rb
114
+ - lib/mandrill/messages.rb
115
+ - lib/mandrill/metadata.rb
116
+ - lib/mandrill/rejects.rb
117
+ - lib/mandrill/senders.rb
118
+ - lib/mandrill/subaccounts.rb
119
+ - lib/mandrill/tags.rb
120
+ - lib/mandrill/templates.rb
121
+ - lib/mandrill/urls.rb
122
+ - lib/mandrill/users.rb
123
+ - lib/mandrill/version.rb
124
+ - lib/mandrill/webhooks.rb
125
+ - lib/mandrill/whitelists.rb
126
+ - mandrill-api.gemspec
103
127
  homepage: https://github.com/jasonayre/mandrill-rb
104
128
  licenses: []
105
129
  metadata: {}