Zuora REST API Code Library in PHP
The code libraries, including any sample code, are provided “AS IS”, for demonstration purposes only. Zuora does not guarantee or make any representations regarding the use, results of use, accuracy, security, timeliness, or completeness of any data or information relating to the sample code. You, the customer, are responsible for making sure that your implementation is functional and secure.
Go to Zuora Community to report issues or discuss these samples with your peers.
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Build package: class io.swagger.codegen.languages.PhpClientCodegen
Requirements
PHP 5.4.0 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/zuora/codelibrary-php.git"
}
],
"require": {
"zuora/codelibrary-php": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to/SwaggerClient-php/autoload.php');
Tests
To run the unit tests:
composer install
./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\AccountingCodesApi();
$ac_id = "ac_id_example"; // string | ID of the accounting code you want to delete.
try {
$result = $api_instance->dELETEAccountingCode($ac_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountingCodesApi->dELETEAccountingCode: ', $e->getMessage(), PHP_EOL;
}
?>
Documentation for API Endpoints
All documentation can be found in the Developer Center, in the API Reference.