Sha256: 25c2b97a36e5f2c7c4dfaeea3fc5ea8c972ecd8e36d3e294f39afa9913f97e44

Contents?: true

Size: 475 Bytes

Versions: 8

Compression:

Stored size: 475 Bytes

Contents

# frozen_string_literal: true

module RudderAnalyticsSync
  module Operations
    class Group < Operation
      def call
        request.post('/v1/group', build_payload)
      end

      def build_payload
        raise ArgumentError, 'group_id must be present' \
          unless options[:group_id]

        base_payload.merge(
          traits: options[:traits] && isoify_dates!(options[:traits]),
          groupId: options[:group_id]
        )
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rudder_analytics_sync-1.0.7 lib/rudder_analytics_sync/operations/group.rb
rudder_analytics_sync-1.0.6 lib/rudder_analytics_sync/operations/group.rb
rudder_analytics_sync-1.0.5 lib/rudder_analytics_sync/operations/group.rb
rudder_analytics_sync-1.0.4 lib/rudder_analytics_sync/operations/group.rb
rudder_analytics_sync-1.0.3 lib/rudder_analytics_sync/operations/group.rb
rudder_analytics_sync-1.0.2 lib/rudder_analytics_sync/operations/group.rb
rudder_analytics_sync-1.0.1 lib/rudder_analytics_sync/operations/group.rb
rudder_analytics_sync-1.0.0 lib/rudder_analytics_sync/operations/group.rb