Sha256: 3df8f5404d51133bd384a8ddc146a89ffe77b86f8a6613828f77a50eaf12a8e2
Contents?: true
Size: 708 Bytes
Versions: 9
Compression:
Stored size: 708 Bytes
Contents
require 'interactor' module DiscoApp module Flow class CreateTrigger include Interactor delegate :shop, :title, :resource_name, :resource_url, :properties, to: :context delegate :trigger, to: :context def call create_trigger enqueue_process_trigger_job end private def create_trigger context.trigger = shop.flow_triggers.create!( title: title, resource_name: resource_name, resource_url: resource_url, properties: properties ) end def enqueue_process_trigger_job ProcessTriggerJob.perform_later(shop, trigger) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems