Sha256: 56d2709d6019063b33f3920e95a5e797d381e3736d87bb87777b08ba6714c39c

Contents?: true

Size: 562 Bytes

Versions: 1

Compression:

Stored size: 562 Bytes

Contents

module Klaviyo
  module People
    module ApiOperations
      Result = Struct.new(:response) do
        def success?
          response.to_s == '1'
        end
      end

      # https://www.klaviyo.com/docs/http-api#people
      # invoke(:people, :identify, properties: { '$email': 'useremail@ua.com' })
      #
      def identify(client:, properties: {})
        res = client.conn.get(
          '/api/identify',
          client.build_params(properties: properties)
        )
        Result.new(res.body)
      end
    end

    extend ApiOperations
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
parallel588-klaviyo-0.5.0 lib/klaviyo/people.rb