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

PPF-562 Create helper method to activate uitpas integration with organizers #1310

Conversation

grubolsch
Copy link
Contributor

Added

  • Added new unit tests for UdbOrganizerRepository, class was untested.
  • Added new check in EloquentIntegrationRepositoryTest to make sure Organizers are created in db.
  • Added new Collection for UdbOrganizer

Changed

  • Added 2 versions of UdbOrganizerRepository::create(), the new one is called "createInBulk", the later one wraps all inserts in a transaction.
  • requestActivation and activateWithOrganization now wrap the creation of the Organizer.

Ticket: https://jira.uitdatabank.be/browse/PPF-562

@@ -115,15 +129,25 @@ public function activate(UuidInterface $id): void
$integrationModel->activate();
}

public function activateWithOrganization(UuidInterface $id, UuidInterface $organizationId, ?string $couponCode): void
public function activateWithOrganization(UuidInterface $integrationId, UuidInterface $organizationId, ?string $couponCode, array $organizers=[]): void
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this also be typed on the new collection?

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 thought so to at first but if you look at ActivateIntegration you can see that actually it is an array of strings (ids).
I will add a docblock to make this more clear.

Copy link
Contributor

Choose a reason for hiding this comment

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

But should it be an array of strings? The UdbOrganizers could be created where this gets called. So in the handle method of ActivateUitpasIntegration the construction of UdbOrganizer could be done.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved it to the ActivateUitpasIntegration class

Base automatically changed from PPF-563-UDBOrganizers to main August 6, 2024 10:30
@grubolsch grubolsch requested a review from LucWollants August 6, 2024 11:51
@grubolsch
Copy link
Contributor Author

Feedback has been processed

@grubolsch grubolsch enabled auto-merge August 6, 2024 13:01
@grubolsch grubolsch merged commit 5e9bd90 into main Aug 6, 2024
8 checks passed
@grubolsch grubolsch deleted the PPF-562/create-helper-method-to-activate-uitpas-integration-with-organizers branch August 6, 2024 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants