maropost 0.8.2 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab774a3e10205f14b11eb4d32cd6a0f6f90fd47e
4
- data.tar.gz: b4141781b430fe4b4d2549db902c87d41de05d5c
3
+ metadata.gz: e5a67e3d0d27f55420993b328223b169315dbc72
4
+ data.tar.gz: c06543d4a24f816e49f0d806a5b5a7b26dec6959
5
5
  SHA512:
6
- metadata.gz: 0364c6faffd676812f234bc804537969a9f975e8a4fbe9de74f635268f670ec93b7343f2ae149f057f8a80e2dcb5f37925193c7bc4178f9f90b43f0a6f3d192c
7
- data.tar.gz: 0d72e7397284499d31c21c99ab640b14f70a0e83e1f079b013c50f86541788ad8db5fe0813bcf6ebe71e808e1aea066202fb9722d3824115ec21de0ee20922b8
6
+ metadata.gz: 140e76bf3ca05ad5495c3c78e0fb9ee27698c835e52134376d73a94df4defcb870ead18d01010c51969c7be6c3f0e71269cea26bf47a31d7bd4dfc87749fd67c
7
+ data.tar.gz: 5d42864babb57f4d39f88ad2f313ad55b2b674881a174f1baa8c9aacf895472f2a701a8ce1610db1e62147658d722a1a1bf1f764b93876010d55090592d0f3ff
@@ -84,6 +84,13 @@ module Maropost
84
84
  end
85
85
 
86
86
  def create_or_update_payload(contact)
87
+ payload(contact).tap do |p|
88
+ p[:contact][:first_name] = contact.try(:first_name) if contact.try(:first_name)
89
+ p[:contact][:last_name] = contact.try(:last_name) if contact.try(:last_name)
90
+ end
91
+ end
92
+
93
+ def payload(contact)
87
94
  {
88
95
  contact: {
89
96
  email: contact.email,
@@ -7,6 +7,8 @@ module Maropost
7
7
  id
8
8
  email
9
9
  phone_number
10
+ first_name
11
+ last_name
10
12
  cell_phone_number
11
13
  lists
12
14
  errors
@@ -34,6 +36,8 @@ module Maropost
34
36
  self.id = data[:id]
35
37
  self.email = data[:email]
36
38
  self.phone_number = data[:phone]
39
+ self.first_name = data[:first_name]
40
+ self.last_name = data[:last_name]
37
41
  self.cell_phone_number = data[:cell_phone_number]
38
42
  self.allow_emails = data.fetch(:allow_emails) { !DoNotMailList.exists?(self) }
39
43
  self.errors = []
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Maropost
4
- VERSION = '0.8.2'
4
+ VERSION = '0.9.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maropost
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael van den Beuken
@@ -19,7 +19,7 @@ authors:
19
19
  autorequire:
20
20
  bindir: bin
21
21
  cert_chain: []
22
- date: 2017-11-15 00:00:00.000000000 Z
22
+ date: 2018-07-24 00:00:00.000000000 Z
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
25
25
  name: rest-client