Skip to content

Commit

Permalink
Update the term Link with Product in the README related to links
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwch committed Aug 2, 2016
1 parent 900e4d4 commit b959de6
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions OLD_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ $ php composer.phar require instamojo/instamojo-php
$api = new Instamojo\Instamojo(API_KEY, AUTH_TOKEN);
```

### Create a Link
### Create a product

```php
try {
$response = $api->linkCreate(array(
'title'=>'Hello API',
'description'=>'Create a new Link easily',
'description'=>'Create a new product easily',
'base_price'=>100,
'cover_image'=>'/path/to/photo.jpg'
));
Expand All @@ -39,14 +39,14 @@ catch (Exception $e) {
}
```

This will give you JSON object containing details of the Link that was just created.
This will give you JSON object containing details of the product that was just created.

### Edit a Link
### Edit a product

```php
try {
$response = $api->linkEdit(
'hello-api', // You must specify the slug of the Link
'hello-api', // You must specify the slug of the product
array(
'title'=>'A New Title',
));
Expand All @@ -57,7 +57,7 @@ catch (Exception $e) {
}
```

### List all Links
### List all products

```php
try {
Expand Down Expand Up @@ -97,28 +97,28 @@ catch (Exception $e) {

You have these functions to interact with the API:

* `linksList()` List all Links created by authenticated User.
* `linkDetail($slug)` Get details of Link specified by its unique slug.
* `linkCreate(array $link)` Create a new Link.
* `linkEdit($slug, array $link)` Edit an existing Link.
* `linkDelete($slug)` Archvive a Link - Archived Links cannot be generally accessed by the API. User can still view them on the Dashboard at instamojo.com.
* `linksList()` List all products created by authenticated User.
* `linkDetail($slug)` Get details of product specified by its unique slug.
* `linkCreate(array $link)` Create a new product.
* `linkEdit($slug, array $link)` Edit an existing product.
* `linkDelete($slug)` Archive a product - Archived producrs cannot be generally accessed by the API. User can still view them on the Dashboard at instamojo.com.
* `paymentsList()` List all Payments linked to User's account.
* `paymentDetail($payment_id)` Get details of a Payment specified by its unique Payment ID. You may receive the Payment ID via `paymentsList()` or via URL Redirect function or as a part of Webhook data.

## Link Creation Parameters
## Product Creation Parameters

### Required

* `title` - Title of the Link, be concise.
* `title` - Title of the product, be concise.
* `description` - Describe what your customers will get, you can add terms and conditions and any other relevant information here. Markdown is supported, popular media URLs like Youtube, Flickr are auto-embedded.
* `base_price` - Price of the Link. This may be 0, if you want to offer it for free.
* `base_price` - Price of the product. This may be 0, if you want to offer it for free.

### File and Cover Image
* `file_upload` - Full path to the file you want to sell. This file will be available only after successful payment.
* `cover_image` - Full path to the IMAGE you want to upload as a cover image.

### Quantity
* `quantity` - Set to 0 for unlimited sales. If you set it to say 10, a total of 10 sales will be allowed after which the Link will be made unavailable.
* `quantity` - Set to 0 for unlimited sales. If you set it to say 10, a total of 10 sales will be allowed after which the product will be made unavailable.

### Post Purchase Note
* `note` - A post-purchase note, will only displayed after successful payment. Will also be included in the ticket/ receipt that is sent as attachment to the email sent to buyer. This will not be shown if the payment fails.
Expand Down

0 comments on commit b959de6

Please sign in to comment.