maxemail_api 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/maxemail_api/shared.rb +11 -3
- data/lib/maxemail_api/triggered.rb +1 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 884964ff41ed7747877e7f9b6705e089cabe0029
|
4
|
+
data.tar.gz: d9edeac5d80a3a71d1519bdb964b844480a9fedf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4949638fa098653b8237fe15a3ee1b538eaa54d6e272155c508ea02c8f4ec673beae269f0367fe9a2867e5c58f6706359a671c2770e0f3f055e56eb9ebc10393
|
7
|
+
data.tar.gz: 0f03090f811af8b28e9e34ef8017ae2dd7e5ebdde5ca711f5aa38288747250a592faf71ed7d4148785bbfc9e0eca9a0cfd347c3c7d67aac87f2f09d99262cf69
|
data/lib/maxemail_api/shared.rb
CHANGED
@@ -1,9 +1,17 @@
|
|
1
1
|
module MaxemailApiShared
|
2
2
|
class << self
|
3
3
|
def send_request(params:, method:)
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
puts 'MaxemailApiResponse params and Method:'
|
5
|
+
puts "params: #{params}"
|
6
|
+
puts "method: #{method}"
|
7
|
+
puts 'END MaxemailApiResponse params and Method:'
|
8
|
+
response = HTTP.headers(authentication_header)
|
9
|
+
.get("#{ENV['MAXEMAIL_API_URL']}#{method}",
|
10
|
+
params: params)
|
11
|
+
puts 'MaxemailApiResponse:'
|
12
|
+
puts response
|
13
|
+
puts 'END MaxemailApiResponse :'
|
14
|
+
response
|
7
15
|
end
|
8
16
|
|
9
17
|
private
|
@@ -15,9 +15,7 @@ module MaxemailApiTriggered
|
|
15
15
|
emailAddress: email_address,
|
16
16
|
emailId: email_id,
|
17
17
|
profileData: profile_data.to_json }, method: 'email_send').body)
|
18
|
-
|
19
|
-
puts response
|
20
|
-
puts 'END MaxemailApiResponse :'
|
18
|
+
|
21
19
|
return MaxemailApiResponse.new(data: {}, success: true, message: 'Mail sent') if response['success'] == true
|
22
20
|
return MaxemailApiResponse.new(data: {}, success: false, message: 'Server error') if response['success'] == false
|
23
21
|
rescue StandardError => e
|