mail-notify 0.0.2 → 0.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a39b418b67958ee80a979be7f33d0367c9b122914d3640bfc65e59db8fd6ba8
4
- data.tar.gz: 48fe8389d949853835b6f4cba7510cb1f2aea18c47899bb56bb2e52ddcc17eb4
3
+ metadata.gz: 69a9c571a11fcd6408c96f59ee72d96a26d3dc6a219e94bed97d0bb4968246b9
4
+ data.tar.gz: e209c731e194acdd646c15bbeb797825c2a9fff3967ae2734ea028fb7e931111
5
5
  SHA512:
6
- metadata.gz: 04e90ef052082fb609bd0e5ca3b680df6794d05a21b133c2ee268d4292ae1175eb35c7e2aaaff4085317a74ad413e06d3f7edb072d8f7c6e1e4b715d10582129
7
- data.tar.gz: 8a874ac8124e9a1126d887fc5ba8d543ac999a30fa26c6ab3703c1f2e9a56aa6e6861b4c495f7fc7e64b7f523dad010d54b5e8353019968d00d9b7133f82c55c
6
+ metadata.gz: b3fa78ee0398c01f41b045be39c623dc3a1cd969947b9f22539910e2be37f2779be89470a62e23f9f64d82160a30936b6c7516b2c5cac9e5d4a49dba4d76967b
7
+ data.tar.gz: 56b927b676e0da0bf58774ba09336c975a04d995ab87a9c973b8379262a26be0c33f2ead74996e1aa0d6ee127e5ffbd31968eb3479b459110f3da6a8fe1113a5
@@ -3,7 +3,7 @@
3
3
  module Mail
4
4
  module Notify
5
5
  class DeliveryMethod
6
- attr_accessor :settings
6
+ attr_accessor :settings, :response
7
7
 
8
8
  def initialize(settings)
9
9
  @settings = settings
@@ -11,8 +11,7 @@ module Mail
11
11
 
12
12
  def deliver!(mail)
13
13
  @mail = mail
14
- @personalisation = Personalisation.new(@mail)
15
- initialize_params
14
+ @personalisation = Personalisation.new(mail)
16
15
  send_email
17
16
  end
18
17
 
@@ -22,8 +21,8 @@ module Mail
22
21
  @client ||= Notifications::Client.new(@settings[:api_key])
23
22
  end
24
23
 
25
- def initialize_params
26
- @email_params = {
24
+ def email_params
25
+ {
27
26
  email_address: @mail.to.first,
28
27
  template_id: @mail[:template_id].to_s,
29
28
  personalisation: @personalisation.to_h
@@ -31,7 +30,7 @@ module Mail
31
30
  end
32
31
 
33
32
  def send_email
34
- client.send_email(@email_params)
33
+ @response = client.send_email(email_params)
35
34
  end
36
35
  end
37
36
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Mail
4
4
  module Notify
5
- VERSION = '0.0.2'
5
+ VERSION = '0.0.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mail-notify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stuart Harrison
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-01 00:00:00.000000000 Z
11
+ date: 2019-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler