Skip to content

Commit

Permalink
Fix incorrect variable usage in SOAP request body
Browse files Browse the repository at this point in the history
In the SOAP request body generation for the VIES VAT number validation, there was an incorrect usage of the `@vat` instance variable. 

This instance variable was used for the fields `requesterCountryCode` and `requesterVatNumber`. I assume that the actual instance variable should be `@requester`
  • Loading branch information
jaymoneybird authored and yolk committed Jan 8, 2024
1 parent 685f9eb commit 45861e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/valvat/lookup/vies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class VIES < Base
<urn:countryCode><%= @vat.vat_country_code %></urn:countryCode>
<urn:vatNumber><%= @vat.to_s_wo_country %></urn:vatNumber>
<% if @requester %>
<urn:requesterCountryCode><%= @vat.vat_country_code %></urn:requesterCountryCode>
<urn:requesterVatNumber><%= @vat.to_s_wo_country %></urn:requesterVatNumber>
<urn:requesterCountryCode><%= @requester.vat_country_code %></urn:requesterCountryCode>
<urn:requesterVatNumber><%= @requester.to_s_wo_country %></urn:requesterVatNumber>
<% end %>
</urn:checkVat<%= 'Approx' if @requester %>>
</soapenv:Body>
Expand Down

0 comments on commit 45861e9

Please sign in to comment.