Module: Vhx::ApiOperations::List::ClassMethods

Defined in:
lib/vhx/utilities/api_operations/list.rb

Instance Method Summary collapse

Instance Method Details

#all(payload = {}, headers = {}) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/vhx/utilities/api_operations/list.rb', line 7

def all(payload = {}, headers = {})
  response = Vhx.connection.get(
    '/' + get_klass.downcase + 's',
    payload,
    headers,
  )
  VhxListObject.new(response.body, get_klass.downcase + 's')
end

#list(payload = {}, headers = {}) ⇒ Object



16
17
18
# File 'lib/vhx/utilities/api_operations/list.rb', line 16

def list(payload = {}, headers = {})
  self.all(payload, headers)
end