nequi 0.1.2 → 0.1.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/nequi.rb +2 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: adfe516c81ff1c4430a521fc5697e16c052664956bdf2d157c6d7b0d02526aa2
4
- data.tar.gz: ff85c2b1b6bc1cd7748ac8f62ab9c1a2d702c1b14d4f051fb7d8fa7bb3af15cb
3
+ metadata.gz: 18b31b8b414ad789cf5341fbe735a9f3ccb5c979295edbf4f107a9ad1724ae8e
4
+ data.tar.gz: 28a1565f189ad7dacea357592f8abc185113a0651bff5b9d0933960c11cbdd13
5
5
  SHA512:
6
- metadata.gz: cb9b66de2efb9b1bedeee29bff7f433c63abc1adc7606665ca006adfce15f8d9cae87ac029e2f7c7faee762f2f6c741d00b1b4561dd56d343c413decef0e6042
7
- data.tar.gz: 718a6028c356c1187b1978dd45f111307a2f0b5de7fb20dd95857feb3be4cf30b008c16440ec380536ac8273ba3b869c7a96ee31e3cc8194e8126ff880a01c94
6
+ metadata.gz: 68fe26b53f94b4b20f09cf711499015fc75aece91e3e421721fd5da5272d3ba73f5d7f897edcdb2ba0a9a99d1ad3d1bd9c0770c226439aaa3fb9e3048df7efe9
7
+ data.tar.gz: e05493bbf82473bd5583f38d62cad525fb134e84d0fa44f6a071221d74697fe19168df44b685740b5904c5ee97f5ce3d763c5e96e2abbdca9b301678c23af878
data/lib/nequi.rb CHANGED
@@ -21,7 +21,7 @@ module Nequi
21
21
  end
22
22
 
23
23
  class Configuration
24
- attr_accessor :auth_uri, :auth_grant_type, :unregisteredpayment_endpoint,
24
+ attr_accessor :auth_uri, :phone, :auth_grant_type, :unregisteredpayment_endpoint,
25
25
  :client_id, :client_secret, :api_base_path, :api_key
26
26
  end
27
27
 
@@ -41,7 +41,7 @@ module Nequi
41
41
 
42
42
  response = HTTParty.post(configuration.auth_uri, body: body, headers: headers)
43
43
 
44
- raise "Failed to authenticate with Nequi. HTTP status code: #{response.code}" unless (response.code == 200 && !response.body.empty?)
44
+ raise "Failed to authenticate with Nequi. HTTP status code: #{response.code}" unless (response.code.to_s.include?('200') && !response.body.empty?)
45
45
  response_body = JSON.parse(response.body)
46
46
  @token = { access_token: response_body['access_token'], token_type: response_body['token_type'], expires_at: Time.now + 2.hours }
47
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nequi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - geocodinglife