Class: Vero::Api::Workers::Events::TrackAPI
Instance Attribute Summary
Attributes inherited from BaseAPI
#domain, #options
Instance Method Summary
collapse
Methods inherited from BaseAPI
#initialize, perform, #perform
Instance Method Details
12
13
14
|
# File 'lib/vero/api/events/track_api.rb', line 12
def request
RestClient.post(url, request_params_as_json, request_content_type)
end
|
8
9
10
|
# File 'lib/vero/api/events/track_api.rb', line 8
def url
"#{@domain}/api/v2/events/track.json"
end
|
#validate! ⇒ Object
16
17
18
19
|
# File 'lib/vero/api/events/track_api.rb', line 16
def validate!
raise ArgumentError, 'Missing :event_name' if options[:event_name].to_s.blank?
raise ArgumentError, ':data must be either nil or a Hash' unless options[:data].nil? || options[:data].is_a?(Hash)
end
|