class ProfitBricks::Location

Location class

Public Class Methods

get(location_id) click to toggle source

Retrieve a location.

# File lib/profitbricks/location.rb, line 18
def get(location_id)
  response = ProfitBricks.request(
    method: :get,
    path: "/locations/#{location_id}",
    expects: 200
  )
  instantiate_objects(response)
end
list() click to toggle source

List all locations.

# File lib/profitbricks/location.rb, line 8
def list
  response = ProfitBricks.request(
    method: :get,
    path: "/locations",
    expects: 200
  )
  instantiate_objects(response)
end