Class: VericredClient::PlansApi

Inherits:
Object
  • Object
show all
Defined in:
lib/vericred_client/api/plans_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ PlansApi

Returns a new instance of PlansApi.



19
20
21
# File 'lib/vericred_client/api/plans_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/vericred_client/api/plans_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#delete_plan(hios, year, opts = {}) ⇒ nil

Delete a plan

Parameters:

  • hios

    HIOS ID

  • year

    Plan year

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


29
30
31
32
# File 'lib/vericred_client/api/plans_api.rb', line 29

def delete_plan(hios, year, opts = {})
  delete_plan_with_http_info(hios, year, opts)
  return nil
end

#delete_plan_with_http_info(hios, year, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete a plan

Parameters:

  • hios

    HIOS ID

  • year

    Plan year

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/vericred_client/api/plans_api.rb', line 40

def delete_plan_with_http_info(hios, year, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PlansApi.delete_plan ..."
  end
  # verify the required parameter 'hios' is set
  if @api_client.config.client_side_validation && hios.nil?
    fail ArgumentError, "Missing the required parameter 'hios' when calling PlansApi.delete_plan"
  end
  # verify the required parameter 'year' is set
  if @api_client.config.client_side_validation && year.nil?
    fail ArgumentError, "Missing the required parameter 'year' when calling PlansApi.delete_plan"
  end
  # resource path
  local_var_path = "/plans/{hios}/{year}".sub('{' + 'hios' + '}', hios.to_s).sub('{' + 'year' + '}', year.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Vericred-Api-Key']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlansApi#delete_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#find_plans(body, 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`. ### Drug coverages Are included along with the rest of the plan data. See [the description below](#drugcoverages) for more details.

Parameters:

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



88
89
90
91
# File 'lib/vericred_client/api/plans_api.rb', line 88

def find_plans(body, opts = {})
  data, _status_code, _headers = find_plans_with_http_info(body, opts)
  return data
end

#find_plans_with_http_info(body, opts = {}) ⇒ Array<(PlanSearchResponse, Fixnum, Hash)>

Find Plans ### Location Information Searching for a set of plans requires a &#x60;zip_code&#x60; and &#x60;fips_code&#x60; 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 &#x60;age&#x60; and can include &#x60;smoker&#x60;, 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 &#x60;GET /plans?zip_code&#x3D;07451&amp;fips_code&#x3D;33025&amp;applicants[]&#x3D;32&amp;applicants[]&#x3D;29&amp;applicants[]&#x3D;true&#x60; It would also be acceptible to include &#x60;applicants[]&#x3D;false&#x60; after the first applicant&#39;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 &#x60;12345&#x60; and &#x60;23456&#x60; you would make the following request &#x60;GET /plans?zip_code&#x3D;07451&amp;fips_code&#x3D;33025&amp;providers[]&#x3D;12345&amp;providers[]&#x3D;23456&#x60; ### 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 &#x60;YYYY-MM-DD&#x60; in the &#x60;enrollment_date&#x60; parameter. &#x60;GET /plans?zip_code&#x3D;07451&amp;fips_code&#x3D;33025&amp;enrollment_date&#x3D;2016-01-01&#x60; ### Subsidy On-marketplace plans are eligible for a subsidy based on the &#x60;household_size&#x60; and &#x60;household_income&#x60; of the applicants. If you pass those values, we will calculate the &#x60;subsidized_premium&#x60; and return it for each plan. If no values are provided, the &#x60;subsidized_premium&#x60; will be the same as the &#x60;premium&#x60; &#x60;GET /plans?zip_code&#x3D;07451&amp;fips_code&#x3D;33025&amp;household_size&#x3D;4&amp;household_income&#x3D;40000&#x60; ### Sorting Plans can be sorted by the &#x60;premium&#x60;, &#x60;carrier_name&#x60;, &#x60;level&#x60;, and &#x60;plan_type&#x60; fields, by either ascending (as &#x60;asc&#x60;) or descending (as &#x60;dsc&#x60;) sort under the &#x60;sort&#x60; field. For example, to sort plans by level, the sort parameter would be &#x60;level:asc&#x60;. ### Drug coverages Are included along with the rest of the plan data. See [the description below](#drugcoverages) for more details.

Parameters:

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(PlanSearchResponse, Fixnum, Hash)>)

    PlanSearchResponse data, response status code and response headers



98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/vericred_client/api/plans_api.rb', line 98

def find_plans_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PlansApi.find_plans ..."
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling PlansApi.find_plans"
  end
  # resource path
  local_var_path = "/plans/search"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(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

#search_rates(body, opts = {}) ⇒ ResponseRatesSearch

Show Plan Rates Search for the Age-Banded ‘Rate`s for a given `Plan` with respect to an `enrollment_date`, `zip_code`, and a `fips_code`.

Parameters:

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



139
140
141
142
# File 'lib/vericred_client/api/plans_api.rb', line 139

def search_rates(body, opts = {})
  data, _status_code, _headers = search_rates_with_http_info(body, opts)
  return data
end

#search_rates_with_http_info(body, opts = {}) ⇒ Array<(ResponseRatesSearch, Fixnum, Hash)>

Show Plan Rates Search for the Age-Banded &#x60;Rate&#x60;s for a given &#x60;Plan&#x60; with respect to an &#x60;enrollment_date&#x60;, &#x60;zip_code&#x60;, and a &#x60;fips_code&#x60;.

Parameters:

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ResponseRatesSearch, Fixnum, Hash)>)

    ResponseRatesSearch data, response status code and response headers



149
150
151
152
153
154
155
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
# File 'lib/vericred_client/api/plans_api.rb', line 149

def search_rates_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PlansApi.search_rates ..."
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling PlansApi.search_rates"
  end
  # resource path
  local_var_path = "/plans/{id}/rates"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(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 => 'ResponseRatesSearch')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PlansApi#search_rates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#show_plan(id, opts = {}) ⇒ PlanShowResponse

Show Plan Show the details of an individual Plan. This includes deductibles, maximums out of pocket, and co-pay/coinsurance for benefits (See [Benefits summary format](#header-benefits-summary-format) above.)

Parameters:

  • id

    ID of the Plan

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :year (Integer)

    Plan year (defaults to current year)

Returns:



195
196
197
198
# File 'lib/vericred_client/api/plans_api.rb', line 195

def show_plan(id, opts = {})
  data, _status_code, _headers = show_plan_with_http_info(id, opts)
  return data
end

#show_plan_with_http_info(id, 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 (See [Benefits summary format](#header-benefits-summary-format) above.)

Parameters:

  • id

    ID of the Plan

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :year (Integer)

    Plan year (defaults to current year)

Returns:

  • (Array<(PlanShowResponse, Fixnum, Hash)>)

    PlanShowResponse data, response status code and response headers



206
207
208
209
210
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
# File 'lib/vericred_client/api/plans_api.rb', line 206

def show_plan_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: PlansApi.show_plan ..."
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling PlansApi.show_plan"
  end
  # resource path
  local_var_path = "/plans/{id}".sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}
  query_params[:'year'] = opts[:'year'] if !opts[:'year'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # 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