diff -Nru libbusiness-us-usps-webtools-perl-1.124/Changes libbusiness-us-usps-webtools-perl-1.125/Changes --- libbusiness-us-usps-webtools-perl-1.124/Changes 2020-09-18 20:53:17.000000000 +0000 +++ libbusiness-us-usps-webtools-perl-1.125/Changes 2021-05-19 21:26:34.000000000 +0000 @@ -1,5 +1,21 @@ Revision history for Perl module Business::US::USPS::WebTools +1.125 2021-05-19 + * Updated API endpoints. Always use HTTPS. + + * Removed two tests that started failing due to changes in the API + response. + + * Skip tracking tests (which are disabled anyway) rather than failing if + test credentials aren't set. + + * Access to the testing/staging environment is no longer granted by + default and testing against the production environment is allowed + (load/stress testing isn't), so tests are now run against the + production API by default. To run against the testing/staging + environment, set USPS_WEBTOOLS_ENVIRONMENT to TESTING while setting up + your credentials. + 1.124 2020-09-18 * New maintainer diff -Nru libbusiness-us-usps-webtools-perl-1.124/debian/changelog libbusiness-us-usps-webtools-perl-1.125/debian/changelog --- libbusiness-us-usps-webtools-perl-1.124/debian/changelog 2020-09-22 11:57:00.000000000 +0000 +++ libbusiness-us-usps-webtools-perl-1.125/debian/changelog 2021-05-20 17:23:56.000000000 +0000 @@ -1,3 +1,10 @@ +libbusiness-us-usps-webtools-perl (1.125-1) unstable; urgency=medium + + * Import upstream version 1.125 (Closes: #988330) + * Remove patch, now included in upstream + + -- Yadd Thu, 20 May 2021 19:23:56 +0200 + libbusiness-us-usps-webtools-perl (1.124-1) unstable; urgency=medium [ gregor herrmann ] diff -Nru libbusiness-us-usps-webtools-perl-1.124/debian/patches/series libbusiness-us-usps-webtools-perl-1.125/debian/patches/series --- libbusiness-us-usps-webtools-perl-1.124/debian/patches/series 2020-09-22 11:48:06.000000000 +0000 +++ libbusiness-us-usps-webtools-perl-1.125/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -skip-network-test.diff diff -Nru libbusiness-us-usps-webtools-perl-1.124/debian/patches/skip-network-test.diff libbusiness-us-usps-webtools-perl-1.125/debian/patches/skip-network-test.diff --- libbusiness-us-usps-webtools-perl-1.124/debian/patches/skip-network-test.diff 2020-09-22 11:52:32.000000000 +0000 +++ libbusiness-us-usps-webtools-perl-1.125/debian/patches/skip-network-test.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -Description: skip test that require network + USPS account -Author: Xavier Guimard -Forwarded: https://github.com/ssimms/business-us-usps-webtools/pull/1 -Last-Update: 2020-09-22 - ---- a/t/track_confirm.t -+++ b/t/track_confirm.t -@@ -6,6 +6,13 @@ - my $class = "Business::US::USPS::WebTools::TrackConfirm"; - my $method = 'track'; - -+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -+unless( $ENV{USPS_WEBTOOLS_USERID} and $ENV{USPS_WEBTOOLS_PASSWORD} ) -+ { -+ plan skip_all => -+ "You must set the USPS_WEBTOOLS_USERID and USPS_WEBTOOLS_PASSWORD " . -+ "environment variables to run these tests\n"; -+ } - - # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # - subtest setup => sub { diff -Nru libbusiness-us-usps-webtools-perl-1.124/lib/Business/US/USPS/WebTools/AddressStandardization.pm libbusiness-us-usps-webtools-perl-1.125/lib/Business/US/USPS/WebTools/AddressStandardization.pm --- libbusiness-us-usps-webtools-perl-1.124/lib/Business/US/USPS/WebTools/AddressStandardization.pm 2020-09-18 20:54:25.000000000 +0000 +++ libbusiness-us-usps-webtools-perl-1.125/lib/Business/US/USPS/WebTools/AddressStandardization.pm 2021-05-19 21:29:20.000000000 +0000 @@ -10,7 +10,7 @@ use subs qw(); use vars qw($VERSION); -$VERSION = '1.124'; +$VERSION = '1.125'; =encoding utf8 diff -Nru libbusiness-us-usps-webtools-perl-1.124/lib/Business/US/USPS/WebTools/CityStateLookup.pm libbusiness-us-usps-webtools-perl-1.125/lib/Business/US/USPS/WebTools/CityStateLookup.pm --- libbusiness-us-usps-webtools-perl-1.124/lib/Business/US/USPS/WebTools/CityStateLookup.pm 2020-09-18 20:54:31.000000000 +0000 +++ libbusiness-us-usps-webtools-perl-1.125/lib/Business/US/USPS/WebTools/CityStateLookup.pm 2021-05-19 21:29:24.000000000 +0000 @@ -10,7 +10,7 @@ use subs qw(); use vars qw($VERSION); -$VERSION = '1.124'; +$VERSION = '1.125'; =encoding utf8 diff -Nru libbusiness-us-usps-webtools-perl-1.124/lib/Business/US/USPS/WebTools/TrackConfirm.pm libbusiness-us-usps-webtools-perl-1.125/lib/Business/US/USPS/WebTools/TrackConfirm.pm --- libbusiness-us-usps-webtools-perl-1.124/lib/Business/US/USPS/WebTools/TrackConfirm.pm 2020-09-18 20:54:36.000000000 +0000 +++ libbusiness-us-usps-webtools-perl-1.125/lib/Business/US/USPS/WebTools/TrackConfirm.pm 2021-05-19 21:29:30.000000000 +0000 @@ -12,7 +12,7 @@ use Carp qw(croak carp); -$VERSION = '1.124'; +$VERSION = '1.125'; =encoding utf8 diff -Nru libbusiness-us-usps-webtools-perl-1.124/lib/Business/US/USPS/WebTools/ZipCodeLookup.pm libbusiness-us-usps-webtools-perl-1.125/lib/Business/US/USPS/WebTools/ZipCodeLookup.pm --- libbusiness-us-usps-webtools-perl-1.124/lib/Business/US/USPS/WebTools/ZipCodeLookup.pm 2020-09-18 20:54:42.000000000 +0000 +++ libbusiness-us-usps-webtools-perl-1.125/lib/Business/US/USPS/WebTools/ZipCodeLookup.pm 2021-05-19 21:29:15.000000000 +0000 @@ -10,7 +10,7 @@ use subs qw(); use vars qw($VERSION); -$VERSION = '1.124'; +$VERSION = '1.125'; =encoding utf8 diff -Nru libbusiness-us-usps-webtools-perl-1.124/lib/Business/US/USPS/WebTools.pm libbusiness-us-usps-webtools-perl-1.125/lib/Business/US/USPS/WebTools.pm --- libbusiness-us-usps-webtools-perl-1.124/lib/Business/US/USPS/WebTools.pm 2020-09-18 20:53:52.000000000 +0000 +++ libbusiness-us-usps-webtools-perl-1.125/lib/Business/US/USPS/WebTools.pm 2021-05-19 21:29:11.000000000 +0000 @@ -10,7 +10,7 @@ use subs qw(); use vars qw($VERSION); -$VERSION = '1.124'; +$VERSION = '1.125'; =encoding utf8 @@ -125,7 +125,7 @@ $_[0]->_live ? "/ShippingAPI.dll" : - "/ShippingAPITest.dll" + "/ShippingAPI.dll" } sub _make_url { @@ -133,7 +133,7 @@ my( $self, $hash ) = @_; $self->{url} = Mojo::URL->new - ->scheme('http') + ->scheme('https') ->host( $self->_api_host ) ->path( $self->_api_path ) ->query( @@ -216,7 +216,7 @@ =cut sub live_server_host { "production.shippingapis.com" }; -sub test_server_host { "testing.shippingapis.com" }; +sub test_server_host { "stg-production.shippingapis.com" }; =back diff -Nru libbusiness-us-usps-webtools-perl-1.124/META.json libbusiness-us-usps-webtools-perl-1.125/META.json --- libbusiness-us-usps-webtools-perl-1.124/META.json 2020-09-18 20:57:03.000000000 +0000 +++ libbusiness-us-usps-webtools-perl-1.125/META.json 2021-05-19 21:31:32.000000000 +0000 @@ -55,6 +55,6 @@ "web" : "https://github.com/ssimms/business-us-usps-webtools" } }, - "version" : "1.124", + "version" : "1.125", "x_serialization_backend" : "JSON::PP version 2.97001" } diff -Nru libbusiness-us-usps-webtools-perl-1.124/META.yml libbusiness-us-usps-webtools-perl-1.125/META.yml --- libbusiness-us-usps-webtools-perl-1.124/META.yml 2020-09-18 20:57:03.000000000 +0000 +++ libbusiness-us-usps-webtools-perl-1.125/META.yml 2021-05-19 21:31:32.000000000 +0000 @@ -27,5 +27,5 @@ bugtracker: https://github.com/ssimms/business-us-usps-webtools/issues homepage: https://github.com/ssimms/business-us-usps-webtools repository: https://github.com/ssimms/business-us-usps-webtools.git -version: '1.124' +version: '1.125' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -Nru libbusiness-us-usps-webtools-perl-1.124/t/address_verification.t libbusiness-us-usps-webtools-perl-1.125/t/address_verification.t --- libbusiness-us-usps-webtools-perl-1.124/t/address_verification.t 2020-08-31 21:46:27.000000000 +0000 +++ libbusiness-us-usps-webtools-perl-1.125/t/address_verification.t 2021-05-19 21:05:47.000000000 +0000 @@ -21,23 +21,35 @@ "environment variables to run these tests\n"; } +my $is_testing = uc($ENV{USPS_WEBTOOLS_ENVIRONMENT}) eq 'TESTING'; + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # use_ok( $class ); my $verifier; -my $base = qq|http://testing.shippingapis.com/ShippingAPITest.dll?API=Verify&XML=%3CAddressValidateRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CIncludeOptionalElements%3Etrue%3C%2FIncludeOptionalElements%3E%3CReturnCarrierRoute%3Etrue%3C%2FReturnCarrierRoute%3E|; + +my $base = 'https://' . ($is_testing ? 'stg-' : '') . qq|production.shippingapis.com/ShippingAPI.dll?API=Verify&XML=%3CAddressValidateRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CIncludeOptionalElements%3Etrue%3C%2FIncludeOptionalElements%3E%3CReturnCarrierRoute%3Etrue%3C%2FReturnCarrierRoute%3E|; subtest setup => sub { $verifier = $class->new( { UserID => $ENV{USPS_WEBTOOLS_USERID}, Password => $ENV{USPS_WEBTOOLS_PASSWORD}, - Testing => 1, + Testing => $is_testing, } ); isa_ok( $verifier, $class ); can_ok( $verifier, $method ); }; +=pod + +2021-05-19: This test is failing because the API is no longer returning the +expected output; it now includes the following warning: + +Default address: The address you entered was found but more information is +needed (such as an apartment, suite, or box number) to match to a specific +address. + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Good response #1 subtest good_response_1 => sub { @@ -81,6 +93,8 @@ is( $hash->{Zip4}, '1441', 'Zip4 matches for Ivy Lane' ); }; +=cut + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Good response #2 subtest good_response_1 => sub { diff -Nru libbusiness-us-usps-webtools-perl-1.124/t/city_state_lookup.t libbusiness-us-usps-webtools-perl-1.125/t/city_state_lookup.t --- libbusiness-us-usps-webtools-perl-1.124/t/city_state_lookup.t 2020-08-31 21:46:27.000000000 +0000 +++ libbusiness-us-usps-webtools-perl-1.125/t/city_state_lookup.t 2021-05-19 21:06:34.000000000 +0000 @@ -21,6 +21,10 @@ "environment variables to run these tests\n"; } +my $is_testing = uc($ENV{USPS_WEBTOOLS_ENVIRONMENT}) eq 'TESTING'; + +my $base = 'https://' . ($is_testing ? 'stg-' : '') . 'production.shippingapis.com/ShippingAPI.dll'; + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # use_ok( $class ); @@ -29,7 +33,7 @@ $verifier = $class->new( { UserID => $ENV{USPS_WEBTOOLS_USERID}, Password => $ENV{USPS_WEBTOOLS_PASSWORD}, - Testing => 1, + Testing => $is_testing, } ); isa_ok( $verifier, $class ); @@ -44,7 +48,7 @@ } ); is( $url, - qq|http://testing.shippingapis.com/ShippingAPITest.dll?API=CityStateLookup&XML=%3CCityStateLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CZipCode+ID%3D%220%22%3E%3CZip5%3E90210%3C%2FZip5%3E%3C%2FZipCode%3E%3C%2FCityStateLookupRequest%3E|, + qq|$base?API=CityStateLookup&XML=%3CCityStateLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CZipCode+ID%3D%220%22%3E%3CZip5%3E90210%3C%2FZip5%3E%3C%2FZipCode%3E%3C%2FCityStateLookupRequest%3E|, "URL for 90210 is correct", ); @@ -77,7 +81,7 @@ } ); is( $url, - qq|http://testing.shippingapis.com/ShippingAPITest.dll?API=CityStateLookup&XML=%3CCityStateLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CZipCode+ID%3D%220%22%3E%3CZip5%3E20770%3C%2FZip5%3E%3C%2FZipCode%3E%3C%2FCityStateLookupRequest%3E|, + qq|$base?API=CityStateLookup&XML=%3CCityStateLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CZipCode+ID%3D%220%22%3E%3CZip5%3E20770%3C%2FZip5%3E%3C%2FZipCode%3E%3C%2FCityStateLookupRequest%3E|, "URL for 20770 is correct", ); @@ -110,7 +114,7 @@ } ); is( $url, - qq|http://testing.shippingapis.com/ShippingAPITest.dll?API=CityStateLookup&XML=%3CCityStateLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CZipCode+ID%3D%220%22%3E%3CZip5%3E21113%3C%2FZip5%3E%3C%2FZipCode%3E%3C%2FCityStateLookupRequest%3E|, + qq|$base?API=CityStateLookup&XML=%3CCityStateLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CZipCode+ID%3D%220%22%3E%3CZip5%3E21113%3C%2FZip5%3E%3C%2FZipCode%3E%3C%2FCityStateLookupRequest%3E|, "URL for 21113 is correct", ); @@ -143,7 +147,7 @@ } ); is( $url, - qq|http://testing.shippingapis.com/ShippingAPITest.dll?API=CityStateLookup&XML=%3CCityStateLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CZipCode+ID%3D%220%22%3E%3CZip5%3E21032%3C%2FZip5%3E%3C%2FZipCode%3E%3C%2FCityStateLookupRequest%3E|, + qq|$base?API=CityStateLookup&XML=%3CCityStateLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CZipCode+ID%3D%220%22%3E%3CZip5%3E21032%3C%2FZip5%3E%3C%2FZipCode%3E%3C%2FCityStateLookupRequest%3E|, "URL for 21032 is correct", ); @@ -182,7 +186,7 @@ } ); is( $url, - qq|http://testing.shippingapis.com/ShippingAPITest.dll?API=CityStateLookup&XML=%3CCityStateLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CZipCode+ID%3D%220%22%3E%3CZip5%3E21117%3C%2FZip5%3E%3C%2FZipCode%3E%3C%2FCityStateLookupRequest%3E|, + qq|$base?API=CityStateLookup&XML=%3CCityStateLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CZipCode+ID%3D%220%22%3E%3CZip5%3E21117%3C%2FZip5%3E%3C%2FZipCode%3E%3C%2FCityStateLookupRequest%3E|, "URL for Sharonwood Road is correct", ); @@ -221,7 +225,7 @@ } ); is( $url, - qq|http://testing.shippingapis.com/ShippingAPITest.dll?API=CityStateLookup&XML=%3CCityStateLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CZipCode+ID%3D%220%22%3E%3CZip5%3E99999%3C%2FZip5%3E%3C%2FZipCode%3E%3C%2FCityStateLookupRequest%3E|, + qq|$base?API=CityStateLookup&XML=%3CCityStateLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CZipCode+ID%3D%220%22%3E%3CZip5%3E99999%3C%2FZip5%3E%3C%2FZipCode%3E%3C%2FCityStateLookupRequest%3E|, "URL for Sharonwood Road Error is correct", ); diff -Nru libbusiness-us-usps-webtools-perl-1.124/t/test_or_live.t libbusiness-us-usps-webtools-perl-1.125/t/test_or_live.t --- libbusiness-us-usps-webtools-perl-1.124/t/test_or_live.t 2020-08-31 21:46:27.000000000 +0000 +++ libbusiness-us-usps-webtools-perl-1.125/t/test_or_live.t 2021-05-19 20:58:06.000000000 +0000 @@ -15,8 +15,8 @@ ok( $webtools->_testing, "I think I'm testing" ); is( ! $webtools->_live, 1, "I don't think I'm live!" ); - is( $webtools->_api_host, "testing.shippingapis.com", "Testing host is right" ); - is( $webtools->_api_path, "/ShippingAPITest.dll", "Testing path is right" ); + is( $webtools->_api_host, "stg-production.shippingapis.com", "Testing host is right" ); + is( $webtools->_api_path, "/ShippingAPI.dll", "Testing path is right" ); }; # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # diff -Nru libbusiness-us-usps-webtools-perl-1.124/t/track_confirm.t libbusiness-us-usps-webtools-perl-1.125/t/track_confirm.t --- libbusiness-us-usps-webtools-perl-1.124/t/track_confirm.t 2020-08-31 21:46:27.000000000 +0000 +++ libbusiness-us-usps-webtools-perl-1.125/t/track_confirm.t 2021-05-19 21:00:49.000000000 +0000 @@ -6,6 +6,15 @@ my $class = "Business::US::USPS::WebTools::TrackConfirm"; my $method = 'track'; +# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +unless( $ENV{USPS_WEBTOOLS_USERID} and $ENV{USPS_WEBTOOLS_PASSWORD} ) + { + plan skip_all => + "You must set the USPS_WEBTOOLS_USERID and USPS_WEBTOOLS_PASSWORD " . + "environment variables to run these tests\n"; + } + +my $is_testing = uc($ENV{USPS_WEBTOOLS_ENVIRONMENT}) eq 'TESTING'; # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # subtest setup => sub { @@ -13,17 +22,12 @@ can_ok( $class, $method ); }; -subtest credentials => sub { - ok defined $ENV{USPS_WEBTOOLS_USERID}, 'USPS_WEBTOOLS_USERID is not set'; - ok defined $ENV{USPS_WEBTOOLS_PASSWORD}, 'USPS_WEBTOOLS_PASSWORD is not set'; - }; - my $tracker; subtest create_tracker => sub { $tracker = $class->new( { UserID => $ENV{USPS_WEBTOOLS_USERID}, Password => $ENV{USPS_WEBTOOLS_PASSWORD}, - Testing => 0, + Testing => $is_testing, } ); isa_ok( $tracker, $class ); }; diff -Nru libbusiness-us-usps-webtools-perl-1.124/t/zip_code_lookup.t libbusiness-us-usps-webtools-perl-1.125/t/zip_code_lookup.t --- libbusiness-us-usps-webtools-perl-1.124/t/zip_code_lookup.t 2020-08-31 21:46:27.000000000 +0000 +++ libbusiness-us-usps-webtools-perl-1.125/t/zip_code_lookup.t 2021-05-19 21:04:32.000000000 +0000 @@ -21,6 +21,10 @@ "environment variables to run these tests\n"; } +my $is_testing = uc($ENV{USPS_WEBTOOLS_ENVIRONMENT}) eq 'TESTING'; + +my $base = 'https://' . ($is_testing ? 'stg-' : '') . 'production.shippingapis.com/ShippingAPI.dll'; + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # my $verifier; subtest setup => sub { @@ -29,13 +33,22 @@ $verifier = $class->new( { UserID => $ENV{USPS_WEBTOOLS_USERID}, Password => $ENV{USPS_WEBTOOLS_PASSWORD}, - Testing => 1, + Testing => $is_testing, } ); isa_ok( $verifier, $class ); can_ok( $verifier, $method ); }; +=pod + +2021-05-19: This test is failing because the API is no longer returning the +expected output; it now includes the following warning: + +Default address: The address you entered was found but more information is +needed (such as an apartment, suite, or box number) to match to a specific +address. + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Good Request #1 subtest good_request_1 => sub { @@ -50,7 +63,7 @@ } ); is( $url, - qq|http://testing.shippingapis.com/ShippingAPITest.dll?API=ZipCodeLookup&XML=%3CZipCodeLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CAddress+ID%3D%220%22%3E%3CFirmName%3E%3C%2FFirmName%3E%3CAddress1%3E%3C%2FAddress1%3E%3CAddress2%3E6406+Ivy+Lane%3C%2FAddress2%3E%3CCity%3EGreenbelt%3C%2FCity%3E%3CState%3EMD%3C%2FState%3E%3C%2FAddress%3E%3C%2FZipCodeLookupRequest%3E|, + qq|$base?API=ZipCodeLookup&XML=%3CZipCodeLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CAddress+ID%3D%220%22%3E%3CFirmName%3E%3C%2FFirmName%3E%3CAddress1%3E%3C%2FAddress1%3E%3CAddress2%3E6406+Ivy+Lane%3C%2FAddress2%3E%3CCity%3EGreenbelt%3C%2FCity%3E%3CState%3EMD%3C%2FState%3E%3C%2FAddress%3E%3C%2FZipCodeLookupRequest%3E|, "URL for Ivy Lane is correct", ); @@ -76,6 +89,8 @@ is( $hash->{Zip4}, '1441', 'Zip4 matches for Ivy Lane' ); }; +=cut + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Good request 2 subtest good_request_2 => sub { @@ -90,7 +105,7 @@ } ); is( $url, - qq|http://testing.shippingapis.com/ShippingAPITest.dll?API=ZipCodeLookup&XML=%3CZipCodeLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CAddress+ID%3D%220%22%3E%3CFirmName%3E%3C%2FFirmName%3E%3CAddress1%3E%3C%2FAddress1%3E%3CAddress2%3E8+Wildwood+Drive%3C%2FAddress2%3E%3CCity%3EOld+Lyme%3C%2FCity%3E%3CState%3ECT%3C%2FState%3E%3C%2FAddress%3E%3C%2FZipCodeLookupRequest%3E|, + qq|$base?API=ZipCodeLookup&XML=%3CZipCodeLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CAddress+ID%3D%220%22%3E%3CFirmName%3E%3C%2FFirmName%3E%3CAddress1%3E%3C%2FAddress1%3E%3CAddress2%3E8+Wildwood+Drive%3C%2FAddress2%3E%3CCity%3EOld+Lyme%3C%2FCity%3E%3CState%3ECT%3C%2FState%3E%3C%2FAddress%3E%3C%2FZipCodeLookupRequest%3E|, "URL for Wildwood Drive is correct", ); @@ -133,7 +148,7 @@ } ); is( $url, - qq|http://testing.shippingapis.com/ShippingAPITest.dll?API=ZipCodeLookup&XML=%3CZipCodeLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CAddress+ID%3D%220%22%3E%3CFirmName%3E%3C%2FFirmName%3E%3CAddress1%3E%3C%2FAddress1%3E%3CAddress2%3E4411+Romlon+Street%3C%2FAddress2%3E%3CCity%3EBeltsville%3C%2FCity%3E%3CState%3EMD%3C%2FState%3E%3C%2FAddress%3E%3C%2FZipCodeLookupRequest%3E|, + qq|$base?API=ZipCodeLookup&XML=%3CZipCodeLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CAddress+ID%3D%220%22%3E%3CFirmName%3E%3C%2FFirmName%3E%3CAddress1%3E%3C%2FAddress1%3E%3CAddress2%3E4411+Romlon+Street%3C%2FAddress2%3E%3CCity%3EBeltsville%3C%2FCity%3E%3CState%3EMD%3C%2FState%3E%3C%2FAddress%3E%3C%2FZipCodeLookupRequest%3E|, "URL for Romlan Street is correct", ); @@ -176,7 +191,7 @@ } ); is( $url, - qq|http://testing.shippingapis.com/ShippingAPITest.dll?API=ZipCodeLookup&XML=%3CZipCodeLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CAddress+ID%3D%220%22%3E%3CFirmName%3E%3C%2FFirmName%3E%3CAddress1%3E%3C%2FAddress1%3E%3CAddress2%3E3527+Sharonwood+Road+Apt.+3C%3C%2FAddress2%3E%3CCity%3ELaurel%3C%2FCity%3E%3CState%3EMD%3C%2FState%3E%3C%2FAddress%3E%3C%2FZipCodeLookupRequest%3E|, + qq|$base?API=ZipCodeLookup&XML=%3CZipCodeLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CAddress+ID%3D%220%22%3E%3CFirmName%3E%3C%2FFirmName%3E%3CAddress1%3E%3C%2FAddress1%3E%3CAddress2%3E3527+Sharonwood+Road+Apt.+3C%3C%2FAddress2%3E%3CCity%3ELaurel%3C%2FCity%3E%3CState%3EMD%3C%2FState%3E%3C%2FAddress%3E%3C%2FZipCodeLookupRequest%3E|, "URL for Sharonwood Road is correct", ); @@ -224,7 +239,7 @@ } ); is( $url, - qq|http://testing.shippingapis.com/ShippingAPITest.dll?API=ZipCodeLookup&XML=%3CZipCodeLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CAddress+ID%3D%220%22%3E%3CFirmName%3E%3C%2FFirmName%3E%3CAddress1%3E%3C%2FAddress1%3E%3CAddress2%3E3527+Sharonwood+Road+Apt.+3C%3C%2FAddress2%3E%3CCity%3EWilmington%3C%2FCity%3E%3CState%3EDE%3C%2FState%3E%3C%2FAddress%3E%3C%2FZipCodeLookupRequest%3E|, + qq|$base?API=ZipCodeLookup&XML=%3CZipCodeLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CAddress+ID%3D%220%22%3E%3CFirmName%3E%3C%2FFirmName%3E%3CAddress1%3E%3C%2FAddress1%3E%3CAddress2%3E3527+Sharonwood+Road+Apt.+3C%3C%2FAddress2%3E%3CCity%3EWilmington%3C%2FCity%3E%3CState%3EDE%3C%2FState%3E%3C%2FAddress%3E%3C%2FZipCodeLookupRequest%3E|, "URL for Sharonwood Road Error is correct", ); @@ -279,7 +294,7 @@ } ); is( $url, - qq|http://testing.shippingapis.com/ShippingAPITest.dll?API=ZipCodeLookup&XML=%3CZipCodeLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CAddress+ID%3D%220%22%3E%3CFirmName%3E%3C%2FFirmName%3E%3CAddress1%3E%3C%2FAddress1%3E%3CAddress2%3E1600+Pennsylvania+Avenue%3C%2FAddress2%3E%3CCity%3EWashington%3C%2FCity%3E%3CState%3EDC%3C%2FState%3E%3C%2FAddress%3E%3C%2FZipCodeLookupRequest%3E|, + qq|$base?API=ZipCodeLookup&XML=%3CZipCodeLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CAddress+ID%3D%220%22%3E%3CFirmName%3E%3C%2FFirmName%3E%3CAddress1%3E%3C%2FAddress1%3E%3CAddress2%3E1600+Pennsylvania+Avenue%3C%2FAddress2%3E%3CCity%3EWashington%3C%2FCity%3E%3CState%3EDC%3C%2FState%3E%3C%2FAddress%3E%3C%2FZipCodeLookupRequest%3E|, "URL for Pennsylvania Avenue Error is correct", ); @@ -330,7 +345,7 @@ } ); is( $url, - qq|http://testing.shippingapis.com/ShippingAPITest.dll?API=ZipCodeLookup&XML=%3CZipCodeLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CAddress+ID%3D%220%22%3E%3CFirmName%3E%3C%2FFirmName%3E%3CAddress1%3E%3C%2FAddress1%3E%3CAddress2%3E123+Main+Street%3C%2FAddress2%3E%3CCity%3EWashington%3C%2FCity%3E%3CState%3EZZ%3C%2FState%3E%3C%2FAddress%3E%3C%2FZipCodeLookupRequest%3E|, + qq|$base?API=ZipCodeLookup&XML=%3CZipCodeLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CAddress+ID%3D%220%22%3E%3CFirmName%3E%3C%2FFirmName%3E%3CAddress1%3E%3C%2FAddress1%3E%3CAddress2%3E123+Main+Street%3C%2FAddress2%3E%3CCity%3EWashington%3C%2FCity%3E%3CState%3EZZ%3C%2FState%3E%3C%2FAddress%3E%3C%2FZipCodeLookupRequest%3E|, "URL for Main Street Error is correct", ); @@ -382,7 +397,7 @@ } ); is( $url, - qq|http://testing.shippingapis.com/ShippingAPITest.dll?API=ZipCodeLookup&XML=%3CZipCodeLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CAddress+ID%3D%220%22%3E%3CFirmName%3E%3C%2FFirmName%3E%3CAddress1%3E%3C%2FAddress1%3E%3CAddress2%3E123+Main+Street%3C%2FAddress2%3E%3CCity%3ETrenton%3C%2FCity%3E%3CState%3ENJ%3C%2FState%3E%3C%2FAddress%3E%3C%2FZipCodeLookupRequest%3E|, + qq|$base?API=ZipCodeLookup&XML=%3CZipCodeLookupRequest+USERID%3D%22$ENV{USPS_WEBTOOLS_USERID}%22+PASSWORD%3D%22$ENV{USPS_WEBTOOLS_PASSWORD}%22%3E%3CAddress+ID%3D%220%22%3E%3CFirmName%3E%3C%2FFirmName%3E%3CAddress1%3E%3C%2FAddress1%3E%3CAddress2%3E123+Main+Street%3C%2FAddress2%3E%3CCity%3ETrenton%3C%2FCity%3E%3CState%3ENJ%3C%2FState%3E%3C%2FAddress%3E%3C%2FZipCodeLookupRequest%3E|, "URL for Trenton, NJ Error is correct", );