gcdtech / module-cyclops
A module for retrieving and sending data to Cyclops
Installs: 7 094
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 16
Forks: 1
Open Issues: 0
pkg:composer/gcdtech/module-cyclops
Requires
- rhubarbphp/module-restapi: ^1.0.0
Requires (Dev)
README
Module for retrieving and sending data to cyclops
Commands
-
PushStateToCyclopsCommand.phpAbstract Custard Command for pushing the state of Cyclops Customers. -
PushDeletedToCyclopsCommand.phpDeletes a list of Cyclops Customers. -
PushStaleToCyclopsCommand.phpUpdates a list of Cyclops Customers' brand opt ins that have failed before. -
PullChangesFromCyclopsCommand.phpRetrieves a list of updates made to Cyclops Customers' brand opt ins, allowing us to update project specific members to the same status.
Entities
-
CustomerEntity.phpUsed for most of our use cases, this combines a CyclopsIdentityEntity with their BrandOptIn value. -
CyclopsIdentityEntity.phpHow we identify a Cyclops Customer - made up of email, id, forename and surname. -
CyclopsCustomerListEntity.phpMade up of an array of CustomerEntities, used in our "Push to Cyclops" use cases.
Exceptions
Cyclops API has a few exceptions it throws for specific end points. The ones we handle are:
-
ConflictException.phpThrown if the parameters we send are invalid. -
CustomerNotFoundException.phpThrown if the customer we are updating or deleting is not found in Cyclops API. -
CyclopsException.phpBase exception that all others extend. -
UserForbiddenException.phpThrown if the user we access Cyclops API as does not have read or write permissions.
Settings
The url, username and password we use to access the Cyclops API are set in CyclopsSettings.php
Use Cases
-
DeleteCustomerUseCase.php -
GetBrandOptInStatusChangesUseCase.php -
GetBrandOptInUseCase.php -
PullChangesFromCyclopsUseCase.php -
PushDeletedToCyclopsUseCase.php -
PushStaleToCyclopsUseCase.php