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
SpreeCmCommissioner::Integrations::BookMeBusV1::SyncManager, Larryta::SyncManager, StadiumXV1::SyncManager, VireakBuntham::SyncManager
Instance Method Summary collapse
-
#initialize(integration:) ⇒ 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:) ⇒ SyncManager
Returns a new instance of SyncManager.
3 4 5 6 |
# File 'app/services/spree_cm_commissioner/integrations/base/sync_manager.rb', line 3 def initialize(integration:) @integration = integration @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
12 13 14 |
# File 'app/services/spree_cm_commissioner/integrations/base/sync_manager.rb', line 12 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
20 21 22 |
# File 'app/services/spree_cm_commissioner/integrations/base/sync_manager.rb', line 20 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
30 31 32 |
# File 'app/services/spree_cm_commissioner/integrations/base/sync_manager.rb', line 30 def sync_webhook!(event_type:, event_data:) raise NotImplementedError, "#{self.class.name} must implement #sync_webhook!" end |