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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 93b6942bf50b91809cc443653364f2d0b0932bb2
4
- data.tar.gz: 1aa30ffb27d8608ac1c885456932a14c0f6c2393
3
+ metadata.gz: c532da3e5e893a422403bd74e30418552225ddf8
4
+ data.tar.gz: c980ae49a8569808b643ae70ef3eb8b8a87e47a1
5
5
  SHA512:
6
- metadata.gz: e3f87f056034968889d639058a6e3f6175efa02d15e7522631a156cc80003ac0b8fcfdc4ed838209e575458a930b86cb299d6ed220008c75f5f6016c962de32b
7
- data.tar.gz: 7ff6c6103659fb254321b2850b555161f9d332d0e31bd592acf77a7b9490a0fe7f5b089ba0b4497c23afdabb85e5279745afe84f7c7fe7abdb177bdc59cb81ba
6
+ metadata.gz: c9d539cb06601f577be81e6c49b4a36e898f0715a35f11147a906f846df17493603307f323eef0090d4c54fcaf5368a8435232c0c1b3df154b2c7ff4769f4623
7
+ data.tar.gz: 51573a865e035320c314794804ff3553622184761f804d0ce2789cf5a7a4ad571e0b0680457d5cc4d36ed8787e529a22be3b984a958ba6c0e243a9c3b50cf5ea
@@ -6,8 +6,8 @@ require 'nokogiri'
6
6
  module HellioMessaging
7
7
  @@api_username = nil
8
8
  @@api_password = nil
9
- @@api_client_id = nil
10
- @@api_client_secret = nil
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
- if @@api_client_id != nil && @@api_client_secret != nil
30
- response = CurbFu.get({:host => 'app.helliomessaging.com/api', :path => '/sms?', :protocol => 'http'}, { :From => sender_id, :To => options[:to], :Content => message, :ClientId => @@api_client_id, :ClientSecret => @@api_client_secret })
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.api_client_id=(api_client_id); @@api_client_id = api_client_id; end
45
- def self.api_client_id; @@api_client_id; end
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.api_client_secret=(api_client_secret); @@api_client_secret = api_client_secret; end
48
- def self.api_client_secret; @@api_client_secret; end
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
@@ -1,3 +1,3 @@
1
1
  module HellioMessaging
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  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.3
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-02 00:00:00.000000000 Z
11
+ date: 2017-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curb-fu