eligible 2.4.3 → 2.5.0

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: 3ab954288272a0ffb48111585b865a3e856282af
4
- data.tar.gz: bd49eb34f4e6ba5ef8d6280ded9250c92e0b225e
3
+ metadata.gz: 17923f2b677856fbfddf6fcb264f50c1df9978a3
4
+ data.tar.gz: 5893d5023436251f4210528eb04427a3b8df88b8
5
5
  SHA512:
6
- metadata.gz: 03d4b59e89c098e952fa372f3134f8141eb6341cce477723f5a43ead3c168ba2caedcce9ddb5832c09d4589e58cba54da64635fca0b4d884085a30f50cb8b6c8
7
- data.tar.gz: d114c923f5a988785ff5214c5e140ada5dcfd4670feb0880fc9bce3b5ff9af31a43808b043fdf8d1d05455d89ab13db701120951e2b4a317d62336c7ef196363
6
+ metadata.gz: b7b78bb2711b50bf924913be82666f60231968cc9fa04b2dbb327bd0db11f0ac178b2554173139bbb4adf1d68516425f932fd9abd876a6db22d73c4ea644fe2e
7
+ data.tar.gz: f74b959d868e42bf2a85a903e28aa487fe9d6a5c420cc8f38e83e41bf85d5277ff2c9f7431d207ea90a55cdc791e082d3f68aeeb393d3037bd81894ee5c1c8ce
data/.gitignore CHANGED
@@ -16,4 +16,3 @@ test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
18
  .idea
19
- test.rb
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --colour
2
+ --format documentation
data/.rubocop.yml ADDED
@@ -0,0 +1,12 @@
1
+ AllCops:
2
+ Exclude:
3
+ - 'test/**/*.rb'
4
+
5
+ Style/Documentation:
6
+ Enabled: false
7
+
8
+ Metrics/LineLength:
9
+ Enabled: false
10
+
11
+ Metrics/MethodLength:
12
+ Enabled: false
data/ChangeLog ADDED
@@ -0,0 +1,51 @@
1
+ 2016-01-07 Eligible <support@eligible.com>
2
+
3
+ * 2.5.0
4
+ - Added certificate pinning
5
+ - Added rubocop and fixed style/linting/metrics issues
6
+ - Migrated from outdated test-unit/mocha to current rspec for test suite
7
+
8
+ 0000-00-00 Eligible <support@eligible.com>
9
+
10
+ * 2.4
11
+ - Refactoring Code
12
+ - More test cases
13
+ - Removed legacy endpoint for *plans*, *coverage* should be used instead.
14
+ - Removed legacy endpoint for *services*, *coverage* should be used instead.
15
+ - List of contributors and documentation updated.
16
+ - Gemfile updated, dependencies updated as well.
17
+ - Removed json gem in favor of multi_json
18
+ - Fixed the code to let the users make x12 requests at anytime.
19
+ - New endpoint for Tickets
20
+
21
+ 0000-00-00 Eligible <support@eligible.com>
22
+
23
+ * 2.3
24
+ - New endpoint for Batch
25
+
26
+ 0000-00-00 Eligible <support@eligible.com>
27
+
28
+ * 2.2
29
+ - New endpoint for x12 POST
30
+
31
+ 0000-00-00 Eligible <support@eligible.com>
32
+
33
+ * 2.1
34
+ - New endpoint for payment status
35
+
36
+ 0000-00-00 Eligible <support@eligible.com>
37
+
38
+ * 2.0
39
+ - Additional endpoints for claims, enrollments, and coverage
40
+
41
+ 0000-00-00 Eligible <support@eligible.com>
42
+
43
+ * 1.1
44
+ - Additional endpoints for service/general and service/list
45
+ - Support x12 format in params
46
+
47
+ 0000-00-00 Eligible <support@eligible.com>
48
+
49
+ * 1.0
50
+ - Initial release
51
+
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013 Eligible
1
+ Copyright (c) 2013-2016 Eligible
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Eligible
2
2
 
