Sha256: 62f16f1eef0812ee9b757964ef0e1145e9d99c4e7dbb92c73117fb81c54849b5

Contents?: true

Size: 1.22 KB

Versions: 29

Compression:

Stored size: 1.22 KB

Contents

# typed: ignore

# Copyright (c) 2015 Sqreen. All Rights Reserved.
# Please refer to our terms for more information: https://www.sqreen.com/terms.html

require 'sqreen/kit/signals/point'
require 'sqreen/kit/signals/dto_helper'

# reference: https://github.com/sqreen/SignalsSchemas/blob/master/schemas/payload/sdk_call/2020-01-01T00_00_00_000Z/schema.cue

module Sqreen
  module Kit
    module Signals
      module Specialized
      end
    end
  end
end

class Sqreen::Kit::Signals::Specialized::SdkTrackCall < Sqreen::Kit::Signals::Point
  add_mandatory_attrs :source, :time, :payload

  validate_str_attr :signal_name, /\Asq\.sdk\..+\z/

  def initialize(values = {})
    self.payload_schema = Payload::SCHEMA_VERSION
    self.source = "sqreen:sdk:track"
    self.time = values[:time] || Time.now
    super
  end

  def payload=(payload)
    unless payload.is_a?(Payload)
      raise ArgumentError, "Payload should be a #{Payload}"
    end
    super
  end

  class Payload
    include Sqreen::Kit::Signals::DtoHelper

    SCHEMA_VERSION = 'track_event/2020-01-01T00:00:00.000Z'.freeze

    # @return [Hash{String|Symbol=>Object}]
    attr_accessor :properties

    # @return [Hash{String|Symbol=>String}]
    attr_accessor :user_identifiers
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
sqreen-1.25.1 lib/sqreen/kit/signals/specialized/sdk_track_call.rb
sqreen-1.25.0 lib/sqreen/kit/signals/specialized/sdk_track_call.rb
sqreen-1.24.3 lib/sqreen/kit/signals/specialized/sdk_track_call.rb
sqreen-1.24.2 lib/sqreen/kit/signals/specialized/sdk_track_call.rb
sqreen-1.24.1 lib/sqreen/kit/signals/specialized/sdk_track_call.rb
sqreen-1.24.0 lib/sqreen/kit/signals/specialized/sdk_track_call.rb
sqreen-1.23.2 lib/sqreen/kit/signals/specialized/sdk_track_call.rb
sqreen-1.23.1 lib/sqreen/kit/signals/specialized/sdk_track_call.rb
sqreen-1.23.0 lib/sqreen/kit/signals/specialized/sdk_track_call.rb
sqreen-1.22.1 lib/sqreen/kit/signals/specialized/sdk_track_call.rb
sqreen-1.22.0-java lib/sqreen/kit/signals/specialized/sdk_track_call.rb
sqreen-1.22.0 lib/sqreen/kit/signals/specialized/sdk_track_call.rb
sqreen-1.21.1-java lib/sqreen/kit/signals/specialized/sdk_track_call.rb
sqreen-1.21.1 lib/sqreen/kit/signals/specialized/sdk_track_call.rb
sqreen-1.21.0-java lib/sqreen/kit/signals/specialized/sdk_track_call.rb
sqreen-1.21.0 lib/sqreen/kit/signals/specialized/sdk_track_call.rb
sqreen-1.20.4-java lib/sqreen/kit/signals/specialized/sdk_track_call.rb
sqreen-1.20.4 lib/sqreen/kit/signals/specialized/sdk_track_call.rb
sqreen-1.21.0.beta3-java lib/sqreen/kit/signals/specialized/sdk_track_call.rb
sqreen-1.21.0.beta3 lib/sqreen/kit/signals/specialized/sdk_track_call.rb