eligible 1.0 → 3.0.0.beta17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +76 -0
  3. data/.codeclimate.yml +23 -0
  4. data/.gitignore +3 -0
  5. data/.rspec +3 -0
  6. data/.rubocop.yml +1158 -0
  7. data/.ruby-version +1 -0
  8. data/CHANGELOG.md +170 -0
  9. data/Gemfile +4 -0
  10. data/Gemfile.lock +66 -0
  11. data/LICENSE +1 -1
  12. data/README.md +700 -93
  13. data/Rakefile +12 -2
  14. data/eligible.gemspec +14 -16
  15. data/lib/eligible/api_resource.rb +49 -5
  16. data/lib/eligible/calculator_deploy_url.rb +7 -0
  17. data/lib/eligible/claim.rb +22 -6
  18. data/lib/eligible/coverage.rb +19 -0
  19. data/lib/eligible/coverage_resource.rb +23 -0
  20. data/lib/eligible/customer.rb +19 -0
  21. data/lib/eligible/demographic.rb +6 -35
  22. data/lib/eligible/eligible_object.rb +12 -15
  23. data/lib/eligible/encryptor.rb +121 -0
  24. data/lib/eligible/enrollment.rb +23 -0
  25. data/lib/eligible/errors/eligible_error.rb +6 -3
  26. data/lib/eligible/errors/invalid_request_error.rb +4 -0
  27. data/lib/eligible/icd.rb +16 -0
  28. data/lib/eligible/json.rb +5 -15
  29. data/lib/eligible/lockbox.rb +39 -0
  30. data/lib/eligible/medicare.rb +11 -0
  31. data/lib/eligible/oauth_token.rb +9 -0
  32. data/lib/eligible/ocr.rb +15 -0
  33. data/lib/eligible/original_signature_pdf.rb +45 -0
  34. data/lib/eligible/payer.rb +17 -0
  35. data/lib/eligible/payer_mapping.rb +37 -0
  36. data/lib/eligible/payment.rb +11 -0
  37. data/lib/eligible/preauth_resource.rb +11 -0
  38. data/lib/eligible/precert.rb +15 -0
  39. data/lib/eligible/provider_model.rb +7 -0
  40. data/lib/eligible/public_key.rb +27 -0
  41. data/lib/eligible/received_pdf.rb +26 -0
  42. data/lib/eligible/referral.rb +11 -0
  43. data/lib/eligible/risk_assessment.rb +15 -0
  44. data/lib/eligible/session_token.rb +11 -0
  45. data/lib/eligible/ticket.rb +40 -0
  46. data/lib/eligible/util.rb +29 -38
  47. data/lib/eligible/v1_0/action.rb +9 -0
  48. data/lib/eligible/v1_0/attribute.rb +9 -0
  49. data/lib/eligible/v1_0/charge.rb +13 -0
  50. data/lib/eligible/v1_0/claim.rb +25 -0
  51. data/lib/eligible/v1_0/claim_service_line.rb +9 -0
  52. data/lib/eligible/v1_0/contract.rb +9 -0
  53. data/lib/eligible/v1_0/device.rb +9 -0
  54. data/lib/eligible/v1_0/discount.rb +9 -0
  55. data/lib/eligible/v1_0/enrollment.rb +17 -0
  56. data/lib/eligible/v1_0/estimate.rb +29 -0
  57. data/lib/eligible/v1_0/estimate_service_line.rb +17 -0
  58. data/lib/eligible/v1_0/fee.rb +21 -0
  59. data/lib/eligible/v1_0/fee_refund.rb +29 -0
  60. data/lib/eligible/v1_0/file.rb +17 -0
  61. data/lib/eligible/v1_0/file_link.rb +13 -0
  62. data/lib/eligible/v1_0/insurance_company.rb +21 -0
  63. data/lib/eligible/v1_0/insurance_company_alias.rb +9 -0
  64. data/lib/eligible/v1_0/insurance_policy.rb +9 -0
  65. data/lib/eligible/v1_0/patient_question.rb +9 -0
  66. data/lib/eligible/v1_0/patient_questionnaire.rb +9 -0
  67. data/lib/eligible/v1_0/patient_record.rb +9 -0
  68. data/lib/eligible/v1_0/patient_statement.rb +54 -0
  69. data/lib/eligible/v1_0/patient_statement_service_line.rb +13 -0
  70. data/lib/eligible/v1_0/payment_report.rb +21 -0
  71. data/lib/eligible/v1_0/product.rb +9 -0
  72. data/lib/eligible/v1_0/provider.rb +9 -0
  73. data/lib/eligible/v1_0/remark.rb +21 -0
  74. data/lib/eligible/v1_0/reports/accuracy_stats.rb +23 -0
  75. data/lib/eligible/v1_0/reports/estimate_friction.rb +23 -0
  76. data/lib/eligible/v1_0/reports/in_scope_distribution.rb +23 -0
  77. data/lib/eligible/v1_0/rest_api_base.rb +44 -0
  78. data/lib/eligible/v1_0/rule.rb +13 -0
  79. data/lib/eligible/v1_0/session.rb +21 -0
  80. data/lib/eligible/v1_0/transaction.rb +21 -0
  81. data/lib/eligible/v1_0/treatment.rb +9 -0
  82. data/lib/eligible/v1_0/value_list.rb +9 -0
  83. data/lib/eligible/v1_0/value_list_item.rb +9 -0
  84. data/lib/eligible/v1_0/verification.rb +17 -0
  85. data/lib/eligible/version.rb +1 -1
  86. data/lib/eligible/visit_type.rb +11 -0
  87. data/lib/eligible/x12.rb +8 -0
  88. data/lib/eligible.rb +320 -110
  89. metadata +148 -67
  90. data/CONTRIBUTORS +0 -1
  91. data/lib/eligible/plan.rb +0 -42
  92. data/lib/eligible/service.rb +0 -39
  93. data/test/test_eligible.rb +0 -279
  94. data/test/test_helper.rb +0 -67
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.4.3
data/CHANGELOG.md ADDED
@@ -0,0 +1,170 @@
1
+ # Changelog
2
+
3
+ ## 3.0.0.beta17 - 2020-07-13
4
+ - Added support for report API endpoints
5
+
6
+ ## 3.0.0.beta16 - 2020-07-10
7
+ - Migrated "Patient" endpoint to "PatientRecord"
8
+
9
+ ## 3.0.0.beta15 - 2020-06-12
10
+ - Added support for patient questionnaire, patient questions API endpoints
11
+
12
+ ## 3.0.0.beta14 - 2020-06-08
13
+ - Added Fee and FeeRefund new REST API endpoints
14
+
15
+ ## 3.0.0.beta13 - 2020-06-05
16
+ - Added create, update, delete and validate endpoints support for rules
17
+
18
+ ## 3.0.0.beta12 - 2020-05-12
19
+ - Updated pinned GDS SSL certificate
20
+
21
+ ## 3.0.0.beta11 - 2020-05-12
22
+ - Added summary and escalate actions for Enrollments endpoint
23
+ - Added Action endpoint
24
+ - Added Attribute endpoint
25
+ - Added Claim endpoint
26
+ - Added ClaimServiceLine endpoint
27
+ - Added Device endpoint
28
+ - Added Discount endpoint
29
+ - Renamed FileObject to File in order to kept consistency
30
+ - Added FileLink endpoint
31
+ - Added InsuranceCompanyAlias endpoint
32
+ - Added PaymentReport endpoint
33
+ - Added Remark endpoint
34
+ - Added Rule endpoint
35
+ - Added Session endpoint
36
+ - Added Transaction endpoint
37
+ - Added ValueList endpoint
38
+ - Added ValueListItem endpoint
39
+ - Added Verification endpoint
40
+ - Updated Charge endpoint to raise exception on delete action
41
+ - Updated Estimate endpoint, raise exception on update and delete actions, and added missing actions process, reestimate, convert
42
+ - Update EstimateServiceLine endpoint to raise exception on update and delete actions
43
+ - Updated InsuranceCompany endpoint to raise exception on delete action
44
+
45
+ ## 3.0.0.beta10 - 2020-05-06
46
+ - Added support for new REST API endpoints "Contract, Enrollment, Provider"
47
+ - Added support delete operations on new API.
48
+
49
+ ## 3.0.0.beta9 - 2020-05-04
50
+ - Added support for new REST API endpoints "Charge, Estimate, EstimateServiceLine, Product, Treatment"
51
+
52
+ ## 3.0.0.beta8 - 2020-04-30
53
+ - Fixed payment and payment_reports API urls for new PatientStatement endpoint
54
+
55
+ ## 3.0.0.beta7 - 2020-04-16
56
+ - Removed un-wanted parameters from the API request while making calls to new REST API endpoint
57
+
58
+ ## 3.0.0.beta6 - 2020-04-08
59
+ - Bug fix for "PatientStatement" endpoint
60
+
61
+ ## 3.0.0.beta5 - 2020-03-31
62
+ - Added support for new REST API endpoints "Insurance Company, Insurance Policy, Patient"
63
+
64
+ ## 3.0.0.beta4 - 2020-03-16
65
+ - Fixed query params conversion to support Expand feature for new REST API Endpoints
66
+ - Changed new REST API endpoints format to support `ID` field or `params`
67
+
68
+ ## 3.0.0.beta3 - 2020-03-09
69
+ - Added support for new REST API endpoint "PatientStatement" and "PatientStatementServiceLine"
70
+
71
+ ## 3.0.0.beta2 - 2020-03-03
72
+ - Added support for V1.0 REST API endpoints and added Files endpoints
73
+ - Update pinned api.eligible.com and wildcard.eligible.com certificate
74
+
75
+ ## 3.0.0.beta1 - 2019-10-01
76
+ - Added support for Eligible-Account Header in the API requests when used Eligible Connect feature
77
+
78
+ ## 2.9.9 - 2019-08-07
79
+ - Added Icd code endpoints
80
+
81
+ ## 2.9.8 - 2019-06-24
82
+ - Added an endpoint to fetch Risk Assessment
83
+
84
+ ## 2.9.7 - 2019-03-08
85
+ - Updated GDS SSL certificate
86
+
87
+ ## 2.9.6 - 2018-07-17
88
+ - Added Risk Assessment endpoints
89
+
90
+ ## 2.9.5 - 2018-07-06
91
+ - Added Mix and Match support for coverage requests
92
+
93
+ ## 2.9.4 - 2018-04-25
94
+ - Rename endpoint provider_detail to provider_model
95
+
96
+ ## 2.9.3 - 2018-04-19
97
+ - Added new endpoints visit types, provider details
98
+
99
+ ## 2.9.2 - 2018-03-26
100
+ - We can use session token or api_key for making a Eligible Call
101
+ - for session token supported endpoints
102
+
103
+ ## 2.9.0 - 2017-10-04
104
+ - Adding revoke functionality for session tokens
105
+
106
+ ## 2.8.2 - 2017-03-24
107
+ - Upgraded internal rest-client dependency to 2.0.0 and higher
108
+
109
+ ## 2.8.1 - 2017-02-23
110
+ - Upgraded internal rest-client dependency to 2.0.1
111
+ - Fixes mime-type dependency issue with newer Rails projects
112
+
113
+ ## 2.8.0 - 2017-02-23
114
+ - Added support for session tokens
115
+
116
+ ## 2.7.0 - 2016-12-14
117
+ - Changed default content type to application/json
118
+
119
+ ## 2.6.3 - 2016-11-18
120
+ - Added a new certificate fingerprint
121
+
122
+ ## 2.6.2 - 2016-08-31
123
+ - New APIs added in testing mode, no public-facing changes
124
+
125
+ ## 2.6.1 - 2016-05-10
126
+ - Suppressing ssl_verify_callback return code warning
127
+ - Added new endpoints: received_pdf, precert and referral
128
+ - Refactored the code and fixed couple of bugs
129
+ - Documentation updates for the endpoints
130
+
131
+ ## 2.6.0 - 2016-02-23
132
+ - Added new endpoints customer, original signature pdf and payer.
133
+ - Added specs
134
+ - Bumped api version to 1.5
135
+ - Fixed few bugs
136
+
137
+ ## 2.5.0 - 2016-01-07
138
+ - Added certificate pinning
139
+ - Added rubocop and fixed style/linting/metrics issues
140
+ - Migrated from outdated test-unit/mocha to current rspec for test suite
141
+
142
+ ## 2.4
143
+ - Refactoring Code
144
+ - More test cases
145
+ - Removed legacy endpoint for *plans*, *coverage* should be used instead.
146
+ - Removed legacy endpoint for *services*, *coverage* should be used instead.
147
+ - List of contributors and documentation updated.
148
+ - Gemfile updated, dependencies updated as well.
149
+ - Removed json gem in favor of multi_json
150
+ - Fixed the code to let the users make x12 requests at anytime.
151
+ - New endpoint for Tickets
152
+
153
+ ## 2.3
154
+ - New endpoint for Batch
155
+
156
+ ## 2.2
157
+ - New endpoint for x12 POST
158
+
159
+ ## 2.1
160
+ - New endpoint for payment status
161
+
162
+ ## 2.0
163
+ - Additional endpoints for claims, enrollments, and coverage
164
+
165
+ ## 1.1
166
+ - Additional endpoints for service/general and service/list
167
+ - Support x12 format in params
168
+
169
+ ## 1.0
170
+ - Initial release
data/Gemfile CHANGED
@@ -1,4 +1,8 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ # cut patch number off the version number and lock it down to the minor version
4
+ ruby_version = File.read(File.expand_path('.ruby-version', __dir__)).chomp.split('.')[0..1].join('.')
5
+ ruby "~> #{ruby_version}"
6
+
3
7
  # Specify your gem's dependencies in eligible.gemspec
4
8
  gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,66 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ eligible (3.0.0.beta17)
5
+ multi_json (~> 1.7)
6
+ rest-client (~> 2.0.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ diff-lcs (1.3)
12
+ docile (1.1.5)
13
+ domain_name (0.5.20190701)
14
+ unf (>= 0.0.5, < 1.0.0)
15
+ http-cookie (1.0.3)
16
+ domain_name (~> 0.5)
17
+ json (2.1.0)
18
+ mime-types (3.3.1)
19
+ mime-types-data (~> 3.2015)
20
+ mime-types-data (3.2020.0512)
21
+ multi_json (1.14.1)
22
+ netrc (0.11.0)
23
+ rake (12.3.0)
24
+ rest-client (2.0.2)
25
+ http-cookie (>= 1.0.2, < 2.0)
26
+ mime-types (>= 1.16, < 4.0)
27
+ netrc (~> 0.8)
28
+ rspec (3.7.0)
29
+ rspec-core (~> 3.7.0)
30
+ rspec-expectations (~> 3.7.0)
31
+ rspec-mocks (~> 3.7.0)
32
+ rspec-core (3.7.1)
33
+ rspec-support (~> 3.7.0)
34
+ rspec-expectations (3.7.0)
35
+ diff-lcs (>= 1.2.0, < 2.0)
36
+ rspec-support (~> 3.7.0)
37
+ rspec-mocks (3.7.0)
38
+ diff-lcs (>= 1.2.0, < 2.0)
39
+ rspec-support (~> 3.7.0)
40
+ rspec-support (3.7.1)
41
+ rspec_junit_formatter (0.3.0)
42
+ rspec-core (>= 2, < 4, != 2.12.0)
43
+ simplecov (0.15.1)
44
+ docile (~> 1.1.0)
45
+ json (>= 1.8, < 3)
46
+ simplecov-html (~> 0.10.0)
47
+ simplecov-html (0.10.2)
48
+ unf (0.1.4)
49
+ unf_ext
50
+ unf_ext (0.0.7.7)
51
+
52
+ PLATFORMS
53
+ ruby
54
+
55
+ DEPENDENCIES
56
+ eligible!
57
+ rake (~> 12.0)
58
+ rspec (~> 3.4)
59
+ rspec_junit_formatter (~> 0.3.0)
60
+ simplecov (~> 0.11)
61
+
62
+ RUBY VERSION
63
+ ruby 2.4.3p205
64
+
65
+ BUNDLED WITH
66
+ 1.17.3
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