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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 000aacd4d4da89da186ef0bab2179ed6576b5154
4
- data.tar.gz: 78abdf6d07648021e0e3f003e6b347f63c134075
3
+ metadata.gz: 884964ff41ed7747877e7f9b6705e089cabe0029
4
+ data.tar.gz: d9edeac5d80a3a71d1519bdb964b844480a9fedf
5
5
  SHA512:
6
- metadata.gz: 5f19489afaf29f6c2e3cd8ce334d8f23f0715a5a74aa2574b7ba108eeffcf1814df0a0cc12b7e9f1e5a3618a3be802653995d17627199d3f1c18ed6f92fe05eb
7
- data.tar.gz: 88aa89d2b8c53004666e9b6040be1ff7f210b3b30b973ec820a81ecf3b25bd95676e0b2ed8b1b0fc01ab375a8e56a81cc15887f6362381825754ca7a985d50ea
6
+ metadata.gz: 4949638fa098653b8237fe15a3ee1b538eaa54d6e272155c508ea02c8f4ec673beae269f0367fe9a2867e5c58f6706359a671c2770e0f3f055e56eb9ebc10393
7
+ data.tar.gz: 0f03090f811af8b28e9e34ef8017ae2dd7e5ebdde5ca711f5aa38288747250a592faf71ed7d4148785bbfc9e0eca9a0cfd347c3c7d67aac87f2f09d99262cf69
@@ -1,9 +1,17 @@
1
1
  module MaxemailApiShared
2
2
  class << self
3
3
  def send_request(params:, method:)
4
- HTTP.headers(authentication_header)
5
- .get("#{ENV['MAXEMAIL_API_URL']}#{method}",
6
- params: params)
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
- puts 'MaxemailApiResponse:'
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
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: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Murray Catto