vericred_client 0.0.18 → 0.0.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +7 -0
- data/README.md +12 -204
- data/Rakefile +8 -0
- data/docs/CarrierGroupsApi.md +3 -3
- data/docs/CarrierVerificationPlansApi.md +1 -1
- data/docs/CarriersApi.md +3 -3
- data/docs/DentalPlanBenefits.md +10 -5
- data/docs/DentalPlansApi.md +4 -4
- data/docs/DrugCoveragesApi.md +4 -4
- data/docs/DrugPackagesApi.md +2 -2
- data/docs/DrugsApi.md +2 -2
- data/docs/EmbargoesApi.md +3 -3
- data/docs/FormulariesApi.md +3 -3
- data/docs/IssuersApi.md +3 -3
- data/docs/MedicalPlanBenefits.md +54 -0
- data/docs/MedicalPlanUpdate.md +42 -0
- data/docs/MedicalPlanUpdateRequest.md +8 -0
- data/docs/MedicalPlansApi.md +59 -2
- data/docs/NetworkSizesApi.md +2 -2
- data/docs/NetworksApi.md +1 -1
- data/docs/PlansApi.md +3 -3
- data/docs/ProviderNotificationSubscriptionsApi.md +2 -2
- data/docs/ProvidersApi.md +1 -1
- data/docs/RateRequest.md +1 -0
- data/docs/RatesApi.md +3 -3
- data/docs/VisionPlansApi.md +4 -4
- data/docs/ZipCountiesApi.md +2 -2
- data/lib/vericred_client/api/carrier_groups_api.rb +17 -226
- data/lib/vericred_client/api/carrier_verification_plans_api.rb +8 -217
- data/lib/vericred_client/api/carriers_api.rb +17 -226
- data/lib/vericred_client/api/dental_plans_api.rb +23 -234
- data/lib/vericred_client/api/drug_coverages_api.rb +12 -221
- data/lib/vericred_client/api/drug_packages_api.rb +11 -218
- data/lib/vericred_client/api/drugs_api.rb +8 -217
- data/lib/vericred_client/api/embargoes_api.rb +17 -226
- data/lib/vericred_client/api/formularies_api.rb +5 -216
- data/lib/vericred_client/api/issuers_api.rb +17 -226
- data/lib/vericred_client/api/medical_plans_api.rb +72 -227
- data/lib/vericred_client/api/network_sizes_api.rb +14 -225
- data/lib/vericred_client/api/networks_api.rb +23 -234
- data/lib/vericred_client/api/plans_api.rb +27 -244
- data/lib/vericred_client/api/provider_notification_subscriptions_api.rb +12 -233
- data/lib/vericred_client/api/providers_api.rb +25 -246
- data/lib/vericred_client/api/rates_api.rb +17 -226
- data/lib/vericred_client/api/vision_plans_api.rb +23 -234
- data/lib/vericred_client/api/zip_counties_api.rb +10 -229
- data/lib/vericred_client/api_client.rb +69 -257
- data/lib/vericred_client/api_error.rb +9 -214
- data/lib/vericred_client/configuration.rb +8 -209
- data/lib/vericred_client/models/aca_plan.rb +4 -211
- data/lib/vericred_client/models/aca_plan2018.rb +4 -211
- data/lib/vericred_client/models/aca_plan2018_search_response.rb +4 -211
- data/lib/vericred_client/models/aca_plan2018_search_result.rb +4 -211
- data/lib/vericred_client/models/aca_plan2018_show_response.rb +4 -211
- data/lib/vericred_client/models/aca_plan_pre2018.rb +4 -211
- data/lib/vericred_client/models/aca_plan_pre2018_search_response.rb +4 -211
- data/lib/vericred_client/models/aca_plan_pre2018_search_result.rb +4 -211
- data/lib/vericred_client/models/aca_plan_pre2018_show_response.rb +4 -211
- data/lib/vericred_client/models/base.rb +4 -211
- data/lib/vericred_client/models/base_plan_search_response.rb +4 -211
- data/lib/vericred_client/models/carrier.rb +4 -211
- data/lib/vericred_client/models/carrier_group_request.rb +4 -211
- data/lib/vericred_client/models/carrier_request.rb +4 -211
- data/lib/vericred_client/models/carrier_subsidiary.rb +4 -211
- data/lib/vericred_client/models/county.rb +4 -211
- data/lib/vericred_client/models/county_bulk.rb +4 -211
- data/lib/vericred_client/models/dental_plan.rb +4 -211
- data/lib/vericred_client/models/dental_plan_benefits.rb +108 -265
- data/lib/vericred_client/models/dental_plan_search_applicant.rb +4 -211
- data/lib/vericred_client/models/dental_plan_search_request.rb +4 -211
- data/lib/vericred_client/models/dental_plan_search_response.rb +4 -211
- data/lib/vericred_client/models/dental_plan_show_response.rb +4 -211
- data/lib/vericred_client/models/dental_plan_update.rb +4 -211
- data/lib/vericred_client/models/dental_plan_update_request.rb +4 -211
- data/lib/vericred_client/models/drug.rb +4 -211
- data/lib/vericred_client/models/drug_coverage.rb +4 -211
- data/lib/vericred_client/models/drug_coverage_response.rb +4 -211
- data/lib/vericred_client/models/drug_package.rb +4 -211
- data/lib/vericred_client/models/drug_search_response.rb +4 -211
- data/lib/vericred_client/models/embargo_request.rb +4 -211
- data/lib/vericred_client/models/formulary.rb +4 -211
- data/lib/vericred_client/models/formulary_drug_package_response.rb +4 -211
- data/lib/vericred_client/models/formulary_response.rb +4 -211
- data/lib/vericred_client/models/issuer_request.rb +4 -211
- data/lib/vericred_client/models/medical_plan_benefits.rb +649 -0
- data/lib/vericred_client/models/medical_plan_update.rb +531 -0
- data/lib/vericred_client/models/medical_plan_update_request.rb +189 -0
- data/lib/vericred_client/models/meta.rb +4 -211
- data/lib/vericred_client/models/meta_plan_search_response.rb +4 -211
- data/lib/vericred_client/models/network.rb +4 -211
- data/lib/vericred_client/models/network_comparison.rb +4 -211
- data/lib/vericred_client/models/network_comparison_request.rb +4 -211
- data/lib/vericred_client/models/network_comparison_response.rb +4 -211
- data/lib/vericred_client/models/network_details.rb +4 -211
- data/lib/vericred_client/models/network_details_response.rb +4 -211
- data/lib/vericred_client/models/network_search_response.rb +4 -211
- data/lib/vericred_client/models/network_size.rb +4 -211
- data/lib/vericred_client/models/notification_subscription.rb +4 -211
- data/lib/vericred_client/models/notification_subscription_response.rb +4 -211
- data/lib/vericred_client/models/plan.rb +4 -211
- data/lib/vericred_client/models/plan_county.rb +4 -211
- data/lib/vericred_client/models/plan_county_bulk.rb +4 -211
- data/lib/vericred_client/models/plan_deleted.rb +4 -211
- data/lib/vericred_client/models/plan_identifier.rb +4 -211
- data/lib/vericred_client/models/plan_medicare.rb +4 -211
- data/lib/vericred_client/models/plan_medicare_bulk.rb +4 -211
- data/lib/vericred_client/models/plan_pricing_medicare.rb +4 -211
- data/lib/vericred_client/models/plan_search_response.rb +4 -211
- data/lib/vericred_client/models/plan_show_response.rb +4 -211
- data/lib/vericred_client/models/provider.rb +4 -211
- data/lib/vericred_client/models/provider_details.rb +4 -211
- data/lib/vericred_client/models/provider_geocode.rb +4 -211
- data/lib/vericred_client/models/provider_network_event_notification.rb +4 -211
- data/lib/vericred_client/models/provider_show_response.rb +4 -211
- data/lib/vericred_client/models/providers_geocode_response.rb +4 -211
- data/lib/vericred_client/models/providers_search_response.rb +4 -211
- data/lib/vericred_client/models/rate_request.rb +18 -215
- data/lib/vericred_client/models/rate_search.rb +4 -211
- data/lib/vericred_client/models/rating_area.rb +4 -211
- data/lib/vericred_client/models/request_plan_find.rb +4 -211
- data/lib/vericred_client/models/request_plan_find_applicant.rb +4 -211
- data/lib/vericred_client/models/request_plan_find_carrier_verification.rb +4 -211
- data/lib/vericred_client/models/request_plan_find_drug_package.rb +4 -211
- data/lib/vericred_client/models/request_plan_find_provider.rb +4 -211
- data/lib/vericred_client/models/request_provider_notification_subscription.rb +4 -211
- data/lib/vericred_client/models/request_providers_search.rb +4 -211
- data/lib/vericred_client/models/request_rates_search.rb +4 -211
- data/lib/vericred_client/models/response_rates_search.rb +4 -211
- data/lib/vericred_client/models/rx_cui_identifier.rb +4 -211
- data/lib/vericred_client/models/rx_cui_identifier_search_response.rb +4 -211
- data/lib/vericred_client/models/service_area.rb +4 -211
- data/lib/vericred_client/models/service_area_zip_county.rb +4 -211
- data/lib/vericred_client/models/state.rb +4 -211
- data/lib/vericred_client/models/state_network_size_request.rb +4 -211
- data/lib/vericred_client/models/state_network_size_response.rb +4 -211
- data/lib/vericred_client/models/vision_plan.rb +4 -211
- data/lib/vericred_client/models/vision_plan_benefits.rb +4 -211
- data/lib/vericred_client/models/vision_plan_search_applicant.rb +4 -211
- data/lib/vericred_client/models/vision_plan_search_request.rb +4 -211
- data/lib/vericred_client/models/vision_plan_search_response.rb +4 -211
- data/lib/vericred_client/models/vision_plan_show_response.rb +4 -211
- data/lib/vericred_client/models/vision_plan_update.rb +4 -211
- data/lib/vericred_client/models/vision_plan_update_request.rb +4 -211
- data/lib/vericred_client/models/zip_code.rb +4 -211
- data/lib/vericred_client/models/zip_counties_response.rb +4 -211
- data/lib/vericred_client/models/zip_county.rb +4 -211
- data/lib/vericred_client/models/zip_county_bulk.rb +4 -211
- data/lib/vericred_client/models/zip_county_response.rb +4 -211
- data/lib/vericred_client/version.rb +3 -210
- data/lib/vericred_client.rb +5 -209
- data/spec/api/carrier_groups_api_spec.rb +3 -210
- data/spec/api/carrier_verification_plans_api_spec.rb +3 -210
- data/spec/api/carriers_api_spec.rb +3 -210
- data/spec/api/dental_plans_api_spec.rb +3 -210
- data/spec/api/drug_coverages_api_spec.rb +3 -210
- data/spec/api/drug_packages_api_spec.rb +3 -210
- data/spec/api/drugs_api_spec.rb +3 -210
- data/spec/api/embargoes_api_spec.rb +3 -210
- data/spec/api/formularies_api_spec.rb +3 -210
- data/spec/api/issuers_api_spec.rb +3 -210
- data/spec/api/medical_plans_api_spec.rb +16 -210
- data/spec/api/network_sizes_api_spec.rb +3 -210
- data/spec/api/networks_api_spec.rb +3 -210
- data/spec/api/plans_api_spec.rb +3 -210
- data/spec/api/provider_notification_subscriptions_api_spec.rb +3 -210
- data/spec/api/providers_api_spec.rb +3 -210
- data/spec/api/rates_api_spec.rb +3 -210
- data/spec/api/vision_plans_api_spec.rb +3 -210
- data/spec/api/zip_counties_api_spec.rb +3 -210
- data/spec/api_client_spec.rb +26 -212
- data/spec/configuration_spec.rb +5 -212
- data/spec/models/aca_plan2018_search_response_spec.rb +3 -210
- data/spec/models/aca_plan2018_search_result_spec.rb +3 -210
- data/spec/models/aca_plan2018_show_response_spec.rb +3 -210
- data/spec/models/aca_plan2018_spec.rb +3 -210
- data/spec/models/aca_plan_pre2018_search_response_spec.rb +3 -210
- data/spec/models/aca_plan_pre2018_search_result_spec.rb +3 -210
- data/spec/models/aca_plan_pre2018_show_response_spec.rb +3 -210
- data/spec/models/aca_plan_pre2018_spec.rb +3 -210
- data/spec/models/aca_plan_spec.rb +3 -210
- data/spec/models/base_plan_search_response_spec.rb +3 -210
- data/spec/models/base_spec.rb +3 -210
- data/spec/models/carrier_group_request_spec.rb +3 -210
- data/spec/models/carrier_request_spec.rb +3 -210
- data/spec/models/carrier_spec.rb +3 -210
- data/spec/models/carrier_subsidiary_spec.rb +3 -210
- data/spec/models/county_bulk_spec.rb +3 -210
- data/spec/models/county_spec.rb +3 -210
- data/spec/models/dental_plan_benefits_spec.rb +52 -229
- data/spec/models/dental_plan_search_applicant_spec.rb +3 -210
- data/spec/models/dental_plan_search_request_spec.rb +3 -210
- data/spec/models/dental_plan_search_response_spec.rb +3 -210
- data/spec/models/dental_plan_show_response_spec.rb +3 -210
- data/spec/models/dental_plan_spec.rb +3 -210
- data/spec/models/dental_plan_update_request_spec.rb +3 -210
- data/spec/models/dental_plan_update_spec.rb +3 -210
- data/spec/models/drug_coverage_response_spec.rb +3 -210
- data/spec/models/drug_coverage_spec.rb +3 -210
- data/spec/models/drug_package_spec.rb +3 -210
- data/spec/models/drug_search_response_spec.rb +3 -210
- data/spec/models/drug_spec.rb +3 -210
- data/spec/models/embargo_request_spec.rb +3 -210
- data/spec/models/formulary_drug_package_response_spec.rb +3 -210
- data/spec/models/formulary_response_spec.rb +3 -210
- data/spec/models/formulary_spec.rb +3 -210
- data/spec/models/issuer_request_spec.rb +3 -210
- data/spec/models/medical_plan_benefits_spec.rb +318 -0
- data/spec/models/medical_plan_update_request_spec.rb +42 -0
- data/spec/models/medical_plan_update_spec.rb +246 -0
- data/spec/models/meta_plan_search_response_spec.rb +3 -210
- data/spec/models/meta_spec.rb +3 -210
- data/spec/models/network_comparison_request_spec.rb +3 -210
- data/spec/models/network_comparison_response_spec.rb +3 -210
- data/spec/models/network_comparison_spec.rb +3 -210
- data/spec/models/network_details_response_spec.rb +3 -210
- data/spec/models/network_details_spec.rb +3 -210
- data/spec/models/network_search_response_spec.rb +3 -210
- data/spec/models/network_size_spec.rb +3 -210
- data/spec/models/network_spec.rb +3 -210
- data/spec/models/notification_subscription_response_spec.rb +3 -210
- data/spec/models/notification_subscription_spec.rb +3 -210
- data/spec/models/plan_county_bulk_spec.rb +3 -210
- data/spec/models/plan_county_spec.rb +3 -210
- data/spec/models/plan_deleted_spec.rb +3 -210
- data/spec/models/plan_identifier_spec.rb +3 -210
- data/spec/models/plan_medicare_bulk_spec.rb +3 -210
- data/spec/models/plan_medicare_spec.rb +3 -210
- data/spec/models/plan_pricing_medicare_spec.rb +3 -210
- data/spec/models/plan_search_response_spec.rb +3 -210
- data/spec/models/plan_show_response_spec.rb +3 -210
- data/spec/models/plan_spec.rb +3 -210
- data/spec/models/provider_details_spec.rb +3 -210
- data/spec/models/provider_geocode_spec.rb +3 -210
- data/spec/models/provider_network_event_notification_spec.rb +3 -210
- data/spec/models/provider_show_response_spec.rb +3 -210
- data/spec/models/provider_spec.rb +3 -210
- data/spec/models/providers_geocode_response_spec.rb +3 -210
- data/spec/models/providers_search_response_spec.rb +3 -210
- data/spec/models/rate_request_spec.rb +9 -210
- data/spec/models/rate_search_spec.rb +3 -210
- data/spec/models/rating_area_spec.rb +3 -210
- data/spec/models/request_plan_find_applicant_spec.rb +3 -210
- data/spec/models/request_plan_find_carrier_verification_spec.rb +3 -210
- data/spec/models/request_plan_find_drug_package_spec.rb +3 -210
- data/spec/models/request_plan_find_provider_spec.rb +3 -210
- data/spec/models/request_plan_find_spec.rb +3 -210
- data/spec/models/request_provider_notification_subscription_spec.rb +3 -210
- data/spec/models/request_providers_search_spec.rb +3 -210
- data/spec/models/request_rates_search_spec.rb +3 -210
- data/spec/models/response_rates_search_spec.rb +3 -210
- data/spec/models/rx_cui_identifier_search_response_spec.rb +3 -210
- data/spec/models/rx_cui_identifier_spec.rb +3 -210
- data/spec/models/service_area_spec.rb +3 -210
- data/spec/models/service_area_zip_county_spec.rb +3 -210
- data/spec/models/state_network_size_request_spec.rb +3 -210
- data/spec/models/state_network_size_response_spec.rb +3 -210
- data/spec/models/state_spec.rb +3 -210
- data/spec/models/vision_plan_benefits_spec.rb +3 -210
- data/spec/models/vision_plan_search_applicant_spec.rb +3 -210
- data/spec/models/vision_plan_search_request_spec.rb +3 -210
- data/spec/models/vision_plan_search_response_spec.rb +3 -210
- data/spec/models/vision_plan_show_response_spec.rb +3 -210
- data/spec/models/vision_plan_spec.rb +3 -210
- data/spec/models/vision_plan_update_request_spec.rb +3 -210
- data/spec/models/vision_plan_update_spec.rb +3 -210
- data/spec/models/zip_code_spec.rb +3 -210
- data/spec/models/zip_counties_response_spec.rb +3 -210
- data/spec/models/zip_county_bulk_spec.rb +3 -210
- data/spec/models/zip_county_response_spec.rb +3 -210
- data/spec/models/zip_county_spec.rb +3 -210
- data/spec/spec_helper.rb +2 -209
- data/vericred_client.gemspec +6 -213
- metadata +126 -107
- data/LICENSE +0 -201
@@ -0,0 +1,531 @@
|
|
1
|
+
=begin
|
2
|
+
#Vericred API
|
3
|
+
|
4
|
+
#Vericred's API allows you to search for Health Plans that a specific doctor accepts. ## Getting Started Visit our [Developer Portal](https://developers.vericred.com) to create an account. Once you have created an account, you can create one Application for Production and another for our Sandbox (select the appropriate Plan when you create the Application). ## SDKs Our API follows standard REST conventions, so you can use any HTTP client to integrate with us. You will likely find it easier to use one of our [autogenerated SDKs](https://github.com/vericred/?query=vericred-), which we make available for several common programming languages. ## Authentication To authenticate, pass the API Key you created in the Developer Portal as a `Vericred-Api-Key` header. `curl -H 'Vericred-Api-Key: YOUR_KEY' \"https://api.vericred.com/providers?search_term=Foo&zip_code=11215\"` ## Versioning Vericred's API default to the latest version. However, if you need a specific version, you can request it with an `Accept-Version` header. The current version is `v3`. Previous versions are `v1` and `v2`. `curl -H 'Vericred-Api-Key: YOUR_KEY' -H 'Accept-Version: v2' \"https://api.vericred.com/providers?search_term=Foo&zip_code=11215\"` ## Pagination Endpoints that accept `page` and `per_page` parameters are paginated. They expose four additional fields that contain data about your position in the response, namely `Total`, `Per-Page`, `Link`, and `Page` as described in [RFC-5988](https://tools.ietf.org/html/rfc5988). For example, to display 5 results per page and view the second page of a `GET` to `/networks`, your final request would be `GET /networks?....page=2&per_page=5`. ## Sideloading When we return multiple levels of an object graph (e.g. `Provider`s and their `State`s we sideload the associated data. In this example, we would provide an Array of `State`s and a `state_id` for each provider. This is done primarily to reduce the payload size since many of the `Provider`s will share a `State` ``` { providers: [{ id: 1, state_id: 1}, { id: 2, state_id: 1 }], states: [{ id: 1, code: 'NY' }] } ``` If you need the second level of the object graph, you can just match the corresponding id. ## Selecting specific data All endpoints allow you to specify which fields you would like to return. This allows you to limit the response to contain only the data you need. For example, let's take a request that returns the following JSON by default ``` { provider: { id: 1, name: 'John', phone: '1234567890', field_we_dont_care_about: 'value_we_dont_care_about' }, states: [{ id: 1, name: 'New York', code: 'NY', field_we_dont_care_about: 'value_we_dont_care_about' }] } ``` To limit our results to only return the fields we care about, we specify the `select` query string parameter for the corresponding fields in the JSON document. In this case, we want to select `name` and `phone` from the `provider` key, so we would add the parameters `select=provider.name,provider.phone`. We also want the `name` and `code` from the `states` key, so we would add the parameters `select=states.name,states.code`. The id field of each document is always returned whether or not it is requested. Our final request would be `GET /providers/12345?select=provider.name,provider.phone,states.name,states.code` The response would be ``` { provider: { id: 1, name: 'John', phone: '1234567890' }, states: [{ id: 1, name: 'New York', code: 'NY' }] } ``` ## Benefits summary format Benefit cost-share strings are formatted to capture: * Network tiers * Compound or conditional cost-share * Limits on the cost-share * Benefit-specific maximum out-of-pocket costs **Example #1** As an example, we would represent [this Summary of Benefits & Coverage](https://s3.amazonaws.com/vericred-data/SBC/2017/33602TX0780032.pdf) as: * **Hospital stay facility fees**: - Network Provider: `$400 copay/admit plus 20% coinsurance` - Out-of-Network Provider: `$1,500 copay/admit plus 50% coinsurance` - Vericred's format for this benefit: `In-Network: $400 before deductible then 20% after deductible / Out-of-Network: $1,500 before deductible then 50% after deductible` * **Rehabilitation services:** - Network Provider: `20% coinsurance` - Out-of-Network Provider: `50% coinsurance` - Limitations & Exceptions: `35 visit maximum per benefit period combined with Chiropractic care.` - Vericred's format for this benefit: `In-Network: 20% after deductible / Out-of-Network: 50% after deductible | limit: 35 visit(s) per Benefit Period` **Example #2** In [this other Summary of Benefits & Coverage](https://s3.amazonaws.com/vericred-data/SBC/2017/40733CA0110568.pdf), the **specialty_drugs** cost-share has a maximum out-of-pocket for in-network pharmacies. * **Specialty drugs:** - Network Provider: `40% coinsurance up to a $500 maximum for up to a 30 day supply` - Out-of-Network Provider `Not covered` - Vericred's format for this benefit: `In-Network: 40% after deductible, up to $500 per script / Out-of-Network: 100%` **BNF** Here's a description of the benefits summary string, represented as a context-free grammar: ``` root ::= coverage coverage ::= (simple_coverage | tiered_coverage) (space pipe space coverage_modifier)? tiered_coverage ::= tier (space slash space tier)* tier ::= tier_name colon space (tier_coverage | not_applicable) tier_coverage ::= simple_coverage (space (then | or | and) space simple_coverage)* tier_limitation? simple_coverage ::= (pre_coverage_limitation space)? coverage_amount (space post_coverage_limitation)? (comma? space coverage_condition)? coverage_modifier ::= limit_condition colon space (((simple_coverage | simple_limitation) (semicolon space see_carrier_documentation)?) | see_carrier_documentation | waived_if_admitted | shared_across_tiers) waived_if_admitted ::= (\"copay\" space)? \"waived if admitted\" simple_limitation ::= pre_coverage_limitation space \"copay applies\" tier_name ::= \"In-Network-Tier-2\" | \"Out-of-Network\" | \"In-Network\" limit_condition ::= \"limit\" | \"condition\" tier_limitation ::= comma space \"up to\" space (currency | (integer space time_unit plural?)) (space post_coverage_limitation)? coverage_amount ::= currency | unlimited | included | unknown | percentage | (digits space (treatment_unit | time_unit) plural?) pre_coverage_limitation ::= first space digits space time_unit plural? post_coverage_limitation ::= (((then space currency) | \"per condition\") space)? \"per\" space (treatment_unit | (integer space time_unit) | time_unit) plural? coverage_condition ::= (\"before deductible\" | \"after deductible\" | \"penalty\" | allowance | \"in-state\" | \"out-of-state\") (space allowance)? allowance ::= upto_allowance | after_allowance upto_allowance ::= \"up to\" space (currency space)? \"allowance\" after_allowance ::= \"after\" space (currency space)? \"allowance\" see_carrier_documentation ::= \"see carrier documentation for more information\" shared_across_tiers ::= \"shared across all tiers\" unknown ::= \"unknown\" unlimited ::= /[uU]nlimited/ included ::= /[iI]ncluded in [mM]edical/ time_unit ::= /[hH]our/ | (((/[cC]alendar/ | /[cC]ontract/) space)? /[yY]ear/) | /[mM]onth/ | /[dD]ay/ | /[wW]eek/ | /[vV]isit/ | /[lL]ifetime/ | ((((/[bB]enefit/ plural?) | /[eE]ligibility/) space)? /[pP]eriod/) treatment_unit ::= /[pP]erson/ | /[gG]roup/ | /[cC]ondition/ | /[sS]cript/ | /[vV]isit/ | /[eE]xam/ | /[iI]tem/ | /[sS]tay/ | /[tT]reatment/ | /[aA]dmission/ | /[eE]pisode/ comma ::= \",\" colon ::= \":\" semicolon ::= \";\" pipe ::= \"|\" slash ::= \"/\" plural ::= \"(s)\" | \"s\" then ::= \"then\" | (\",\" space) | space or ::= \"or\" and ::= \"and\" not_applicable ::= \"Not Applicable\" | \"N/A\" | \"NA\" first ::= \"first\" currency ::= \"$\" number percentage ::= number \"%\" number ::= float | integer float ::= digits \".\" digits integer ::= /[0-9]/+ (comma_int | under_int)* comma_int ::= (\",\" /[0-9]/*3) !\"_\" under_int ::= (\"_\" /[0-9]/*3) !\",\" digits ::= /[0-9]/+ (\"_\" /[0-9]/+)* space ::= /[ \\t]/+ ```
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module VericredClient
|
16
|
+
|
17
|
+
class MedicalPlanUpdate
|
18
|
+
# The medical plan name
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# The issuer vericred id
|
22
|
+
attr_accessor :issuer_vericred_id
|
23
|
+
|
24
|
+
# The medical plan audience
|
25
|
+
attr_accessor :audience
|
26
|
+
|
27
|
+
# Category of the plan (e.g. EPO, HMO, PPO, POS, Indemnity, PACE, Medicare-Medicaid, HMO w/POS, Cost, FFS, MSA)
|
28
|
+
attr_accessor :plan_type
|
29
|
+
|
30
|
+
# Percentage of total average costs for covered benefits that a plan will cover.
|
31
|
+
attr_accessor :actuarial_value
|
32
|
+
|
33
|
+
# True if the plan allows dependents up to age 29
|
34
|
+
attr_accessor :age29_rider
|
35
|
+
|
36
|
+
# TRUE if plan data is Privileged
|
37
|
+
attr_accessor :privileged_data
|
38
|
+
|
39
|
+
# Link to the summary of benefits and coverage (SBC) document.
|
40
|
+
attr_accessor :benefits_summary_url
|
41
|
+
|
42
|
+
# Standard cost share for most benefits
|
43
|
+
attr_accessor :coinsurance
|
44
|
+
|
45
|
+
# True if plan does not cover domestic partners
|
46
|
+
attr_accessor :dp_rider
|
47
|
+
|
48
|
+
# True if plan is in a fixed family tier state
|
49
|
+
attr_accessor :family_tier
|
50
|
+
|
51
|
+
# Link to the summary of drug benefits for the plan
|
52
|
+
attr_accessor :drug_formulary_url
|
53
|
+
|
54
|
+
# Percentage of essential plan benefits
|
55
|
+
attr_accessor :essential_health_benefits_percentage
|
56
|
+
|
57
|
+
# Is the individual deductible for each covered person, embedded in the family deductible
|
58
|
+
attr_accessor :embedded_deductible
|
59
|
+
|
60
|
+
# True if plan does not cover family planning
|
61
|
+
attr_accessor :fp_rider
|
62
|
+
|
63
|
+
# Does the plan's network require a physician referral?
|
64
|
+
attr_accessor :gated
|
65
|
+
|
66
|
+
# Is the plan HSA eligible?
|
67
|
+
attr_accessor :hsa_eligible
|
68
|
+
|
69
|
+
# Plan metal grouping (e.g. platinum, gold, silver, etc)
|
70
|
+
attr_accessor :level
|
71
|
+
|
72
|
+
# Multiple of the standard Rx cost share for orders filled via mail order
|
73
|
+
attr_accessor :mail_order_rx
|
74
|
+
|
75
|
+
# Are deductibles and MOOPs reset on Dec-31 (\"calendar year\"), 365 days after enrollment date (\"plan year\"), or are both options available (\"both\")?
|
76
|
+
attr_accessor :plan_calendar
|
77
|
+
|
78
|
+
# Market in which the plan is offered (on_marketplace, shop, etc)
|
79
|
+
attr_accessor :plan_market
|
80
|
+
|
81
|
+
# Market for plan
|
82
|
+
attr_accessor :market
|
83
|
+
|
84
|
+
# Indicates whether the plan has meaningful descriptions for these benefits: individual_medical_deductible, family_medical_deductible, individual_medical_moop, family_medical_moop, primary_care_physician.
|
85
|
+
attr_accessor :key_benefits_complete
|
86
|
+
|
87
|
+
# Link to a location to purchase the plan.
|
88
|
+
attr_accessor :buy_link
|
89
|
+
|
90
|
+
# Does the plan cover full-time, year-round, nursing facilities?
|
91
|
+
attr_accessor :skilled_nursing_facility_365
|
92
|
+
|
93
|
+
# allowed ages on the plan, possible values: allows adult-only, allows child-only, allows adult and child-only, child29, requires adult
|
94
|
+
attr_accessor :covered_ages
|
95
|
+
|
96
|
+
# Plan year
|
97
|
+
attr_accessor :year
|
98
|
+
|
99
|
+
# State code
|
100
|
+
attr_accessor :state_code
|
101
|
+
|
102
|
+
# Source of the plan benefit data
|
103
|
+
attr_accessor :source
|
104
|
+
|
105
|
+
# Name of the SBC
|
106
|
+
attr_accessor :sbc_name
|
107
|
+
|
108
|
+
# Indicates whether this plan is being actively marketed by the carrier.
|
109
|
+
attr_accessor :actively_marketed
|
110
|
+
|
111
|
+
# Plan private exchange
|
112
|
+
attr_accessor :private_exchange
|
113
|
+
|
114
|
+
# Medical Plan External Identifiers
|
115
|
+
attr_accessor :external_ids
|
116
|
+
|
117
|
+
# Medical Plan External Identifier
|
118
|
+
attr_accessor :external_id
|
119
|
+
|
120
|
+
# Medical Plan Benefits
|
121
|
+
attr_accessor :benefits
|
122
|
+
|
123
|
+
|
124
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
125
|
+
def self.attribute_map
|
126
|
+
{
|
127
|
+
:'name' => :'name',
|
128
|
+
:'issuer_vericred_id' => :'issuer_vericred_id',
|
129
|
+
:'audience' => :'audience',
|
130
|
+
:'plan_type' => :'plan_type',
|
131
|
+
:'actuarial_value' => :'actuarial_value',
|
132
|
+
:'age29_rider' => :'age29_rider',
|
133
|
+
:'privileged_data' => :'privileged_data',
|
134
|
+
:'benefits_summary_url' => :'benefits_summary_url',
|
135
|
+
:'coinsurance' => :'coinsurance',
|
136
|
+
:'dp_rider' => :'dp_rider',
|
137
|
+
:'family_tier' => :'family_tier',
|
138
|
+
:'drug_formulary_url' => :'drug_formulary_url',
|
139
|
+
:'essential_health_benefits_percentage' => :'essential_health_benefits_percentage',
|
140
|
+
:'embedded_deductible' => :'embedded_deductible',
|
141
|
+
:'fp_rider' => :'fp_rider',
|
142
|
+
:'gated' => :'gated',
|
143
|
+
:'hsa_eligible' => :'hsa_eligible',
|
144
|
+
:'level' => :'level',
|
145
|
+
:'mail_order_rx' => :'mail_order_rx',
|
146
|
+
:'plan_calendar' => :'plan_calendar',
|
147
|
+
:'plan_market' => :'plan_market',
|
148
|
+
:'market' => :'market',
|
149
|
+
:'key_benefits_complete' => :'key_benefits_complete',
|
150
|
+
:'buy_link' => :'buy_link',
|
151
|
+
:'skilled_nursing_facility_365' => :'skilled_nursing_facility_365',
|
152
|
+
:'covered_ages' => :'covered_ages',
|
153
|
+
:'year' => :'year',
|
154
|
+
:'state_code' => :'state_code',
|
155
|
+
:'source' => :'source',
|
156
|
+
:'sbc_name' => :'sbc_name',
|
157
|
+
:'actively_marketed' => :'actively_marketed',
|
158
|
+
:'private_exchange' => :'private_exchange',
|
159
|
+
:'external_ids' => :'external_ids',
|
160
|
+
:'external_id' => :'external_id',
|
161
|
+
:'benefits' => :'benefits'
|
162
|
+
}
|
163
|
+
end
|
164
|
+
|
165
|
+
# Attribute type mapping.
|
166
|
+
def self.swagger_types
|
167
|
+
{
|
168
|
+
:'name' => :'String',
|
169
|
+
:'issuer_vericred_id' => :'String',
|
170
|
+
:'audience' => :'String',
|
171
|
+
:'plan_type' => :'String',
|
172
|
+
:'actuarial_value' => :'Float',
|
173
|
+
:'age29_rider' => :'BOOLEAN',
|
174
|
+
:'privileged_data' => :'BOOLEAN',
|
175
|
+
:'benefits_summary_url' => :'String',
|
176
|
+
:'coinsurance' => :'Float',
|
177
|
+
:'dp_rider' => :'BOOLEAN',
|
178
|
+
:'family_tier' => :'BOOLEAN',
|
179
|
+
:'drug_formulary_url' => :'String',
|
180
|
+
:'essential_health_benefits_percentage' => :'Float',
|
181
|
+
:'embedded_deductible' => :'String',
|
182
|
+
:'fp_rider' => :'BOOLEAN',
|
183
|
+
:'gated' => :'BOOLEAN',
|
184
|
+
:'hsa_eligible' => :'BOOLEAN',
|
185
|
+
:'level' => :'String',
|
186
|
+
:'mail_order_rx' => :'Float',
|
187
|
+
:'plan_calendar' => :'String',
|
188
|
+
:'plan_market' => :'String',
|
189
|
+
:'market' => :'String',
|
190
|
+
:'key_benefits_complete' => :'BOOLEAN',
|
191
|
+
:'buy_link' => :'String',
|
192
|
+
:'skilled_nursing_facility_365' => :'String',
|
193
|
+
:'covered_ages' => :'String',
|
194
|
+
:'year' => :'Integer',
|
195
|
+
:'state_code' => :'String',
|
196
|
+
:'source' => :'String',
|
197
|
+
:'sbc_name' => :'String',
|
198
|
+
:'actively_marketed' => :'String',
|
199
|
+
:'private_exchange' => :'String',
|
200
|
+
:'external_ids' => :'Array<PlanIdentifier>',
|
201
|
+
:'external_id' => :'String',
|
202
|
+
:'benefits' => :'MedicalPlanBenefits'
|
203
|
+
}
|
204
|
+
end
|
205
|
+
|
206
|
+
# Initializes the object
|
207
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
208
|
+
def initialize(attributes = {})
|
209
|
+
return unless attributes.is_a?(Hash)
|
210
|
+
|
211
|
+
# convert string to symbol for hash key
|
212
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
213
|
+
|
214
|
+
if attributes.has_key?(:'name')
|
215
|
+
self.name = attributes[:'name']
|
216
|
+
end
|
217
|
+
|
218
|
+
if attributes.has_key?(:'issuer_vericred_id')
|
219
|
+
self.issuer_vericred_id = attributes[:'issuer_vericred_id']
|
220
|
+
end
|
221
|
+
|
222
|
+
if attributes.has_key?(:'audience')
|
223
|
+
self.audience = attributes[:'audience']
|
224
|
+
end
|
225
|
+
|
226
|
+
if attributes.has_key?(:'plan_type')
|
227
|
+
self.plan_type = attributes[:'plan_type']
|
228
|
+
end
|
229
|
+
|
230
|
+
if attributes.has_key?(:'actuarial_value')
|
231
|
+
self.actuarial_value = attributes[:'actuarial_value']
|
232
|
+
end
|
233
|
+
|
234
|
+
if attributes.has_key?(:'age29_rider')
|
235
|
+
self.age29_rider = attributes[:'age29_rider']
|
236
|
+
end
|
237
|
+
|
238
|
+
if attributes.has_key?(:'privileged_data')
|
239
|
+
self.privileged_data = attributes[:'privileged_data']
|
240
|
+
end
|
241
|
+
|
242
|
+
if attributes.has_key?(:'benefits_summary_url')
|
243
|
+
self.benefits_summary_url = attributes[:'benefits_summary_url']
|
244
|
+
end
|
245
|
+
|
246
|
+
if attributes.has_key?(:'coinsurance')
|
247
|
+
self.coinsurance = attributes[:'coinsurance']
|
248
|
+
end
|
249
|
+
|
250
|
+
if attributes.has_key?(:'dp_rider')
|
251
|
+
self.dp_rider = attributes[:'dp_rider']
|
252
|
+
end
|
253
|
+
|
254
|
+
if attributes.has_key?(:'family_tier')
|
255
|
+
self.family_tier = attributes[:'family_tier']
|
256
|
+
end
|
257
|
+
|
258
|
+
if attributes.has_key?(:'drug_formulary_url')
|
259
|
+
self.drug_formulary_url = attributes[:'drug_formulary_url']
|
260
|
+
end
|
261
|
+
|
262
|
+
if attributes.has_key?(:'essential_health_benefits_percentage')
|
263
|
+
self.essential_health_benefits_percentage = attributes[:'essential_health_benefits_percentage']
|
264
|
+
end
|
265
|
+
|
266
|
+
if attributes.has_key?(:'embedded_deductible')
|
267
|
+
self.embedded_deductible = attributes[:'embedded_deductible']
|
268
|
+
end
|
269
|
+
|
270
|
+
if attributes.has_key?(:'fp_rider')
|
271
|
+
self.fp_rider = attributes[:'fp_rider']
|
272
|
+
end
|
273
|
+
|
274
|
+
if attributes.has_key?(:'gated')
|
275
|
+
self.gated = attributes[:'gated']
|
276
|
+
end
|
277
|
+
|
278
|
+
if attributes.has_key?(:'hsa_eligible')
|
279
|
+
self.hsa_eligible = attributes[:'hsa_eligible']
|
280
|
+
end
|
281
|
+
|
282
|
+
if attributes.has_key?(:'level')
|
283
|
+
self.level = attributes[:'level']
|
284
|
+
end
|
285
|
+
|
286
|
+
if attributes.has_key?(:'mail_order_rx')
|
287
|
+
self.mail_order_rx = attributes[:'mail_order_rx']
|
288
|
+
end
|
289
|
+
|
290
|
+
if attributes.has_key?(:'plan_calendar')
|
291
|
+
self.plan_calendar = attributes[:'plan_calendar']
|
292
|
+
end
|
293
|
+
|
294
|
+
if attributes.has_key?(:'plan_market')
|
295
|
+
self.plan_market = attributes[:'plan_market']
|
296
|
+
end
|
297
|
+
|
298
|
+
if attributes.has_key?(:'market')
|
299
|
+
self.market = attributes[:'market']
|
300
|
+
end
|
301
|
+
|
302
|
+
if attributes.has_key?(:'key_benefits_complete')
|
303
|
+
self.key_benefits_complete = attributes[:'key_benefits_complete']
|
304
|
+
end
|
305
|
+
|
306
|
+
if attributes.has_key?(:'buy_link')
|
307
|
+
self.buy_link = attributes[:'buy_link']
|
308
|
+
end
|
309
|
+
|
310
|
+
if attributes.has_key?(:'skilled_nursing_facility_365')
|
311
|
+
self.skilled_nursing_facility_365 = attributes[:'skilled_nursing_facility_365']
|
312
|
+
end
|
313
|
+
|
314
|
+
if attributes.has_key?(:'covered_ages')
|
315
|
+
self.covered_ages = attributes[:'covered_ages']
|
316
|
+
end
|
317
|
+
|
318
|
+
if attributes.has_key?(:'year')
|
319
|
+
self.year = attributes[:'year']
|
320
|
+
end
|
321
|
+
|
322
|
+
if attributes.has_key?(:'state_code')
|
323
|
+
self.state_code = attributes[:'state_code']
|
324
|
+
end
|
325
|
+
|
326
|
+
if attributes.has_key?(:'source')
|
327
|
+
self.source = attributes[:'source']
|
328
|
+
end
|
329
|
+
|
330
|
+
if attributes.has_key?(:'sbc_name')
|
331
|
+
self.sbc_name = attributes[:'sbc_name']
|
332
|
+
end
|
333
|
+
|
334
|
+
if attributes.has_key?(:'actively_marketed')
|
335
|
+
self.actively_marketed = attributes[:'actively_marketed']
|
336
|
+
end
|
337
|
+
|
338
|
+
if attributes.has_key?(:'private_exchange')
|
339
|
+
self.private_exchange = attributes[:'private_exchange']
|
340
|
+
end
|
341
|
+
|
342
|
+
if attributes.has_key?(:'external_ids')
|
343
|
+
if (value = attributes[:'external_ids']).is_a?(Array)
|
344
|
+
self.external_ids = value
|
345
|
+
end
|
346
|
+
end
|
347
|
+
|
348
|
+
if attributes.has_key?(:'external_id')
|
349
|
+
self.external_id = attributes[:'external_id']
|
350
|
+
end
|
351
|
+
|
352
|
+
if attributes.has_key?(:'benefits')
|
353
|
+
self.benefits = attributes[:'benefits']
|
354
|
+
end
|
355
|
+
|
356
|
+
end
|
357
|
+
|
358
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
359
|
+
# @return Array for valid properties with the reasons
|
360
|
+
def list_invalid_properties
|
361
|
+
invalid_properties = Array.new
|
362
|
+
return invalid_properties
|
363
|
+
end
|
364
|
+
|
365
|
+
# Check to see if the all the properties in the model are valid
|
366
|
+
# @return true if the model is valid
|
367
|
+
def valid?
|
368
|
+
return true
|
369
|
+
end
|
370
|
+
|
371
|
+
# Checks equality by comparing each attribute.
|
372
|
+
# @param [Object] Object to be compared
|
373
|
+
def ==(o)
|
374
|
+
return true if self.equal?(o)
|
375
|
+
self.class == o.class &&
|
376
|
+
name == o.name &&
|
377
|
+
issuer_vericred_id == o.issuer_vericred_id &&
|
378
|
+
audience == o.audience &&
|
379
|
+
plan_type == o.plan_type &&
|
380
|
+
actuarial_value == o.actuarial_value &&
|
381
|
+
age29_rider == o.age29_rider &&
|
382
|
+
privileged_data == o.privileged_data &&
|
383
|
+
benefits_summary_url == o.benefits_summary_url &&
|
384
|
+
coinsurance == o.coinsurance &&
|
385
|
+
dp_rider == o.dp_rider &&
|
386
|
+
family_tier == o.family_tier &&
|
387
|
+
drug_formulary_url == o.drug_formulary_url &&
|
388
|
+
essential_health_benefits_percentage == o.essential_health_benefits_percentage &&
|
389
|
+
embedded_deductible == o.embedded_deductible &&
|
390
|
+
fp_rider == o.fp_rider &&
|
391
|
+
gated == o.gated &&
|
392
|
+
hsa_eligible == o.hsa_eligible &&
|
393
|
+
level == o.level &&
|
394
|
+
mail_order_rx == o.mail_order_rx &&
|
395
|
+
plan_calendar == o.plan_calendar &&
|
396
|
+
plan_market == o.plan_market &&
|
397
|
+
market == o.market &&
|
398
|
+
key_benefits_complete == o.key_benefits_complete &&
|
399
|
+
buy_link == o.buy_link &&
|
400
|
+
skilled_nursing_facility_365 == o.skilled_nursing_facility_365 &&
|
401
|
+
covered_ages == o.covered_ages &&
|
402
|
+
year == o.year &&
|
403
|
+
state_code == o.state_code &&
|
404
|
+
source == o.source &&
|
405
|
+
sbc_name == o.sbc_name &&
|
406
|
+
actively_marketed == o.actively_marketed &&
|
407
|
+
private_exchange == o.private_exchange &&
|
408
|
+
external_ids == o.external_ids &&
|
409
|
+
external_id == o.external_id &&
|
410
|
+
benefits == o.benefits
|
411
|
+
end
|
412
|
+
|
413
|
+
# @see the `==` method
|
414
|
+
# @param [Object] Object to be compared
|
415
|
+
def eql?(o)
|
416
|
+
self == o
|
417
|
+
end
|
418
|
+
|
419
|
+
# Calculates hash code according to all attributes.
|
420
|
+
# @return [Fixnum] Hash code
|
421
|
+
def hash
|
422
|
+
[name, issuer_vericred_id, audience, plan_type, actuarial_value, age29_rider, privileged_data, benefits_summary_url, coinsurance, dp_rider, family_tier, drug_formulary_url, essential_health_benefits_percentage, embedded_deductible, fp_rider, gated, hsa_eligible, level, mail_order_rx, plan_calendar, plan_market, market, key_benefits_complete, buy_link, skilled_nursing_facility_365, covered_ages, year, state_code, source, sbc_name, actively_marketed, private_exchange, external_ids, external_id, benefits].hash
|
423
|
+
end
|
424
|
+
|
425
|
+
# Builds the object from hash
|
426
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
427
|
+
# @return [Object] Returns the model itself
|
428
|
+
def build_from_hash(attributes)
|
429
|
+
return nil unless attributes.is_a?(Hash)
|
430
|
+
self.class.swagger_types.each_pair do |key, type|
|
431
|
+
if type =~ /\AArray<(.*)>/i
|
432
|
+
# check to ensure the input is an array given that the the attribute
|
433
|
+
# is documented as an array but the input is not
|
434
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
435
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
436
|
+
end
|
437
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
438
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
439
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
440
|
+
end
|
441
|
+
|
442
|
+
self
|
443
|
+
end
|
444
|
+
|
445
|
+
# Deserializes the data based on type
|
446
|
+
# @param string type Data type
|
447
|
+
# @param string value Value to be deserialized
|
448
|
+
# @return [Object] Deserialized data
|
449
|
+
def _deserialize(type, value)
|
450
|
+
case type.to_sym
|
451
|
+
when :DateTime
|
452
|
+
DateTime.parse(value)
|
453
|
+
when :Date
|
454
|
+
Date.parse(value)
|
455
|
+
when :String
|
456
|
+
value.to_s
|
457
|
+
when :Integer
|
458
|
+
value.to_i
|
459
|
+
when :Float
|
460
|
+
value.to_f
|
461
|
+
when :BOOLEAN
|
462
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
463
|
+
true
|
464
|
+
else
|
465
|
+
false
|
466
|
+
end
|
467
|
+
when :Object
|
468
|
+
# generic object (usually a Hash), return directly
|
469
|
+
value
|
470
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
471
|
+
inner_type = Regexp.last_match[:inner_type]
|
472
|
+
value.map { |v| _deserialize(inner_type, v) }
|
473
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
474
|
+
k_type = Regexp.last_match[:k_type]
|
475
|
+
v_type = Regexp.last_match[:v_type]
|
476
|
+
{}.tap do |hash|
|
477
|
+
value.each do |k, v|
|
478
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
479
|
+
end
|
480
|
+
end
|
481
|
+
else # model
|
482
|
+
temp_model = VericredClient.const_get(type).new
|
483
|
+
temp_model.build_from_hash(value)
|
484
|
+
end
|
485
|
+
end
|
486
|
+
|
487
|
+
# Returns the string representation of the object
|
488
|
+
# @return [String] String presentation of the object
|
489
|
+
def to_s
|
490
|
+
to_hash.to_s
|
491
|
+
end
|
492
|
+
|
493
|
+
# to_body is an alias to to_hash (backward compatibility)
|
494
|
+
# @return [Hash] Returns the object in the form of hash
|
495
|
+
def to_body
|
496
|
+
to_hash
|
497
|
+
end
|
498
|
+
|
499
|
+
# Returns the object in the form of hash
|
500
|
+
# @return [Hash] Returns the object in the form of hash
|
501
|
+
def to_hash
|
502
|
+
hash = {}
|
503
|
+
self.class.attribute_map.each_pair do |attr, param|
|
504
|
+
value = self.send(attr)
|
505
|
+
next if value.nil?
|
506
|
+
hash[param] = _to_hash(value)
|
507
|
+
end
|
508
|
+
hash
|
509
|
+
end
|
510
|
+
|
511
|
+
# Outputs non-array value in the form of hash
|
512
|
+
# For object, use to_hash. Otherwise, just return the value
|
513
|
+
# @param [Object] value Any valid value
|
514
|
+
# @return [Hash] Returns the value in the form of hash
|
515
|
+
def _to_hash(value)
|
516
|
+
if value.is_a?(Array)
|
517
|
+
value.compact.map{ |v| _to_hash(v) }
|
518
|
+
elsif value.is_a?(Hash)
|
519
|
+
{}.tap do |hash|
|
520
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
521
|
+
end
|
522
|
+
elsif value.respond_to? :to_hash
|
523
|
+
value.to_hash
|
524
|
+
else
|
525
|
+
value
|
526
|
+
end
|
527
|
+
end
|
528
|
+
|
529
|
+
end
|
530
|
+
|
531
|
+
end
|