Module: USPS
- Defined in:
- lib/USPS/address.rb
Overview
address.rb
Copyright © 2006 Gregor N. Purdy. All rights reserved.
This program is free software. It is subject to the same license as Ruby.
Classes
-
((<Address>))
Address
Synopsis
require "USPS/ZipLookup"
require "USPS/Address"
address = USPS::Address.new(delivery_address, city, state)
zlu = USPS::ZipLookup.new()
matches = zlu.std_addr(address)
if matches.size > 0
printf "\n%d matches:\n", matches.size
matches.each { |match|
# print "-" x 39, "\n"
print match.to_dump
print "\n";
}
# print "-" x 39, "\n"
else
print "No matches!\n"
end
Description
Results from USPS::ZipLookup calls are of this type.
Class to represent U.S. postal addresses for the purpose of standardizing via the U.S. Postal Service’s web site:
BE SURE TO READ AND UNDERSTAND THE TERMS OF USE SECTION IN THE DOCUMENTATION, WHICH MAY BE FOUND AT THE END OF THIS SOURCE CODE.
Class Methods
Instance Methods
— Address#dump() — Address#firm() — Address#urbanization() — Address#delivery_address() — Address#city() — Address#state() — Address#zip_code() — Address#carrier_route() Detailed information (see the U.S. Postal Service web site for definitions at L<zip4.usps.com/zip4/pu_mailing_industry_def.htm>): — Address#county() Detailed information (see the U.S. Postal Service web site for definitions at L<zip4.usps.com/zip4/pu_mailing_industry_def.htm>): — Address#delivery_point() Detailed information (see the U.S. Postal Service web site for definitions at L<zip4.usps.com/zip4/pu_mailing_industry_def.htm>): — Address#check_digit() Detailed information (see the U.S. Postal Service web site for definitions at L<zip4.usps.com/zip4/pu_mailing_industry_def.htm>): — Address#lac_indicator() Detailed information (see the U.S. Postal Service web site for definitions at L<zip4.usps.com/zip4/pu_mailing_industry_def.htm>): — Address#elot_sequence() Detailed information (see the U.S. Postal Service web site for definitions at L<zip4.usps.com/zip4/pu_mailing_industry_def.htm>): — Address#elot_indicator() Detailed information (see the U.S. Postal Service web site for definitions at L<zip4.usps.com/zip4/pu_mailing_industry_def.htm>): — Address#record_type() Detailed information (see the U.S. Postal Service web site for definitions at L<zip4.usps.com/zip4/pu_mailing_industry_def.htm>): — Address#pmb_designator() Detailed information (see the U.S. Postal Service web site for definitions at L<zip4.usps.com/zip4/pu_mailing_industry_def.htm>): — Address#pmb_number() Detailed information (see the U.S. Postal Service web site for definitions at L<zip4.usps.com/zip4/pu_mailing_industry_def.htm>): — Address#default_address() Detailed information (see the U.S. Postal Service web site for definitions at L<zip4.usps.com/zip4/pu_mailing_industry_def.htm>): — Address#early_warning() Detailed information (see the U.S. Postal Service web site for definitions at L<zip4.usps.com/zip4/pu_mailing_industry_def.htm>): — Address#valid() Detailed information (see the U.S. Postal Service web site for definitions at L<zip4.usps.com/zip4/pu_mailing_industry_def.htm>):
History
$Id: address.rb 2255 2006-08-07 05:39:57Z gregor $
TERMS OF USE
BE SURE TO READ AND FOLLOW THE UNITED STATES POSTAL SERVICE TERMS OF USE PAGE AT C<www.usps.gov/disclaimer.html>. IN PARTICULAR, NOTE THAT THEY DO NOT PERMIT THE USE OF THEIR WEB SITE’S FUNCTIONALITY FOR COMMERCIAL PURPOSES. DO NOT USE THIS CODE IN A WAY THAT VIOLATES THE TERMS OF USE.
The author believes that the example usage given above does not violate these terms, but sole responsibility for conforming to the terms of use belongs to the user of this code, not the author.
Author
Gregor N. Purdy, C<[email protected]>.
Copyright
Copyright © 2006 Gregor N. Purdy. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Ruby itself.
Defined Under Namespace
Classes: Address