Once you have used the
getService() method to get a client
for a particular StrikeIron service, you can utilize that client
by calling methods on it just like any other PHP object.
$strikeIron = new Zend_Service_StrikeIron(array('username' => 'your-username',
'password' => 'your-password'));
// Get a client for the Sales & Use Tax Basic service
$taxBasic = $strikeIron->getService(array('class' => 'SalesUseTaxBasic'));
// Query tax rate for Ontario, Canada
$rateInfo = $taxBasic->getTaxRateCanada(array('province' => 'ontario'));
In the example above, the
getService() method is used
to return a client to the Sales &
Use Tax Basic service. The client object is stored in
getTaxRateCanada() method is then called on the
service. An associative array is used to supply keyword parameters to
the method. This is the way that all StrikeIron methods are called.
The result from
getTaxRateCanada() is stored in
$rateInfo and has properties like province
Many of the StrikeIron services are as simple to use as the example above. See Bundled Services for detailed information on three StrikeIron services.