mhrabovcin / zuora-rest
A PHP client for integrating with the Zuora API
Installs: 28 832
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 3
Forks: 7
Open Issues: 0
Requires
- php: ^7.1|^8.0
Requires (Dev)
- pdepend/pdepend: ~1.0
- phpmd/phpmd: ~1.0
- phpunit/phpunit: ^9.5
- satooshi/php-coveralls: *
- sebastian/phpcpd: ~2.0
- squizlabs/php_codesniffer: ^3.4
This package is not auto-updated.
Last update: 2024-05-11 14:28:27 UTC
README
Simple Zuora REST API client.
Installation
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.
Usage
To initialize client use following code:
use \Zuora\Client; $client = Client::factory(array( 'username' => 'email@exmaple.com', '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";
For developers
Refer to PHP Project Starter's documentation for the Apache Ant targets supported by this project.
TODO
- Add lazy result loading