maxemail_api 2.0.0 → 2.0.1

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: e5c671a5662c9da6c6bbb3c2fc113c1da4f03c22
4
- data.tar.gz: 26ca25551f0dfa29fa3c80a650fb571f5926474d
3
+ metadata.gz: edd501253b75b15d28dd0f84d550f02870d9644e
4
+ data.tar.gz: d2611b6d2eef9ef4421bdecfccd05a969ba67124
5
5
  SHA512:
6
- metadata.gz: 6c96530051a3c947848cc67a9ff9f5a1668ba4f26b0d11f946505ff8b50b4a33d51f9a7f126fa378550cfbf3f7ac36e99758085705e749de63c947c613d89a89
7
- data.tar.gz: 363cb07ad76d6ba100bccb78e51db80292bb337a9b7bbf2eca92fbbefc375749cc81b6087ad47c115935bcbdb2feaf3a31b14b1ea3057d611f9db115598d1bff
6
+ metadata.gz: 5b2d9c69c4d07e55a1a67e535d2a13ff1f93ccc2da04a0167b2b490256155cfa2cd0a1dc0cb663313be7f233cbb3f74923bd50122c7c9af45344ff638ad7c8aa
7
+ data.tar.gz: 01cb9e5e9a56fb47282920a8b5dc2cfe180f439dee40f612f1319cdc53ea86c408d7024f77ccdb93d7fa303720a29f18a227b3ab1ea7b22a4482ec25d33e0098
@@ -39,6 +39,11 @@ module MaxemailApiSubscriptions
39
39
  MaxemailApiShared.send_request(params: { method: 'fetchLists', listID: list_id, recipientId: recipient_id }, method: 'recipient')
40
40
  end
41
41
 
42
+ def update_subscription_email(old_email_address:nil, recipient_id: nil, new_email_address:)
43
+ recipient_id = find_recipient_id(email_address: old_email_address) if recipient_id.nil?
44
+ MaxemailApiShared.send_request(params: { method: 'update', data: { email_address: new_email_address }.to_json, recipientId: recipient_id }, method: 'recipient')
45
+ end
46
+
42
47
  def find_recipient_id(email_address: nil)
43
48
  MaxemailApiShared.send_request(params: { method: 'findByEmailAddress', emailAddress: email_address }, method: 'recipient')
44
49
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maxemail_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Murray Catto