Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add partner's api's #286

Merged
merged 11 commits into from
May 30, 2023
Merged

feat: add partner's api's #286

merged 11 commits into from
May 30, 2023

Conversation

@ankitdas13 ankitdas13 self-assigned this May 15, 2023
@ankitdas13 ankitdas13 added the TestingNotRequired TestingNotRequired label for BVT label May 15, 2023
@ankitdas13 ankitdas13 requested a review from ndhaka007 May 15, 2023 18:17
return processResponse(response);
}

public <T extends Entity> T post(String path, JSONObject requestObject) throws RazorpayException {
Response response = ApiUtils.postRequest(path, requestObject, auth);
public <T> T post(String version, String path, JSONObject requestObject) throws RazorpayException {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made these changes because this api is returning an empty array [] also checking these method checking the return type . so after these changes now it supports empty []

return "settlement";
}else if(jsonObj.get("entity").toString().equals("payment.downtime")){
return "payment";
}else if(getClass(jsonObj.get("entity").toString()) == null){
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made this change because it was not able to check those entity properties which has settlement.ondemand or payment.downtime

response example

throws RazorpayException {

HttpUrl.Builder builder = getBuilder(path);
HttpUrl.Builder builder = getBuilder(version, path);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SDK now supports the v2 APIs , also for v3 if it will come up

@ankitdas13 ankitdas13 changed the base branch from increase_coverage to master May 23, 2023 04:38
@codecov-commenter
Copy link

codecov-commenter commented May 23, 2023

Codecov Report

Merging #286 (821d632) into master (15b6105) will increase coverage by 8.64%.
The diff coverage is 90.28%.

❗ Current head 821d632 differs from pull request most recent head bd69da2. Consider uploading reports for the commit bd69da2 to get more accurate results

@@             Coverage Diff              @@
##             master     #286      +/-   ##
============================================
+ Coverage     65.02%   73.67%   +8.64%     
- Complexity      192      240      +48     
============================================
  Files            46       53       +7     
  Lines           509      528      +19     
  Branches         19       20       +1     
============================================
+ Hits            331      389      +58     
+ Misses          160      120      -40     
- Partials         18       19       +1     
Flag Coverage Δ
tests 73.67% <90.28%> (+8.64%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/main/java/com/razorpay/Product.java 0.00% <0.00%> (ø)
src/main/java/com/razorpay/RazorpayClient.java 0.00% <0.00%> (ø)
...c/main/java/com/razorpay/VirtualAccountClient.java 84.61% <77.77%> (+15.38%) ⬆️
src/main/java/com/razorpay/ApiClient.java 59.81% <83.33%> (-1.14%) ⬇️
src/main/java/com/razorpay/TransferClient.java 88.88% <83.33%> (+1.38%) ⬆️
src/main/java/com/razorpay/PaymentClient.java 87.09% <84.21%> (+16.12%) ⬆️
src/main/java/com/razorpay/WebhookClient.java 87.50% <87.50%> (ø)
src/main/java/com/razorpay/Account.java 100.00% <100.00%> (ø)
src/main/java/com/razorpay/AccountClient.java 100.00% <100.00%> (ø)
src/main/java/com/razorpay/AddonClient.java 100.00% <100.00%> (+16.66%) ⬆️
... and 21 more

... and 5 files with indirect coverage changes

Copy link
Contributor

@ndhaka007 ndhaka007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM test one more time before merging. Minor comments discussed over the call.

@ankitdas13 ankitdas13 merged commit b6179a5 into master May 30, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TestingNotRequired TestingNotRequired label for BVT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants