Class: SpreeCmCommissioner::Integrations::Base::SyncManager
- Inherits:
-
Object
- Object
- SpreeCmCommissioner::Integrations::Base::SyncManager
- Defined in:
- app/services/spree_cm_commissioner/integrations/base/sync_manager.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(integration:, client:) ⇒ SyncManager
constructor
A new instance of SyncManager.
-
#sync_full! ⇒ SpreeCmCommissioner::IntegrationSyncSession
Perform a full synchronization (initial setup or complete refresh) Override in subclass and use run_execution to wrap your sync logic.
-
#sync_incremental! ⇒ SpreeCmCommissioner::IntegrationSyncSession
Perform an incremental synchronization (delta updates) Override in subclass and use run_execution to wrap your sync logic.
-
#sync_webhook!(event_type:, event_data:) ⇒ SpreeCmCommissioner::IntegrationSyncSession
Perform a webhook-triggered synchronization (real-time event) Override in subclass and use run_execution to wrap your sync logic.
Constructor Details
#initialize(integration:, client:) ⇒ SyncManager
Returns a new instance of SyncManager.
3 4 5 6 7 |
# File 'app/services/spree_cm_commissioner/integrations/base/sync_manager.rb', line 3 def initialize(integration:, client:) @integration = integration @client = client @sync_session = nil end |
Instance Method Details
#sync_full! ⇒ SpreeCmCommissioner::IntegrationSyncSession
Perform a full synchronization (initial setup or complete refresh) Override in subclass and use run_execution to wrap your sync logic
13 14 15 |
# File 'app/services/spree_cm_commissioner/integrations/base/sync_manager.rb', line 13 def sync_full! raise NotImplementedError, "#{self.class.name} must implement #sync_full!" end |
#sync_incremental! ⇒ SpreeCmCommissioner::IntegrationSyncSession
Perform an incremental synchronization (delta updates) Override in subclass and use run_execution to wrap your sync logic
21 22 23 |
# File 'app/services/spree_cm_commissioner/integrations/base/sync_manager.rb', line 21 def sync_incremental! raise NotImplementedError, "#{self.class.name} must implement #sync_incremental!" end |
#sync_webhook!(event_type:, event_data:) ⇒ SpreeCmCommissioner::IntegrationSyncSession
Perform a webhook-triggered synchronization (real-time event) Override in subclass and use run_execution to wrap your sync logic
31 32 33 |
# File 'app/services/spree_cm_commissioner/integrations/base/sync_manager.rb', line 31 def sync_webhook!(event_type:, event_data:) raise NotImplementedError, "#{self.class.name} must implement #sync_webhook!" end |