This program is free software you can redistribute it and/or modify it under the terms of the Artistic License 2.0. The WebTools API is documented on the US Postal Service's website: SOURCE AVAILABILITYĬopyright © 2020, Steve Simms. The modules choose this host when you have set Testing to a true value. The modules choose this host when you have not set Testing to a true value. If the response was an error, this method sets various fields in the object: $self-> live_server_host Returns true if the response to the last request was an error, and false otherwise. So far it only fixes up line endings and normalizes some error output for inconsistent responses from different physical servers. Returns the response from the web service. Returns the transaction from the Mojo::UserAgent request. USPS Web Tools API registration resulting in generation of Web Tools user ID.So far, all requests are GET request with all of the data in the query string. If you have not registered, go to and follow the instructions to register for the APIs. Returns the URL for the request to the web service. To use the USPS APIs you must be a registered user. You need to get this from the US Postal Service. Returns the Password for the web service. If the Testing key is false or not present, the object uses the live server details. If you pass a true value with the Testing key, the object will use the testing server host name and the testing URL path. If new cannot find both the User ID and the Password, it croaks. If you don't pass the UserID or Password entries, new looks in the environment variables USPS_WEBTOOLS_USERID and USPS_WEBTOOLS_PASSWORD. Testing true or false, to select the right server Password the password provided by the USPS Pass is an anonymous hash with these keys: UserID the user id provided by the USPS USPSManager m new USPSManager ('YOURUSERID', true) Address a new Address () a.Address2 '6406 Ivy Lane' a.City 'Greenbelt' a. USPS official Developers Guide - PDF format. Register on the USPS Web Tools API Portalfor your Web Tools ID. To authenticate a request add the USERID attribute to the outermost XML element and set the value equal to your Web Tools User ID. So far, the only subclass in this distribution is Business::US::USPS::WebTools::AddressStandardization. USPS Web Tools API are accessible using your Web Tools User ID. The interesting stuff happens in one of the subclasses which implement a particular service. The USPS offers several services, and this module handles the parts common to all of them: making the request, getting the response, parsing error reponses, and so on. This is the base class for the WebTools web service from the US Postal Service. # see subclasses for API details DESCRIPTION Request.ts | 93.5 | 61.53 | 100 | 93.Business::US::USPS::WebTools - Use the US Postal Service Web Tools SYNOPSIS use Business::US::USPS::WebTools log ( result ) Coverage -|-|-|-|-|-įile | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
0 Comments
Leave a Reply. |