minfraud 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/minfraud/components/base.rb +13 -1
- data/lib/minfraud/components/order.rb +1 -0
- data/lib/minfraud/http_service.rb +1 -1
- data/lib/minfraud/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: 360e5c67027b7cac3bacd6715aa3afee61de8a75
|
4
|
+
data.tar.gz: cb6dd240c3436fe0c0c23e7aa6d5ad5c4bcfcae8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3cb59ad5bde816f3b2f8be3cc1f0699ce18c1728a8267d7e827b28e8fecd0a20c638211f453a0f8dee2ea7c252096193293633ca5ecf4e3a640f632e5201dfb
|
7
|
+
data.tar.gz: 2b430855a1157e215891a09a1cf0aab79bad1a027e272359a536caf81db8958835e06f591393a9782b22c90655017b91475eff775208f964a4ae0ca44bb1dd43
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Minfraud Changelog
|
2
2
|
|
3
|
+
## v1.0.4
|
4
|
+
|
5
|
+
* Prevents boolean value conversion to string to avoid warnings
|
6
|
+
* Adds `amount` attribute to the `Minfraud::Components::Order` instances
|
7
|
+
|
3
8
|
## v1.0.3
|
4
9
|
* Adds `token` attribute to the `Minfraud::Components::CreditCard` instances
|
5
10
|
according to the MinFraud Release Notes introduced on November 17, 2016
|
@@ -16,8 +16,20 @@ module Minfraud
|
|
16
16
|
# @return [Hash] a hash containing a JSON representation of instance variable name and it's value
|
17
17
|
def populate!(hash, v_sym)
|
18
18
|
return hash unless value = instance_variable_get(v_sym)
|
19
|
-
|
19
|
+
|
20
|
+
key = v_sym.to_s.gsub(/@/, '')
|
21
|
+
hash.merge!(key => represent(key, value))
|
22
|
+
end
|
23
|
+
|
24
|
+
# param [Symbol] key instance variable symbol
|
25
|
+
# param [Object] value instance variable value
|
26
|
+
# @return [Object] value representation according to the request format
|
27
|
+
def represent(key, value)
|
28
|
+
BOOLS.include?(key) ? value : value.to_s
|
20
29
|
end
|
30
|
+
|
31
|
+
# Keys that have to remain boolean
|
32
|
+
BOOLS = %w(was_authorized is_gift has_gift_message)
|
21
33
|
end
|
22
34
|
end
|
23
35
|
end
|
@@ -38,6 +38,7 @@ module Minfraud
|
|
38
38
|
# @param [Hash] params hash of parameters
|
39
39
|
# @return [Minfraud::Components::Order] an Order instance
|
40
40
|
def initialize (params = {})
|
41
|
+
@amount = params[:amount]
|
41
42
|
@has_gift_message = params[:has_gift_message]
|
42
43
|
@affiliate_id = params[:affiliate_id]
|
43
44
|
@subaffiliate_id = params[:subaffiliate_id]
|
data/lib/minfraud/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minfraud
|
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
|
- kushnir.yb
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|