eligible 2.9.1 → 2.9.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2a50028978ef5f3a39e998f84ac1e7a80d45696
4
- data.tar.gz: 7296fa9ff2ca890a1e3f5464fe190285d0a2f2df
3
+ metadata.gz: 2502ecfe38ce4bc65f29abc1d3b3748287aee62c
4
+ data.tar.gz: 1601b0702e75f9b58dd9daef66cbe813d93cd477
5
5
  SHA512:
6
- metadata.gz: 6376bc0fa92857b043ac2da25a9897a34dd5fc51252a980f667277d4226dfe2b51032673fa2261de3c564d78951ce97be213b2916e97027d6742c6894a70947b
7
- data.tar.gz: 41c0a0339c6781b82f23f94df810e5fbb159fadece8f3c5beb2d49edfbc36b58a229a571e8b442cd926e616ac13b115d1868482a7651a93a033f4825bfb2b01b
6
+ metadata.gz: 049554c0293e6fe305c5d5dff13600534ce53b868989591cb8d152e810547b2682ae29a9e51d9b97ac14e70ff5f135d6828143fb3523bbf696a167c716c5b3dd
7
+ data.tar.gz: 966a729b8a8656a6e350377f514a35a1c5d21d5bdb98b3f76e431a986aeee501a7e2ed7c705c089a5b6ce80c9ca5c94620314012487d8ed992650e479eddbfcb
data/ChangeLog CHANGED
@@ -1,3 +1,9 @@
1
+ 2018-03-26 Eligible <support@eligible.com>
2
+
3
+ * 2.9.2
4
+ - We can use session token or api_key for making a Eligible Call
5
+ - for session token supported endpoints
6
+
1
7
  2017-10-04 Eligible <support@eligible.com>
2
8
 
3
9
  * 2.9.0
data/README.md CHANGED
@@ -674,6 +674,12 @@ result.to_hash # returns all session token info for the request
674
674
  result.error # returns error, if any
675
675
  ```
676
676
 
677
+ ### Use session token without api_key
678
+
679
+ ```ruby
680
+ Eligible::Coverage.get({:session_token => 'SESSION_TOKEN', :test => false})
681
+ ```
682
+
677
683
 
678
684
  ## Errors
679
685
 
data/lib/eligible.rb CHANGED
@@ -23,6 +23,7 @@ require 'eligible/x12'
23
23
  require 'eligible/medicare'
24
24
  require 'eligible/ticket'
25
25
  require 'eligible/customer'
26
+ require 'eligible/ocr'
26
27
  require 'eligible/original_signature_pdf'
27
28
  require 'eligible/received_pdf'
28
29
  require 'eligible/payer'
@@ -106,12 +107,13 @@ module Eligible
106
107
  end
107
108
 
108
109
  def self.request(method, url, api_key, params = {}, headers = {})
109
- api_key ||= @@api_key
110
+ session_token = Util.value(params, :session_token)
111
+ api_key ||= @@api_key unless session_token
110
112
  test = self.test
111
113
  api_key = Util.value(params, :api_key) if api_key?(params)
112
114
  test = Util.value(params, :test) if test_key?(params)
113
115
 
114
- fail AuthenticationError, 'No API key provided. (HINT: set your API key using "Eligible.api_key = <API-KEY>".' unless api_key
116
+ fail AuthenticationError, 'No API key provided. (HINT: set your API key using "Eligible.api_key = <API-KEY>".' unless api_key || session_token
115
117
 
116
118
  lang_version = "#{RUBY_VERSION} p#{RUBY_PATCHLEVEL} (#{RUBY_RELEASE_DATE})"
117
119
  debug_info = {
@@ -0,0 +1,15 @@
1
+ module Eligible
2
+ class Ocr < APIResource
3
+ def self.setup_file(params)
4
+ file = Util.value(params, :file)
5
+ params[:file] = File.new(file, 'rb') if file.is_a?(String)
6
+ end
7
+
8
+ def self.post(params, api_key = nil)
9
+ setup_file(params)
10
+ send_request(:post, '/card_scans.json', api_key, params)
11
+ end
12
+
13
+ private_class_method :setup_file
14
+ end
15
+ end
@@ -1,3 +1,3 @@
1
1
  module Eligible
2
- VERSION = '2.9.1'.freeze
2
+ VERSION = '2.9.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eligible
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.1
4
+ version: 2.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katelyn Gleaon
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-01-11 00:00:00.000000000 Z
13
+ date: 2018-03-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rest-client
@@ -122,6 +122,7 @@ files:
122
122
  - lib/eligible/json.rb
123
123
  - lib/eligible/lockbox.rb
124
124
  - lib/eligible/medicare.rb
125
+ - lib/eligible/ocr.rb
125
126
  - lib/eligible/original_signature_pdf.rb
126
127
  - lib/eligible/payer.rb
127
128
  - lib/eligible/payment.rb