safecharge 0.0.3 → 0.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/safecharge/request.rb +2 -0
- data/lib/safecharge/version.rb +1 -1
- data/lib/safecharge/wc_request.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a44e226290371ccb1ad824290497c445d572fdfc
|
|
4
|
+
data.tar.gz: dc768e9ee00e0c31e6b14dea6cd2fe98ff999b24
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b1205d6895ea7a4a399efb819587121189cd81b786cfc34acaba0aea01962e12bbbb3b632b901dc845eab2eaa9e770bb066375c66cec1399472200ea6f096e1e
|
|
7
|
+
data.tar.gz: fe414f8d6dc2fa9adf2a9ce9fc58473e8213c2bc2c1506b36a96eafb640512e5aeee057e18138fb5d2027d1780ad15aa1dc7ddec277cafc71ba6d486ed1094e6
|
data/lib/safecharge/request.rb
CHANGED
|
@@ -114,6 +114,8 @@ module Safecharge
|
|
|
114
114
|
case meta[:type]
|
|
115
115
|
when 'boolstring'
|
|
116
116
|
correct_type = p.is_a?(String) && ['True', 'False'].include?(p)
|
|
117
|
+
when 'usertoken'
|
|
118
|
+
correct_type = p.is_a?(String) && ['register', 'auto'].include?(p)
|
|
117
119
|
when 'string'
|
|
118
120
|
correct_type = p.is_a? String
|
|
119
121
|
raise ValidationException, sprintf("Value '%s' in field '%s' is too long.", p, name) if p.size > meta[:length]
|
data/lib/safecharge/version.rb
CHANGED
|
@@ -32,7 +32,7 @@ module Safecharge
|
|
|
32
32
|
'userid' => {:required => false, :type => 'string', length: 50},
|
|
33
33
|
'version' => {:required => true, :type => 'string', length: 10},
|
|
34
34
|
'webMasterId' => {:required => false, :type => 'string', length: 255},
|
|
35
|
-
'user_token' => {:required => false, :type => '
|
|
35
|
+
'user_token' => {:required => false, :type => 'usertoken'},
|
|
36
36
|
'user_token_id' => {:required => true, :type => 'string', length: 45}
|
|
37
37
|
|
|
38
38
|
} # 'time_stamp', 'numberofitems' and 'checksum' are inserted after validation.
|