-
Notifications
You must be signed in to change notification settings - Fork 3
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
Recurring payments job sets up new permissions in DynamoDb #1957
Recurring payments job sets up new permissions in DynamoDb #1957
Conversation
21fc49d
to
fe4c70c
Compare
https://eaflood.atlassian.net/browse/IWTF-4017 This is required for IWTF-4017 as we will need a new function within the Sales API to retrieve data about a permission based on its full reference number. See #1957 for further implementation.
https://eaflood.atlassian.net/browse/IWTF-4017 This is required for IWTF-4017 as we will need a new function within the Sales API to prepare data for a recurring payment. The recurring payment job needs to be able to conenct to this new feature so this PR updates the connector. See #1957 for further implementation.
https://eaflood.atlassian.net/browse/IWTF-4017 This is required for IWTF-4017 as we will need a new function within the Sales API to retrieve data about a permission based on its full reference number. See #1957 for further implementation.
https://eaflood.atlassian.net/browse/IWTF-4017 This is required for IWTF-4017 as we will need a new function within the Sales API to prepare data for a recurring payment. The recurring payment job needs to be able to conenct to this new feature so this PR updates the connector. See #1957 for further implementation.
623108a
to
9c0b210
Compare
https://eaflood.atlassian.net/browse/IWTF-4017 When the RP job is run and relevant permissions are found that need to be renewed, we want to create a new permission for the renewal and store it in DynamoDb. This permission should have all the relevant data that needs to be carried over. The new permission won't be moved over to the CRM until payment has successfully been taken. As part of this we need to adapt some of the code that was written for easy renewals.
The refactor revealed that we were only ever assigning the result of getLicenceStartDate when renewedHasExpired was false. So there's no point returning a value if it's true.
a749e3b
to
9a205f5
Compare
This may seem like a redundant change but apparently it is what SonarCloud prefers, so...
packages/recurring-payments-job/src/recurring-payments-processor.js
Outdated
Show resolved
Hide resolved
packages/recurring-payments-job/src/recurring-payments-processor.js
Outdated
Show resolved
Hide resolved
{ | ||
isLicenceForYou: data.isLicenceForYou, | ||
isRenewal: data.isRenewal, | ||
issueDate: null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you omit this? Or does the issueDate key have to exist in the permission object?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Required by the permission schema, unfortunately!
packages/recurring-payments-job/src/recurring-payments-processor.js
Outdated
Show resolved
Hide resolved
packages/recurring-payments-job/src/__tests__/recurring-payments-processor.spec.js
Show resolved
Hide resolved
packages/recurring-payments-job/src/__tests__/recurring-payments-processor.spec.js
Show resolved
Hide resolved
packages/sales-api-service/src/services/renewals/renewals.service.js
Outdated
Show resolved
Hide resolved
packages/sales-api-service/src/services/renewals/renewals.service.js
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
https://eaflood.atlassian.net/browse/IWTF-4017
When the RP job is run and relevant permissions are found that need to be renewed, we want to create a new permission for the renewal and store it in DynamoDb. This permission should have all the relevant data that needs to be carried over. The new permission won't be moved over to the CRM until payment has successfully been taken.
As part of this we need to adapt some of the code that was written for easy renewals.