diff --git a/documents/items.md b/documents/items.md index 7d48dfc2..6231894f 100644 --- a/documents/items.md +++ b/documents/items.md @@ -23,12 +23,22 @@ client.item.create({ **Response:** ```json { - "id": "item_7Oxp4hmm6T4SCn", + "id": "item_JnQ2kRGq8Kbte3", "active": true, "name": "Book / English August", "description": "An indian story, Booker prize winner.", "amount": 20000, - "currency": "INR" + "unit_amount": 20000, + "currency": "INR", + "type": "invoice", + "unit": null, + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "tax_id": null, + "tax_group_id": null, + "created_at": 1656529427 } ``` @@ -47,36 +57,31 @@ client.item.all(options) | to | timestamp | timestamp before which the item were created | | count | integer | number of item to fetch (default: 10) | | skip | integer | number of item to be skipped (default: 0) | +| active | integer | Fetches number of active or inactive items. The value is `1` for active items and `0` for inactive items. | **Response:** ```json { "entity": "collection", - "count": 3, + "count": 1, "items": [ { - "id": "item_7Oy8OMV6BdEAac", - "active": true, - "name": "Book / Ignited Minds", - "description": null, - "amount": 15000, - "currency": "INR" - }, - { - "id": "item_7Oxp4hmm6T4SCn", + "id": "item_JnQ2kRGq8Kbte3", "active": true, "name": "Book / English August", "description": "An indian story, Booker prize winner.", "amount": 20000, - "currency": "INR" - }, - { - "id": "item_7OxoGnoxCuUKbo", - "active": true, - "name": "Book / English August", - "description": null, - "amount": 20000, - "currency": "INR" + "unit_amount": 20000, + "currency": "INR", + "type": "invoice", + "unit": null, + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "tax_id": null, + "tax_group_id": null, + "created_at": 1656529427 } ] } @@ -96,12 +101,22 @@ client.item.fetch(itemId) **Response:** ```json { - "id": "item_7Oxp4hmm6T4SCn", + "id": "item_JnQ2kRGq8Kbte3", "active": true, "name": "Book / English August", "description": "An indian story, Booker prize winner.", "amount": 20000, - "currency": "INR" + "unit_amount": 20000, + "currency": "INR", + "type": "invoice", + "unit": null, + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "tax_id": null, + "tax_group_id": null, + "created_at": 1656529427 } ``` @@ -115,7 +130,7 @@ client.item.edit(itemId,{ "description": "New descirption too. :).", "amount": 20000, "currency": "INR", - "active": true + "active": True }) ``` **Parameters** @@ -132,12 +147,22 @@ client.item.edit(itemId,{ **Response:** ```json { - "id": "item_7Oy8OMV6BdEAac", + "id": "item_JnQ2kRGq8Kbte3", "active": true, "name": "Book / Ignited Minds - Updated name!", - "description": "New descirption too. :)", - "amount": 15000, - "currency": "INR" + "description": "New descirption too. :).", + "amount": 20000, + "unit_amount": 20000, + "currency": "INR", + "type": "invoice", + "unit": null, + "tax_inclusive": false, + "hsn_code": null, + "sac_code": null, + "tax_rate": null, + "tax_id": null, + "tax_group_id": null, + "created_at": 1656529427 } ``` -------------------------------------------------------------------------------------------------------