3
- Ruby bindings for the [Eligible API](https://eligibleapi.com/rest-api-v1)
3
+ [![Circle CI](https://circleci.com/gh/eligible/eligible-ruby.svg?style=svg)](https://circleci.com/gh/eligible/eligible-ruby)
4
+
5
+ Ruby bindings for the [Eligible API](https://eligible.com/rest)
4
6
 
5
7
  ## Installation
6
8
 
@@ -16,72 +18,77 @@ Or install it yourself with:
16
18
 
17
19
  $ gem install eligible
18
20
 
19
- # Important notes
21
+ ## Usage
20
22
 
21
- ## Payer List for Eligibility
23
+ ### Setup
24
+ ```ruby
25
+ require 'eligible'
26
+ Eligible.api_key = 'YOUR_KEY'
27
+ ```
22
28
 
23
- the parameter *payer_id*, required for most of the api calls, is provided by EligibleAPI from its website,
24
- in xml and json format, which you can embed into your applications.
29
+ ### Test
30
+ ```ruby
31
+ Eligible.test = true
32
+ ```
25
33
 
26
- [https://eligibleapi.com/resources/information-sources.xml](https://eligibleapi.com/resources/information-sources.xml)
27
- [https://eligibleapi.com/resources/information-sources.json](https://eligibleapi.com/resources/information-sources.json)
34
+ ### Parameters overwrite
28
35
 
29
- ## Payer List for Claims
36
+ On each api call, you can overwrite the api key or the test parameter:
30
37
 
31
- the parameter *payer_id*, required for claims, is provided by EligibleAPI from its website,
32
- in xml and json format, which you can embed into your applications.
38
+ ```ruby
39
+ Eligible::Demographic.get({:api_key => 'NEW_KEY', :test => false})
40
+ ```
33
41
 
34
- [https://eligibleapi.com/resources/claims-payer.xml](https://eligibleapi.com/resources/claims-payer.xml)
35
- [https://eligibleapi.com/resources/claims-payer.json](https://eligibleapi.com/resources/claims-payer.json)
42
+ ### Response Format
36
43
 
37
- ## Service Type Codes
44
+ By default, all responses are in JSON, but you can request raw
45
+ access to X12 by adding is as a parameter on the api call:
38
46
 
39
- the parameter *service_type*, required on the api calls, is provided by EligibleAPI from its website,
40
- in xml and json format, which you can embed into your applications.
41
- [https://eligibleapi.com/resources/service-codes.xml](https://eligibleapi.com/resources/service-codes.xml)
42
- https://eligibleapi.com/resources/service-codes.json](ttps://eligibleapi.com/resources/service-codes.json)
47
+ ```ruby
48
+ Eligible::Demographic.get({:format => "x12"})
49
+ ```
43
50
 
44
- ## Place of Service
51
+ # Important notes
45
52
 
46
- [https://eligibleapi.com/resources/place_of_service.json](https://eligibleapi.com/resources/place_of_service.json)
53
+ ## Payer List for Eligibility
47
54
 
48
- ## Health Care Provider Taxonomy
55
+ the parameter `payer_id`, required for most of the api calls, is
56
+ provided by Eligible from its website, in xml and json format, which
57
+ you can embed into your applications.
49
58
 
50
- [https://eligibleapi.com/resources/health-care-provider-taxonomy-code-set.json](https://eligibleapi.com/resources/health-care-provider-taxonomy-code-set.json)
59
+ [https://eligible.com/resources/information-sources.xml](https://eligible.com/resources/information-sources.xml)
60
+ [https://eligible.com/resources/information-sources.json](https://eligible.com/resources/information-sources.json)
51
61
 
62
+ ## Payer List for Claims
52
63
 
53
- # Usage
64
+ the parameter `payer_id`, required for claims, is provided by Eligible
65
+ from its website, in xml and json format, which you can embed into
66
+ your applications.
54
67
 
55
- ### Setup
56
- ```ruby
57
- require 'eligible'
58
- Eligible.api_key = 'YOUR_KEY'
59
- ```
68
+ [https://eligible.com/resources/claims-payer.xml](https://eligible.com/resources/claims-payer.xml)
69
+ [https://eligible.com/resources/claims-payer.json](https://eligible.com/resources/claims-payer.json)
60
70
 
61
- ### Test
62
- ```ruby
63
- Eligible.test = true
64
- ```
71
+ ## Service Type Codes
65
72
 
66
- ### Parameters overwrite
73
+ the parameter `service_type`, required on the api calls, is provided
74
+ by Eligible from its website, in xml and json format, which you can
75
+ embed into your applications.
67
76
 
68
- On each api call, you can overwrite the api key or the test parameter, i.e.
77
+ [https://eligible.com/resources/service-codes.xml](https://eligible.com/resources/service-codes.xml)
78
+ [https://eligible.com/resources/service-codes.json](ttps://eligible.com/resources/service-codes.json)
69
79
 
70
- ```ruby
71
- Eligible::Demographic.get({:api_key => 'NEW_KEY', :test => false})
72
- ```
80
+ ## Place of Service
73
81
 
74
- ### Response Format
82
+ [https://eligible.com/resources/place_of_service.json](https://eligible.com/resources/place_of_service.json)
75
83
 
76
- By default, all the responses came in JSON, but you can request raw access to X12 by adding is as a parameter on the api call.
84
+ ## Health Care Provider Taxonomy
77
85
 
78
- ```ruby
79
- Eligible::Demographic.get({:format => "x12"})
80
- ```
86
+ [https://eligible.com/resources/health-care-provider-taxonomy-code-set.json](https://eligible.com/resources/health-care-provider-taxonomy-code-set.json)
81
87
 
82
88
  ### Api Call Results
83
89
 
84
- On all the results, you can check for errors in *result.error*, you can get get the raw json format in a has by using *result.to_hash*.
90
+ On all results you can check for errors in `result.error`. The raw
91
+ json format is available by using `result.to_hash`.
85
92
 
86
93
  ```ruby
87
94
  demographic = Eligible::Demographic.get(params)
@@ -93,9 +100,9 @@ demographic.to_hash
93
100
 
94
101
  ### Reference
95
102
 
96
- [https://eligibleapi.com/rest-api-v1-1/coverage-all#apiCoverageInfo](https://eligibleapi.com/rest-api-v1-1/coverage-all#apiCoverageInfo)
103
+ [https://eligible.com/rest#coverage](https://eligible.com/rest#coverage)
97
104
 
98
- ### Retrieve eligibility & benefit information
105
+ ### Retrieve eligibility and benefit information
99
106
 
100
107
  ```ruby
101
108
  params = {
@@ -120,7 +127,7 @@ coverage.error # return error, if any
120
127
 
121
128
  ### Reference
122
129
 
123
- [https://eligibleapi.com/rest-api-v1-1/demographic-all#apiDemographics](https://eligibleapi.com/rest-api-v1-1/demographic-all#apiDemographics)
130
+ [https://eligible.com/rest#demographics](https://eligible.com/rest#demographics)
124
131
 
125
132
  ### Fetch demographics for a patient
126
133
 
@@ -144,11 +151,7 @@ demographic.error # return error, if any
144
151
 
145
152
  ## Medicare
146
153
 
147
- ### Reference
148
-
149
- [https://github.com/EligibleAPI/tools/wiki/Medicare](https://github.com/EligibleAPI/tools/wiki/Medicare)
150
-
151
- ### Retrieve eligibility & benefit information from CMS Medicare for a patient.
154
+ ### Retrieve eligibility and benefit information from CMS Medicare for a patient.
152
155
 
153
156
  ```ruby
154
157
  params = {
@@ -164,20 +167,15 @@ params = {
164
167
  medicare = Eligible::Medicare.get(params)
165
168
  medicare.to_hash # returns all coverage info for the request
166
169
  medicare.error # return error, if any
167
-
168
170
  ```
169
171
 
170
172
  ## Batch API
171
173
 
172
- ### Reference
173
-
174
- [https://github.com/EligibleAPI/tools/wiki/Batch-Api](https://github.com/EligibleAPI/tools/wiki/Batch-Api)
175
-
176
- Its important to notice that all the batch api calls, will notify the results by a webhook.
177
-
178
- You can setup a webhook in your [Dashboard](https://www.eligibleapi.com/dashboard/webhooks).
179
-
180
- All the batch api calls, returns a *reference_id* value and the *number_of_items* submitted.
174
+ All the batch api calls will notify the results via webhook. You can
175
+ setup a webhook in your
176
+ [Dashboard](https://ligible.com/dashboard/webhooks). All batch api
177
+ calls return a *reference_id* value and the *number_of_items*
178
+ submitted.
181
179
 
182
180
  ### Coverage Batch API
183
181
 
@@ -288,12 +286,9 @@ result.error # return error, if any
288
286
 
289
287
  ## Enrollment
290
288
 
291
- ### Reference
292
-
293
- [https://github.com/EligibleAPI/tools/wiki/Enrollments](https://github.com/EligibleAPI/tools/wiki/Enrollments)
294
-
295
- Its important to notice than an Enrollment Request can have multiple Enrollment NPIs, and that the API has been designed
296
- in a way that you can repeat the enrollment for a NPI multiple times across different Enrollment request.
289
+ Enrollment requests can have multiple enrollment NPIs. You can repeat
290
+ the enrollment for a NPI multiple times across different enrollment
291
+ requests.
297
292
 
298
293
  ### Create an Enrollment Request
299
294
 
@@ -331,7 +326,6 @@ params = {
331
326
  result = Eligible::Enrollment.post(params)
332
327
  result.to_hash # returns the api call results
333
328
  result.error # return error, if any
334
-
335
329
  ```
336
330
 
337
331
  ### Retrieve an Enrollment Request
@@ -345,16 +339,10 @@ enrollment.enrollment_npis # quick access to the enrollment npis within the enro
345
339
 
346
340
  params = { :npis => %w(123 456 789).join(',') }
347
341
  enrollment = Eligible::Enrollment.get(params)
348
-
349
342
  ```
350
343
 
351
-
352
344
  ## Claims
353
345
 
354
- ### Reference
355
-
356
- [https://github.com/EligibleAPI/tools/wiki/Claims](https://github.com/EligibleAPI/tools/wiki/Claims)
357
-
358
346
  ### Create Claim object
359
347
 
360
348
  ```ruby
@@ -433,24 +421,24 @@ enrollment.error # return error, if any
433
421
  ### Retrieve all Claim objects/acknowledgments
434
422
 
435
423
  ```ruby
436
- claims = Eligible::Claim.all # returns acknowlegdement information for all claims that have been submitted with the API key
424
+ claims = Eligible::Claim.all # returns acknowledgment information for all claims that have been submitted with the API key
437
425
  ```
438
426
 
439
427
  ### Retrieve individual Claim object/acknowledgment
440
428
 
441
429
  ```ruby
442
- params = {
430
+ params = {
443
431
  :reference_id => "12345"
444
432
  }
445
433
 
446
- claim = Eligible::Claim.get(params) # returns acknoweldement information on an individual claim identified by its reference_id
434
+ claim = Eligible::Claim.get(params) # returns acknowledgment information on an individual claim identified by its reference_id
447
435
  ```
448
436
 
449
437
  ## Payment Status
450
438
 
451
439
  ### Reference
452
440
 
453
- [https://eligibleapi.com/rest-api-v1-1/beta/payment-status#apiPaymentStatus](https://eligibleapi.com/rest-api-v1-1/beta/payment-status#apiPaymentStatus)
441
+ [https://eligible.com/rest#payment-status](https://eligible.com/rest#payment-status)
454
442
 
455
443
  ### Retrieve Payment status
456
444
 
@@ -475,10 +463,6 @@ result.error # return error, if any
475
463
 
476
464
  ## X12
477
465
 
478
- ### Reference
479
-
480
- [https://github.com/EligibleAPI/tools/wiki/X12](https://github.com/EligibleAPI/tools/wiki/X12)
481
-
482
466
  ### X12 post
483
467
 
484
468
  ```ruby
@@ -489,16 +473,12 @@ result = Eligible::X12.post(params)
489
473
 
490
474
  ## Tickets
491
475
 
492
- ### Reference
493
-
494
- [https://github.com/EligibleAPI/tools/wiki/Tickets](https://github.com/EligibleAPI/tools/wiki/Tickets)
495
-
496
476
  ### Create a ticket
497
477
 
498
478
  ```ruby
499
479
  params = {:priority => 'normal',
500
480
  :title => 'TITLE',
501
- :notification_email => 'admin@eligibleapi.com',
481
+ :notification_email => 'admin@eligible.com',
502
482
  :body => 'Your comment'}
503
483
  result = Eligible::Ticket.create params
504
484
  result.to_hash # return the api call results
@@ -542,64 +522,22 @@ comments.to_hash # return the api call result
542
522
  comments.error # return error, if any
543
523
  ```
544
524
 
545
-
546
525
  ### Get all tickets
547
526
 
548
527
  ```ruby
549
528
  Eligible::Ticket.all
550
529
  ```
551
530
 
552
-
553
- # Tests
554
-
555
- You can run tests with
556
-
557
- ```ruby
558
- rake test
559
- ```
560
-
561
- If you do send a pull request, please add passing tests for the new feature/fix.
562
-
563
531
  ## Contributing
564
532
 
533
+ Running `rake` will run the test suite along with rubocop as a basic
534
+ style assessment. If you are going to submit a pull request, please
535
+ verify that all tests pass and there are no rubocop errors. Please add
536
+ additional tests for any features or fixes provided.
537
+
565
538
  1. Fork it
566
539
  2. Create your feature branch (`git checkout -b my-new-feature`)
567
540
  3. Commit your changes (`git commit -am 'Add some feature'`)
568
541
  4. Run tests (see above)
569
542
  5. Push to the branch (`git push origin my-new-feature`)
570
543
  6. Create new Pull Request
571
-
572
- ## Changelog
573
-
574
- #### 2.4
575
- - Refactoring Code
576
- - More test cases
577
- - Removed legacy endpoint for *plans*, *coverage* should be used instead.
578
- - Removed legacy endpoint for *services*, *coverage* should be used instead.
579
- - List of contributors and documentation updated.
580
- - Gemfile updated, dependencies updated as well.
581
- - Removed json gem in favor of multi_json
582
- - Fixed the code to let the users make x12 requests at anytime.
583
- - New endpoint for Tickets
584
-
585
- #### 2.3
586
- - New endpoint for Batch
587
-
588
- #### 2.2
589
- - New endpoint for x12 POST
590
-
591
- #### 2.1
592
- - New endpoint for payment status
593
-
594
- #### 2.0
595
-
596
- - Additional endpoints for claims, enrollments, and coverage
597
-
598
- #### 1.1
599
-
600
- - Additional endpoints for service/general and service/list
601
- - Support x12 format in params
602
-
603
- #### 1.0
604
-
605
- - Initial release
data/Rakefile CHANGED
@@ -1,4 +1,14 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler/gem_tasks'
2
2
  require 'rake/testtask'
3
+ require 'rubocop/rake_task'
4
+ require 'rspec/core/rake_task'
3
5
 
4
- Rake::TestTask.new(:test)
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ desc 'Run RuboCop on the lib directory'
9
+ RuboCop::RakeTask.new(:rubocop) do |task|
10
+ task.patterns = ['lib/**/*.rb']
11
+ task.fail_on_error = false
12
+ end
13
+
14
+ task default: [:rubocop, :spec]