The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::Easypost::Address - Class to represent an Easypost address

VERSION

version 0.15

ATTRIBUTES

street1

A field for street information, typically a house number, a street name and a direction

street2

A field for any additional street information like an apartment or suite number

city

The city in the address

state

The U.S. state for this address

zip

The U.S. zipcode for this address

phone

Any phone number associated with this address. Some carrier services like Next-Day or Express require a sender phone number.

name

A name associated with this address.

country

The country code. Default to US.

METHODS

_build_fieldnames

Attributes that make up an Address, from Net::Easypost::Resource

_build_role

Prefix to data when POSTing to the Easypost API about Address objects

_build_operation

Base API endpoint for operations on Address objects

clone

Make a new copy of this object and return it.

as_string

Format this address as it might be seen on a mailing label. This class overloads stringification using this method, so something like say $addr should just work.

merge

This method takes a Net::Easypost::Address object and an arrayref of fields to copy into this object. This method only merges fields that are defined on the other object.

verify

This method takes a Net::Easypost::Address object and verifies its underlying address.

If a non-US address is asked for verification, a warning will be emitted and the object itself will be returned.

AUTHOR

Mark Allen <mrallen1@yahoo.com>, Hunter McMillen <mcmillhj@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Mark Allen.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.