wavecell_otp_and_sms 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/wavecell_otp_and_sms/send_sms.rb +1 -15
- data/lib/wavecell_otp_and_sms/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 187cad25957120ee5a32c1e617795345cf75f7d9407f31805e3eb61b35dc214e
|
4
|
+
data.tar.gz: 1bfe6b42da7ca588d3040ce878e68f481d363af237e18d998c055f6fc194d618
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de5e44bfa5d4a685827e29c68fb2152aa312669a3198d303b7fc7ad93e6f1ab97edc4dc5a126cf80d27a9c1250f2f2a89d374ca9942ce00c3339c122afc3b5aa
|
7
|
+
data.tar.gz: a9e43d06853b9daaeb0f49fc361f80b63d5f4862d99dfe14a0d1c9037ff7663b8de34fcd87becebc0a4c0a8b64861cab7a833dbe0f3efdf8111eb01bdc8541b4
|
data/Gemfile.lock
CHANGED
@@ -23,21 +23,7 @@ module WavecellOtpAndSms
|
|
23
23
|
def generate_url
|
24
24
|
api_key = WavecellOtpAndSms.configuration.api_key
|
25
25
|
sub_account = WavecellOtpAndSms.configuration.sub_account
|
26
|
-
|
27
|
-
parameters = {
|
28
|
-
source: source,
|
29
|
-
destination: destination,
|
30
|
-
text: text,
|
31
|
-
encoding: encoding
|
32
|
-
}
|
33
|
-
query_string = parameters.to_a.map { |x| "#{x[0]}=#{x[1]}" }.join("&")
|
34
|
-
url = "https://api.wavecell.com/sms/v1/#{sub_account}/single" + "?#{query_string}"
|
35
|
-
HTTParty.post(url.to_str,
|
36
|
-
:body => parameters.to_json,
|
37
|
-
:headers => {
|
38
|
-
"Content-Type" => "application/json",
|
39
|
-
"Authorization" => "Bearer #{api_key}"
|
40
|
-
})
|
26
|
+
puts `curl -X POST https://api.wavecell.com/sms/v1/#{sub_account}/single -H "Authorization: Bearer #{api_key}" -H "Content-Type: application/json" -d $'{ "source": "#{source}", "destination": "+63#{destination}", "text": "#{text}", "encoding": "#{encoding}" }'`
|
41
27
|
end
|
42
28
|
|
43
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wavecell_otp_and_sms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alejandro De Guzman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|