Module: Appboy::Endpoints::TrackUsers

Included in:
API
Defined in:
lib/appboy/endpoints/track_users.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#track_users_service=(value) ⇒ Object

Sets the attribute track_users_service

Parameters:

  • value

    the value to set the attribute track_users_service to.



4
5
6
# File 'lib/appboy/endpoints/track_users.rb', line 4

def track_users_service=(value)
  @track_users_service = value
end

Instance Method Details

#track_attribute(payload) ⇒ Object



18
19
20
# File 'lib/appboy/endpoints/track_users.rb', line 18

def track_attribute(payload)
  track_users(attributes: [payload])
end

#track_event(payload) ⇒ Object



14
15
16
# File 'lib/appboy/endpoints/track_users.rb', line 14

def track_event(payload)
  track_users(events: [payload])
end

#track_purchase(payload) ⇒ Object



10
11
12
# File 'lib/appboy/endpoints/track_users.rb', line 10

def track_purchase(payload)
  track_users(purchases: [payload])
end

#track_users(**payload) ⇒ Object



6
7
8
# File 'lib/appboy/endpoints/track_users.rb', line 6

def track_users(**payload)
  track_users_service.perform(app_group_id, payload)
end