Programmer's Reference Guide
| Zend_Service_StrikeIron |
Zend_Service_StrikeIron: Bundled Services
Zend_Service_StrikeIron comes with wrapper classes for three popular StrikeIron services.
ZIP Code Information
Zend_Service_StrikeIron_ZipCodeInfo provides a client for StrikeIron's Zip Code Information Service. For more information on this service, visit these StrikeIron resources:
The service contains a getZipCode() method that will retrieve information about a United States ZIP code or Canadian postal code:- 'password' => 'your-password'));
- // Get a client for the Zip Code Information service
- // Get the Zip information for 95014
- $zips = $response->serviceResult;
- // Display the results
- if ($zips->count == 0) {
- echo 'No results found';
- } else {
- // a result with one single zip code is returned as an object,
- // not an array with one element as one might expect.
- }
- // print all of the possible results
- foreach ($zips->zipCodes as $z) {
- $info = $z->zipCodeInfo;
- // show all properties
- // or just the city name
- }
- }
- // Detailed status information
- // http://www.strikeiron.com/exampledata/StrikeIronZipCodeInformation_v3.pdf
- $status = $response->serviceStatus;
U.S. Address Verification
Zend_Service_StrikeIron_USAddressVerification provides a client for StrikeIron's U.S. Address Verification Service. For more information on this service, visit these StrikeIron resources:
The service contains a verifyAddressUSA() method that will verify an address in the United States:
- 'password' => 'your-password'));
- // Get a client for the Zip Code Information service
- // Address to verify. Not all fields are required but
- // supply as many as possible for the best results.
- 'addressLine1' => '19200 Stevens Creek Blvd',
- 'addressLine2' => '',
- 'city_state_zip' => 'Cupertino CA 95014');
- // Verify the address
- $result = $verifier->verifyAddressUSA($address);
- // Display the results
- if ($result->addressErrorNumber != 0) {
- } else {
- // show all properties
- // or just the firm name
- // valid address?
- $valid = ($result->valid == 'VALID');
- }
Sales & Use Tax Basic
Zend_Service_StrikeIron_SalesUseTaxBasic provides a client for StrikeIron's Sales & Use Tax Basic service. For more information on this service, visit these StrikeIron resources:
The service contains two methods, getTaxRateUSA() and getTaxRateCanada(), that will retrieve sales and use tax data for the United States and Canada, respectively.
- 'password' => 'your-password'));
- // Get a client for the Sales & Use Tax Basic service
- // Query tax rate for Ontario, Canada
- // Query tax rate for Cupertino, CA USA
| Zend_Service_StrikeIron |
Select a Version
Languages Available
Components
Search the Manual
Navigation
- Programmer's Reference Guide
- Programmer's Reference Guide
- Zend Framework Reference
- Zend_Service
- Introduction
- Zend_Service_Akismet
- Zend_Service_Amazon
- Zend_Service_Amazon_Ec2
- Zend_Service_Amazon_Ec2: Instances
- Zend_Service_Amazon_Ec2: Windows Instances
- Zend_Service_Amazon_Ec2: Reserved Instances
- Zend_Service_Amazon_Ec2: CloudWatch Monitoring
- Zend_Service_Amazon_Ec2: Amazon Machine Images (AMI)
- Zend_Service_Amazon_Ec2: Elastic Block Storage (EBS)
- Zend_Service_Amazon_Ec2: Elastic IP Addresses
- Zend_Service_Amazon_Ec2: Keypairs
- Zend_Service_Amazon_Ec2: Regions and Availability Zones
- Zend_Service_Amazon_Ec2: Security Groups
- Zend_Service_Amazon_S3
- Zend_Service_Amazon_Sqs
- Zend_Service_Audioscrobbler
- Zend_Service_Delicious
- Zend_Service_DeveloperGarden
- Zend_Service_Flickr
- Zend_Service_LiveDocx
- Zend_Service_Nirvanix
- Zend_Service_ReCaptcha
- Zend_Service_Simpy
- Zend_Service_SlideShare
- Zend_Service_StrikeIron
- Zend_Service_StrikeIron: Bundled Services
- Zend_Service_StrikeIron: Advanced Uses
- Zend_Service_Technorati
- Zend_Service_Twitter
- Zend_Service_WindowsAzure
- Zend_Service_Yahoo
