gatorjuice_credit_rating 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a29a964f12d56890937a8e9ef25908348981fac
4
- data.tar.gz: 3c21ce17198e2b7c07f1b090903e4d2f60068f5d
3
+ metadata.gz: dc730ffb0338db92a9b4709241cd9236136a9bdc
4
+ data.tar.gz: 07e142703130e0f64d793bc04776a5b04b44b662
5
5
  SHA512:
6
- metadata.gz: a815fcd3b6aa15cb694c7fb6403df246a0c3af7f2df454a4de105d461755033386ec2998908508d1a913d0d5d9fee32117e307c9043370e3184ac8e42b4e6e93
7
- data.tar.gz: 9836eba8fbbdd2aed77c307d64d8bda22de5efcc2f1d993c2fad37b43ba70b410817bf965883a625df5e95bf4a5259c66c9f7f1f524b1793183451d390c981ce
6
+ metadata.gz: fad38de8bbdab9f2b7fedcb0a56f7da74f707543acf55f59544f74af8aa877b84c6b086a8bb7422751043548ca1b6402b676551a75428997d43fc0ea685504e1
7
+ data.tar.gz: a9529104fe5eecb074045ef3ef5797ea4ca45968e209646e7f946ffb9f0df843f872b34bb0da355e43ad6b2ce061f036fb8daf73650e70f458823c5d45e78959
@@ -11,26 +11,27 @@ module GatorjuiceCreditRating
11
11
  end
12
12
 
13
13
  def self.inquiry(input_options)
14
- if
15
- input_options[:age] &&
16
- input_options[:age].to_i >= 18 &&
17
- !!Integer(input_options[:age]) &&
18
- input_options[:income] &&
19
- input_options[:income].to_i > 0 &&
20
- !!Integer(input_options[:income]) &&
21
- input_options[:zipcode] &&
22
- input_options[:zipcode].to_s.length == 5 &&
23
- !!Integer(input_options[:zipcode]) &&
24
- input_options.class == Hash
14
+ age = input_options[:age].to_s
15
+ income = input_options[:income].to_s
16
+ zipcode = input_options[:zipcode].to_s
17
+
18
+ if age && income && zipcode &&
19
+ age.to_i >= 18 &&
20
+ income.to_i > 0 &&
21
+ zipcode.length == 5 &&
22
+ !!Integer(age) &&
23
+ !!Integer(income) &&
24
+ !!Integer(zipcode) &&
25
+ input_options.class == Hash
25
26
  response = Unirest.get(
26
27
  "https://pacific-stream-61271.herokuapp.com/api/v1/inquiries",
27
28
  headers: {
28
29
  "Accept" => "application/json"
29
30
  },
30
31
  parameters: {
31
- age: input_options[:age].to_s,
32
- income: input_options[:income].to_s,
33
- zipcode: input_options[:zipcode],
32
+ age: age,
33
+ income: income,
34
+ zipcode: zipcode,
34
35
  api_token: "ABCDEFG1234567" # ENV[API_TOKEN]
35
36
  }
36
37
  ).body
@@ -1,3 +1,3 @@
1
1
  module GatorjuiceCreditRating
2
- VERSION = "0.2.0".freeze
2
+ VERSION = "0.2.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gatorjuice_credit_rating
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie