Class: SimpleSegment::Operations::Identify

Inherits:
Operation
  • Object
show all
Defined in:
lib/simple_segment/operations/identify.rb

Constant Summary

Constants inherited from Operation

Operation::DEFAULT_CONTEXT

Instance Method Summary collapse

Methods inherited from Operation

#initialize

Methods included from Utils

included, #isoify_dates, #isoify_dates!, #maybe_datetime_in_iso8601, #symbolize_keys

Constructor Details

This class inherits a constructor from SimpleSegment::Operations::Operation

Instance Method Details

#build_payloadObject



10
11
12
13
14
# File 'lib/simple_segment/operations/identify.rb', line 10

def build_payload
  base_payload.merge(
    traits: options[:traits] && isoify_dates!(options[:traits])
  )
end

#callObject



6
7
8
# File 'lib/simple_segment/operations/identify.rb', line 6

def call
  request.post('/v1/identify', build_payload)
end