-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sdk update with test case and readme doc (#43)
* Addon update with test case and readme doc * Order update with readme doc * Update paymentlink with test cases * Change edit method name and doc correction of upi PL * Few changes in addon readme * changed order edit method name and doc correction * Fix comment for update order * Update subscription with unit test (#47) * Update subscription with unit test * Removed CreateRegistrationLink from subscription module * Update item module with test case (#50) * Update item module with test case * Condition for null and empty array response * Settlement module with test case (#51) * Settlement module with test case * Few changes according to review comments * Fund account module with test case (#55) * Fund account module with test case * few changes according to review comments * update customers with testcase (#44) * update customers with testcase * resolved pr comments * added url escape * json eol fixed * fixed eol * Update qrcode (#48) * added qrcode with readme * fix pr corrections * fixed eol and remove extra space * fixed eol Co-authored-by: sonyy-m <[email protected]> * Updated payment with unit test (#49) * update payment & added readme * fixed PR correction * fixed eol in json * fixed eol * fix eol from json files * added eol in fake_payment * added eol in fake_payment * update virtualaccount & readme (#52) * update virtualaccount & readme * update virtualaccount & readme * code cleanup * fixed eol json * fixed eol * readme corrections Co-authored-by: sonyy-m <[email protected]> * Update refund & readme (#53) * add edit refund and readme * fixed eol * url escape & readme * refund.md notes indentation * update invoice and readme (#54) * update invoice and readme * comments correction * update test function * Add CreateRegistrationLink to invoice Co-authored-by: mudududla.sony <[email protected]> Co-authored-by: sonyy-m <[email protected]> * Update request.go * Update settlement.go * Update virtualAccount.md * Update readme (#56) * Added readme documents for each module * Update readme * Updated CreateRegistrationLink api * Update readme.md * Update card.md * Update Version (#57) * Update Version * Update CHANGELOG.md Co-authored-by: ankitdas13 <[email protected]>
- Loading branch information
1 parent
980e9c2
commit 937c0c5
Showing
80 changed files
with
11,542 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [1.0.0] - 2022-04-29 | ||
|
||
### Added | ||
|
||
- QR code end point API | ||
- Settlement end point API | ||
- Fund Account end point API | ||
- Item end point API | ||
- New APIs for Invoices (Edit, Cancel, Issue, Delete, Send/resend) | ||
- New API for Customers (Fetch all customers) | ||
- New APIs for PaymentLinks (Cancel, Update, Send/Resend) | ||
- New APIs for Subscriptions (Update, Pause, Resume, Cancel, Pending update, Delete offer) | ||
- New API for Addons (Fetch all Addons) | ||
- New API for Refund (Update refund) | ||
- New APIs for Payments (Update, Create recurring, Create Json, Payment downtime details, refunds of a payment) | ||
- New APIs for Virtual Account (Add receiver, add an allowed payer account, delete an allowed payer account) | ||
- Updated Testcases | ||
- Updated Readme | ||
|
||
### Changed | ||
|
||
- Request method of update order from `put` to `patch` | ||
- Request method of update customer from `post` to `put` | ||
|
||
## 0.1 | ||
|
||
### Added | ||
|
||
- Initial Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,180 @@ | ||
## Addons | ||
|
||
### Create an addon | ||
|
||
```go | ||
subscriptionId := "sub_00000000000001" | ||
data := map[string]interface{}{ | ||
"item": map[string]interface{}{ | ||
"name":"Extra appala (papadum)", | ||
"amount":3000, | ||
"currency":"INR", | ||
"description":"1 extra oil fried appala with meals", | ||
}, | ||
"quantity":2, | ||
} | ||
body, err := client.Subscription.CreateAddon(subscriptionId, data, nil) | ||
``` | ||
|
||
**Parameters:** | ||
|
||
| Name | Type | Description | | ||
|-------|-----------|--------------------------------------------------| | ||
| subscriptionId* | string | The subscription ID to which the add-on is being added. | | ||
| items* | object | Details of the add-on you want to create. | | ||
| quantity | integer | This specifies the number of units of the add-on to be charged to the customer. Defaults to 1 | | ||
|
||
**Response:** | ||
```json | ||
{ | ||
"id":"ao_00000000000001", | ||
"entity":"addon", | ||
"item":{ | ||
"id":"item_00000000000001", | ||
"active":true, | ||
"name":"Extra appala (papadum)", | ||
"description":"1 extra oil fried appala with meals", | ||
"amount":30000, | ||
"unit_amount":30000, | ||
"currency":"INR", | ||
"type":"addon", | ||
"unit":null, | ||
"tax_inclusive":false, | ||
"hsn_code":null, | ||
"sac_code":null, | ||
"tax_rate":null, | ||
"tax_id":null, | ||
"tax_group_id":null, | ||
"created_at":1581597318, | ||
"updated_at":1581597318 | ||
}, | ||
"quantity":2, | ||
"created_at":1581597318, | ||
"subscription_id":"sub_00000000000001", | ||
"invoice_id":null | ||
} | ||
``` | ||
------------------------------------------------------------------------------------------------------- | ||
|
||
### Fetch all addons | ||
|
||
```go | ||
options := map[string]interface{}{ | ||
"count": 1, | ||
} | ||
body, err := client.Addon.All(options, nil) | ||
``` | ||
|
||
**Parameters:** | ||
|
||
| Name | Type | Description | | ||
|-------|-----------|--------------------------------------------------| | ||
| from | timestamp | timestamp after which the payments were created | | ||
| to | timestamp | timestamp before which the payments were created | | ||
| count | integer | number of payments to fetch (default: 10) | | ||
| skip | integer | number of payments to be skipped (default: 0) | | ||
|
||
**Response:** | ||
```json | ||
{ | ||
"entity": "collection", | ||
"count": 1, | ||
"items": [ | ||
{ | ||
"id": "ao_00000000000002", | ||
"entity": "addon", | ||
"item": { | ||
"id": "item_00000000000002", | ||
"active": true, | ||
"name": "Extra sweet", | ||
"description": "1 extra sweet of the day with meals", | ||
"amount": 90000, | ||
"unit_amount": 90000, | ||
"currency": "INR", | ||
"type": "addon", | ||
"unit": null, | ||
"tax_inclusive": false, | ||
"hsn_code": null, | ||
"sac_code": null, | ||
"tax_rate": null, | ||
"tax_id": null, | ||
"tax_group_id": null, | ||
"created_at": 1581597318, | ||
"updated_at": 1581597318 | ||
}, | ||
"quantity": 1, | ||
"created_at": 1581597318, | ||
"subscription_id": "sub_00000000000001", | ||
"invoice_id": "inv_00000000000001" | ||
} | ||
] | ||
} | ||
``` | ||
------------------------------------------------------------------------------------------------------- | ||
|
||
### Fetch an addon | ||
|
||
```go | ||
addonId := "ao_00000000000001" | ||
body, err := client.Addon.Fetch(addonId, nil, nil) | ||
``` | ||
|
||
**Parameters:** | ||
|
||
| Name | Type | Description | | ||
|-----------------|---------|------------------------------------------------------------------------------| | ||
| addonId* | string | addon id to be fetched | | ||
**Response:** | ||
```json | ||
{ | ||
"id":"ao_00000000000001", | ||
"entity":"addon", | ||
"item":{ | ||
"id":"item_00000000000001", | ||
"active":true, | ||
"name":"Extra appala (papadum)", | ||
"description":"1 extra oil fried appala with meals", | ||
"amount":30000, | ||
"unit_amount":30000, | ||
"currency":"INR", | ||
"type":"addon", | ||
"unit":null, | ||
"tax_inclusive":false, | ||
"hsn_code":null, | ||
"sac_code":null, | ||
"tax_rate":null, | ||
"tax_id":null, | ||
"tax_group_id":null, | ||
"created_at":1581597318, | ||
"updated_at":1581597318 | ||
}, | ||
"quantity":2, | ||
"created_at":1581597318, | ||
"subscription_id":"sub_00000000000001", | ||
"invoice_id":null | ||
} | ||
``` | ||
------------------------------------------------------------------------------------------------------- | ||
|
||
### Delete an addon | ||
|
||
```go | ||
body, err := client.Addon.Delete(addonId, nil, nil) | ||
``` | ||
|
||
**Parameters:** | ||
|
||
| Name | Type | Description | | ||
|-----------------|---------|------------------------------------------------------------------------------| | ||
| addonId* | string | addon id to be deleted | | ||
|
||
**Response:** | ||
```json | ||
[] | ||
``` | ||
------------------------------------------------------------------------------------------------------- | ||
|
||
**PN: * indicates mandatory fields** | ||
<br> | ||
<br> | ||
**For reference click [here](https://razorpay.com/docs/api/subscriptions/#add-ons)** |
Oops, something went wrong.