From 1c485a3a7834c4478c65035cebeb683a59eb5735 Mon Sep 17 00:00:00 2001 From: Alex Kibler Date: Tue, 3 Feb 2026 13:37:20 -0700 Subject: [PATCH 1/6] 4902: Add search route and requisite VCR testing --- Gemfile.lock | 2 +- README.md | 43 +++++++++++ lib/data_nexus/resources/programs.rb | 76 +++++++++++++++++++ .../program_members/search_employee_id.yml | 52 +++++++++++++ .../cassettes/program_members/search_name.yml | 44 +++++++++++ spec/integration/program_members_spec.rb | 55 ++++++++++++++ 6 files changed, 271 insertions(+), 1 deletion(-) create mode 100644 spec/cassettes/program_members/search_employee_id.yml create mode 100644 spec/cassettes/program_members/search_name.yml diff --git a/Gemfile.lock b/Gemfile.lock index 524077c..f0a5006 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - data_nexus (0.1.0) + data_nexus (0.2.0) faraday (~> 2.0) faraday-retry (~> 2.0) diff --git a/README.md b/README.md index 33ab8f0..cdaff87 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,49 @@ collection.data.each do |member| end ``` +### Search Members + +Search for members within a program. Returns a bounded result set (max 10 results) with a `more_results` flag indicating if additional matches exist. + +Valid parameter combinations: +- `born_on` + `employee_id` +- `born_on` + `first_name` + `last_name` +- `born_on` + `first_name` + `last_name` + `employee_id` +- `born_on` + `first_name_prefix` + `last_name_prefix` +- `born_on` + `first_name_prefix` + `last_name_prefix` + `employee_id` + +```ruby +# Search by employee ID and DOB +result = client.programs('program-id').search_members( + born_on: '1980-01-15', + employee_id: 'EMP123' +) + +result[:data].each do |member| + puts "#{member[:first_name]} #{member[:last_name]}" +end + +puts "More results available" if result[:more_results] + +# Search by name and DOB +result = client.programs('program-id').search_members( + born_on: '1980-01-15', + first_name: 'George', + last_name: 'Washington' +) + +# Search by name prefix and DOB +result = client.programs('program-id').search_members( + born_on: '1980-01-15', + first_name_prefix: 'G', + last_name_prefix: 'Was' +) +``` + +Note: Unlike `list`, `search_members` does not support pagination. It returns up to 10 results with a `more_results` boolean. An `ArgumentError` will be raised if an invalid parameter combination is provided. + +Note: Depending on your API key, `search_members` may be the only method you have access to. Contact your DataNexus representative for more information about your API key's permissions. + ### Pagination ```ruby diff --git a/lib/data_nexus/resources/programs.rb b/lib/data_nexus/resources/programs.rb index 995f19b..98230a5 100644 --- a/lib/data_nexus/resources/programs.rb +++ b/lib/data_nexus/resources/programs.rb @@ -19,7 +19,18 @@ module Resources # client.programs("program-uuid").members("member-id").consents.create(...) # client.programs("program-uuid").members("member-id").enrollments.create(...) # + # @example Search for members + # client.programs("program-uuid").search_members(born_on: "1976-07-04", employee_id: "ABC123") + # class Programs + VALID_SEARCH_COMBINATIONS = [ + %i[born_on first_name last_name employee_id], + %i[born_on first_name last_name], + %i[born_on first_name_prefix last_name_prefix employee_id], + %i[born_on first_name_prefix last_name_prefix], + %i[born_on employee_id] + ].freeze + # @return [Connection] The HTTP connection attr_reader :connection @@ -65,6 +76,71 @@ def members(member_id = nil) ProgramMembers.new(connection, program_id) end end + + # Search for members within this program + # + # Returns a bounded result set (max 10 results). Use `more_results` to + # determine if additional matches exist beyond what was returned. + # + # Valid parameter combinations: + # - born_on, first_name, last_name, employee_id + # - born_on, first_name, last_name + # - born_on, first_name_prefix, last_name_prefix, employee_id + # - born_on, first_name_prefix, last_name_prefix + # - born_on, employee_id + # + # @param born_on [String] Date of birth (YYYY-MM-DD) - required for all searches + # @param first_name [String, nil] Exact first name match + # @param first_name_prefix [String, nil] First name prefix (min 1 char) + # @param last_name [String, nil] Exact last name match + # @param last_name_prefix [String, nil] Last name prefix (min 3 chars) + # @param employee_id [String, nil] Employee ID + # + # @return [Hash] Response with :data (Array) and :more_results (Boolean) + # + # @raise [ArgumentError] If params don't match a valid search combination + # + # @example Search by name and DOB + # client.programs("uuid").search_members( + # born_on: "1976-07-04", + # first_name: "george", + # last_name: "washington" + # ) + # + # @example Search by prefix and DOB + # client.programs("uuid").search_members( + # born_on: "1976-07-04", + # first_name_prefix: "g", + # last_name_prefix: "was" + # ) + # + # @example Search by employee ID and DOB + # client.programs("uuid").search_members( + # born_on: "1976-07-04", + # employee_id: "ABC1234" + # ) + def search_members(**params) + validate_search_params!(params) + + connection.post("/api/programs/#{program_id}/members/search", params) + end + + private + + def validate_search_params!(params) + provided_keys = params.keys.sort + + return if VALID_SEARCH_COMBINATIONS.any? { |combo| combo.sort == provided_keys } + + raise ArgumentError, invalid_search_params_message(provided_keys) + end + + def invalid_search_params_message(provided_keys) + valid_combos = VALID_SEARCH_COMBINATIONS.map { |c| c.join(', ') }.join("\n - ") + + "Invalid search parameter combination: #{provided_keys.join(', ')}. " \ + "Valid combinations are:\n - #{valid_combos}" + end end end end diff --git a/spec/cassettes/program_members/search_employee_id.yml b/spec/cassettes/program_members/search_employee_id.yml new file mode 100644 index 0000000..508adb0 --- /dev/null +++ b/spec/cassettes/program_members/search_employee_id.yml @@ -0,0 +1,52 @@ +--- +http_interactions: +- request: + method: post + uri: https://localhost:4000/api/programs//members/search + body: + encoding: UTF-8 + string: '{"born_on":"","employee_id":""}' + headers: + Authorization: + - apikey + Content-Type: + - application/json + Accept: + - application/json + User-Agent: + - data-nexus-ruby/0..0 + Accept-Encoding: + - gzip;q=.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Content-Length: + - '5240' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 03 Feb 2026 20:25:56 GMT + Server: + - Cowboy + X-Request-Id: + - GJDWXuXNyi0xC48AAB5B + body: + encoding: UTF-8 + string: '{"data":[{"id":"","state":"CO","email":"test2@emsanacare.com","option_id":null,"gender":"female","enrollments":[{"id":2,"expires_at":"2025-0-0T00:00:00Z","enrolled_at":"2024-0-0T00:00:00.000000Z","enrollment_events":[],"program_id":"","member_id":""}],"consents":[{"id":5,"category":"sms","consent_details":{"sms_phone_number":"+5558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":6,"category":"sms","consent_details":{"sms_phone_number":"+5558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":7,"category":"sms","consent_details":{"sms_phone_number":"+5558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":,"category":"sms","consent_details":{},"member_response":true,"consented_at":"2025-0-08T20:8:08Z","program_id":"","member_id":""},{"id":4,"category":"hipaa","consent_details":{},"member_response":true,"consented_at":"2025-0-08T20:8:0Z","program_id":"","member_id":""}],"first_name":"Betty + Jo","middle_name":"","last_name":"Brown","born_on":"","street_address_":"40 + Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":"+555234567","eligibility_start_on":"2024-0-0","eligibility_end_on":null,"sponsor_member_identifier":"87878787","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You + Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test2@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"87878787","parent_sponsor_member_identifier":"87878787","relationship_type":"PP","insurance_identifiers":[]},{"id":"0mw7m","state":"CO","email":"test2@emsanacare.com","option_id":null,"gender":"female","enrollments":[],"consents":[],"first_name":"Olivia","middle_name":"","last_name":"O''Bannon","born_on":"","street_address_":"40 + Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":null,"eligibility_start_on":"2024-0-0","eligibility_end_on":null,"sponsor_member_identifier":"78787874","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You + Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test2@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"78787874","parent_sponsor_member_identifier":"78787874","relationship_type":"PP","insurance_identifiers":[]},{"id":"jmjXE","state":"CO","email":"test2@emsanacare.com","option_id":null,"gender":"female","enrollments":[],"consents":[],"first_name":"Xavier","middle_name":"","last_name":"Xanadu","born_on":"","street_address_":"40 + Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":null,"eligibility_start_on":"2024-0-0","eligibility_end_on":null,"sponsor_member_identifier":"578787874","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You + Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test2@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"578787874","parent_sponsor_member_identifier":"578787874","relationship_type":"PP","insurance_identifiers":[]},{"id":"2rZd3","state":"CO","email":"test2@emsanacare.com","option_id":null,"gender":"female","enrollments":[],"consents":[],"first_name":"Grace","middle_name":"","last_name":"Gammon","born_on":"","street_address_":"40 + Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":null,"eligibility_start_on":"2024-0-0","eligibility_end_on":null,"sponsor_member_identifier":"278787874","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You + Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test2@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"278787874","parent_sponsor_member_identifier":"278787874","relationship_type":"PP","insurance_identifiers":[]},{"id":"3WvME","state":"CO","email":"test2@emsanacare.com","option_id":null,"gender":"female","enrollments":[],"consents":[],"first_name":"Percy","middle_name":"","last_name":"Price","born_on":"","street_address_":"40 + Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":null,"eligibility_start_on":"2024-0-0","eligibility_end_on":null,"sponsor_member_identifier":"378787874","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You + Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test2@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"378787874","parent_sponsor_member_identifier":"378787874","relationship_type":"PP","insurance_identifiers":[]}],"more_results":false}' + recorded_at: Tue, 03 Feb 2026 20:25:57 GMT +recorded_with: VCR 6.4.0 diff --git a/spec/cassettes/program_members/search_name.yml b/spec/cassettes/program_members/search_name.yml new file mode 100644 index 0000000..327cc66 --- /dev/null +++ b/spec/cassettes/program_members/search_name.yml @@ -0,0 +1,44 @@ +--- +http_interactions: +- request: + method: post + uri: https://localhost:4000/api/programs//members/search + body: + encoding: UTF-8 + string: '{"born_on":"","first_name":"Betty Jo","last_name":"Brown"}' + headers: + Authorization: + - apikey + Content-Type: + - application/json + Accept: + - application/json + User-Agent: + - data-nexus-ruby/0..0 + Accept-Encoding: + - gzip;q=.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Content-Length: + - "985" + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 03 Feb 2026 20:28:07 GMT + Server: + - Cowboy + X-Request-Id: + - GJDWfXBUP9LelLsAAB-h + body: + encoding: UTF-8 + string: '{"data":[{"id":"","state":"CO","email":"test2@emsanacare.com","option_id":null,"gender":"female","enrollments":[{"id":2,"expires_at":"2025-0-0T00:00:00Z","enrolled_at":"2024-0-0T00:00:00.000000Z","enrollment_events":[],"program_id":"","member_id":""}],"consents":[{"id":5,"category":"sms","consent_details":{"sms_phone_number":"+5558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":6,"category":"sms","consent_details":{"sms_phone_number":"+5558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":7,"category":"sms","consent_details":{"sms_phone_number":"+5558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":,"category":"sms","consent_details":{},"member_response":true,"consented_at":"2025-0-08T20:8:08Z","program_id":"","member_id":""},{"id":4,"category":"hipaa","consent_details":{},"member_response":true,"consented_at":"2025-0-08T20:8:0Z","program_id":"","member_id":""}],"first_name":"Betty + Jo","middle_name":"","last_name":"Brown","born_on":"","street_address_":"40 + Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":"+555234567","eligibility_start_on":"2024-0-0","eligibility_end_on":null,"sponsor_member_identifier":"87878787","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You + Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test2@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"87878787","parent_sponsor_member_identifier":"87878787","relationship_type":"PP","insurance_identifiers":[]}],"more_results":false}' + recorded_at: Tue, 03 Feb 2026 20:28:08 GMT +recorded_with: VCR 6.4.0 diff --git a/spec/integration/program_members_spec.rb b/spec/integration/program_members_spec.rb index 36eeab5..d479b3a 100644 --- a/spec/integration/program_members_spec.rb +++ b/spec/integration/program_members_spec.rb @@ -75,4 +75,59 @@ expect(household).to be_an(Array) end end + + describe 'searching members' do + let(:test_first_name) { ENV.fetch('DATANEXUS_TEST_FIRST_NAME', 'Test') } + let(:test_last_name) { ENV.fetch('DATANEXUS_TEST_LAST_NAME', 'User') } + + it 'returns members matching employee_id and DOB', vcr: { cassette_name: 'program_members/search_employee_id' } do + result = client.programs(program_id).search_members( + born_on: test_born_on, + employee_id: test_employee_id + ) + + expect(result).to be_a(Hash) + expect(result[:data]).to be_an(Array) + expect(result).to have_key(:more_results) + end + + it 'returns members matching name and DOB', vcr: { cassette_name: 'program_members/search_name' } do + result = client.programs(program_id).search_members( + born_on: test_born_on, + first_name: test_first_name, + last_name: test_last_name + ) + + expect(result).to be_a(Hash) + expect(result[:data]).to be_an(Array) + expect(result).to have_key(:more_results) + end + + it 'raises ArgumentError for invalid parameter combinations' do + expect { + client.programs(program_id).search_members( + born_on: test_born_on, + first_name: test_first_name + ) + }.to raise_error(ArgumentError, /Invalid search parameter combination/) + end + + it 'raises ArgumentError when mixing prefix and exact name params' do + expect { + client.programs(program_id).search_members( + born_on: test_born_on, + first_name: test_first_name, + last_name_prefix: 'Was' + ) + }.to raise_error(ArgumentError, /Invalid search parameter combination/) + end + + it 'raises ArgumentError when born_on is missing' do + expect { + client.programs(program_id).search_members( + employee_id: test_employee_id + ) + }.to raise_error(ArgumentError, /Invalid search parameter combination/) + end + end end From 31e23a6afcf00e0e771b3efe3614154a14a2ae8c Mon Sep 17 00:00:00 2001 From: Alex Kibler Date: Tue, 3 Feb 2026 13:38:38 -0700 Subject: [PATCH 2/6] 4902: Fix gemfile.lock --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index f0a5006..524077c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - data_nexus (0.2.0) + data_nexus (0.1.0) faraday (~> 2.0) faraday-retry (~> 2.0) From 0975f1daa2d9537441e25c9a270dff1f9b81411d Mon Sep 17 00:00:00 2001 From: Alex Kibler Date: Tue, 3 Feb 2026 13:40:10 -0700 Subject: [PATCH 3/6] 4902: Add spec for prefix search --- .../program_members/search_prefix.yml | 44 +++++++++++++++++++ spec/integration/program_members_spec.rb | 12 +++++ 2 files changed, 56 insertions(+) create mode 100644 spec/cassettes/program_members/search_prefix.yml diff --git a/spec/cassettes/program_members/search_prefix.yml b/spec/cassettes/program_members/search_prefix.yml new file mode 100644 index 0000000..1d16caa --- /dev/null +++ b/spec/cassettes/program_members/search_prefix.yml @@ -0,0 +1,44 @@ +--- +http_interactions: +- request: + method: post + uri: https://localhost:4000/api/programs//members/search + body: + encoding: UTF-8 + string: '{"born_on":"","first_name_prefix":"Bet","last_name_prefix":"Bro"}' + headers: + Authorization: + - apikey + Content-Type: + - application/json + Accept: + - application/json + User-Agent: + - data-nexus-ruby/0..0 + Accept-Encoding: + - gzip;q=.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Content-Length: + - "985" + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 03 Feb 2026 20:39:49 GMT + Server: + - Cowboy + X-Request-Id: + - GJDXIP32-I8236UAAAMh + body: + encoding: UTF-8 + string: '{"data":[{"id":"","state":"CO","email":"test2@emsanacare.com","option_id":null,"gender":"female","enrollments":[{"id":2,"expires_at":"2025-0-0T00:00:00Z","enrolled_at":"2024-0-0T00:00:00.000000Z","enrollment_events":[],"program_id":"","member_id":""}],"consents":[{"id":5,"category":"sms","consent_details":{"sms_phone_number":"+5558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":6,"category":"sms","consent_details":{"sms_phone_number":"+5558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":7,"category":"sms","consent_details":{"sms_phone_number":"+5558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":,"category":"sms","consent_details":{},"member_response":true,"consented_at":"2025-0-08T20:8:08Z","program_id":"","member_id":""},{"id":4,"category":"hipaa","consent_details":{},"member_response":true,"consented_at":"2025-0-08T20:8:0Z","program_id":"","member_id":""}],"first_name":"Betty + Jo","middle_name":"","last_name":"Brown","born_on":"","street_address_":"40 + Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":"+555234567","eligibility_start_on":"2024-0-0","eligibility_end_on":null,"sponsor_member_identifier":"87878787","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You + Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test2@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"87878787","parent_sponsor_member_identifier":"87878787","relationship_type":"PP","insurance_identifiers":[]}],"more_results":false}' + recorded_at: Tue, 03 Feb 2026 20:39:50 GMT +recorded_with: VCR 6.4.0 diff --git a/spec/integration/program_members_spec.rb b/spec/integration/program_members_spec.rb index d479b3a..b3ae9e7 100644 --- a/spec/integration/program_members_spec.rb +++ b/spec/integration/program_members_spec.rb @@ -103,6 +103,18 @@ expect(result).to have_key(:more_results) end + it 'returns members matching name prefix and DOB', vcr: { cassette_name: 'program_members/search_prefix' } do + result = client.programs(program_id).search_members( + born_on: test_born_on, + first_name_prefix: test_first_name[0, 3], + last_name_prefix: test_last_name[0, 3] + ) + + expect(result).to be_a(Hash) + expect(result[:data]).to be_an(Array) + expect(result).to have_key(:more_results) + end + it 'raises ArgumentError for invalid parameter combinations' do expect { client.programs(program_id).search_members( From 977d2fcb119c312f1979119c57140f2e7b290c45 Mon Sep 17 00:00:00 2001 From: Alex Kibler Date: Tue, 3 Feb 2026 13:44:14 -0700 Subject: [PATCH 4/6] 4902: Spec fix --- spec/integration/program_members_spec.rb | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/spec/integration/program_members_spec.rb b/spec/integration/program_members_spec.rb index b3ae9e7..5a73912 100644 --- a/spec/integration/program_members_spec.rb +++ b/spec/integration/program_members_spec.rb @@ -77,9 +77,6 @@ end describe 'searching members' do - let(:test_first_name) { ENV.fetch('DATANEXUS_TEST_FIRST_NAME', 'Test') } - let(:test_last_name) { ENV.fetch('DATANEXUS_TEST_LAST_NAME', 'User') } - it 'returns members matching employee_id and DOB', vcr: { cassette_name: 'program_members/search_employee_id' } do result = client.programs(program_id).search_members( born_on: test_born_on, @@ -94,8 +91,8 @@ it 'returns members matching name and DOB', vcr: { cassette_name: 'program_members/search_name' } do result = client.programs(program_id).search_members( born_on: test_born_on, - first_name: test_first_name, - last_name: test_last_name + first_name: 'Betty Jo', + last_name: 'Brown' ) expect(result).to be_a(Hash) @@ -106,8 +103,8 @@ it 'returns members matching name prefix and DOB', vcr: { cassette_name: 'program_members/search_prefix' } do result = client.programs(program_id).search_members( born_on: test_born_on, - first_name_prefix: test_first_name[0, 3], - last_name_prefix: test_last_name[0, 3] + first_name_prefix: 'Bet', + last_name_prefix: 'Bro' ) expect(result).to be_a(Hash) @@ -119,7 +116,7 @@ expect { client.programs(program_id).search_members( born_on: test_born_on, - first_name: test_first_name + first_name: 'George' ) }.to raise_error(ArgumentError, /Invalid search parameter combination/) end @@ -128,7 +125,7 @@ expect { client.programs(program_id).search_members( born_on: test_born_on, - first_name: test_first_name, + first_name: 'George', last_name_prefix: 'Was' ) }.to raise_error(ArgumentError, /Invalid search parameter combination/) From bbdf5d07cb3c11bd6619b42b62ae1f6fe0abdce6 Mon Sep 17 00:00:00 2001 From: Alex Kibler Date: Tue, 3 Feb 2026 13:44:53 -0700 Subject: [PATCH 5/6] 4902: Rubocop --- spec/integration/program_members_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/integration/program_members_spec.rb b/spec/integration/program_members_spec.rb index 5a73912..7d34e34 100644 --- a/spec/integration/program_members_spec.rb +++ b/spec/integration/program_members_spec.rb @@ -113,30 +113,30 @@ end it 'raises ArgumentError for invalid parameter combinations' do - expect { + expect do client.programs(program_id).search_members( born_on: test_born_on, first_name: 'George' ) - }.to raise_error(ArgumentError, /Invalid search parameter combination/) + end.to raise_error(ArgumentError, /Invalid search parameter combination/) end it 'raises ArgumentError when mixing prefix and exact name params' do - expect { + expect do client.programs(program_id).search_members( born_on: test_born_on, first_name: 'George', last_name_prefix: 'Was' ) - }.to raise_error(ArgumentError, /Invalid search parameter combination/) + end.to raise_error(ArgumentError, /Invalid search parameter combination/) end it 'raises ArgumentError when born_on is missing' do - expect { + expect do client.programs(program_id).search_members( employee_id: test_employee_id ) - }.to raise_error(ArgumentError, /Invalid search parameter combination/) + end.to raise_error(ArgumentError, /Invalid search parameter combination/) end end end From 0f0dbd14266c985d4e2a7d87cbab5f6ecc6aed04 Mon Sep 17 00:00:00 2001 From: Alex Kibler Date: Tue, 3 Feb 2026 13:55:58 -0700 Subject: [PATCH 6/6] 4902: Fix cassettes --- .../program_members/search_employee_id.yml | 99 ++++++++++--------- .../cassettes/program_members/search_name.yml | 83 ++++++++-------- .../program_members/search_prefix.yml | 83 ++++++++-------- spec/support/vcr.rb | 3 +- 4 files changed, 136 insertions(+), 132 deletions(-) diff --git a/spec/cassettes/program_members/search_employee_id.yml b/spec/cassettes/program_members/search_employee_id.yml index 508adb0..911f5b5 100644 --- a/spec/cassettes/program_members/search_employee_id.yml +++ b/spec/cassettes/program_members/search_employee_id.yml @@ -1,52 +1,53 @@ --- http_interactions: -- request: - method: post - uri: https://localhost:4000/api/programs//members/search - body: - encoding: UTF-8 - string: '{"born_on":"","employee_id":""}' - headers: - Authorization: - - apikey - Content-Type: - - application/json - Accept: - - application/json - User-Agent: - - data-nexus-ruby/0..0 - Accept-Encoding: - - gzip;q=.0,deflate;q=0.6,identity;q=0.3 - response: - status: - code: 200 - message: OK - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Content-Length: - - '5240' - Content-Type: - - application/json; charset=utf-8 - Date: - - Tue, 03 Feb 2026 20:25:56 GMT - Server: - - Cowboy - X-Request-Id: - - GJDWXuXNyi0xC48AAB5B - body: - encoding: UTF-8 - string: '{"data":[{"id":"","state":"CO","email":"test2@emsanacare.com","option_id":null,"gender":"female","enrollments":[{"id":2,"expires_at":"2025-0-0T00:00:00Z","enrolled_at":"2024-0-0T00:00:00.000000Z","enrollment_events":[],"program_id":"","member_id":""}],"consents":[{"id":5,"category":"sms","consent_details":{"sms_phone_number":"+5558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":6,"category":"sms","consent_details":{"sms_phone_number":"+5558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":7,"category":"sms","consent_details":{"sms_phone_number":"+5558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":,"category":"sms","consent_details":{},"member_response":true,"consented_at":"2025-0-08T20:8:08Z","program_id":"","member_id":""},{"id":4,"category":"hipaa","consent_details":{},"member_response":true,"consented_at":"2025-0-08T20:8:0Z","program_id":"","member_id":""}],"first_name":"Betty - Jo","middle_name":"","last_name":"Brown","born_on":"","street_address_":"40 - Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":"+555234567","eligibility_start_on":"2024-0-0","eligibility_end_on":null,"sponsor_member_identifier":"87878787","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You - Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test2@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"87878787","parent_sponsor_member_identifier":"87878787","relationship_type":"PP","insurance_identifiers":[]},{"id":"0mw7m","state":"CO","email":"test2@emsanacare.com","option_id":null,"gender":"female","enrollments":[],"consents":[],"first_name":"Olivia","middle_name":"","last_name":"O''Bannon","born_on":"","street_address_":"40 - Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":null,"eligibility_start_on":"2024-0-0","eligibility_end_on":null,"sponsor_member_identifier":"78787874","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You - Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test2@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"78787874","parent_sponsor_member_identifier":"78787874","relationship_type":"PP","insurance_identifiers":[]},{"id":"jmjXE","state":"CO","email":"test2@emsanacare.com","option_id":null,"gender":"female","enrollments":[],"consents":[],"first_name":"Xavier","middle_name":"","last_name":"Xanadu","born_on":"","street_address_":"40 - Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":null,"eligibility_start_on":"2024-0-0","eligibility_end_on":null,"sponsor_member_identifier":"578787874","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You - Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test2@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"578787874","parent_sponsor_member_identifier":"578787874","relationship_type":"PP","insurance_identifiers":[]},{"id":"2rZd3","state":"CO","email":"test2@emsanacare.com","option_id":null,"gender":"female","enrollments":[],"consents":[],"first_name":"Grace","middle_name":"","last_name":"Gammon","born_on":"","street_address_":"40 - Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":null,"eligibility_start_on":"2024-0-0","eligibility_end_on":null,"sponsor_member_identifier":"278787874","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You - Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test2@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"278787874","parent_sponsor_member_identifier":"278787874","relationship_type":"PP","insurance_identifiers":[]},{"id":"3WvME","state":"CO","email":"test2@emsanacare.com","option_id":null,"gender":"female","enrollments":[],"consents":[],"first_name":"Percy","middle_name":"","last_name":"Price","born_on":"","street_address_":"40 - Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":null,"eligibility_start_on":"2024-0-0","eligibility_end_on":null,"sponsor_member_identifier":"378787874","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You - Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test2@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"378787874","parent_sponsor_member_identifier":"378787874","relationship_type":"PP","insurance_identifiers":[]}],"more_results":false}' - recorded_at: Tue, 03 Feb 2026 20:25:57 GMT + - request: + method: post + uri: https://localhost:4000/api/programs//members/search + body: + encoding: UTF-8 + string: '{"born_on":"","employee_id":""}' + headers: + Authorization: + - apikey + Content-Type: + - application/json + Accept: + - application/json + User-Agent: + - data-nexus-ruby/0.1.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Content-Length: + - "5240" + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 03 Feb 2026 20:50:32 GMT + Server: + - Cowboy + X-Request-Id: + - GJDXtohbavv3IpEAABpi + body: + encoding: UTF-8 + string: + '{"data":[{"id":"","state":"CO","email":"test21@emsanacare.com","option_id":null,"gender":"female","enrollments":[{"id":2,"expires_at":"2025-01-01T00:00:00Z","enrolled_at":"2024-01-01T00:00:00.000000Z","enrollment_events":[],"program_id":"","member_id":""}],"consents":[{"id":5,"category":"sms","consent_details":{"sms_phone_number":"+15558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":6,"category":"sms","consent_details":{"sms_phone_number":"+15558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":7,"category":"sms","consent_details":{"sms_phone_number":"+15558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":1,"category":"sms","consent_details":{},"member_response":true,"consented_at":"2025-10-08T20:18:08Z","program_id":"","member_id":""},{"id":4,"category":"hipaa","consent_details":{},"member_response":true,"consented_at":"2025-10-08T20:18:10Z","program_id":"","member_id":""}],"first_name":"Betty + Jo","middle_name":"","last_name":"Brown","born_on":"","street_address_1":"401 + Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":"+15551234567","eligibility_start_on":"2024-01-01","eligibility_end_on":null,"sponsor_member_identifier":"878787871","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You + Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test21@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"878787871","parent_sponsor_member_identifier":"878787871","relationship_type":"PP","insurance_identifiers":[]},{"id":"0mw7m","state":"CO","email":"test21@emsanacare.com","option_id":null,"gender":"female","enrollments":[],"consents":[],"first_name":"Olivia","middle_name":"","last_name":"O''Bannon","born_on":"","street_address_1":"401 + Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":null,"eligibility_start_on":"2024-01-01","eligibility_end_on":null,"sponsor_member_identifier":"178787874","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You + Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test21@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"178787874","parent_sponsor_member_identifier":"178787874","relationship_type":"PP","insurance_identifiers":[]},{"id":"jmjXE","state":"CO","email":"test21@emsanacare.com","option_id":null,"gender":"female","enrollments":[],"consents":[],"first_name":"Xavier","middle_name":"","last_name":"Xanadu","born_on":"","street_address_1":"401 + Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":null,"eligibility_start_on":"2024-01-01","eligibility_end_on":null,"sponsor_member_identifier":"578787874","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You + Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test21@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"578787874","parent_sponsor_member_identifier":"578787874","relationship_type":"PP","insurance_identifiers":[]},{"id":"2rZd3","state":"CO","email":"test21@emsanacare.com","option_id":null,"gender":"female","enrollments":[],"consents":[],"first_name":"Grace","middle_name":"","last_name":"Gammon","born_on":"","street_address_1":"401 + Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":null,"eligibility_start_on":"2024-01-01","eligibility_end_on":null,"sponsor_member_identifier":"278787874","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You + Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test21@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"278787874","parent_sponsor_member_identifier":"278787874","relationship_type":"PP","insurance_identifiers":[]},{"id":"3WvME","state":"CO","email":"test21@emsanacare.com","option_id":null,"gender":"female","enrollments":[],"consents":[],"first_name":"Percy","middle_name":"","last_name":"Price","born_on":"","street_address_1":"401 + Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":null,"eligibility_start_on":"2024-01-01","eligibility_end_on":null,"sponsor_member_identifier":"378787874","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You + Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test21@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"378787874","parent_sponsor_member_identifier":"378787874","relationship_type":"PP","insurance_identifiers":[]}],"more_results":false}' + recorded_at: Tue, 03 Feb 2026 20:50:32 GMT recorded_with: VCR 6.4.0 diff --git a/spec/cassettes/program_members/search_name.yml b/spec/cassettes/program_members/search_name.yml index 327cc66..70c4b39 100644 --- a/spec/cassettes/program_members/search_name.yml +++ b/spec/cassettes/program_members/search_name.yml @@ -1,44 +1,45 @@ --- http_interactions: -- request: - method: post - uri: https://localhost:4000/api/programs//members/search - body: - encoding: UTF-8 - string: '{"born_on":"","first_name":"Betty Jo","last_name":"Brown"}' - headers: - Authorization: - - apikey - Content-Type: - - application/json - Accept: - - application/json - User-Agent: - - data-nexus-ruby/0..0 - Accept-Encoding: - - gzip;q=.0,deflate;q=0.6,identity;q=0.3 - response: - status: - code: 200 - message: OK - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Content-Length: - - "985" - Content-Type: - - application/json; charset=utf-8 - Date: - - Tue, 03 Feb 2026 20:28:07 GMT - Server: - - Cowboy - X-Request-Id: - - GJDWfXBUP9LelLsAAB-h - body: - encoding: UTF-8 - string: '{"data":[{"id":"","state":"CO","email":"test2@emsanacare.com","option_id":null,"gender":"female","enrollments":[{"id":2,"expires_at":"2025-0-0T00:00:00Z","enrolled_at":"2024-0-0T00:00:00.000000Z","enrollment_events":[],"program_id":"","member_id":""}],"consents":[{"id":5,"category":"sms","consent_details":{"sms_phone_number":"+5558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":6,"category":"sms","consent_details":{"sms_phone_number":"+5558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":7,"category":"sms","consent_details":{"sms_phone_number":"+5558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":,"category":"sms","consent_details":{},"member_response":true,"consented_at":"2025-0-08T20:8:08Z","program_id":"","member_id":""},{"id":4,"category":"hipaa","consent_details":{},"member_response":true,"consented_at":"2025-0-08T20:8:0Z","program_id":"","member_id":""}],"first_name":"Betty - Jo","middle_name":"","last_name":"Brown","born_on":"","street_address_":"40 - Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":"+555234567","eligibility_start_on":"2024-0-0","eligibility_end_on":null,"sponsor_member_identifier":"87878787","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You - Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test2@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"87878787","parent_sponsor_member_identifier":"87878787","relationship_type":"PP","insurance_identifiers":[]}],"more_results":false}' - recorded_at: Tue, 03 Feb 2026 20:28:08 GMT + - request: + method: post + uri: https://localhost:4000/api/programs//members/search + body: + encoding: UTF-8 + string: '{"born_on":"","first_name":"Betty Jo","last_name":"Brown"}' + headers: + Authorization: + - apikey + Content-Type: + - application/json + Accept: + - application/json + User-Agent: + - data-nexus-ruby/0.1.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Content-Length: + - "1985" + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 03 Feb 2026 20:50:32 GMT + Server: + - Cowboy + X-Request-Id: + - GJDXtpug-B8qhTQAABsC + body: + encoding: UTF-8 + string: + '{"data":[{"id":"","state":"CO","email":"test21@emsanacare.com","option_id":null,"gender":"female","enrollments":[{"id":2,"expires_at":"2025-01-01T00:00:00Z","enrolled_at":"2024-01-01T00:00:00.000000Z","enrollment_events":[],"program_id":"","member_id":""}],"consents":[{"id":5,"category":"sms","consent_details":{"sms_phone_number":"+15558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":6,"category":"sms","consent_details":{"sms_phone_number":"+15558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":7,"category":"sms","consent_details":{"sms_phone_number":"+15558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":1,"category":"sms","consent_details":{},"member_response":true,"consented_at":"2025-10-08T20:18:08Z","program_id":"","member_id":""},{"id":4,"category":"hipaa","consent_details":{},"member_response":true,"consented_at":"2025-10-08T20:18:10Z","program_id":"","member_id":""}],"first_name":"Betty + Jo","middle_name":"","last_name":"Brown","born_on":"","street_address_1":"401 + Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":"+15551234567","eligibility_start_on":"2024-01-01","eligibility_end_on":null,"sponsor_member_identifier":"878787871","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You + Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test21@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"878787871","parent_sponsor_member_identifier":"878787871","relationship_type":"PP","insurance_identifiers":[]}],"more_results":false}' + recorded_at: Tue, 03 Feb 2026 20:50:33 GMT recorded_with: VCR 6.4.0 diff --git a/spec/cassettes/program_members/search_prefix.yml b/spec/cassettes/program_members/search_prefix.yml index 1d16caa..8f9c940 100644 --- a/spec/cassettes/program_members/search_prefix.yml +++ b/spec/cassettes/program_members/search_prefix.yml @@ -1,44 +1,45 @@ --- http_interactions: -- request: - method: post - uri: https://localhost:4000/api/programs//members/search - body: - encoding: UTF-8 - string: '{"born_on":"","first_name_prefix":"Bet","last_name_prefix":"Bro"}' - headers: - Authorization: - - apikey - Content-Type: - - application/json - Accept: - - application/json - User-Agent: - - data-nexus-ruby/0..0 - Accept-Encoding: - - gzip;q=.0,deflate;q=0.6,identity;q=0.3 - response: - status: - code: 200 - message: OK - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Content-Length: - - "985" - Content-Type: - - application/json; charset=utf-8 - Date: - - Tue, 03 Feb 2026 20:39:49 GMT - Server: - - Cowboy - X-Request-Id: - - GJDXIP32-I8236UAAAMh - body: - encoding: UTF-8 - string: '{"data":[{"id":"","state":"CO","email":"test2@emsanacare.com","option_id":null,"gender":"female","enrollments":[{"id":2,"expires_at":"2025-0-0T00:00:00Z","enrolled_at":"2024-0-0T00:00:00.000000Z","enrollment_events":[],"program_id":"","member_id":""}],"consents":[{"id":5,"category":"sms","consent_details":{"sms_phone_number":"+5558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":6,"category":"sms","consent_details":{"sms_phone_number":"+5558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":7,"category":"sms","consent_details":{"sms_phone_number":"+5558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":,"category":"sms","consent_details":{},"member_response":true,"consented_at":"2025-0-08T20:8:08Z","program_id":"","member_id":""},{"id":4,"category":"hipaa","consent_details":{},"member_response":true,"consented_at":"2025-0-08T20:8:0Z","program_id":"","member_id":""}],"first_name":"Betty - Jo","middle_name":"","last_name":"Brown","born_on":"","street_address_":"40 - Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":"+555234567","eligibility_start_on":"2024-0-0","eligibility_end_on":null,"sponsor_member_identifier":"87878787","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You - Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test2@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"87878787","parent_sponsor_member_identifier":"87878787","relationship_type":"PP","insurance_identifiers":[]}],"more_results":false}' - recorded_at: Tue, 03 Feb 2026 20:39:50 GMT + - request: + method: post + uri: https://localhost:4000/api/programs//members/search + body: + encoding: UTF-8 + string: '{"born_on":"","first_name_prefix":"Bet","last_name_prefix":"Bro"}' + headers: + Authorization: + - apikey + Content-Type: + - application/json + Accept: + - application/json + User-Agent: + - data-nexus-ruby/0.1.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Content-Length: + - "1985" + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 03 Feb 2026 20:50:32 GMT + Server: + - Cowboy + X-Request-Id: + - GJDXtq77PBWLg0UAABsi + body: + encoding: UTF-8 + string: + '{"data":[{"id":"","state":"CO","email":"test21@emsanacare.com","option_id":null,"gender":"female","enrollments":[{"id":2,"expires_at":"2025-01-01T00:00:00Z","enrolled_at":"2024-01-01T00:00:00.000000Z","enrollment_events":[],"program_id":"","member_id":""}],"consents":[{"id":5,"category":"sms","consent_details":{"sms_phone_number":"+15558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":6,"category":"sms","consent_details":{"sms_phone_number":"+15558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":7,"category":"sms","consent_details":{"sms_phone_number":"+15558675309"},"member_response":true,"consented_at":null,"program_id":"","member_id":""},{"id":1,"category":"sms","consent_details":{},"member_response":true,"consented_at":"2025-10-08T20:18:08Z","program_id":"","member_id":""},{"id":4,"category":"hipaa","consent_details":{},"member_response":true,"consented_at":"2025-10-08T20:18:10Z","program_id":"","member_id":""}],"first_name":"Betty + Jo","middle_name":"","last_name":"Brown","born_on":"","street_address_1":"401 + Shady Holw","street_address_2":null,"city":"Nederland","postal_code":"80466","phone_number":"+15551234567","eligibility_start_on":"2024-01-01","eligibility_end_on":null,"sponsor_member_identifier":"878787871","soda_sponsor_id":null,"employee_id":"","health_plan_coverage_tier":"You + Only","health_plan_description":"Aetna, Inc.","emails":[{"type":"personal","value":"test21@emsanacare.com"},{"type":"primary_member","value":null}],"work_email":null,"health_plan_identifier":"878787871","parent_sponsor_member_identifier":"878787871","relationship_type":"PP","insurance_identifiers":[]}],"more_results":false}' + recorded_at: Tue, 03 Feb 2026 20:50:33 GMT recorded_with: VCR 6.4.0 diff --git a/spec/support/vcr.rb b/spec/support/vcr.rb index f183392..bcfdaa4 100644 --- a/spec/support/vcr.rb +++ b/spec/support/vcr.rb @@ -20,6 +20,7 @@ # Match requests on method and path only (ignore query params for flexibility) config.default_cassette_options = { record: :once, - match_requests_on: %i[method path] + match_requests_on: %i[method path], + allow_playback_repeats: true } end