consumer_score_naj 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/Gemfile +2 -0
- data/README.md +25 -1
- data/lib/consumer_score_naj/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60bee1bc9af0ef5867430f2b00e290d6c2e29c1d
|
4
|
+
data.tar.gz: 9c12ccc3cca4ddf7d5de890df68d6301f733a621
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af966a2bbe566b82e465a2b57d9778f7878eee04bd6deb46f780bd29fa7f846f0264c8221797fe481671f591ad174ff4074b5aeec45b230868fb32a533b4b3f5
|
7
|
+
data.tar.gz: 9cd4e96065ff9ca653d4f7ff84830cda7751ad32d3d9d8758165da190f1da0857d8facff463384bcc362404efa55a6e6afc4048e1919f057feddbbe13717726f
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.4.0
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -22,7 +22,31 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
To fetch a customer score based on income, zipcode, and age:
|
26
|
+
```ruby
|
27
|
+
Consumer::Score.get_score({income: 5000, zipcode: 60201, age: 50})
|
28
|
+
```
|
29
|
+
Should return 'propensity' and 'ranking' values, in the form of a JSON response:
|
30
|
+
```ruby
|
31
|
+
=> {"propensity"=>0.31175, "ranking"=>"C"}
|
32
|
+
```
|
33
|
+
Will only provide a successful response with all three values (income, zipcode, age)
|
34
|
+
Otherwise, API will ask for more information:
|
35
|
+
|
36
|
+
```ruby
|
37
|
+
=> {"message"=>"Please provide income, zipcode, and age for successful response."}
|
38
|
+
```
|
39
|
+
|
40
|
+
## Dependencies
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
"bundler", "~> 1.14"
|
44
|
+
"rake", "~> 10.0"
|
45
|
+
"rspec", "~> 3.0"
|
46
|
+
"unirest", "1.1.2"
|
47
|
+
|
48
|
+
ruby "2.4.0"
|
49
|
+
```
|
26
50
|
|
27
51
|
## Development
|
28
52
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: consumer_score_naj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mrjonesbot
|
@@ -75,6 +75,7 @@ extra_rdoc_files: []
|
|
75
75
|
files:
|
76
76
|
- ".gitignore"
|
77
77
|
- ".rspec"
|
78
|
+
- ".ruby-version"
|
78
79
|
- ".travis.yml"
|
79
80
|
- Gemfile
|
80
81
|
- LICENSE.txt
|
@@ -106,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
107
|
version: '0'
|
107
108
|
requirements: []
|
108
109
|
rubyforge_project:
|
109
|
-
rubygems_version: 2.
|
110
|
+
rubygems_version: 2.6.8
|
110
111
|
signing_key:
|
111
112
|
specification_version: 4
|
112
113
|
summary: a simple consumer-api client
|