Class: Vero::Api::Workers::Users::DeleteAPI

Inherits:
BaseAPI show all
Defined in:
lib/vero/api/users/delete_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/delete_api.rb', line 10

def request
  RestClient.post(url, @options)
end

#urlObject



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

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

#validate!Object

Raises:

  • (ArgumentError)


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

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