Module: Uber::API::Products

Included in:
Uber::API
Defined in:
lib/uber/api/products.rb

Instance Method Summary collapse

Instance Method Details

#apply_availability(product_id, value) ⇒ Object



17
18
19
# File 'lib/uber/api/products.rb', line 17

def apply_availability(product_id, value)
  perform_with_object(:put, "/v1/sandbox/products/#{product_id}", {drivers_available: value}, Product)
end

#apply_surge(product_id, surge_multiplier) ⇒ Object



13
14
15
# File 'lib/uber/api/products.rb', line 13

def apply_surge(product_id, surge_multiplier)
  perform_with_object(:put, "/v1/sandbox/products/#{product_id}", {surge_multiplier: surge_multiplier}, Product)
end

#products(*args) ⇒ Object



8
9
10
11
# File 'lib/uber/api/products.rb', line 8

def products(*args)
  arguments = Uber::Arguments.new(args)
  perform_with_objects(:get, "/v1/products", arguments.options, Product)
end