Skip to content

Commit

Permalink
### 0.0.8 - Release help documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sudiptochoudhury committed Jul 16, 2018
1 parent 46dd9d8 commit 313bc48
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@
- Generate and update cleaner documentation

### 0.0.7
- Generate and update cleaner documentation
- Generate and update cleaner documentation

### 0.0.8
- Release help documentation
79 changes: 79 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,86 @@
# php-zoho-subscriptions

[![Latest Stable Version](https://poser.pugx.org/sudiptochoudhury/php-zoho-subscriptions/version)](https://packagist.org/packages/sudiptochoudhury/php-zoho-subscriptions)
[![Latest Unstable Version](https://poser.pugx.org/sudiptochoudhury/php-zoho-subscriptions/v/unstable)](//packagist.org/packages/sudiptochoudhury/php-zoho-subscriptions)
[![License](https://poser.pugx.org/sudiptochoudhury/php-zoho-subscriptions/license)](https://packagist.org/packages/sudiptochoudhury/php-zoho-subscriptions)
[![Total Downloads](https://poser.pugx.org/sudiptochoudhury/php-zoho-subscriptions/downloads)](https://packagist.org/packages/sudiptochoudhury/php-zoho-subscriptions)
[![composer.lock available](https://poser.pugx.org/sudiptochoudhury/php-zoho-subscriptions/composerlock)](https://packagist.org/packages/sudiptochoudhury/php-zoho-subscriptions)


Zoho Subscriptions API Client for PHP

```php

use SudiptoChoudhury\Zoho\Subscriptions\Api;

...

$subscriptions = new Api([
'authtoken' => '<<Zoho Subscriptions Auth Token>>', // https://accounts.zoho.com/apiauthtoken/nb/create
'zohoOrgId' => '<<Zoho Organization ID>>',
]);


$resultJson = $subscriptions->addCustomer($data); // create a customer

$resultJson = $subscriptions->addSubscription($data); // create a subscription

```
<a name="install"/>

## Installation

<a name="requirements"/>

### Requirements

- Any flavour of PHP 7.0+ should do

<a name="install-composer"/>

### Install With Composer

You can install the library via [Composer](http://getcomposer.org) by adding the following line to the
**require** block of your *composer.json* file (replace dev-master with latest stable version):

````
"sudiptochoudhury/php-zoho-subscriptions": "dev-master"
````

or run the following command:

````
composer require sudiptochoudhury/php-zoho-subscriptions
````

<a name="setting-up"/>

## Setting up

All you need to do is to retrieve from your Zoho account and set the AuthToken and Organization ID in the constructor.
````php
new Api([
'authtoken' => '<<Zoho Subscriptions Auth Token>>', // https://accounts.zoho.com/apiauthtoken/nb/create
'zohoOrgId' => '<<Zoho Organization ID>>',
]);
````

<a name="how-to"/>

## How to use

Next, call the desired method from the table given below. In some methods you may need to pass parameters. The parameters
are to be passed as an associative array. The required list of parameters can be found in the parameters column of the
table or you may get more details going to the original Zoho Subscription API documentation.

Examples:
````php
$resultJson = $subscriptions->getOrganizations();

$resultJson = $subscriptions->addCustomer(['display_name'=> 'Sudipto Choudhury', 'email'=> '[email protected]']); // create a customer

````

### Available API Methods

| Method & Endpoint | Parameters | Description |
Expand Down

0 comments on commit 313bc48

Please sign in to comment.