helliomessaging_sms 1.0.3 → 1.0.4
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 +4 -4
- data/lib/helliomessaging_sms.rb +20 -8
- data/lib/helliomessaging_sms/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c532da3e5e893a422403bd74e30418552225ddf8
|
4
|
+
data.tar.gz: c980ae49a8569808b643ae70ef3eb8b8a87e47a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9d539cb06601f577be81e6c49b4a36e898f0715a35f11147a906f846df17493603307f323eef0090d4c54fcaf5368a8435232c0c1b3df154b2c7ff4769f4623
|
7
|
+
data.tar.gz: 51573a865e035320c314794804ff3553622184761f804d0ce2789cf5a7a4ad571e0b0680457d5cc4d36ed8787e529a22be3b984a958ba6c0e243a9c3b50cf5ea
|
data/lib/helliomessaging_sms.rb
CHANGED
@@ -6,8 +6,8 @@ require 'nokogiri'
|
|
6
6
|
module HellioMessaging
|
7
7
|
@@api_username = nil
|
8
8
|
@@api_password = nil
|
9
|
-
@@
|
10
|
-
@@
|
9
|
+
@@api_comsumer_key = nil
|
10
|
+
@@api_application_secret = nil
|
11
11
|
@@api_senderid = "HELLIOAPI"
|
12
12
|
|
13
13
|
# Expects :msg, :to and an optional :from param
|
@@ -22,12 +22,24 @@ module HellioMessaging
|
|
22
22
|
|
23
23
|
message = Nokogiri::HTML.parse(message).text
|
24
24
|
|
25
|
+
# Send SMS Using the old form of Authentication [Username and Password]
|
25
26
|
if @@api_username != nil && @@api_password != nil
|
26
27
|
response = CurbFu.get({:host => 'app.helliomessaging.com/api', :path => '/sms?'}, { :from => sender_id, :to => options[:to], :text => message, :username => @@api_username, :password => @@api_password })
|
27
28
|
end
|
28
29
|
|
29
|
-
|
30
|
-
|
30
|
+
# Check Your Account Balance
|
31
|
+
if @@api_username != nil && @@api_password != nil
|
32
|
+
response = CurbFu.get({:host => 'app.helliomessaging.com/api', :path => '/sms-bal?'}, { :username => @@api_username, :password => @@api_password })
|
33
|
+
end
|
34
|
+
|
35
|
+
# Send SMS Using the new form of Authentication [Consumer ID and an Application Serect]
|
36
|
+
if @@api_consumer_key != nil && @@api_application_secret != nil
|
37
|
+
response = CurbFu.get({:host => 'app.helliomessaging.com/api', :path => '/sms-dlr?', :protocol => 'http'}, { :From => sender_id, :To => options[:to], :Content => message, :ClientId => @@api_consumer_key, :ClientSecret => @@api_application_secret })
|
38
|
+
end
|
39
|
+
|
40
|
+
# Check for DLR's [Consumer ID and an Application Serect or Username and Password]
|
41
|
+
if @@api_consumer_key != nil && @@api_application_secret != nil
|
42
|
+
response = CurbFu.get({:host => 'app.helliomessaging.com/api', :path => '/sms-dlr?', :protocol => 'http'}, { :From => sender_id, :To => options[:to], :Content => message, :ClientId => @@api_consumer_key, :ClientSecret => @@api_application_secret })
|
31
43
|
end
|
32
44
|
|
33
45
|
{:status => response.status, :notice => response.body}
|
@@ -41,11 +53,11 @@ module HellioMessaging
|
|
41
53
|
def self.api_password=(api_password); @@api_password = api_password; end
|
42
54
|
def self.api_password; @@api_password; end
|
43
55
|
|
44
|
-
def self.
|
45
|
-
def self.
|
56
|
+
def self.api_consumer_key=(api_consumer_key); @@api_consumer_key = api_consumer_key; end
|
57
|
+
def self.api_consumer_key; @@api_consumer_key; end
|
46
58
|
|
47
|
-
def self.
|
48
|
-
def self.
|
59
|
+
def self.api_application_secret=(api_application_secret); @@api_application_secret = api_application_secret; end
|
60
|
+
def self.api_application_secret; @@api_application_secret; end
|
49
61
|
|
50
62
|
def self.api_senderid=(api_senderid); @@api_senderid = api_senderid; end
|
51
63
|
def self.api_senderid; @@api_senderid; end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: helliomessaging_sms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Albert A. Ninyeh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curb-fu
|