Class: CandidApiClient::PayerPlanGroups::V1::V1Client
- Inherits:
-
Object
- Object
- CandidApiClient::PayerPlanGroups::V1::V1Client
- Defined in:
- lib/candidhealth/payer_plan_groups/v_1/client.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#create(request:, request_options: nil) ⇒ CandidApiClient::PayerPlanGroups::V1::Types::PayerPlanGroup
Create a payer plan group.
-
#deactivate(payer_plan_group_id:, request_options: nil) ⇒ CandidApiClient::PayerPlanGroups::V1::Types::PayerPlanGroup
Marks the payer plan group as deactivated.
-
#get(payer_plan_group_id:, request_options: nil) ⇒ CandidApiClient::PayerPlanGroups::V1::Types::PayerPlanGroup
Return a plan group with a given ID.
-
#get_multi(plan_group_name: nil, payer_uuid: nil, payer_id: nil, plan_type: nil, is_active: nil, payer_plan_group_id: nil, limit: nil, sort_by_similarity: nil, sort: nil, sort_direction: nil, page_token: nil, request_options: nil) ⇒ CandidApiClient::PayerPlanGroups::V1::Types::PayerPlanGroupPage
Returns all payer plan groups matching filter criteria.
- #initialize(request_client:) ⇒ CandidApiClient::PayerPlanGroups::V1::V1Client constructor
-
#update(payer_plan_group_id:, request:, request_options: nil) ⇒ CandidApiClient::PayerPlanGroups::V1::Types::PayerPlanGroup
Update any of the fields on a payer plan group.
Constructor Details
#initialize(request_client:) ⇒ CandidApiClient::PayerPlanGroups::V1::V1Client
21 22 23 |
# File 'lib/candidhealth/payer_plan_groups/v_1/client.rb', line 21 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::RequestClient (readonly)
17 18 19 |
# File 'lib/candidhealth/payer_plan_groups/v_1/client.rb', line 17 def request_client @request_client end |
Instance Method Details
#create(request:, request_options: nil) ⇒ CandidApiClient::PayerPlanGroups::V1::Types::PayerPlanGroup
Create a payer plan group
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/candidhealth/payer_plan_groups/v_1/client.rb', line 112 def create(request:, request_options: nil) response = @request_client.conn.post do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.body = { **(request || {}), **(&.additional_body_parameters || {}) }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/payer-plan-groups/v1" end CandidApiClient::PayerPlanGroups::V1::Types::PayerPlanGroup.from_json(json_object: response.body) end |
#deactivate(payer_plan_group_id:, request_options: nil) ⇒ CandidApiClient::PayerPlanGroups::V1::Types::PayerPlanGroup
Marks the payer plan group as deactivated
164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/candidhealth/payer_plan_groups/v_1/client.rb', line 164 def deactivate(payer_plan_group_id:, request_options: nil) response = @request_client.conn.patch do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/payer-plan-groups/v1/#{payer_plan_group_id}" end CandidApiClient::PayerPlanGroups::V1::Types::PayerPlanGroup.from_json(json_object: response.body) end |
#get(payer_plan_group_id:, request_options: nil) ⇒ CandidApiClient::PayerPlanGroups::V1::Types::PayerPlanGroup
Return a plan group with a given ID.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/candidhealth/payer_plan_groups/v_1/client.rb', line 86 def get(payer_plan_group_id:, request_options: nil) response = @request_client.conn.get do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/payer-plan-groups/v1/#{payer_plan_group_id}" end CandidApiClient::PayerPlanGroups::V1::Types::PayerPlanGroup.from_json(json_object: response.body) end |
#get_multi(plan_group_name: nil, payer_uuid: nil, payer_id: nil, plan_type: nil, is_active: nil, payer_plan_group_id: nil, limit: nil, sort_by_similarity: nil, sort: nil, sort_direction: nil, page_token: nil, request_options: nil) ⇒ CandidApiClient::PayerPlanGroups::V1::Types::PayerPlanGroupPage
Returns all payer plan groups matching filter criteria.
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 |
# File 'lib/candidhealth/payer_plan_groups/v_1/client.rb', line 48 def get_multi(plan_group_name: nil, payer_uuid: nil, payer_id: nil, plan_type: nil, is_active: nil, payer_plan_group_id: nil, limit: nil, sort_by_similarity: nil, sort: nil, sort_direction: nil, page_token: nil, request_options: nil) response = @request_client.conn.get do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.params = { **(&.additional_query_parameters || {}), "plan_group_name": plan_group_name, "payer_uuid": payer_uuid, "payer_id": payer_id, "plan_type": plan_type, "is_active": is_active, "payer_plan_group_id": payer_plan_group_id, "limit": limit, "sort_by_similarity": sort_by_similarity, "sort": sort, "sort_direction": sort_direction, "page_token": page_token }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/payer-plan-groups/v1" end CandidApiClient::PayerPlanGroups::V1::Types::PayerPlanGroupPage.from_json(json_object: response.body) end |
#update(payer_plan_group_id:, request:, request_options: nil) ⇒ CandidApiClient::PayerPlanGroups::V1::Types::PayerPlanGroup
Update any of the fields on a payer plan group
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/candidhealth/payer_plan_groups/v_1/client.rb', line 140 def update(payer_plan_group_id:, request:, request_options: nil) response = @request_client.conn.put do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.body = { **(request || {}), **(&.additional_body_parameters || {}) }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/payer-plan-groups/v1/#{payer_plan_group_id}" end CandidApiClient::PayerPlanGroups::V1::Types::PayerPlanGroup.from_json(json_object: response.body) end |