Class: OpenPanel::SDK::IdentifyUser

Inherits:
Object
  • Object
show all
Defined in:
lib/openpanel/sdk/identify_user.rb

Overview

Identify user payload class. Use this class to identify a user in OpenPanel.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#emailString

user email address

Returns:

  • (String)

    the current value of email



11
12
13
# File 'lib/openpanel/sdk/identify_user.rb', line 11

def email
  @email
end

#first_nameString

user first name

Returns:

  • (String)

    the current value of first_name



11
12
13
# File 'lib/openpanel/sdk/identify_user.rb', line 11

def first_name
  @first_name
end

#last_nameString

user last name

Returns:

  • (String)

    the current value of last_name



11
12
13
# File 'lib/openpanel/sdk/identify_user.rb', line 11

def last_name
  @last_name
end

#profile_idString

user profile ID

Returns:

  • (String)

    the current value of profile_id



11
12
13
# File 'lib/openpanel/sdk/identify_user.rb', line 11

def profile_id
  @profile_id
end

#propertiesHash

user properties

Returns:

  • (Hash)

    the current value of properties



11
12
13
# File 'lib/openpanel/sdk/identify_user.rb', line 11

def properties
  @properties
end

Instance Method Details

#to_json(*_args) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'lib/openpanel/sdk/identify_user.rb', line 14

def to_json(*_args)
  {
    profileId: profile_id,
    email: email,
    firstName: first_name,
    lastName: last_name,
    properties: properties
  }.to_json
end