Module: Webhookdb::Replicator::FrontV1Mixin

Included in:
FrontConversationV1, FrontMessageV1
Defined in:
lib/webhookdb/replicator/front_v1_mixin.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.marketplace_only_state_machineObject



23
24
25
26
27
28
29
# File 'lib/webhookdb/replicator/front_v1_mixin.rb', line 23

def self.marketplace_only_state_machine
  step = Webhookdb::Replicator::StateMachineStep.new
  step.output = %(Front integrations can only be enabled through the Front App Store.
Head over to https://app.frontapp.com/settings/apps/details/webhookdb/overview to set up WebhookDB replication.)
  step.completed
  return step
end

Instance Method Details

#_webhook_response(request) ⇒ Object



15
16
17
# File 'lib/webhookdb/replicator/front_v1_mixin.rb', line 15

def _webhook_response(request)
  return Webhookdb::Front.webhook_response(request, Webhookdb::Front.app_secret)
end

#calculate_webhook_state_machineObject



6
7
8
9
10
11
12
13
# File 'lib/webhookdb/replicator/front_v1_mixin.rb', line 6

def calculate_webhook_state_machine
  if (step = self.calculate_dependency_state_machine_step(dependency_help: ""))
    return step
   end
  step = Webhookdb::Replicator::StateMachineStep.new
  step.output = %(Great! WebhookDB is now listening for #{self.resource_name_singular} webhooks.)
  return step.completed
end

#on_dependency_webhook_upsert(_replicator, _payload) ⇒ Object



19
20
21
# File 'lib/webhookdb/replicator/front_v1_mixin.rb', line 19

def on_dependency_webhook_upsert(_replicator, _payload, *)
  return
end