in example/request_ride.py [0:0]
def update_surge(api_client, surge_multiplier):
"""Use an UberRidesClient to update surge and print the results.
Parameters
api_client (UberRidesClient)
An authorized UberRidesClient with 'request' scope.
surge_mutliplier (float)
The surge multiple for a sandbox product. A multiplier greater than
or equal to 2.0 will require the two stage confirmation screen.
"""
try:
update_surge = api_client.update_sandbox_product(
SURGE_PRODUCT_ID,
surge_multiplier=surge_multiplier,
)
except (ClientError, ServerError) as error:
fail_print(error)
else:
success_print(update_surge.status_code)