Sha256: 232eaf0504ae47f985b2f283fc9b84c73262affebec8792de6cba7c38963d41f
Contents?: true
Size: 566 Bytes
Versions: 18
Compression:
Stored size: 566 Bytes
Contents
# frozen_string_literal: true module FlowcommerceSpree module Webhooks class ExperienceUpsertedV2 attr_accessor :errors alias full_messages errors def self.process(data, opts = {}) new(data, opts).process end def initialize(data, opts = {}) @data = data @opts = opts @errors = [] end def process experience = @data['experience'] Spree::Zones::Product.find_or_initialize_by(name: experience['key'].titleize).store_flow_io_data(experience) end end end end
Version data entries
18 entries across 18 versions & 1 rubygems