Class: VericredClient::PlansApi
- Inherits:
-
Object
- Object
- VericredClient::PlansApi
- Defined in:
- lib/vericred_client/api/plans_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#find_plans(opts = {}) ⇒ PlanSearchResponse
Find Plans ### Location Information Searching for a set of plans requires a ‘zip_code` and `fips_code` code.
-
#find_plans_with_http_info(opts = {}) ⇒ Array<(PlanSearchResponse, Fixnum, Hash)>
Find Plans ### Location Information Searching for a set of plans requires a `zip_code` and `fips_code` code.
-
#initialize(api_client = ApiClient.default) ⇒ PlansApi
constructor
A new instance of PlansApi.
-
#show_plan(opts = {}) ⇒ PlanShowResponse
Show Plan Show the details of an individual Plan.
-
#show_plan_with_http_info(opts = {}) ⇒ Array<(PlanShowResponse, Fixnum, Hash)>
Show Plan Show the details of an individual Plan.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
135 136 137 |
# File 'lib/vericred_client/api/plans_api.rb', line 135 def api_client @api_client end |
Instance Method Details
#find_plans(opts = {}) ⇒ PlanSearchResponse
Find Plans ### Location Information Searching for a set of plans requires a ‘zip_code` and `fips_code` code. These are used to determine pricing and availabity of health plans. This endpoint is paginated. Optionally, you may provide a list of Applicants or Providers ### Applicants This is a list of people who will be covered by the plan. We use this list to calculate the premium. You must include `age` and can include `smoker`, which also factors into pricing in some states. Applicants must include an age. If smoker is omitted, its value is assumed to be false. #### Multiple Applicants To get pricing for multiple applicants, just append multiple sets of data to the URL with the age and smoking status of each applicant next to each other. For example, given two applicants - one age 32 and a non-smoker and one age 29 and a smoker, you could use the following request `GET /plans?zip_code=07451&fips_code=33025&applicants[]=32&applicants[]=29&applicants[]=true` It would also be acceptible to include `applicants[]=false` after the first applicant’s age. ### Providers We identify Providers (Doctors) by their National Practitioner Index number (NPI). If you pass a list of Providers, keyed by their NPI number, we will return a list of which Providers are in and out of network for each plan returned. For example, if we had two providers with the NPI numbers ‘12345` and `23456` you would make the following request `GET /plans?zip_code=07451&fips_code=33025&providers[]=12345&providers[]=23456` ### Enrollment Date To calculate plan pricing and availability, we default to the current date as the enrollment date. To specify a date in the future (or the past), pass a string with the format `YYYY-MM-DD` in the `enrollment_date` parameter. `GET /plans?zip_code=07451&fips_code=33025&enrollment_date=2016-01-01` ### Subsidy On-marketplace plans are eligible for a subsidy based on the `household_size` and `household_income` of the applicants. If you pass those values, we will calculate the `subsidized_premium` and return it for each plan. If no values are provided, the `subsidized_premium` will be the same as the `premium` `GET /plans?zip_code=07451&fips_code=33025&household_size=4&household_income=40000` ### Sorting Plans can be sorted by the `premium`, `carrier_name`, `level`, and `plan_type` fields, by either ascending (as `asc`) or descending (as `dsc) sort under the `sort` field. For example, to sort plans by level, the sort parameter would be `level:asc`.
146 147 148 149 |
# File 'lib/vericred_client/api/plans_api.rb', line 146 def find_plans(opts = {}) data, _status_code, _headers = find_plans_with_http_info(opts) return data end |
#find_plans_with_http_info(opts = {}) ⇒ Array<(PlanSearchResponse, Fixnum, Hash)>
Find Plans ### Location Information Searching for a set of plans requires a `zip_code` and `fips_code` code. These are used to determine pricing and availabity of health plans. This endpoint is paginated. Optionally, you may provide a list of Applicants or Providers ### Applicants This is a list of people who will be covered by the plan. We use this list to calculate the premium. You must include `age` and can include `smoker`, which also factors into pricing in some states. Applicants must include an age. If smoker is omitted, its value is assumed to be false. #### Multiple Applicants To get pricing for multiple applicants, just append multiple sets of data to the URL with the age and smoking status of each applicant next to each other. For example, given two applicants - one age 32 and a non-smoker and one age 29 and a smoker, you could use the following request `GET /plans?zip_code=07451&fips_code=33025&applicants[]=32&applicants[]=29&applicants[]=true` It would also be acceptible to include `applicants[]=false` after the first applicant's age. ### Providers We identify Providers (Doctors) by their National Practitioner Index number (NPI). If you pass a list of Providers, keyed by their NPI number, we will return a list of which Providers are in and out of network for each plan returned. For example, if we had two providers with the NPI numbers `12345` and `23456` you would make the following request `GET /plans?zip_code=07451&fips_code=33025&providers[]=12345&providers[]=23456` ### Enrollment Date To calculate plan pricing and availability, we default to the current date as the enrollment date. To specify a date in the future (or the past), pass a string with the format `YYYY-MM-DD` in the `enrollment_date` parameter. `GET /plans?zip_code=07451&fips_code=33025&enrollment_date=2016-01-01` ### Subsidy On-marketplace plans are eligible for a subsidy based on the `household_size` and `household_income` of the applicants. If you pass those values, we will calculate the `subsidized_premium` and return it for each plan. If no values are provided, the `subsidized_premium` will be the same as the `premium` `GET /plans?zip_code=07451&fips_code=33025&household_size=4&household_income=40000` ### Sorting Plans can be sorted by the `premium`, `carrier_name`, `level`, and `plan_type` fields, by either ascending (as `asc`) or descending (as `dsc) sort under the `sort` field. For example, to sort plans by level, the sort parameter would be `level:asc`.
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/vericred_client/api/plans_api.rb', line 156 def find_plans_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlansApi.find_plans ..." end # resource path local_var_path = "/plans/search".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = [] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['Vericred-Api-Key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PlanSearchResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlansApi#find_plans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#show_plan(opts = {}) ⇒ PlanShowResponse
Show Plan Show the details of an individual Plan. This includes deductibles, maximums out of pocket, and co-pay/coinsurance for benefits
201 202 203 204 |
# File 'lib/vericred_client/api/plans_api.rb', line 201 def show_plan(opts = {}) data, _status_code, _headers = show_plan_with_http_info(opts) return data end |
#show_plan_with_http_info(opts = {}) ⇒ Array<(PlanShowResponse, Fixnum, Hash)>
Show Plan Show the details of an individual Plan. This includes deductibles, maximums out of pocket, and co-pay/coinsurance for benefits
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/vericred_client/api/plans_api.rb', line 211 def show_plan_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PlansApi.show_plan ..." end # resource path local_var_path = "/plans/{id}".sub('{format}','json') # query parameters query_params = {} query_params[:'year'] = opts[:'year'] if !opts[:'year'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['Vericred-Api-Key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PlanShowResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: PlansApi#show_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |