From 232558346ae2ec28d534531167808eaa958403f9 Mon Sep 17 00:00:00 2001 From: Andrew Herzberg Date: Wed, 6 Nov 2024 14:05:43 -0700 Subject: [PATCH] delete appointment preferences --- .../v0/appointment_preferences_controller.rb | 32 ----- .../v0/appointment_preferences_serializer.rb | 16 --- modules/mobile/config/routes.rb | 2 - modules/mobile/docs/openapi.yaml | 72 ---------- .../docs/schemas/AppointmentPreferences.yml | 45 ------ .../schemas/AppointmentPreferencesRequest.yml | 20 --- .../v0/appointments/preferences_spec.rb | 62 -------- .../schemas/appointment_preferences.json | 48 ------- .../mobile/appointments/get_preferences.yml | 90 ------------ .../mobile/appointments/put_preferences.yml | 135 ------------------ .../put_preferences_minimal_payload.yml | 135 ------------------ 11 files changed, 657 deletions(-) delete mode 100644 modules/mobile/app/controllers/mobile/v0/appointment_preferences_controller.rb delete mode 100644 modules/mobile/app/serializers/mobile/v0/appointment_preferences_serializer.rb delete mode 100644 modules/mobile/docs/schemas/AppointmentPreferences.yml delete mode 100644 modules/mobile/docs/schemas/AppointmentPreferencesRequest.yml delete mode 100644 modules/mobile/spec/requests/mobile/v0/appointments/preferences_spec.rb delete mode 100644 modules/mobile/spec/support/schemas/appointment_preferences.json delete mode 100644 spec/support/vcr_cassettes/mobile/appointments/get_preferences.yml delete mode 100644 spec/support/vcr_cassettes/mobile/appointments/put_preferences.yml delete mode 100644 spec/support/vcr_cassettes/mobile/appointments/put_preferences_minimal_payload.yml diff --git a/modules/mobile/app/controllers/mobile/v0/appointment_preferences_controller.rb b/modules/mobile/app/controllers/mobile/v0/appointment_preferences_controller.rb deleted file mode 100644 index 32febe9c320..00000000000 --- a/modules/mobile/app/controllers/mobile/v0/appointment_preferences_controller.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -module Mobile - module V0 - class AppointmentPreferencesController < ApplicationController - def show - response = preferences_service.get_preferences - render json: Mobile::V0::AppointmentPreferencesSerializer.new(response) - end - - def update - response = preferences_service.put_preferences(update_params) - render json: Mobile::V0::AppointmentPreferencesSerializer.new(response) - end - - private - - def preferences_service - VAOS::PreferencesService.new(@current_user) - end - - def update_params - params.require(:notification_frequency) - params.permit(:notification_frequency, - :email_allowed, - :email_address, - :text_msg_allowed, - :text_msg_ph_number) - end - end - end -end diff --git a/modules/mobile/app/serializers/mobile/v0/appointment_preferences_serializer.rb b/modules/mobile/app/serializers/mobile/v0/appointment_preferences_serializer.rb deleted file mode 100644 index 6476fe6b2a2..00000000000 --- a/modules/mobile/app/serializers/mobile/v0/appointment_preferences_serializer.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -require 'jsonapi/serializer' - -module Mobile - module V0 - class AppointmentPreferencesSerializer - include JSONAPI::Serializer - - attributes :notification_frequency, - :email_allowed, - :email_address, - :text_msg_allowed - end - end -end diff --git a/modules/mobile/config/routes.rb b/modules/mobile/config/routes.rb index d0cfdcfb76d..07fdcd99213 100644 --- a/modules/mobile/config/routes.rb +++ b/modules/mobile/config/routes.rb @@ -13,8 +13,6 @@ get '/appointments/facilities/:facility_id/clinics', to: 'clinics#index' get '/appointments/facilities/:facility_id/clinics/:clinic_id/slots', to: 'clinics#slots' get '/appointments/facilities/:facility_id/slots', to: 'clinics#facility_slots' - get '/appointments/preferences', to: 'appointment_preferences#show' - put '/appointments/preferences', to: 'appointment_preferences#update' post '/appointments/check-in', to: 'check_in#create' patch '/appointments/check-in/demographics', to: 'check_in_demographics#update' post '/appointment', to: 'appointments#create' diff --git a/modules/mobile/docs/openapi.yaml b/modules/mobile/docs/openapi.yaml index 0689efb4c0e..a09dbfdea27 100644 --- a/modules/mobile/docs/openapi.yaml +++ b/modules/mobile/docs/openapi.yaml @@ -721,78 +721,6 @@ paths: security: - Bearer: [ ] summary: /v0/appointments/facilities/{facility_id}/clinics/{clinic_id}/slots - /v0/appointments/preferences: - get: - description: Returns VAOS appointment contact preferences - parameters: - - $ref: '#/components/parameters/InflectionHeader' - responses: - '200': - content: - application/json: - schema: - $ref: ./schemas/AppointmentPreferences.yml - description: OK - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '408': - $ref: '#/components/responses/408' - '422': - $ref: '#/components/responses/422' - '500': - $ref: '#/components/responses/500' - '502': - $ref: '#/components/responses/502' - '503': - $ref: '#/components/responses/503' - '504': - $ref: '#/components/responses/504' - security: - - Bearer: [ ] - summary: /v0/appointments/preferences - put: - description: updates VAOS appointment preferences - parameters: - - $ref: '#/components/parameters/InflectionHeader' - requestBody: - content: - application/json: - schema: - $ref: ./schemas/AppointmentPreferencesRequest.yml - description: Preferences data to update - required: true - responses: - '200': - content: - application/json: - schema: - $ref: ./schemas/AppointmentPreferences.yml - description: OK - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '408': - $ref: '#/components/responses/408' - '422': - $ref: '#/components/responses/422' - '500': - $ref: '#/components/responses/500' - '502': - $ref: '#/components/responses/502' - '503': - $ref: '#/components/responses/503' - '504': - $ref: '#/components/responses/504' - security: - - Bearer: [] - summary: /v0/appointments/preferences /v0/appointments/va/eligibility: get: description: Lists types of service. For each type of service, lists users registered facilities that support request and direct appointments. diff --git a/modules/mobile/docs/schemas/AppointmentPreferences.yml b/modules/mobile/docs/schemas/AppointmentPreferences.yml deleted file mode 100644 index f98f15d38f5..00000000000 --- a/modules/mobile/docs/schemas/AppointmentPreferences.yml +++ /dev/null @@ -1,45 +0,0 @@ -type: object -additionalProperties: false -required: - - data -properties: - data: - type: object - additionalProperties: false - required: - - type - - id - - attributes - properties: - type: - type: string - example: "appointment_preferences" - id: - type: string - example: "6260ab13-177f-583d-b2dc-1b350404abb7" - description: user UUID - attributes: - type: object - additionalProperties: false - required: - - notificationFrequency - - emailAllowed - - textMsgAllowed - properties: - notificationFrequency: - type: string - example: "Never" - emailAllowed: - type: boolean - example: true - emailAddress: - type: string - description: omitted if not allowed - example: "abraham.lincoln@va.gov" - textMsgAllowed: - type: boolean - example: false - TextMsgPhNumber: - type: string - description: omitted if not allowed - example: '480-278-2515' diff --git a/modules/mobile/docs/schemas/AppointmentPreferencesRequest.yml b/modules/mobile/docs/schemas/AppointmentPreferencesRequest.yml deleted file mode 100644 index fcb3f06e285..00000000000 --- a/modules/mobile/docs/schemas/AppointmentPreferencesRequest.yml +++ /dev/null @@ -1,20 +0,0 @@ -type: object -additionalProperties: false -required: - - notification_frequency -properties: - notification_frequency: - type: string - example: 'Each new message' - email_allowed: - type: boolean - example: true - email_address: - type: string - example: 'abraham.lincoln@va.gov' - text_msg_allowed: - type: boolean - example: false - text_msg_ph_number: - type: string - example: '480-278-2515' \ No newline at end of file diff --git a/modules/mobile/spec/requests/mobile/v0/appointments/preferences_spec.rb b/modules/mobile/spec/requests/mobile/v0/appointments/preferences_spec.rb deleted file mode 100644 index 4d86edaa21a..00000000000 --- a/modules/mobile/spec/requests/mobile/v0/appointments/preferences_spec.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -require_relative '../../../../support/helpers/rails_helper' - -RSpec.describe 'Mobile::V0::Appointments::Preferences', type: :request do - include JsonSchemaMatchers - - let!(:user) { sis_user(icn: '24811694708759028') } - - before do - allow_any_instance_of(VAOS::UserService).to receive(:session).and_return('stubbed_token') - end - - describe 'GET /appointments/preferences', :aggregate_failures do - it 'returns a 200 with the correct schema' do - VCR.use_cassette('mobile/appointments/get_preferences', match_requests_on: %i[method uri]) do - get '/mobile/v0/appointments/preferences', headers: sis_headers - - expect(response).to have_http_status(:ok) - expect(response.body).to match_json_schema('appointment_preferences') - end - end - end - - describe 'PUT /appointments/preferences', :aggregate_failures do - let(:request_body) do - { - notification_frequency: 'Each new message', - email_allowed: true, - email_address: 'abraham.lincoln@va.gov', - text_msg_allowed: false, - text_msg_ph_number: '' - } - end - - let(:minimal_request_body) do - { - notification_frequency: 'Each new message' - } - end - - it 'returns a 200 code' do - VCR.use_cassette('mobile/appointments/put_preferences', match_requests_on: %i[method uri]) do - put '/mobile/v0/appointments/preferences', headers: sis_headers, params: request_body - - expect(response).to have_http_status(:ok) - expect(response.body).to match_json_schema('appointment_preferences') - end - end - - context 'when only required fields are included in params' do - it 'returns a 200 code' do - VCR.use_cassette('mobile/appointments/put_preferences_minimal_payload', match_requests_on: %i[method uri]) do - put '/mobile/v0/appointments/preferences', headers: sis_headers, params: request_body - - expect(response).to have_http_status(:ok) - expect(response.body).to match_json_schema('appointment_preferences') - end - end - end - end -end diff --git a/modules/mobile/spec/support/schemas/appointment_preferences.json b/modules/mobile/spec/support/schemas/appointment_preferences.json deleted file mode 100644 index 72af4020405..00000000000 --- a/modules/mobile/spec/support/schemas/appointment_preferences.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "type": "object", - "required": [ - "id", - "type", - "attributes" - ], - "properties": { - "id": { - "type": "string" - }, - "type": { - "type": "string" - }, - "attributes": { - "type": "object", - "required": [ - "notificationFrequency", - "emailAllowed", - "emailAddress", - "textMsgAllowed" - ], - "properties": { - "notificationFrequency": { - "type": "string" - }, - "emailAllowed": { - "type": "boolean" - }, - "emailAddress": { - "type": "string" - }, - "textMsgAllowed": { - "type": "boolean" - } - } - } - } - } - } -} diff --git a/spec/support/vcr_cassettes/mobile/appointments/get_preferences.yml b/spec/support/vcr_cassettes/mobile/appointments/get_preferences.yml deleted file mode 100644 index 7551a48c78c..00000000000 --- a/spec/support/vcr_cassettes/mobile/appointments/get_preferences.yml +++ /dev/null @@ -1,90 +0,0 @@ ---- -http_interactions: - - request: - method: get - uri: https://veteran.apps.va.gov/var/VeteranAppointmentRequestService/v4/rest/patient/ICN/24811694708759028/preference - body: - encoding: US-ASCII - string: '' - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - Vets.gov Agent - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - response: - status: - code: 200 - message: OK - headers: - Date: - - Thu, 14 Nov 2019 21:22:27 GMT - Content-Type: - - application/json - Content-Length: - - '1293' - Connection: - - keep-alive - X-B3-Parentspanid: - - 917fc3b237228004 - X-Vamf-Version: - - 1.9.0 - X-B3-Traceid: - - cd0d5b66756bd28a - Access-Control-Allow-Headers: - - x-vamf-jwt - X-Vamf-Build: - - b4a9910 - X-B3-Sampled: - - '0' - X-Vamf-Timestamp: - - '2019-07-08T16:09:14+0000' - Access-Control-Allow-Origin: - - "*" - X-B3-Spanid: - - ba71845219536caf - Access-Control-Allow-Methods: - - GET,OPTIONS - Access-Control-Max-Age: - - '3600' - Set-Cookie: - - TS016f4012=01c16e2d81fc226234f653b401a6d3c45964b178c3dca337d48dc27850ee4b2500802d8cd5ce3022f84792af5d23119520ca71bbc596b1ad67dc95ab16a1a86b35c68d151ea4d6e53a92650a851039167e75ca477a; - Max-Age=900; Path=/ - - vamfjwtv3=eyJ6aXAiOiJERUYiLCJjdHkiOiJKV1QiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIiwiYWxnIjoiUlNBLU9BRVAtMjU2In0.ZyMpgyWmTxwJ4xf7e9aF8vSHP9YEZwRrI9sIRVX5x_tztvCzp4TDNj0yZ33GwHlXgDRFDIWh9qNZAq6d7ECDnI9hzZk-3Q-GM69bkUcdLRrYE4UX4i8HQawxXfC05lVHnqNZo81n4-laN91S6_In613ZcAQ4y4V-734nxqXFH9mYJUlf1MI3ixIPQ9G_0liQyvk0bZ2eE6GGGyDqt7mOvw_SGR3D3xgjB_csivbhkgY8qTOTTHCkRqYG6Ehpj9k2kiS_HD3XBVbyKTv3Oa7DtbnJ6HbFP7LUh-4pTATSBxT9IjyKtfCEHV9k0ZwMZGrnvJHmGaE3EcBq1qjeqdtdcw.aaLqA_CnlF_lo6pn2zINXw.Nn_C0mbkeOeXwxdkw_6h81GtmH0ykuMIKPeUUW4Z_yEmfBgTi6Ber9OUnv8OSsNVA8KUwsP8kgGB6Mh8xnvSVuA2jmn8YeG1dojV4Mhi8bGj4F0qKYTaCGorCEqpN8cu2wzupCuM4FYT3mXhHao1h_-Qc6_tRiDpbq572MngKJG8KHS7RYkMUo9RCRTuwSHQXr7XFN9Y0uToKGrY_r8a3LUr6PV8N5iFWunWF1G8_d6QbMFo-EY54cd9VPdJqydOtvTStyRbVjfq6Ud9GyzblgO22-jedghx0EOLOxjcIOVCEdJNnAnfokl50K53dW7ogK0Uj6ljH7_XzHyjhfDGBE_Xm_r2c9LYPX8_jp1bO2AZYllJGupAbJ4mIGCEG1zxUBNDaKX_T5rV5G5vxTGqlLw-9h6Il6rcqScrrfVciK46fnHZWfOZadevMNqO6yafMlUOQqnL4HodZRy4soy_KKlO4lsMX6LM1mVJM0SNU3YZUO0KuhCSTz8cMnuoek26OTurc6_x2ZrMMLS_GLh-m8pdjbvsjhbjw2n-yBQrKvHf1jl1cvUQSG8pHCFOjni2coUmmbTy0omzt29A1-NkOwbcIw7H2cgnosYzdpkgOvOMJgYAz-_PHYba1aDF8SNZpTl49TrIJXp01mVWwr-5buDmCbebuk1beqwb1-3FQI0.Owtu7sXRP0m4qVdPQ0qMZJKr2mVrSUrtpGpH9hvqjAM; - path=/;max-age=900; HttpOnly - - vamftimeoutv1=1567617431; path=/ - body: - encoding: UTF-8 - string: |- - { - "dataIdentifier" : { }, - "patientIdentifier" : { - "uniqueId" : "1259897978", - "assigningAuthority" : "EDIPI" - }, - "surrogateIdentifier" : { }, - "notificationFrequency" : "Never", - "emailAllowed" : true, - "emailAddress" : "abraham.lincoln@va.gov", - "textMsgAllowed" : false, - "patientId" : "1259897978", - "assigningAuthority" : "EDIPI", - "selfUri" : "/var/VeteranAppointmentRequestService/v4/rest/patient/EDIPI/1259897978/preference", - "selfLink" : { - "rel" : "self", - "href" : "/var/VeteranAppointmentRequestService/v4/rest/patient/EDIPI/1259897978/preference", - "objectType" : "AtomLink" - }, - "objectType" : "VARPatientPreference", - "link" : [ { - "rel" : "self", - "href" : "/var/VeteranAppointmentRequestService/v4/rest/patient/EDIPI/1259897978/preference", - "objectType" : "AtomLink" - } ] - } - http_version: - recorded_at: Thu, 14 Nov 2019 21:22:27 GMT -recorded_with: VCR 3.0.3 diff --git a/spec/support/vcr_cassettes/mobile/appointments/put_preferences.yml b/spec/support/vcr_cassettes/mobile/appointments/put_preferences.yml deleted file mode 100644 index 5b0e3e8485a..00000000000 --- a/spec/support/vcr_cassettes/mobile/appointments/put_preferences.yml +++ /dev/null @@ -1,135 +0,0 @@ ---- -http_interactions: -- request: - method: put - uri: https://veteran.apps.va.gov/var/VeteranAppointmentRequestService/v4/rest/patient/ICN/24811694708759028/preference - body: - encoding: UTF-8 - string: '{"notificationFrequency":"Each new message","emailAllowed":true,"emailAddress":"abraham.lincoln@va.gov","textMsgAllowed":false,"textMsgPhNumber":"","patientIdentifier":{"uniqueId":"1012845331V153043","assigningAuthority":"ICN"},"patientId":"1012845331V153043","assigningAuthority":"ICN"}' - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - Vets.gov Agent - Referer: - - https://api.va.gov - X-Vamf-Jwt: - - eyJhbGciOiJSUzUxMiJ9.eyJsYXN0TmFtZSI6Ik1vcnJpc29uIiwic3ViIjoiMTAxMjg0NTMzMVYxNTMwNDMiLCJhdXRoZW50aWNhdGVkIjp0cnVlLCJhdXRoZW50aWNhdGlvbkF1dGhvcml0eSI6Imdvdi52YS52YW9zIiwiaWRUeXBlIjoiSUNOIiwiZ2VuZGVyIjoiRkVNQUxFIiwiaXNzIjoiZ292LnZhLnZhbWYudXNlcnNlcnZpY2UudjEiLCJ2YW1mLmF1dGgucmVzb3VyY2VzIjpbIl4uKihcLyk_c2l0ZVtzXT9cLyhkZm4tKT85ODRcL3BhdGllbnRbc10_XC81NTIxNjEwNTBcL2FwcG9pbnRtZW50cyhcLy4qKT8kIiwiXi4qKFwvKT9zaXRlW3NdP1wvKGRmbi0pPzk4M1wvcGF0aWVudFtzXT9cLzcyMTY2OTFcL2FwcG9pbnRtZW50cyhcLy4qKT8kIiwiXi4qKFwvKT9wYXRpZW50W3NdP1w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0l-LVYhLNbPN2M03mH6JZ6hmvxxEzmAx9Oivus-jwQ8Pd_FNHJwvLgCeIQzBpFBjMEjrdvY02VUqJ6AI6BnjD1Q3Y2kw - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - response: - status: - code: 200 - message: OK - headers: - Date: - - Wed, 18 Dec 2019 19:25:22 GMT - Content-Type: - - application/json;charset=UTF-8 - Content-Length: - - '897' - Server: - - openresty - Strict-Transport-Security: - - max-age=63072000; includeSubDomains; preload - body: - encoding: UTF-8 - string: |- - { - "dataIdentifier" : { }, - "patientIdentifier" : { - "uniqueId" : "1012845331V153043", - "assigningAuthority" : "ICN" - }, - "surrogateIdentifier" : { }, - "notificationFrequency" : "Each new message", - "emailAllowed" : true, - "emailAddress" : "abraham.lincoln@va.gov", - "textMsgAllowed" : false, - "textMsgPhNumber" : "", - "assigningAuthority" : "ICN", - "patientId" : "1012845331V153043", - "selfUri" : "/var/VeteranAppointmentRequestService/v4/rest/patient/ICN/1012845331V153043/preference", - "selfLink" : { - "rel" : "self", - "href" : "/var/VeteranAppointmentRequestService/v4/rest/patient/ICN/1012845331V153043/preference", - "objectType" : "AtomLink" - }, - "objectType" : "VARPatientPreference", - "link" : [ { - "rel" : "self", - "href" : "/var/VeteranAppointmentRequestService/v4/rest/patient/ICN/1012845331V153043/preference", - "objectType" : "AtomLink" - } ] - } - http_version: - recorded_at: Wed, 18 Dec 2019 19:25:22 GMT -- request: - method: put - uri: https://veteran.apps.va.gov/var/VeteranAppointmentRequestService/v4/rest/patient/ICN/24811694708759028/preference - body: - encoding: UTF-8 - string: '{"notificationFrequency":"Each new message","emailAllowed":true,"emailAddress":"abraham.lincoln@va.gov","textMsgAllowed":false,"textMsgPhNumber":"","patientIdentifier":{"uniqueId":"1012845331V153043","assigningAuthority":"ICN"},"patientId":"1012845331V153043","assigningAuthority":"ICN"}' - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - Vets.gov Agent - Referer: - - https://api.va.gov -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sImRvYiI6IjE5NTMtMDQtMDEiLCJkYXRlT2ZCaXJ0aCI6IjE5NTMtMDQtMDEiLCJzc24iOiI3OTYwNjE5NzYifSwiZG9iIjoiMTk1My0wNC0wMSIsInZhbWYuYXV0aC5yb2xlcyI6WyJ2ZXRlcmFuIl0sInJpZ2h0T2ZBY2Nlc3NBY2NlcHRlZCI6dHJ1ZSwiZXhwIjoxNTc2Njk4MDIyLCJqdGkiOiIwMjM3YzdjMC0xNzE5LTRmY2QtYjhmNi0yMzA2YzQwOWFiNWMiLCJsb2EiOjJ9.VcFIigpFgZi4yFm4aCJLdyZnFKxql-AiAiA4ocLLT2B_OtB4uKbbTXNdrVtULleK-j7XrLsxZYHa2BLUALP96QAUwDTOiX2618m8vZo0oLghOfB0NjTGqt3LPFl7EVSB7X3rv-0s2SpKvugen_GFPxMyvNROsHBrYYzOJUTORgaYNb1fl28GZO1KIxZGxbukpElvgaX2R8SasTLqXEDx3nv_OuZI2CISf4pcooZQJARQK5hsCtr44t4izU0l-LVYhLNbPN2M03mH6JZ6hmvxxEzmAx9Oivus-jwQ8Pd_FNHJwvLgCeIQzBpFBjMEjrdvY02VUqJ6AI6BnjD1Q3Y2kw - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - response: - status: - code: 200 - message: OK - headers: - Date: - - Wed, 18 Dec 2019 19:25:22 GMT - Content-Type: - - application/json;charset=UTF-8 - Content-Length: - - '897' - Server: - - openresty - Strict-Transport-Security: - - max-age=63072000; includeSubDomains; preload - body: - encoding: UTF-8 - string: |- - { - "dataIdentifier" : { }, - "patientIdentifier" : { - "uniqueId" : "1012845331V153043", - "assigningAuthority" : "ICN" - }, - "surrogateIdentifier" : { }, - "notificationFrequency" : "Each new message", - "emailAllowed" : true, - "emailAddress" : "abraham.lincoln@va.gov", - "textMsgAllowed" : false, - "textMsgPhNumber" : "", - "assigningAuthority" : "ICN", - "patientId" : "1012845331V153043", - "selfUri" : "/var/VeteranAppointmentRequestService/v4/rest/patient/ICN/1012845331V153043/preference", - "selfLink" : { - "rel" : "self", - "href" : "/var/VeteranAppointmentRequestService/v4/rest/patient/ICN/1012845331V153043/preference", - "objectType" : "AtomLink" - }, - "objectType" : "VARPatientPreference", - "link" : [ { - "rel" : "self", - "href" : "/var/VeteranAppointmentRequestService/v4/rest/patient/ICN/1012845331V153043/preference", - "objectType" : "AtomLink" - } ] - } - http_version: - recorded_at: Wed, 18 Dec 2019 19:25:22 GMT -recorded_with: VCR 3.0.3 diff --git a/spec/support/vcr_cassettes/mobile/appointments/put_preferences_minimal_payload.yml b/spec/support/vcr_cassettes/mobile/appointments/put_preferences_minimal_payload.yml deleted file mode 100644 index 5b0e3e8485a..00000000000 --- a/spec/support/vcr_cassettes/mobile/appointments/put_preferences_minimal_payload.yml +++ /dev/null @@ -1,135 +0,0 @@ ---- -http_interactions: -- request: - method: put - uri: https://veteran.apps.va.gov/var/VeteranAppointmentRequestService/v4/rest/patient/ICN/24811694708759028/preference - body: - encoding: UTF-8 - string: '{"notificationFrequency":"Each new message","emailAllowed":true,"emailAddress":"abraham.lincoln@va.gov","textMsgAllowed":false,"textMsgPhNumber":"","patientIdentifier":{"uniqueId":"1012845331V153043","assigningAuthority":"ICN"},"patientId":"1012845331V153043","assigningAuthority":"ICN"}' - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - Vets.gov Agent - Referer: - - https://api.va.gov - X-Vamf-Jwt: - - eyJhbGciOiJSUzUxMiJ9.eyJsYXN0TmFtZSI6Ik1vcnJpc29uIiwic3ViIjoiMTAxMjg0NTMzMVYxNTMwNDMiLCJhdXRoZW50aWNhdGVkIjp0cnVlLCJhdXRoZW50aWNhdGlvbkF1dGhvcml0eSI6Imdvdi52YS52YW9zIiwiaWRUeXBlIjoiSUNOIiwiZ2VuZGVyIjoiRkVNQUxFIiwiaXNzIjoiZ292LnZhLnZhbWYudXNlcnNlcnZpY2UudjEiLCJ2YW1mLmF1dGgucmVzb3VyY2VzIjpbIl4uKihcLyk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aCJLdyZnFKxql-AiAiA4ocLLT2B_OtB4uKbbTXNdrVtULleK-j7XrLsxZYHa2BLUALP96QAUwDTOiX2618m8vZo0oLghOfB0NjTGqt3LPFl7EVSB7X3rv-0s2SpKvugen_GFPxMyvNROsHBrYYzOJUTORgaYNb1fl28GZO1KIxZGxbukpElvgaX2R8SasTLqXEDx3nv_OuZI2CISf4pcooZQJARQK5hsCtr44t4izU0l-LVYhLNbPN2M03mH6JZ6hmvxxEzmAx9Oivus-jwQ8Pd_FNHJwvLgCeIQzBpFBjMEjrdvY02VUqJ6AI6BnjD1Q3Y2kw - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - response: - status: - code: 200 - message: OK - headers: - Date: - - Wed, 18 Dec 2019 19:25:22 GMT - Content-Type: - - application/json;charset=UTF-8 - Content-Length: - - '897' - Server: - - openresty - Strict-Transport-Security: - - max-age=63072000; includeSubDomains; preload - body: - encoding: UTF-8 - string: |- - { - "dataIdentifier" : { }, - "patientIdentifier" : { - "uniqueId" : "1012845331V153043", - "assigningAuthority" : "ICN" - }, - "surrogateIdentifier" : { }, - "notificationFrequency" : "Each new message", - "emailAllowed" : true, - "emailAddress" : "abraham.lincoln@va.gov", - "textMsgAllowed" : false, - "textMsgPhNumber" : "", - "assigningAuthority" : "ICN", - "patientId" : "1012845331V153043", - "selfUri" : "/var/VeteranAppointmentRequestService/v4/rest/patient/ICN/1012845331V153043/preference", - "selfLink" : { - "rel" : "self", - "href" : "/var/VeteranAppointmentRequestService/v4/rest/patient/ICN/1012845331V153043/preference", - "objectType" : "AtomLink" - }, - "objectType" : "VARPatientPreference", - "link" : [ { - "rel" : "self", - "href" : "/var/VeteranAppointmentRequestService/v4/rest/patient/ICN/1012845331V153043/preference", - "objectType" : "AtomLink" - } ] - } - http_version: - recorded_at: Wed, 18 Dec 2019 19:25:22 GMT -- request: - method: put - uri: https://veteran.apps.va.gov/var/VeteranAppointmentRequestService/v4/rest/patient/ICN/24811694708759028/preference - body: - encoding: UTF-8 - string: '{"notificationFrequency":"Each new message","emailAllowed":true,"emailAddress":"abraham.lincoln@va.gov","textMsgAllowed":false,"textMsgPhNumber":"","patientIdentifier":{"uniqueId":"1012845331V153043","assigningAuthority":"ICN"},"patientId":"1012845331V153043","assigningAuthority":"ICN"}' - headers: - Accept: - - application/json - Content-Type: - - application/json - User-Agent: - - Vets.gov Agent - Referer: - - https://api.va.gov - X-Vamf-Jwt: - - eyJhbGciOiJSUzUxMiJ9.eyJsYXN0TmFtZSI6Ik1vcnJpc29uIiwic3ViIjoiMTAxMjg0NTMzMVYxNTMwNDMiLCJhdXRoZW50aWNhdGVkIjp0cnVlLCJhdXRoZW50aWNhdGlvbkF1dGhvcml0eSI6Imdvdi52YS52YW9zIiwiaWRUeXBlIjoiSUNOIiwiZ2VuZGVyIjoiRkVNQUxFIiwiaXNzIjoiZ292LnZhLnZhbWYudXNlcnNlcnZpY2UudjEiLCJ2YW1mLmF1dGgucmVzb3VyY2VzIjpbIl4uKihcLyk_c2l0ZVtzXT9cLyhkZm4tKT85ODRcL3BhdGllbnRbc10_XC81NTIxNjEwNTBcL2FwcG9pbnRtZW50cyhcLy4qKT8kIiwiXi4qKFwvKT9zaXRlW3NdP1wvKGRmbi0pPzk4M1wvcGF0aWVudFtzXT9cLzcyMTY2OTFcL2FwcG9pbnRtZW50cyhcLy4qKT8kIiwiXi4qKFwvKT9wYXRpZW50W3NdP1wvKElDTlwvKT8xMDEyODQ1MzMxVjE1MzA0MyhcLy4qKT8kIl0sImRhdGVPZkJpcnRoIjoiMTk1My0wNC0wMSIsInZlcnNpb24iOjIuMSwiZWRpcGlkIjoiMTI1OTg5Nzk3OCIsInZpc3RhSWRzIjpbeyJwYXRpZW50SWQiOiI1NTIxNjEwNTAiLCJzaXRlSWQiOiI5ODQifSx7InBhdGllbnRJZCI6IjcyMTY2OTEiLCJzaXRlSWQiOiI5ODMifV0sInNzbiI6Ijc5NjA2MTk3NiIsImZpcnN0TmFtZSI6Ikp1ZHkiLCJzdGFmZkRpc2NsYWltZXJBY2NlcHRlZCI6dHJ1ZSwibmJmIjoxNTc2Njk2OTQyLCJzc3QiOjE1NzY2OTcxMjIsInBhdGllbnQiOnsiZmlyc3ROYW1lIjoiSnVkeSIsImxhc3ROYW1lIjoiTW9ycmlzb24iLCJnZW5kZXIiOiJGRU1BTEUiLCJpY24iOiIxMDEyODQ1MzMxVjE1MzA0MyIsImRvYiI6IjE5NTMtMDQtMDEiLCJkYXRlT2ZCaXJ0aCI6IjE5NTMtMDQtMDEiLCJzc24iOiI3OTYwNjE5NzYifSwiZG9iIjoiMTk1My0wNC0wMSIsInZhbWYuYXV0aC5yb2xlcyI6WyJ2ZXRlcmFuIl0sInJpZ2h0T2ZBY2Nlc3NBY2NlcHRlZCI6dHJ1ZSwiZXhwIjoxNTc2Njk4MDIyLCJqdGkiOiIwMjM3YzdjMC0xNzE5LTRmY2QtYjhmNi0yMzA2YzQwOWFiNWMiLCJsb2EiOjJ9.VcFIigpFgZi4yFm4aCJLdyZnFKxql-AiAiA4ocLLT2B_OtB4uKbbTXNdrVtULleK-j7XrLsxZYHa2BLUALP96QAUwDTOiX2618m8vZo0oLghOfB0NjTGqt3LPFl7EVSB7X3rv-0s2SpKvugen_GFPxMyvNROsHBrYYzOJUTORgaYNb1fl28GZO1KIxZGxbukpElvgaX2R8SasTLqXEDx3nv_OuZI2CISf4pcooZQJARQK5hsCtr44t4izU0l-LVYhLNbPN2M03mH6JZ6hmvxxEzmAx9Oivus-jwQ8Pd_FNHJwvLgCeIQzBpFBjMEjrdvY02VUqJ6AI6BnjD1Q3Y2kw - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - response: - status: - code: 200 - message: OK - headers: - Date: - - Wed, 18 Dec 2019 19:25:22 GMT - Content-Type: - - application/json;charset=UTF-8 - Content-Length: - - '897' - Server: - - openresty - Strict-Transport-Security: - - max-age=63072000; includeSubDomains; preload - body: - encoding: UTF-8 - string: |- - { - "dataIdentifier" : { }, - "patientIdentifier" : { - "uniqueId" : "1012845331V153043", - "assigningAuthority" : "ICN" - }, - "surrogateIdentifier" : { }, - "notificationFrequency" : "Each new message", - "emailAllowed" : true, - "emailAddress" : "abraham.lincoln@va.gov", - "textMsgAllowed" : false, - "textMsgPhNumber" : "", - "assigningAuthority" : "ICN", - "patientId" : "1012845331V153043", - "selfUri" : "/var/VeteranAppointmentRequestService/v4/rest/patient/ICN/1012845331V153043/preference", - "selfLink" : { - "rel" : "self", - "href" : "/var/VeteranAppointmentRequestService/v4/rest/patient/ICN/1012845331V153043/preference", - "objectType" : "AtomLink" - }, - "objectType" : "VARPatientPreference", - "link" : [ { - "rel" : "self", - "href" : "/var/VeteranAppointmentRequestService/v4/rest/patient/ICN/1012845331V153043/preference", - "objectType" : "AtomLink" - } ] - } - http_version: - recorded_at: Wed, 18 Dec 2019 19:25:22 GMT -recorded_with: VCR 3.0.3