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

Recurring payments job sets up new permissions in DynamoDb #1957

Merged
merged 31 commits into from
Jun 17, 2024

Conversation

irisfaraway
Copy link
Member

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.

@irisfaraway irisfaraway added the enhancement New feature or request label May 16, 2024
@irisfaraway irisfaraway self-assigned this May 16, 2024
@irisfaraway irisfaraway force-pushed the feature/iwtf-4017-recurring-payments-dynamodb branch 2 times, most recently from 21fc49d to fe4c70c Compare June 4, 2024 16:25
irisfaraway added a commit that referenced this pull request Jun 6, 2024
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.
irisfaraway added a commit that referenced this pull request Jun 6, 2024
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.
irisfaraway added a commit that referenced this pull request Jun 6, 2024
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.
irisfaraway added a commit that referenced this pull request Jun 6, 2024
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.
@irisfaraway irisfaraway force-pushed the feature/iwtf-4017-recurring-payments-dynamodb branch from 623108a to 9c0b210 Compare June 6, 2024 14:12
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.
@irisfaraway irisfaraway force-pushed the feature/iwtf-4017-recurring-payments-dynamodb branch from a749e3b to 9a205f5 Compare June 11, 2024 10:33
This may seem like a redundant change but apparently it is what SonarCloud prefers, so...
{
isLicenceForYou: data.isLicenceForYou,
isRenewal: data.isRenewal,
issueDate: null,
Copy link
Collaborator

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?

Copy link
Member Author

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!

Copy link

sonarcloud bot commented Jun 14, 2024

@irisfaraway irisfaraway merged commit 6df7223 into develop Jun 17, 2024
3 checks passed
@irisfaraway irisfaraway deleted the feature/iwtf-4017-recurring-payments-dynamodb branch June 17, 2024 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants