Skip to content

Commit

Permalink
Update codeowners, slight fixes, empty spec
Browse files Browse the repository at this point in the history
  • Loading branch information
tfink419 committed Apr 24, 2024
1 parent 5fa497d commit 84ae59d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 7 deletions.
4 changes: 4 additions & 0 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1341,6 +1341,10 @@ vetext_push:
user: vets-api-username
pass: secret

res:
base_url: ~
api_key: ~

veteran_readiness_and_employment:
base_url: ~
credentials: ~
Expand Down
4 changes: 4 additions & 0 deletions config/settings/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ vanotify:
claim_submission_duplicate_text: oh_fake_duplicate_template_id
claim_submission_error_text: oh_fake_error_template_id

res:
base_url: https://fake_url.com
api_key: fake_auth

veteran_readiness_and_employment:
base_url: https://fake_url.com
credentials: fake_auth
Expand Down
13 changes: 7 additions & 6 deletions lib/res/ch31_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Ch31Form < RES::Service
SENTRY_TAG = { team: 'vfs-ebenefits' }.freeze

def initialize(user:, claim:)
super
super()
@user = user
@claim = claim
end
Expand Down Expand Up @@ -58,19 +58,20 @@ def format_payload_for_res
isMoving: form_data['isMoving'],
mainPhone: form_data['mainPhone'],
cellNumber: form_data['cellPhone'],
# internationalNumber: form_data['internationalNumber'],
internationalNumber: form_data['internationalNumber'],
email: form_data['email'],
documentId: form_data.dig('supportingDocuments', 0, 'documentId'), # or @claim.guid
receivedDate: @claim.created_at
receivedDate: @claim.created_at,
veteranAddress: mapped_address_hash(form_data['veteranAddress'])
}

res_payload[:data].merge!(veteran_address(form_data))
res_payload[:data].merge!({ veteranInformation: adjusted_veteran_information })
res_payload[:data].merge!(new_address) if form_data['newAddress'].present?
res_payload.merge!({ veteranInformation: adjusted_veteran_information })
res_payload.merge!(new_address) if form_data['newAddress'].present?

res_payload.to_json
end

# TODO: determine need
def veteran_address(form_data)
vet_address = mapped_address_hash(form_data['veteranAddress'])

Expand Down
2 changes: 1 addition & 1 deletion lib/res/service.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'vre/configuration'
require 'res/configuration'
require 'common/client/base'

# The RES::Service class is where we keep RES related endpoint calls and common methods
Expand Down
7 changes: 7 additions & 0 deletions spec/lib/res/ch31_form_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

require 'rails_helper'
require 'res/ch31_form'

RSpec.describe RES::Ch31Form do
end

0 comments on commit 84ae59d

Please sign in to comment.