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

Updated customer addbank #268

Merged
merged 100 commits into from
Mar 19, 2024
Merged

Updated customer addbank #268

merged 100 commits into from
Mar 19, 2024

Conversation

ankitdas13
Copy link
Contributor

@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.12%. Comparing base (5e828f4) to head (f7bdf61).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #268      +/-   ##
==========================================
+ Coverage   97.06%   97.12%   +0.05%     
==========================================
  Files          62       62              
  Lines        2009     2049      +40     
==========================================
+ Hits         1950     1990      +40     
  Misses         59       59              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


| Name | Type | Description |
|---------------|-------------|---------------------------------------------|
| customerId* | string | Customer's bank account number |
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we sure about customerId? based on the example above, it seems to be the public customer id, but here in the description it is mentioned as bank account number

Copy link
Contributor Author

@ankitdas13 ankitdas13 Mar 6, 2024

Choose a reason for hiding this comment

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

it should be The unique identifier linked to the customer. i will change the description

Comment on lines 174 to 175
| account_number | integer | The id of the customer to be fetched |
| account_number | string | The name of the beneficiary associated with the bank account. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Repeated, check for proper description

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed the first one

Dictionary of Customers data
"""
url = "{}/{}/bank_account".format(self.base_url, customer_id)
Copy link
Contributor

Choose a reason for hiding this comment

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

can we use

url = f"{self.base_url}/{customer_id}/bank_account"

seems to be much elegant

Copy link
Contributor

Choose a reason for hiding this comment

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

Same goes for the other code in this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, including in unit tests

"""
url = "{}/eligibility/{}".format(self.base_url, eligibility_id)
return self.get_url(url, data, **kwargs)
Copy link
Contributor

Choose a reason for hiding this comment

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

add new line at the end of the file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

@@ -288,4 +288,4 @@ def otpResend(self, payment_id, data={}, **kwargs):
Otp Dict which was created
"""
url = "{}/{}/otp/resend".format(self.base_url, payment_id)
return self.post_url(url, data, **kwargs)
return self.post_url(url, data, **kwargs)
Copy link
Contributor

Choose a reason for hiding this comment

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

add new line at the end of the file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

"name": "Gaurav Kumar",
"notes": [],
"account_number": "XXXXXXXXXXXXXXX0434"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

add new line at the end of the file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

}
}
]
}
Copy link
Contributor

Choose a reason for hiding this comment

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

add new line at the end of the file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

responses.add(responses.GET, url, status=200,
body=json.dumps(result), match_querystring=True)
self.assertEqual(self.client.customer.fetchEligibility('fake_eligibility_id'), result)
Copy link
Contributor

Choose a reason for hiding this comment

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

add new line at the end of the file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

| Name | Type | Description |
|---------------|-------------|---------------------------------------------|
| customerId* | string | Unique identifier of the customer. |
| account_number | string | The name of the beneficiary associated with the bank account. |
Copy link
Contributor

Choose a reason for hiding this comment

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

is account_number name of the beneficiary?

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 correction in account_number

Comment on lines 176 to 182
| beneficiary_address1 | string | The id of the customer to be fetched |
| beneficiary_email | string | Email address of the beneficiary. |
| beneficiary_mobile | integer | Mobile number of the beneficiary. |
| beneficiary_city | string | The name of the city of the beneficiary. |
| beneficiary_state | string | The state of the beneficiary. |
| beneficiary_pin | interger | The pin code of the beneficiary's address. |
| ifsc_code | string | The IFSC code of the bank branch associated with the account. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Please check the description of each of the parameters and make sure they are proper

Copy link
Contributor

Choose a reason for hiding this comment

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

Go through the entire file and make sure the information is correct.

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 all doc correction in new added endpoint

| customerId* | string | Unique identifier of the customer. |
| account_number | string | Customer's bank account number. |
| beneficiary_name | string | The name of the beneficiary associated with the bank account. |
| beneficiary_address1 | string | The virtual payment address. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this correct? should it be VPA, VPA is used for upi right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I mentioned the description as it is showing in the doc, should i have to change something here?

Screenshot 2024-03-11 at 8 01 27 PM

Comment on lines 252 to 256
| inquiry | string | List of methods or instruments on which eligibility check is required. |
| amount* | string | The amount for which the order was created, in currency subunits. |
| currency* | string | A three-letter ISO code for the currency in which you want to accept the payment. |
| customer* | object | All keys listed [here](https://razorpay.com/docs/payments/payment-gateway/affordability/eligibility-check/#eligibility-check-api) |
| instruments | object | All keys listed [here](https://razorpay.com/docs/payments/payment-gateway/affordability/eligibility-check/#eligibility-check-api) |
Copy link
Contributor

Choose a reason for hiding this comment

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

The description does not seem right. Please add proper description. Kindly go through this file and make sure all text that is being written are proper.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

update description

Customer details. for customer* and
Payment instruments on which an eligibility check is required. for instruments

although it's showing type array in doc, but that is typo error it should be object

Screenshot 2024-03-11 at 8 26 17 PM

@ankitdas13 ankitdas13 added the TestingNotRequired TestingNotRequired label for BVT label Mar 19, 2024
@ankitdas13 ankitdas13 merged commit 54a0372 into master Mar 19, 2024
14 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.

8 participants