Module: CoverMyMeds::Forms
Constant Summary collapse
- CURRENT_VERSION =
1
Instance Method Summary collapse
- #form_search(form, drug_id, state, version = CURRENT_VERSION) ⇒ Object
- #form_search_by_plan(plan_hash, drug_id, state, version = CURRENT_VERSION) ⇒ Object
- #get_form(form_id, version = CURRENT_VERSION) ⇒ Object
Methods included from HostAndPath
Instance Method Details
#form_search(form, drug_id, state, version = CURRENT_VERSION) ⇒ Object
7 8 9 |
# File 'lib/cover_my_meds/client/forms.rb', line 7 def form_search form, drug_id, state, version=CURRENT_VERSION search_with_args({q: form}, drug_id, state, version) end |
#form_search_by_plan(plan_hash, drug_id, state, version = CURRENT_VERSION) ⇒ Object
11 12 13 |
# File 'lib/cover_my_meds/client/forms.rb', line 11 def form_search_by_plan plan_hash, drug_id, state, version=CURRENT_VERSION search_with_args(plan_hash, drug_id, state, version) end |
#get_form(form_id, version = CURRENT_VERSION) ⇒ Object
15 16 17 18 |
# File 'lib/cover_my_meds/client/forms.rb', line 15 def get_form form_id, version = CURRENT_VERSION data = forms_request GET, params: { v: version }, path: form_id Hashie::Mash.new(data['form']) end |