The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

WWW::PostalMethods - Interface to the PostalMethods API

SYNOPSIS

my $pm = WWW::PostalMethods->new( username => 'emperorzurg', password => 'buzzmustdie', work_mode => 'Development', );

$pm->send_letter( description => 'Reminder to buy beer', extension => 'html', data => qq| <h1>Hello!</h1> <p>This is an automated notification that you should buy beer. |, );

METHODS

new

Returns a new WWW::PostalMethods object.

Takes the following required parameters:

username - Your PostalMethods.com username

password - Your PostalMethods.com password

and the following optional parameters:

work_mode - The work mode to use (Development or Production) - defaults to Development

send_letter

Sends a new letter via PostalMethods.

Takes the following required parameters:

description - Describes the letter

extension - File extension

And one of the following parameters:

data - The data to be passed

base64_data - The data to be passed, base64-encoded

api_call

Direct all to make a PostalPathods API call.

Takes the call and a hash reference of parameters as an API call.

The username and password will be auto-filled, the rest is up to you.

TO DO

This is a very simplistic implementation. Native support of more complex queries would be neat.

More to come, patches also welcome.

DEPENDENCIES

SOAP::Lite, MIME::Base64

AUTHORS

OHPA Software (http://ohpasw.com)

COPYRIGHT & LICENSE

Copyright (C) 2013 OHPA Software.

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