Mark Allen > Net-Easypost-0.09 > Net::Easypost::Address

Download:
Net-Easypost-0.09.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.09   Source   Latest Release: Net-Easypost-0.13

NAME ^

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

VERSION ^

version 0.09

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.

role

The role of this address. For example, if this is a recipient, it is in the 'to' role. If it's the sender's address, it's in the 'from' role. Defaults to 'address'.

order

The order attributes should be processed during serialization or cloning. Defaults to name, street1, street2, city, state, zip, phone.

METHODS ^

serialize

Format the defined attributes for a call to the Easypost service. Takes an arrayref of attributes to serialize. Defaults to the order attribute.

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.

AUTHOR ^

Mark Allen <mrallen1@yahoo.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.

syntax highlighting: