kave_rest_api 0.2.1 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kave_rest_api/requests/deliver.rb +2 -2
- data/lib/kave_rest_api/requests/send.rb +1 -1
- data/lib/kave_rest_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2709fbc88e59d5f33249fc71bc208f4ec23efc30b17258663466fda3dceaf1f
|
4
|
+
data.tar.gz: c932eabe3654225e41459cbae6a55b823aa7ee7ebfe621d90216d1330c05e7b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69785cf408ddd22f83c3c412e6be50926de1ceeeafe3b81ae4c535d77f01dacf224e154ac2943046befd1d903b851a47e86ad6f8009694c8ffebe382e091b0e5
|
7
|
+
data.tar.gz: 1ac0278947643c1219539bb5f9a2fa230a66b04ca4d66dd87ce4879c4a9262e1926f999a4931a0d4489529e4ce5f52de57ee6e685156c4495524f4faccea537a
|
@@ -5,7 +5,7 @@ module KaveRestApi
|
|
5
5
|
attr_accessor :messageid
|
6
6
|
attr_reader :response
|
7
7
|
validates_presence_of :messageid
|
8
|
-
validates_format_of :messageid, :with => /^\d*$/, :if => Proc.new { !messageid.nil? }
|
8
|
+
validates_format_of :messageid, :with => /^\d+(,\d+)*$/, :if => Proc.new { !messageid.nil? }
|
9
9
|
|
10
10
|
def initialize(args = {})
|
11
11
|
@ACTION_NAME = [:status,@FORMAT].join('.').freeze
|
@@ -21,7 +21,7 @@ module KaveRestApi
|
|
21
21
|
def call
|
22
22
|
connection = Faraday.new(url: "#{@API_URL}/sms/") do |faraday|
|
23
23
|
faraday.adapter Faraday.default_adapter
|
24
|
-
faraday.response
|
24
|
+
faraday.response :json
|
25
25
|
end
|
26
26
|
response = connection.get(@ACTION_NAME, messageid: @messageid)
|
27
27
|
@response.validate(response.body)
|
@@ -5,7 +5,7 @@ module KaveRestApi
|
|
5
5
|
attr_reader :response,:message_size,:config
|
6
6
|
validates_presence_of :message
|
7
7
|
validates_presence_of :receptor
|
8
|
-
validates_length_of :message, :within => 1..
|
8
|
+
validates_length_of :message, :within => 1..900
|
9
9
|
validates_format_of :sender, :with => /^\d*$/, :if => Proc.new { !sender.nil? }
|
10
10
|
validates_format_of :unixdate, :with => /^\d*$/, :if => Proc.new { !unixdate.nil? }
|
11
11
|
|