Module: NgpVan::Client::Locations

Included in:
NgpVan::Client
Defined in:
lib/ngp_van/client/locations.rb

Instance Method Summary collapse

Instance Method Details

#create_location(body: {}) ⇒ Object



19
20
21
# File 'lib/ngp_van/client/locations.rb', line 19

def create_location(body: {})
  post(path: 'locations', body: body)
end

#delete_location(id:) ⇒ Object



23
24
25
26
# File 'lib/ngp_van/client/locations.rb', line 23

def delete_location(id:)
  verify_id(id)
  delete(path: "locations/#{id}")
end

#find_or_create_location(body: {}) ⇒ Object



15
16
17
# File 'lib/ngp_van/client/locations.rb', line 15

def find_or_create_location(body: {})
  post(path: 'locations/findOrCreate', body: body)
end

#location(id:, params: {}) ⇒ Object



10
11
12
13
# File 'lib/ngp_van/client/locations.rb', line 10

def location(id:, params: {})
  verify_id(id)
  get(path: "locations/#{id}", params: params)
end

#locations(params: {}) ⇒ Object



6
7
8
# File 'lib/ngp_van/client/locations.rb', line 6

def locations(params: {})
  get(path: 'locations', params: params)
end