Simple Zuora REST API client.
Zuora REST PHP Client can be installed with Composer by adding it as a dependency to your project's composer.json file.
{
"require": {
"mhrabovcin/zuora-rest": "*"
}
}
Please refer to Composer's documentation for more detailed installation and usage instructions.
To initialize client use following code:
use \Zuora\Client;
$client = Client::factory(array(
'username' => '[email protected]',
'password' => 'secretpassword',
// For production endpoint
'endpoint' => 'https://api.zuora.com/rest'
));
Client has method for querying Zuora API
$account = $client->getAccount('A0000001');
print $account->getAccountNumber() . "\n"; // A0000001
print $account->getBillToContact()->getFirstName() . "\n"; // John
$credit_cards = $cliennt->getCreditCards('A0000001');
$card = reset($credit_cards);
print $card->isDefaultPaymentMethod() . "\n";
print $card->getCardHolderInfo()->getCardHolderName() . "\n";
Refer to PHP Project Starter's documentation for the Apache Ant targets supported by this project.
- Add lazy result loading