Class: Vero::Api::Workers::Users::ReidentifyAPI

Inherits:
BaseAPI show all
Defined in:
lib/vero/api/users/reidentify_api.rb

Instance Attribute Summary

Attributes inherited from BaseAPI

#domain, #options

Instance Method Summary collapse

Methods inherited from BaseAPI

#initialize, perform, #perform

Constructor Details

This class inherits a constructor from Vero::Api::Workers::BaseAPI

Instance Method Details

#requestObject



10
11
12
# File 'lib/vero/api/users/reidentify_api.rb', line 10

def request
  RestClient.put(url, self.request_params_as_json, self.request_content_type)
end

#urlObject



6
7
8
# File 'lib/vero/api/users/reidentify_api.rb', line 6

def url
  "#{@domain}/api/v2/users/reidentify.json"
end

#validate!Object

Raises:

  • (ArgumentError)


14
15
16
17
# File 'lib/vero/api/users/reidentify_api.rb', line 14

def validate!
  raise ArgumentError.new("Missing :id") if options[:id].to_s.blank?
  raise ArgumentError.new("Missing :new_id") if options[:new_id].to_s.blank?
end