Skip to content

Commit

Permalink
Added logs for AddressValidationV3
Browse files Browse the repository at this point in the history
  • Loading branch information
RachalCassity committed Dec 9, 2024
1 parent 3073183 commit 1382c13
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/va_profile/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ def mock_enabled?
end
end
end

Check failure on line 31 in lib/va_profile/configuration.rb

View workflow job for this annotation

GitHub Actions / Linting and Security

Layout/TrailingEmptyLines: 1 trailing blank lines detected.
3 changes: 2 additions & 1 deletion lib/va_profile/models/v3/validation_address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def address_validation_req
countryName: @country_name, countryCodeFIPS: @country_code_fips },
state: { stateCode: @state_code, stateName: @state_name },
province: { provinceName: @province_name, provinceCode: @province_code },
addressPOU: @address_pou
addressPOU: "RESIDENCE"

Check failure on line 30 in lib/va_profile/models/v3/validation_address.rb

View workflow job for this annotation

GitHub Actions / Linting and Security

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
)
)
end
Expand Down Expand Up @@ -58,6 +58,7 @@ def self.regional_attributes(address_type, address_hash)
else
{
state_code: address_hash.dig('state', 'state_code'),
state_name: address_hash.dig('state', 'state_name'),
county_code: address_hash.dig('county', 'county_code'),
county_name: address_hash.dig('county', 'county_name'),
zip_code: address_hash['zip_code5'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module AddressValidation
# and use original address.
class AddressSuggestionsResponse
def initialize(candidate_res)
Rails.logger.info("Address Suggestion Response: #{address_suggestion_hash}")
validation_key = candidate_res['override_validation_key']
@response = {
addresses: candidate_res['candidate_addresses'].map do |address_suggestion_hash|
Expand Down
1 change: 1 addition & 0 deletions lib/va_profile/v3/address_validation/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def initialize; end
# @return [VAProfile::AddressValidation::AddressSuggestionsResponse] response wrapper around address
# suggestions data
def address_suggestions(address)
Rails.logger.info("Address Valid Service: #{address}")
with_monitoring do
candidate_res = candidate(address)

Expand Down

0 comments on commit 1382c13

Please sign in to comment.