Skip to content

Commit

Permalink
Fixes to integrate with vets-website
Browse files Browse the repository at this point in the history
  • Loading branch information
hinzed1127 committed Apr 24, 2024
1 parent 59c90f9 commit 87a9563
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions config/betamocks/services_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
:path: "/veis/api/btsss/travelclaim/api/v1/Auth/access-token"
:file_path: "/travel_pay/token/default"
:response_delay: 0.3
- :method: :get
:path: "/veis/api/btsss/travelclaim/api/v1/claims"
:file_path: "/travel_pay/status/default"
:response_delay: 0.3
- :method: :post
:path: <%= "/#{Settings.ask_va_api.crm_api.veis_api_path}/inquiries/new" %>
:file_path: "/ask_va/crm_api/post_inquiries/default"
Expand Down
5 changes: 4 additions & 1 deletion modules/travel_pay/app/services/travel_pay/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,14 @@ def get_claims(veis_token, btsss_token)
end

symbolized_body = response.body.deep_symbolize_keys
parse_claim_date = ->(c) { Date.parse(c[:modified_on]) }
parse_claim_date = ->(c) { Date.parse(c[:modifiedOn]) }
symbolized_body[:data].sort_by(&parse_claim_date).reverse!
symbolized_body
end

def request_sts_token(user)
return nil if mock_enabled?

host_baseurl = build_host_baseurl({ ip_form: false })
private_key_file = Settings.sign_in.sts_client.key_path
private_key = OpenSSL::PKey::RSA.new(File.read(private_key_file))
Expand Down

0 comments on commit 87a9563

Please sign in to comment.