From 8c403e77cea96d1435d8b0e3f78a9b3d55d934ad Mon Sep 17 00:00:00 2001 From: Dustin Whittle Date: Mon, 7 Aug 2017 15:19:44 -0700 Subject: [PATCH 1/8] Updated requirements + locked to minor stable version --- requirements.txt | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/requirements.txt b/requirements.txt index 8a88433..2ba9434 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,18 +1,18 @@ -appdirs>=1.4.3 -certifi>=2017.7.27.1 -chardet>=3.0.4 -contextlib2>=0.5.5 -funcsigs>=1.0.2 -idna>=2.5 -mock>=2.0.0 -packaging>=16.8 -pbr>=3.1.1 -py>=1.4.34 -pyparsing>=2.2.0 -pytest>=3.1.3 -PyYAML>=3.12 -requests>=2.18.2 -six>=1.10.0 -urllib3>=1.22 -vcrpy>=1.11.1 -wrapt>=1.10.10 +appdirs==1.4.3 +certifi==2017.7.27.1 +chardet==3.0.4 +contextlib2==0.5.5 +funcsigs==1.0.2 +idna==2.5 +mock==2.0.0 +packaging==16.8 +pbr==3.1.1 +py==1.4.34 +pyparsing==2.2.0 +pytest==3.2.0 +PyYAML==3.12 +requests==2.18.3 +six==1.10.0 +urllib3==1.22 +vcrpy==1.11.1 +wrapt==1.10.10 From cd7da7c87046cda3df7309769aff1fb90116f6e3 Mon Sep 17 00:00:00 2001 From: Dustin Whittle Date: Thu, 10 Aug 2017 17:05:47 -0700 Subject: [PATCH 2/8] Added Uber Driver API to Python SDK --- tests/fixtures/test_cancel_current_ride | 8 +- tests/fixtures/test_cancel_ride | 8 +- tests/fixtures/test_estimate_ride | 8 +- tests/fixtures/test_estimate_ride_with_places | 8 +- tests/fixtures/test_estimate_shared_ride | 8 +- tests/fixtures/test_get_current_ride_details | 8 +- .../test_get_current_shared_ride_details | 8 +- tests/fixtures/test_get_driver_payments | 28 +++++++ tests/fixtures/test_get_driver_profile | 28 +++++++ tests/fixtures/test_get_driver_trips | 38 ++++++++++ tests/fixtures/test_get_home_address | 8 +- tests/fixtures/test_get_payment_methods | 8 +- tests/fixtures/test_get_pickup_time_estimates | 16 ++-- tests/fixtures/test_get_price_estimates | 16 ++-- tests/fixtures/test_get_products | 16 ++-- tests/fixtures/test_get_promotions | 16 ++-- tests/fixtures/test_get_ride_details | 8 +- tests/fixtures/test_get_ride_map | 2 +- tests/fixtures/test_get_ride_receipt | 2 +- tests/fixtures/test_get_single_product | 16 ++-- tests/fixtures/test_get_user_activity | 8 +- tests/fixtures/test_get_user_profile | 8 +- tests/fixtures/test_get_work_address | 8 +- tests/fixtures/test_request_ride | 8 +- .../test_request_ride_with_no_default_product | 8 +- tests/fixtures/test_request_ride_with_places | 8 +- tests/fixtures/test_request_ride_with_surge | 2 +- tests/fixtures/test_request_shared_ride | 8 +- tests/fixtures/test_set_home_address | 8 +- tests/fixtures/test_set_work_address | 8 +- tests/fixtures/test_update_ride_destination | 8 +- .../test_update_ride_destination_with_places | 8 +- tests/fixtures/test_update_sandbox_product | 8 +- tests/fixtures/test_update_sandbox_ride | 8 +- tests/test_client.py | 75 ++++++++++++++++++- uber_rides/client.py | 40 +++++++++- 36 files changed, 340 insertions(+), 139 deletions(-) create mode 100644 tests/fixtures/test_get_driver_payments create mode 100644 tests/fixtures/test_get_driver_profile create mode 100644 tests/fixtures/test_get_driver_trips diff --git a/tests/fixtures/test_cancel_current_ride b/tests/fixtures/test_cancel_current_ride index 1b3dcf3..49ae53c 100644 --- a/tests/fixtures/test_cancel_current_ride +++ b/tests/fixtures/test_cancel_current_ride @@ -3,7 +3,7 @@ interactions: body: null headers: Content-Length: ['0'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: DELETE uri: https://sandbox-api.uber.com/v1.2/requests/current response: @@ -23,7 +23,7 @@ interactions: body: null headers: Content-Length: ['0'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: DELETE uri: https://sandbox-api.uber.com/v1.2/requests/current response: @@ -43,7 +43,7 @@ interactions: body: null headers: Content-Length: ['0'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: DELETE uri: https://sandbox-api.uber.com/v1.2/requests/current response: @@ -63,7 +63,7 @@ interactions: body: null headers: Content-Length: ['0'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: DELETE uri: https://sandbox-api.uber.com/v1.2/requests/current response: diff --git a/tests/fixtures/test_cancel_ride b/tests/fixtures/test_cancel_ride index c15b108..b884e4a 100644 --- a/tests/fixtures/test_cancel_ride +++ b/tests/fixtures/test_cancel_ride @@ -3,7 +3,7 @@ interactions: body: null headers: Content-Length: ['0'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: DELETE uri: https://sandbox-api.uber.com/v1.2/requests/9bdb3278-21bd-46b8-90fa-51404b0d6acf response: @@ -23,7 +23,7 @@ interactions: body: null headers: Content-Length: ['0'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: DELETE uri: https://sandbox-api.uber.com/v1.2/requests/610d868b-e21c-483a-9932-97e61b852fd2 response: @@ -43,7 +43,7 @@ interactions: body: null headers: Content-Length: ['0'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: DELETE uri: https://sandbox-api.uber.com/v1.2/requests/0aec0061-1e20-4239-a0b7-78328e9afec8 response: @@ -63,7 +63,7 @@ interactions: body: null headers: Content-Length: ['0'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: DELETE uri: https://sandbox-api.uber.com/v1.2/requests/0aec0061-1e20-4239-a0b7-78328e9afec8 response: diff --git a/tests/fixtures/test_estimate_ride b/tests/fixtures/test_estimate_ride index c94202a..0ac0252 100644 --- a/tests/fixtures/test_estimate_ride +++ b/tests/fixtures/test_estimate_ride @@ -6,7 +6,7 @@ interactions: "start_place_id": null}' headers: Content-Length: ['241'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate @@ -32,7 +32,7 @@ interactions: "start_place_id": null}' headers: Content-Length: ['241'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate @@ -58,7 +58,7 @@ interactions: "start_place_id": null}' headers: Content-Length: ['241'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate @@ -84,7 +84,7 @@ interactions: "start_place_id": null}' headers: Content-Length: ['241'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate diff --git a/tests/fixtures/test_estimate_ride_with_places b/tests/fixtures/test_estimate_ride_with_places index a63d1ba..ddb8360 100644 --- a/tests/fixtures/test_estimate_ride_with_places +++ b/tests/fixtures/test_estimate_ride_with_places @@ -5,7 +5,7 @@ interactions: null, "end_place_id": "work", "start_latitude": null, "start_place_id": "home"}' headers: Content-Length: ['218'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate @@ -30,7 +30,7 @@ interactions: null, "end_place_id": "work", "start_latitude": null, "start_place_id": "home"}' headers: Content-Length: ['218'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate @@ -55,7 +55,7 @@ interactions: null, "end_place_id": "work", "start_latitude": null, "start_place_id": "home"}' headers: Content-Length: ['218'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate @@ -80,7 +80,7 @@ interactions: null, "end_place_id": "work", "start_latitude": null, "start_place_id": "home"}' headers: Content-Length: ['218'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate diff --git a/tests/fixtures/test_estimate_shared_ride b/tests/fixtures/test_estimate_shared_ride index 3ee756d..8cea6dc 100644 --- a/tests/fixtures/test_estimate_shared_ride +++ b/tests/fixtures/test_estimate_shared_ride @@ -6,7 +6,7 @@ interactions: null}' headers: Content-Length: ['238'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate @@ -32,7 +32,7 @@ interactions: null}' headers: Content-Length: ['238'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate @@ -58,7 +58,7 @@ interactions: null}' headers: Content-Length: ['238'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate @@ -84,7 +84,7 @@ interactions: null}' headers: Content-Length: ['238'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate diff --git a/tests/fixtures/test_get_current_ride_details b/tests/fixtures/test_get_current_ride_details index a77c11f..ba25f8f 100644 --- a/tests/fixtures/test_get_current_ride_details +++ b/tests/fixtures/test_get_current_ride_details @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/current response: @@ -24,7 +24,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/current response: @@ -44,7 +44,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/current response: @@ -66,7 +66,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/current response: diff --git a/tests/fixtures/test_get_current_shared_ride_details b/tests/fixtures/test_get_current_shared_ride_details index a0597e2..d422a44 100644 --- a/tests/fixtures/test_get_current_shared_ride_details +++ b/tests/fixtures/test_get_current_shared_ride_details @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/current response: @@ -24,7 +24,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/current response: @@ -44,7 +44,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/current response: @@ -66,7 +66,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/current response: diff --git a/tests/fixtures/test_get_driver_payments b/tests/fixtures/test_get_driver_payments new file mode 100644 index 0000000..4cdad81 --- /dev/null +++ b/tests/fixtures/test_get_driver_payments @@ -0,0 +1,28 @@ +interactions: +- request: + body: null + headers: + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + method: GET + uri: https://api.uber.com/v1/partners/payments + response: + body: {string: !!python/unicode '{"count":50,"limit":10,"payments":[{"payment_id":"63b379d1-190e-44f1-9318-6963fcaf981a","category":"fare","event_time":1601991661,"trip_id":"63b379d1-190e-44f1-9318-6963fcaf981a","cash_collected":0.0,"amount":6.77,"driver_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","breakdown":{"other":8.01,"service_fee":-1.16},"rider_fees":{},"partner_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","currency_code":"USD"},{"payment_id":"c7618173-c063-4911-a810-c060616388e9","category":"fare","event_time":1601843717,"trip_id":"c7618173-c063-4911-a810-c060616388e9","cash_collected":0.0,"amount":7.91,"driver_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","breakdown":{"other":10.98,"service_fee":-3.07},"rider_fees":{},"partner_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","currency_code":"USD"},{"payment_id":"0d98609b-0e48-8361-d3e7-77ea396964b1","category":"other","event_time":1601376113,"trip_id":null,"cash_collected":null,"amount":-0.6,"driver_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","breakdown":{"other":-0.6},"rider_fees":{},"partner_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","currency_code":"USD"},{"payment_id":"341cfbc3-8f9b-4f14-a6c1-18bbad971a16","category":"fare","event_time":1601316763,"trip_id":"341cfbc3-8f9b-4f14-a6c1-18bbad971a16","cash_collected":0.0,"amount":9.63,"driver_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","breakdown":{"other":13.13,"service_fee":-3.7},"rider_fees":{},"partner_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","currency_code":"USD"},{"payment_id":"f43fc0ab-d616-4e31-8eba-0096a6c61864","category":"fare","event_time":1601916637,"trip_id":"f43fc0ab-d616-4e31-8eba-0096a6c61864","cash_collected":0.0,"amount":3.14,"driver_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","breakdown":{"other":4.6,"service_fee":-1.16},"rider_fees":{},"partner_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","currency_code":"USD"},{"payment_id":"1b098df6-06fc-4cc3-ad3b-e1c1c6d9a6c6","category":"fare","event_time":1601939396,"trip_id":"1b098df6-06fc-4cc3-ad3b-e1c1c6d9a6c6","cash_collected":0.0,"amount":16.16,"driver_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","breakdown":{"other":10.41,"service_fee":-6.16},"rider_fees":{},"partner_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","currency_code":"USD"},{"payment_id":"f98361fd-181e-4c68-8a61-1e676e66181b","category":"fare","event_time":1601188038,"trip_id":"f98361fd-181e-4c68-8a61-1e676e66181b","cash_collected":0.0,"amount":11.79,"driver_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","breakdown":{"other":16.37,"service_fee":-4.68},"rider_fees":{},"partner_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","currency_code":"USD"},{"payment_id":"9399d969-1a16-4316-8b97-1ed9907fa1ab","category":"fare","event_time":1601993919,"trip_id":"9399d969-1a16-4316-8b97-1ed9907fa1ab","cash_collected":0.0,"amount":3.14,"driver_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","breakdown":{"other":4.6,"service_fee":-1.16},"rider_fees":{},"partner_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","currency_code":"USD"},{"payment_id":"8ae1166e-016d-6631-e17c-ad9416f0b98b","category":"other","event_time":1601191767,"trip_id":null,"cash_collected":null,"amount":-0.6,"driver_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","breakdown":{"other":-0.6},"rider_fees":{},"partner_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","currency_code":"USD"},{"payment_id":"6ff9377d-4f63-47b8-8d3b-49fc13c6eb73","category":"fare","event_time":1601941318,"trip_id":"6ff9377d-4f63-47b8-8d3b-49fc13c6eb73","cash_collected":0.0,"amount":3.87,"driver_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","breakdown":{"other":6.38,"service_fee":-1.61},"rider_fees":{},"partner_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","currency_code":"USD"}],"offset":0}'} + headers: + cache-control: [max-age=0] + connection: [keep-alive] + content-language: [en] + content-type: [application/json] + date: ['Thu, 10 Aug 1017 13:16:41 GMT'] + etag: [W/"fe9169d6d9c7d76a6f3870d9161fe68a6b116ca7"] + server: [nginx] + strict-transport-security: [max-age=604800, max-age=2692000] + transfer-encoding: [chunked] + x-content-type-options: [nosniff] + x-frame-options: [SAMEORIGIN] + x-rate-limit-limit: ['2000'] + x-rate-limit-remaining: ['1997'] + x-rate-limit-reset: ['1601409600'] + x-uber-app: [uberex-nonsandbox, optimus] + x-xss-protection: [1; mode=block] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/test_get_driver_profile b/tests/fixtures/test_get_driver_profile new file mode 100644 index 0000000..968e076 --- /dev/null +++ b/tests/fixtures/test_get_driver_profile @@ -0,0 +1,28 @@ +interactions: +- request: + body: null + headers: + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + method: GET + uri: https://api.uber.com/v1/partners/me + response: + body: {string: !!python/unicode '{"phone_number":"+16513319173","picture":"https:\/\/d1w2poirtb3as9.cloudfront.net\/16ce502f4767f17b120e.png","first_name":"Greatest","last_name":"Ever","promo_code":"uber_dw","rating":4.94,"activation_status":"active","driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyRaQevIto-aXmYX7nZ2rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","email":"uberdevelopers@gmail.com"}'} + headers: + cache-control: [max-age=0] + connection: [keep-alive] + content-language: [en] + content-length: ['406'] + content-type: [application/json] + date: ['Thu, 10 Aug 2017 23:25:40 GMT'] + etag: [W/"a823fdeea4d4aed0268b7ce1f2addc369c391629"] + server: [nginx] + strict-transport-security: [max-age=604800, max-age=2592000] + x-content-type-options: [nosniff] + x-frame-options: [SAMEORIGIN] + x-rate-limit-limit: ['2000'] + x-rate-limit-remaining: ['1999'] + x-rate-limit-reset: ['1502409600'] + x-uber-app: [uberex-nonsandbox, optimus] + x-xss-protection: [1; mode=block] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/test_get_driver_trips b/tests/fixtures/test_get_driver_trips new file mode 100644 index 0000000..e0bac68 --- /dev/null +++ b/tests/fixtures/test_get_driver_trips @@ -0,0 +1,38 @@ +interactions: +- request: + body: null + headers: + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + method: GET + uri: https://api.uber.com/v1/partners/trips + response: + body: {string: !!python/unicode '{"count":50,"limit":10,"trips":[{"fare":7.76,"dropoff":{"latitude":45.0120162,"timestamp":1502175086,"longitude":-91.0207218},"vehicle_id":"51cb7a92-716f-12ec-a9e1-1cfc7881658d","distance":5.67,"start_city":{"latitude":44.965,"display_name":"Minneapolis + - St. Paul","longitude":-91.181},"status_changes":[{"status":"accepted","timestamp":1502171881},{"status":"driver_arrived","timestamp":1502174252},{"status":"trip_began","timestamp":1502174141},{"status":"completed","timestamp":1502175086}],"surge_multiplier":1.0,"pickup":{"latitude":44.981262,"timestamp":1502174141,"longitude":-92.9929644},"driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","status":"completed","duration":741,"trip_id":"99ad6cce-170a-4de5-9c15-ccc5878cd1d6","currency_code":"USD"},{"fare":10.21,"dropoff":{"latitude":44.9509847,"timestamp":1502171778,"longitude":-92.9916511},"vehicle_id":"51cb7a92-716f-12ec-a9e1-1cfc7881658d","distance":5.99,"start_city":{"latitude":44.965,"display_name":"Minneapolis + - St. Paul","longitude":-91.181},"status_changes":[{"status":"accepted","timestamp":1502172878},{"status":"driver_arrived","timestamp":1502172909},{"status":"trip_began","timestamp":1502171011},{"status":"completed","timestamp":1502171778}],"surge_multiplier":1.0,"pickup":{"latitude":44.9518707,"timestamp":1502171011,"longitude":-91.0916874},"driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","status":"completed","duration":766,"trip_id":"1212227f-01dd-4be1-ab8c-15642b5d119a","currency_code":"USD"},{"fare":22.22,"dropoff":{"latitude":44.8546744,"timestamp":1502171097,"longitude":-91.2447478},"vehicle_id":"51cb7a92-716f-12ec-a9e1-1cfc7881658d","distance":11.44,"start_city":{"latitude":44.965,"display_name":"Minneapolis + - St. Paul","longitude":-91.181},"status_changes":[{"status":"accepted","timestamp":1502168948},{"status":"driver_arrived","timestamp":1502169747},{"status":"trip_began","timestamp":1502169818},{"status":"completed","timestamp":1502171097}],"surge_multiplier":1.2,"pickup":{"latitude":44.9861092,"timestamp":1502169818,"longitude":-91.2286542},"driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","status":"completed","duration":1279,"trip_id":"9e0da75b-6221-40b2-9571-0a60ad7ba909","currency_code":"USD"},{"fare":16.05,"dropoff":{"latitude":44.9608516,"timestamp":1502169068,"longitude":-91.2002126},"vehicle_id":"51cb7a92-716f-12ec-a9e1-1cfc7881658d","distance":9.11,"start_city":{"latitude":44.965,"display_name":"Minneapolis + - St. Paul","longitude":-91.181},"status_changes":[{"status":"accepted","timestamp":1502167064},{"status":"driver_arrived","timestamp":1502167176},{"status":"trip_began","timestamp":1502167451},{"status":"completed","timestamp":1502169068}],"surge_multiplier":1.0,"pickup":{"latitude":44.9541119,"timestamp":1502167451,"longitude":-91.0464417},"driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","status":"completed","duration":1615,"trip_id":"8694999b-414f-4dfc-8c49-161407f14fdd","currency_code":"USD"},{"fare":8.67,"dropoff":{"latitude":44.9114911,"timestamp":1502164162,"longitude":-91.0910178},"vehicle_id":"51cb7a92-716f-12ec-a9e1-1cfc7881658d","distance":5.06,"start_city":{"latitude":44.965,"display_name":"Minneapolis + - St. Paul","longitude":-91.181},"status_changes":[{"status":"accepted","timestamp":1502161289},{"status":"driver_arrived","timestamp":1502161447},{"status":"trip_began","timestamp":1502161511},{"status":"completed","timestamp":1502164162}],"surge_multiplier":1.0,"pickup":{"latitude":44.9066127,"timestamp":1502161511,"longitude":-91.1547108},"driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","status":"completed","duration":610,"trip_id":"fb4f90ed-2f41-452b-af7d-8a1510566710","currency_code":"USD"},{"fare":26.17,"dropoff":{"latitude":44.8819051,"timestamp":1502162816,"longitude":-91.2102282},"vehicle_id":"51cb7a92-716f-12ec-a9e1-1cfc7881658d","distance":20.59,"start_city":{"latitude":44.965,"display_name":"Minneapolis + - St. Paul","longitude":-91.181},"status_changes":[{"status":"accepted","timestamp":1502160658},{"status":"driver_arrived","timestamp":1502161252},{"status":"trip_began","timestamp":1502161101},{"status":"completed","timestamp":1502162816}],"surge_multiplier":1.0,"pickup":{"latitude":45.0067115,"timestamp":1502161101,"longitude":-91.1241722},"driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","status":"completed","duration":1511,"trip_id":"ee1b5557-04ff-4bac-a4d4-aeab7a459fc2","currency_code":"USD"},{"fare":14.18,"dropoff":{"latitude":44.9655822,"timestamp":1502160716,"longitude":-91.1486052},"vehicle_id":"51cb7a92-716f-12ec-a9e1-1cfc7881658d","distance":9.26,"start_city":{"latitude":44.965,"display_name":"Minneapolis + - St. Paul","longitude":-91.181},"status_changes":[{"status":"accepted","timestamp":1502159261},{"status":"driver_arrived","timestamp":1502159794},{"status":"trip_began","timestamp":1502159859},{"status":"completed","timestamp":1502160716}],"surge_multiplier":1.0,"pickup":{"latitude":44.924171,"timestamp":1502159859,"longitude":-91.2676985},"driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","status":"completed","duration":857,"trip_id":"25066a02-19a1-4f56-a866-a85f581cdd24","currency_code":"USD"},{"fare":16.16,"dropoff":{"latitude":44.8878918,"timestamp":1502159144,"longitude":-91.2915962},"vehicle_id":"51cb7a92-716f-12ec-a9e1-1cfc7881658d","distance":7.25,"start_city":{"latitude":44.965,"display_name":"Minneapolis + - St. Paul","longitude":-91.181},"status_changes":[{"status":"accepted","timestamp":1502158264},{"status":"driver_arrived","timestamp":1502158591},{"status":"trip_began","timestamp":1502158719},{"status":"completed","timestamp":1502159144}],"surge_multiplier":1.5,"pickup":{"latitude":44.9677781,"timestamp":1502158719,"longitude":-91.2826957},"driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","status":"completed","duration":625,"trip_id":"cf677de0-abe1-42e1-a6d1-e918a9a57442","currency_code":"USD"},{"fare":21.51,"dropoff":{"latitude":44.9642576,"timestamp":1502158506,"longitude":-91.2765811},"vehicle_id":"51cb7a92-716f-12ec-a9e1-1cfc7881658d","distance":15.48,"start_city":{"latitude":44.965,"display_name":"Minneapolis + - St. Paul","longitude":-91.181},"status_changes":[{"status":"accepted","timestamp":1502156758},{"status":"driver_arrived","timestamp":1502157157},{"status":"trip_began","timestamp":1502157259},{"status":"completed","timestamp":1502158506}],"surge_multiplier":1.0,"pickup":{"latitude":44.9044995,"timestamp":1502157259,"longitude":-91.0506188},"driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","status":"completed","duration":1247,"trip_id":"c8418116-87cf-4e1d-9557-99e8df849018","currency_code":"USD"},{"fare":10.76,"dropoff":{"latitude":44.9591279,"timestamp":1502119171,"longitude":-91.2510997},"vehicle_id":"51cb7a92-716f-12ec-a9e1-1cfc7881658d","distance":0.48,"start_city":{"latitude":44.965,"display_name":"Minneapolis + - St. Paul","longitude":-91.181},"status_changes":[{"status":"accepted","timestamp":1502117622},{"status":"driver_arrived","timestamp":1502118174},{"status":"trip_began","timestamp":1502118991},{"status":"completed","timestamp":1502119171}],"surge_multiplier":1.5,"pickup":{"latitude":44.9590624,"timestamp":1502118991,"longitude":-91.2606216},"driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","status":"completed","duration":181,"trip_id":"cd85aaa5-d127-4170-a170-115895518f2e","currency_code":"USD"}],"offset":0}'} + headers: + cache-control: [max-age=0] + connection: [keep-alive] + content-language: [en] + content-type: [application/json] + date: ['Thu, 10 Aug 2017 21:25:41 GMT'] + etag: [W/"e10108c25652921a048011ddbfe81758a0c19801"] + server: [nginx] + strict-transport-security: [max-age=604800, max-age=2592000] + transfer-encoding: [chunked] + x-content-type-options: [nosniff] + x-frame-options: [SAMEORIGIN] + x-rate-limit-limit: ['2000'] + x-rate-limit-remaining: ['1998'] + x-rate-limit-reset: ['1502409600'] + x-uber-app: [uberex-nonsandbox, optimus] + x-xss-protection: [1; mode=block] + status: {code: 200, message: OK} +version: 1 diff --git a/tests/fixtures/test_get_home_address b/tests/fixtures/test_get_home_address index e5a266d..e0ee9ce 100644 --- a/tests/fixtures/test_get_home_address +++ b/tests/fixtures/test_get_home_address @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/places/home response: @@ -24,7 +24,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/places/home response: @@ -46,7 +46,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/places/home response: @@ -68,7 +68,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/places/home response: diff --git a/tests/fixtures/test_get_payment_methods b/tests/fixtures/test_get_payment_methods index f718bef..a1fd81e 100644 --- a/tests/fixtures/test_get_payment_methods +++ b/tests/fixtures/test_get_payment_methods @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/payment-methods response: @@ -23,7 +23,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/payment-methods response: @@ -44,7 +44,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/payment-methods response: @@ -65,7 +65,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/payment-methods response: diff --git a/tests/fixtures/test_get_pickup_time_estimates b/tests/fixtures/test_get_pickup_time_estimates index 6152f53..1535665 100644 --- a/tests/fixtures/test_get_pickup_time_estimates +++ b/tests/fixtures/test_get_pickup_time_estimates @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/estimates/time?start_latitude=37.7899886&start_longitude=-122.4021253 response: @@ -24,7 +24,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://api.uber.com/v1.2/estimates/time?start_latitude=37.7899886&start_longitude=-122.4021253 response: @@ -46,7 +46,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/estimates/time?start_latitude=37.7899886&start_longitude=-122.4021253 response: @@ -68,7 +68,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://api.uber.com/v1.2/estimates/time?start_latitude=37.7899886&start_longitude=-122.4021253 response: @@ -90,7 +90,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/estimates/time?start_latitude=37.7899886&start_longitude=-122.4021253 response: @@ -112,7 +112,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://api.uber.com/v1.2/estimates/time?start_latitude=37.7899886&start_longitude=-122.4021253 response: @@ -134,7 +134,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/estimates/time?start_latitude=37.7899886&start_longitude=-122.4021253 response: @@ -156,7 +156,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://api.uber.com/v1.2/estimates/time?start_latitude=37.7899886&start_longitude=-122.4021253 response: diff --git a/tests/fixtures/test_get_price_estimates b/tests/fixtures/test_get_price_estimates index b510e74..9bc9c8d 100644 --- a/tests/fixtures/test_get_price_estimates +++ b/tests/fixtures/test_get_price_estimates @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/estimates/price?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513&seat_count=2 response: @@ -24,7 +24,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://api.uber.com/v1.2/estimates/price?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513&seat_count=2 response: @@ -46,7 +46,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/estimates/price?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513&seat_count=2 response: @@ -68,7 +68,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://api.uber.com/v1.2/estimates/price?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513&seat_count=2 response: @@ -90,7 +90,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/estimates/price?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513&seat_count=2 response: @@ -112,7 +112,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://api.uber.com/v1.2/estimates/price?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513&seat_count=2 response: @@ -134,7 +134,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/estimates/price?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513&seat_count=2 response: @@ -156,7 +156,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://api.uber.com/v1.2/estimates/price?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513&seat_count=2 response: diff --git a/tests/fixtures/test_get_products b/tests/fixtures/test_get_products index 4368c21..4f56fe4 100644 --- a/tests/fixtures/test_get_products +++ b/tests/fixtures/test_get_products @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/products?latitude=37.7899886&longitude=-122.4021253 response: @@ -33,7 +33,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://api.uber.com/v1.2/products?latitude=37.7899886&longitude=-122.4021253 response: @@ -64,7 +64,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/products?latitude=37.7899886&longitude=-122.4021253 response: @@ -95,7 +95,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://api.uber.com/v1.2/products?latitude=37.7899886&longitude=-122.4021253 response: @@ -126,7 +126,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/products?latitude=37.7899886&longitude=-122.4021253 response: @@ -157,7 +157,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://api.uber.com/v1.2/products?latitude=37.7899886&longitude=-122.4021253 response: @@ -188,7 +188,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/products?latitude=37.7899886&longitude=-122.4021253 response: @@ -219,7 +219,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://api.uber.com/v1.2/products?latitude=37.7899886&longitude=-122.4021253 response: diff --git a/tests/fixtures/test_get_promotions b/tests/fixtures/test_get_promotions index 93ef175..04c1d51 100644 --- a/tests/fixtures/test_get_promotions +++ b/tests/fixtures/test_get_promotions @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/promotions?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513 response: @@ -23,7 +23,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://api.uber.com/v1.2/promotions?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513 response: @@ -44,7 +44,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/promotions?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513 response: @@ -65,7 +65,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://api.uber.com/v1.2/promotions?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513 response: @@ -86,7 +86,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/promotions?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513 response: @@ -107,7 +107,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://api.uber.com/v1.2/promotions?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513 response: @@ -128,7 +128,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/promotions?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513 response: @@ -149,7 +149,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://api.uber.com/v1.2/promotions?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513 response: diff --git a/tests/fixtures/test_get_ride_details b/tests/fixtures/test_get_ride_details index f457406..d8deff2 100644 --- a/tests/fixtures/test_get_ride_details +++ b/tests/fixtures/test_get_ride_details @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/9bdb3278-21bd-46b8-90fa-51404b0d6acf response: @@ -21,7 +21,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/610d868b-e21c-483a-9932-97e61b852fd2 response: @@ -42,7 +42,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/0aec0061-1e20-4239-a0b7-78328e9afec8 response: @@ -64,7 +64,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/0aec0061-1e20-4239-a0b7-78328e9afec8 response: diff --git a/tests/fixtures/test_get_ride_map b/tests/fixtures/test_get_ride_map index 1b9004c..3e4c34d 100644 --- a/tests/fixtures/test_get_ride_map +++ b/tests/fixtures/test_get_ride_map @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/0aec0061-1e20-4239-a0b7-78328e9afec8/map response: diff --git a/tests/fixtures/test_get_ride_receipt b/tests/fixtures/test_get_ride_receipt index 5e2a11b..849138c 100644 --- a/tests/fixtures/test_get_ride_receipt +++ b/tests/fixtures/test_get_ride_receipt @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/0aec0061-1e20-4239-a0b7-78328e9afec8/receipt response: diff --git a/tests/fixtures/test_get_single_product b/tests/fixtures/test_get_single_product index 9fc535e..370d1fd 100644 --- a/tests/fixtures/test_get_single_product +++ b/tests/fixtures/test_get_single_product @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/products/821415d8-3bd5-4e27-9604-194e4359a449 response: @@ -25,7 +25,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://api.uber.com/v1.2/products/821415d8-3bd5-4e27-9604-194e4359a449 response: @@ -48,7 +48,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/products/821415d8-3bd5-4e27-9604-194e4359a449 response: @@ -71,7 +71,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://api.uber.com/v1.2/products/821415d8-3bd5-4e27-9604-194e4359a449 response: @@ -94,7 +94,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/products/821415d8-3bd5-4e27-9604-194e4359a449 response: @@ -117,7 +117,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://api.uber.com/v1.2/products/821415d8-3bd5-4e27-9604-194e4359a449 response: @@ -140,7 +140,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/products/821415d8-3bd5-4e27-9604-194e4359a449 response: @@ -163,7 +163,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://api.uber.com/v1.2/products/821415d8-3bd5-4e27-9604-194e4359a449 response: diff --git a/tests/fixtures/test_get_user_activity b/tests/fixtures/test_get_user_activity index 254b138..b5dfd44 100644 --- a/tests/fixtures/test_get_user_activity +++ b/tests/fixtures/test_get_user_activity @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/history response: @@ -28,7 +28,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/history response: @@ -54,7 +54,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/history response: @@ -80,7 +80,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/history response: diff --git a/tests/fixtures/test_get_user_profile b/tests/fixtures/test_get_user_profile index d8cb7ac..6a97a4c 100644 --- a/tests/fixtures/test_get_user_profile +++ b/tests/fixtures/test_get_user_profile @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/me response: @@ -23,7 +23,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/me response: @@ -44,7 +44,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/me response: @@ -65,7 +65,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/me response: diff --git a/tests/fixtures/test_get_work_address b/tests/fixtures/test_get_work_address index e0c143c..1e41751 100644 --- a/tests/fixtures/test_get_work_address +++ b/tests/fixtures/test_get_work_address @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/places/work response: @@ -24,7 +24,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/places/work response: @@ -46,7 +46,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/places/work response: @@ -68,7 +68,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] method: GET uri: https://sandbox-api.uber.com/v1.2/places/work response: diff --git a/tests/fixtures/test_request_ride b/tests/fixtures/test_request_ride index d3852d6..9df9685 100644 --- a/tests/fixtures/test_request_ride +++ b/tests/fixtures/test_request_ride @@ -8,7 +8,7 @@ interactions: "start_latitude": 37.7899886}' headers: Content-Length: ['468'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -36,7 +36,7 @@ interactions: "start_latitude": 37.7899886}' headers: Content-Length: ['468'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -64,7 +64,7 @@ interactions: "start_latitude": 37.7899886}' headers: Content-Length: ['468'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -92,7 +92,7 @@ interactions: "start_latitude": 37.7899886}' headers: Content-Length: ['468'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests diff --git a/tests/fixtures/test_request_ride_with_no_default_product b/tests/fixtures/test_request_ride_with_no_default_product index 6b84d89..62ce9c1 100644 --- a/tests/fixtures/test_request_ride_with_no_default_product +++ b/tests/fixtures/test_request_ride_with_no_default_product @@ -8,7 +8,7 @@ interactions: 37.7899886}' headers: Content-Length: ['434'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -36,7 +36,7 @@ interactions: 37.7899886}' headers: Content-Length: ['434'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -64,7 +64,7 @@ interactions: 37.7899886}' headers: Content-Length: ['434'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -92,7 +92,7 @@ interactions: 37.7899886}' headers: Content-Length: ['434'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests diff --git a/tests/fixtures/test_request_ride_with_places b/tests/fixtures/test_request_ride_with_places index 42eb6ee..c95102d 100644 --- a/tests/fixtures/test_request_ride_with_places +++ b/tests/fixtures/test_request_ride_with_places @@ -8,7 +8,7 @@ interactions: null}' headers: Content-Length: ['445'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -36,7 +36,7 @@ interactions: null}' headers: Content-Length: ['445'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -64,7 +64,7 @@ interactions: null}' headers: Content-Length: ['445'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -92,7 +92,7 @@ interactions: null}' headers: Content-Length: ['445'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests diff --git a/tests/fixtures/test_request_ride_with_surge b/tests/fixtures/test_request_ride_with_surge index c7caf73..d40f0e4 100644 --- a/tests/fixtures/test_request_ride_with_surge +++ b/tests/fixtures/test_request_ride_with_surge @@ -8,7 +8,7 @@ interactions: "start_latitude": -22.9674153}' headers: Content-Length: ['407'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests diff --git a/tests/fixtures/test_request_shared_ride b/tests/fixtures/test_request_shared_ride index 27784b2..376c006 100644 --- a/tests/fixtures/test_request_shared_ride +++ b/tests/fixtures/test_request_shared_ride @@ -8,7 +8,7 @@ interactions: "start_latitude": 37.7899886}' headers: Content-Length: ['465'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -36,7 +36,7 @@ interactions: "start_latitude": 37.7899886}' headers: Content-Length: ['465'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -64,7 +64,7 @@ interactions: "start_latitude": 37.7899886}' headers: Content-Length: ['465'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -92,7 +92,7 @@ interactions: "start_latitude": 37.7899886}' headers: Content-Length: ['465'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests diff --git a/tests/fixtures/test_set_home_address b/tests/fixtures/test_set_home_address index 2a2cdc3..be34958 100644 --- a/tests/fixtures/test_set_home_address +++ b/tests/fixtures/test_set_home_address @@ -3,7 +3,7 @@ interactions: body: !!python/unicode '{"address": "555 Market Street, SF"}' headers: Content-Length: ['36'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/places/home @@ -26,7 +26,7 @@ interactions: body: !!python/unicode '{"address": "555 Market Street, SF"}' headers: Content-Length: ['36'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/places/home @@ -49,7 +49,7 @@ interactions: body: !!python/unicode '{"address": "555 Market Street, SF"}' headers: Content-Length: ['36'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/places/home @@ -72,7 +72,7 @@ interactions: body: !!python/unicode '{"address": "555 Market Street, SF"}' headers: Content-Length: ['36'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/places/home diff --git a/tests/fixtures/test_set_work_address b/tests/fixtures/test_set_work_address index ec31fcc..8cb613e 100644 --- a/tests/fixtures/test_set_work_address +++ b/tests/fixtures/test_set_work_address @@ -3,7 +3,7 @@ interactions: body: !!python/unicode '{"address": "1455 Market Street, SF"}' headers: Content-Length: ['37'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/places/work @@ -26,7 +26,7 @@ interactions: body: !!python/unicode '{"address": "1455 Market Street, SF"}' headers: Content-Length: ['37'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/places/work @@ -49,7 +49,7 @@ interactions: body: !!python/unicode '{"address": "1455 Market Street, SF"}' headers: Content-Length: ['37'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/places/work @@ -72,7 +72,7 @@ interactions: body: !!python/unicode '{"address": "1455 Market Street, SF"}' headers: Content-Length: ['37'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/places/work diff --git a/tests/fixtures/test_update_ride_destination b/tests/fixtures/test_update_ride_destination index 588d622..bb82b04 100644 --- a/tests/fixtures/test_update_ride_destination +++ b/tests/fixtures/test_update_ride_destination @@ -3,7 +3,7 @@ interactions: body: !!python/unicode '{"end_longitude": -122.4197515, "end_latitude": 37.775234}' headers: Content-Length: ['58'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PATCH uri: https://sandbox-api.uber.com/v1.2/requests/9bdb3278-21bd-46b8-90fa-51404b0d6acf @@ -25,7 +25,7 @@ interactions: body: !!python/unicode '{"end_longitude": -122.4197515, "end_latitude": 37.775234}' headers: Content-Length: ['58'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PATCH uri: https://sandbox-api.uber.com/v1.2/requests/610d868b-e21c-483a-9932-97e61b852fd2 @@ -48,7 +48,7 @@ interactions: body: !!python/unicode '{"end_longitude": -122.4197515, "end_latitude": 37.775234}' headers: Content-Length: ['58'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PATCH uri: https://sandbox-api.uber.com/v1.2/requests/0aec0061-1e20-4239-a0b7-78328e9afec8 @@ -69,7 +69,7 @@ interactions: body: !!python/unicode '{"end_longitude": -122.4197515, "end_latitude": 37.775234}' headers: Content-Length: ['58'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PATCH uri: https://sandbox-api.uber.com/v1.2/requests/0aec0061-1e20-4239-a0b7-78328e9afec8 diff --git a/tests/fixtures/test_update_ride_destination_with_places b/tests/fixtures/test_update_ride_destination_with_places index af00599..6018320 100644 --- a/tests/fixtures/test_update_ride_destination_with_places +++ b/tests/fixtures/test_update_ride_destination_with_places @@ -3,7 +3,7 @@ interactions: body: !!python/unicode '{"end_place_id": "work"}' headers: Content-Length: ['24'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PATCH uri: https://sandbox-api.uber.com/v1.2/requests/9bdb3278-21bd-46b8-90fa-51404b0d6acf @@ -25,7 +25,7 @@ interactions: body: !!python/unicode '{"end_place_id": "work"}' headers: Content-Length: ['24'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PATCH uri: https://sandbox-api.uber.com/v1.2/requests/610d868b-e21c-483a-9932-97e61b852fd2 @@ -48,7 +48,7 @@ interactions: body: !!python/unicode '{"end_place_id": "work"}' headers: Content-Length: ['24'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PATCH uri: https://sandbox-api.uber.com/v1.2/requests/0aec0061-1e20-4239-a0b7-78328e9afec8 @@ -69,7 +69,7 @@ interactions: body: !!python/unicode '{"end_place_id": "work"}' headers: Content-Length: ['24'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PATCH uri: https://sandbox-api.uber.com/v1.2/requests/0aec0061-1e20-4239-a0b7-78328e9afec8 diff --git a/tests/fixtures/test_update_sandbox_product b/tests/fixtures/test_update_sandbox_product index fd41671..0f76fef 100644 --- a/tests/fixtures/test_update_sandbox_product +++ b/tests/fixtures/test_update_sandbox_product @@ -3,7 +3,7 @@ interactions: body: !!python/unicode '{"surge_multiplier": 2, "drivers_available": null}' headers: Content-Length: ['50'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/sandbox/products/d5ef01d9-7d54-413e-b265-425948d06e92 @@ -24,7 +24,7 @@ interactions: body: !!python/unicode '{"surge_multiplier": 2, "drivers_available": null}' headers: Content-Length: ['50'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/sandbox/products/d5ef01d9-7d54-413e-b265-425948d06e92 @@ -45,7 +45,7 @@ interactions: body: !!python/unicode '{"surge_multiplier": 2, "drivers_available": null}' headers: Content-Length: ['50'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/sandbox/products/d5ef01d9-7d54-413e-b265-425948d06e92 @@ -66,7 +66,7 @@ interactions: body: !!python/unicode '{"surge_multiplier": 2, "drivers_available": null}' headers: Content-Length: ['50'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/sandbox/products/d5ef01d9-7d54-413e-b265-425948d06e92 diff --git a/tests/fixtures/test_update_sandbox_ride b/tests/fixtures/test_update_sandbox_ride index 3927bf9..5076950 100644 --- a/tests/fixtures/test_update_sandbox_ride +++ b/tests/fixtures/test_update_sandbox_ride @@ -3,7 +3,7 @@ interactions: body: !!python/unicode '{"status": "accepted"}' headers: Content-Length: ['22'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/sandbox/requests/9bdb3278-21bd-46b8-90fa-51404b0d6acf @@ -24,7 +24,7 @@ interactions: body: !!python/unicode '{"status": "accepted"}' headers: Content-Length: ['22'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/sandbox/requests/610d868b-e21c-483a-9932-97e61b852fd2 @@ -45,7 +45,7 @@ interactions: body: !!python/unicode '{"status": "accepted"}' headers: Content-Length: ['22'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/sandbox/requests/0aec0061-1e20-4239-a0b7-78328e9afec8 @@ -66,7 +66,7 @@ interactions: body: !!python/unicode '{"status": "accepted"}' headers: Content-Length: ['22'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.3.0] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/sandbox/requests/0aec0061-1e20-4239-a0b7-78328e9afec8 diff --git a/tests/test_client.py b/tests/test_client.py index 56f10df..ef0c82d 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -225,6 +225,42 @@ 'description', ]) +EXPECTED_DRIVER_PROFILE_KEYS = set([ + 'driver_id', + 'activation_status', + 'first_name', + 'last_name', + 'driver_id', + 'email', + 'phone_number', + 'picture', + 'promo_code', + 'rating', +]) + +EXPECTED_DRIVER_TRIPS_KEYS = set([ + 'dropoff', + 'distance', + 'status_changes', + 'pickup', + 'driver_id', + 'status', + 'trip_id' +]) + +EXPECTED_DRIVER_PAYMENTS_KEYS = set([ + 'category', + 'breakdown', + 'rider_fees', + 'event_time', + 'trip_id', + 'payment_id', + 'amount', + 'driver_id', + 'partner_id', + 'currency_code' +]) + @fixture def oauth2credential(): @@ -416,7 +452,7 @@ def test_get_user_profile(authorized_sandbox_client): response = authorized_sandbox_client.get_user_profile() assert response.status_code == codes.ok - # assert response looks like use profile + # assert response looks like user profile response = response.json assert EXPECTED_PROFILE_KEYS.issubset(response) @@ -763,3 +799,40 @@ def test_get_payment_methods(authorized_sandbox_client): for payment in payments: assert EXPECTED_PAYMENT_KEYS.issubset(payment) + + +@uber_vcr.use_cassette() +def test_get_driver_profile(authorized_production_client): + """Test to fetch driver profile with access token.""" + response = authorized_production_client.get_driver_profile() + assert response.status_code == codes.ok + + # assert response looks like driver profile + response = response.json + assert EXPECTED_DRIVER_PROFILE_KEYS.issubset(response) + + +@uber_vcr.use_cassette() +def test_get_driver_trips(authorized_production_client): + """Test to fetch driver trips with access token.""" + response = authorized_production_client.get_driver_trips() + assert response.status_code == codes.ok + + response = response.json + trips = response.get('trips') + + for trip in trips: + assert EXPECTED_DRIVER_TRIPS_KEYS.issubset(trip) + + +@uber_vcr.use_cassette() +def test_get_driver_payments(authorized_production_client): + """Test to fetch driver payments with access token.""" + response = authorized_production_client.get_driver_payments() + assert response.status_code == codes.ok + + response = response.json + payments = response.get('payments') + + for payment in payments: + assert EXPECTED_DRIVER_PAYMENTS_KEYS.issubset(payment) diff --git a/uber_rides/client.py b/uber_rides/client.py index a279c80..7680271 100644 --- a/uber_rides/client.py +++ b/uber_rides/client.py @@ -699,6 +699,42 @@ def revoke_oauth_credential(self): credential = self.session.oauth2credential revoke_access_token(credential) + def get_rider_profile(self): + """Get information about the authorized Uber user. + + Returns + (Response) + A Response object containing account information. + """ + return self.get_user_profile() + + def get_driver_profile(self): + """Get profile about the authorized Uber driver. + + Returns + (Response) + A Response object containing account information. + """ + return self._api_call('GET', 'v1/partners/me') + + def get_driver_trips(self): + """Get trips about the authorized Uber driver. + + Returns + (Response) + A Response object containing trip information. + """ + return self._api_call('GET', 'v1/partners/trips') + + def get_driver_payments(self): + """Get payment about the authorized Uber driver. + + Returns + (Response) + A Response object containing payment information. + """ + return self._api_call('GET', 'v1/partners/payments') + def surge_handler(response, **kwargs): """Error Handler to surface 409 Surge Conflict errors. @@ -713,11 +749,9 @@ def surge_handler(response, **kwargs): """ if response.status_code == codes.conflict: json = response.json() - # try to get errors, then the first, if so errors = json.get('errors', []) - error = errors[0] if errors else json.get('error') # might find an `error` key if `errors` was not there + error = errors[0] if errors else json.get('error') - # safe check in case `code` isn't present if error and error.get('code') == 'surge': raise SurgeError(response) From 2167cf65065cfc9d1408bf6830189966576987be Mon Sep 17 00:00:00 2001 From: Dustin Whittle Date: Wed, 16 Aug 2017 15:59:28 -0700 Subject: [PATCH 3/8] Added support for Driver APIs + updated test fixtures for latest release --- tests/fixtures/test_cancel_current_ride | 8 +- tests/fixtures/test_cancel_ride | 8 +- tests/fixtures/test_estimate_ride | 8 +- tests/fixtures/test_estimate_ride_with_places | 8 +- tests/fixtures/test_estimate_shared_ride | 8 +- tests/fixtures/test_get_current_ride_details | 8 +- .../test_get_current_shared_ride_details | 8 +- tests/fixtures/test_get_driver_payments | 14 +- tests/fixtures/test_get_driver_profile | 14 +- tests/fixtures/test_get_driver_trips | 32 +-- tests/fixtures/test_get_home_address | 8 +- tests/fixtures/test_get_payment_methods | 8 +- tests/fixtures/test_get_pickup_time_estimates | 16 +- tests/fixtures/test_get_price_estimates | 16 +- tests/fixtures/test_get_products | 16 +- tests/fixtures/test_get_promotions | 16 +- tests/fixtures/test_get_ride_details | 8 +- tests/fixtures/test_get_ride_map | 2 +- tests/fixtures/test_get_ride_receipt | 2 +- tests/fixtures/test_get_single_product | 16 +- tests/fixtures/test_get_user_activity | 8 +- tests/fixtures/test_get_user_profile | 8 +- tests/fixtures/test_get_work_address | 8 +- tests/fixtures/test_request_ride | 8 +- .../test_request_ride_with_no_default_product | 8 +- tests/fixtures/test_request_ride_with_places | 8 +- tests/fixtures/test_request_ride_with_surge | 2 +- tests/fixtures/test_request_shared_ride | 8 +- tests/fixtures/test_set_home_address | 8 +- tests/fixtures/test_set_work_address | 8 +- tests/fixtures/test_update_ride_destination | 8 +- .../test_update_ride_destination_with_places | 8 +- tests/fixtures/test_update_sandbox_product | 8 +- tests/fixtures/test_update_sandbox_ride | 8 +- tests/test_client.py | 185 +++++++++++------- uber_rides/client.py | 62 +++++- 36 files changed, 331 insertions(+), 246 deletions(-) diff --git a/tests/fixtures/test_cancel_current_ride b/tests/fixtures/test_cancel_current_ride index 49ae53c..a8d6dee 100644 --- a/tests/fixtures/test_cancel_current_ride +++ b/tests/fixtures/test_cancel_current_ride @@ -3,7 +3,7 @@ interactions: body: null headers: Content-Length: ['0'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: DELETE uri: https://sandbox-api.uber.com/v1.2/requests/current response: @@ -23,7 +23,7 @@ interactions: body: null headers: Content-Length: ['0'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: DELETE uri: https://sandbox-api.uber.com/v1.2/requests/current response: @@ -43,7 +43,7 @@ interactions: body: null headers: Content-Length: ['0'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: DELETE uri: https://sandbox-api.uber.com/v1.2/requests/current response: @@ -63,7 +63,7 @@ interactions: body: null headers: Content-Length: ['0'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: DELETE uri: https://sandbox-api.uber.com/v1.2/requests/current response: diff --git a/tests/fixtures/test_cancel_ride b/tests/fixtures/test_cancel_ride index b884e4a..a6fa556 100644 --- a/tests/fixtures/test_cancel_ride +++ b/tests/fixtures/test_cancel_ride @@ -3,7 +3,7 @@ interactions: body: null headers: Content-Length: ['0'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: DELETE uri: https://sandbox-api.uber.com/v1.2/requests/9bdb3278-21bd-46b8-90fa-51404b0d6acf response: @@ -23,7 +23,7 @@ interactions: body: null headers: Content-Length: ['0'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: DELETE uri: https://sandbox-api.uber.com/v1.2/requests/610d868b-e21c-483a-9932-97e61b852fd2 response: @@ -43,7 +43,7 @@ interactions: body: null headers: Content-Length: ['0'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: DELETE uri: https://sandbox-api.uber.com/v1.2/requests/0aec0061-1e20-4239-a0b7-78328e9afec8 response: @@ -63,7 +63,7 @@ interactions: body: null headers: Content-Length: ['0'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: DELETE uri: https://sandbox-api.uber.com/v1.2/requests/0aec0061-1e20-4239-a0b7-78328e9afec8 response: diff --git a/tests/fixtures/test_estimate_ride b/tests/fixtures/test_estimate_ride index 0ac0252..d33aeb5 100644 --- a/tests/fixtures/test_estimate_ride +++ b/tests/fixtures/test_estimate_ride @@ -6,7 +6,7 @@ interactions: "start_place_id": null}' headers: Content-Length: ['241'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate @@ -32,7 +32,7 @@ interactions: "start_place_id": null}' headers: Content-Length: ['241'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate @@ -58,7 +58,7 @@ interactions: "start_place_id": null}' headers: Content-Length: ['241'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate @@ -84,7 +84,7 @@ interactions: "start_place_id": null}' headers: Content-Length: ['241'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate diff --git a/tests/fixtures/test_estimate_ride_with_places b/tests/fixtures/test_estimate_ride_with_places index ddb8360..4aee31b 100644 --- a/tests/fixtures/test_estimate_ride_with_places +++ b/tests/fixtures/test_estimate_ride_with_places @@ -5,7 +5,7 @@ interactions: null, "end_place_id": "work", "start_latitude": null, "start_place_id": "home"}' headers: Content-Length: ['218'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate @@ -30,7 +30,7 @@ interactions: null, "end_place_id": "work", "start_latitude": null, "start_place_id": "home"}' headers: Content-Length: ['218'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate @@ -55,7 +55,7 @@ interactions: null, "end_place_id": "work", "start_latitude": null, "start_place_id": "home"}' headers: Content-Length: ['218'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate @@ -80,7 +80,7 @@ interactions: null, "end_place_id": "work", "start_latitude": null, "start_place_id": "home"}' headers: Content-Length: ['218'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate diff --git a/tests/fixtures/test_estimate_shared_ride b/tests/fixtures/test_estimate_shared_ride index 8cea6dc..710f179 100644 --- a/tests/fixtures/test_estimate_shared_ride +++ b/tests/fixtures/test_estimate_shared_ride @@ -6,7 +6,7 @@ interactions: null}' headers: Content-Length: ['238'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate @@ -32,7 +32,7 @@ interactions: null}' headers: Content-Length: ['238'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate @@ -58,7 +58,7 @@ interactions: null}' headers: Content-Length: ['238'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate @@ -84,7 +84,7 @@ interactions: null}' headers: Content-Length: ['238'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests/estimate diff --git a/tests/fixtures/test_get_current_ride_details b/tests/fixtures/test_get_current_ride_details index ba25f8f..bb5e6c9 100644 --- a/tests/fixtures/test_get_current_ride_details +++ b/tests/fixtures/test_get_current_ride_details @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/current response: @@ -24,7 +24,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/current response: @@ -44,7 +44,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/current response: @@ -66,7 +66,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/current response: diff --git a/tests/fixtures/test_get_current_shared_ride_details b/tests/fixtures/test_get_current_shared_ride_details index d422a44..fa25251 100644 --- a/tests/fixtures/test_get_current_shared_ride_details +++ b/tests/fixtures/test_get_current_shared_ride_details @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/current response: @@ -24,7 +24,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/current response: @@ -44,7 +44,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/current response: @@ -66,7 +66,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/current response: diff --git a/tests/fixtures/test_get_driver_payments b/tests/fixtures/test_get_driver_payments index 4cdad81..be7099f 100644 --- a/tests/fixtures/test_get_driver_payments +++ b/tests/fixtures/test_get_driver_payments @@ -2,26 +2,26 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1/partners/payments response: - body: {string: !!python/unicode '{"count":50,"limit":10,"payments":[{"payment_id":"63b379d1-190e-44f1-9318-6963fcaf981a","category":"fare","event_time":1601991661,"trip_id":"63b379d1-190e-44f1-9318-6963fcaf981a","cash_collected":0.0,"amount":6.77,"driver_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","breakdown":{"other":8.01,"service_fee":-1.16},"rider_fees":{},"partner_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","currency_code":"USD"},{"payment_id":"c7618173-c063-4911-a810-c060616388e9","category":"fare","event_time":1601843717,"trip_id":"c7618173-c063-4911-a810-c060616388e9","cash_collected":0.0,"amount":7.91,"driver_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","breakdown":{"other":10.98,"service_fee":-3.07},"rider_fees":{},"partner_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","currency_code":"USD"},{"payment_id":"0d98609b-0e48-8361-d3e7-77ea396964b1","category":"other","event_time":1601376113,"trip_id":null,"cash_collected":null,"amount":-0.6,"driver_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","breakdown":{"other":-0.6},"rider_fees":{},"partner_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","currency_code":"USD"},{"payment_id":"341cfbc3-8f9b-4f14-a6c1-18bbad971a16","category":"fare","event_time":1601316763,"trip_id":"341cfbc3-8f9b-4f14-a6c1-18bbad971a16","cash_collected":0.0,"amount":9.63,"driver_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","breakdown":{"other":13.13,"service_fee":-3.7},"rider_fees":{},"partner_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","currency_code":"USD"},{"payment_id":"f43fc0ab-d616-4e31-8eba-0096a6c61864","category":"fare","event_time":1601916637,"trip_id":"f43fc0ab-d616-4e31-8eba-0096a6c61864","cash_collected":0.0,"amount":3.14,"driver_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","breakdown":{"other":4.6,"service_fee":-1.16},"rider_fees":{},"partner_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","currency_code":"USD"},{"payment_id":"1b098df6-06fc-4cc3-ad3b-e1c1c6d9a6c6","category":"fare","event_time":1601939396,"trip_id":"1b098df6-06fc-4cc3-ad3b-e1c1c6d9a6c6","cash_collected":0.0,"amount":16.16,"driver_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","breakdown":{"other":10.41,"service_fee":-6.16},"rider_fees":{},"partner_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","currency_code":"USD"},{"payment_id":"f98361fd-181e-4c68-8a61-1e676e66181b","category":"fare","event_time":1601188038,"trip_id":"f98361fd-181e-4c68-8a61-1e676e66181b","cash_collected":0.0,"amount":11.79,"driver_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","breakdown":{"other":16.37,"service_fee":-4.68},"rider_fees":{},"partner_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","currency_code":"USD"},{"payment_id":"9399d969-1a16-4316-8b97-1ed9907fa1ab","category":"fare","event_time":1601993919,"trip_id":"9399d969-1a16-4316-8b97-1ed9907fa1ab","cash_collected":0.0,"amount":3.14,"driver_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","breakdown":{"other":4.6,"service_fee":-1.16},"rider_fees":{},"partner_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","currency_code":"USD"},{"payment_id":"8ae1166e-016d-6631-e17c-ad9416f0b98b","category":"other","event_time":1601191767,"trip_id":null,"cash_collected":null,"amount":-0.6,"driver_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","breakdown":{"other":-0.6},"rider_fees":{},"partner_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","currency_code":"USD"},{"payment_id":"6ff9377d-4f63-47b8-8d3b-49fc13c6eb73","category":"fare","event_time":1601941318,"trip_id":"6ff9377d-4f63-47b8-8d3b-49fc13c6eb73","cash_collected":0.0,"amount":3.87,"driver_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","breakdown":{"other":6.38,"service_fee":-1.61},"rider_fees":{},"partner_id":"8LvWuRAq160Ogmr8EMkovekFNa1848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO1CW1uRP4D6o07-Lplpq6PKrX1WyjgTXgDP7QyRmzwxRx==","currency_code":"USD"}],"offset":0}'} + body: {string: !!python/unicode '{"count":13,"limit":10,"payments":[{"payment_id":"5cb8304c-f3f0-4a46-b6e3-b55e020750d7","category":"fare","event_time":1502842757,"trip_id":"5cb8304c-f3f0-4a46-b6e3-b55e020750d7","cash_collected":0.0,"amount":3.12,"driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","breakdown":{"other":4.16,"service_fee":-1.04},"rider_fees":{},"partner_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","currency_code":"USD"},{"payment_id":"a9d1efa8-f2b1-46a2-acee-6847c752b0eb","category":"fare","event_time":1502841851,"trip_id":"a9d1efa8-f2b1-46a2-acee-6847c752b0eb","cash_collected":0.0,"amount":4.49,"driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","breakdown":{"other":5.99,"service_fee":-1.5},"rider_fees":{},"partner_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","currency_code":"USD"},{"payment_id":"da30d9ce-4592-40fe-9ba9-c9b970d1d391","category":"fare","event_time":1502841640,"trip_id":"da30d9ce-4592-40fe-9ba9-c9b970d1d391","cash_collected":0.0,"amount":3.0,"driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","breakdown":{"other":4.0,"service_fee":-1.0},"rider_fees":{},"partner_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","currency_code":"USD"},{"payment_id":"b5613b6a-fe74-4704-a637-50f8d51a8bb1","category":"fare","event_time":1502843894,"trip_id":"b5613b6a-fe74-4704-a637-50f8d51a8bb1","cash_collected":0.0,"amount":3.0,"driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","breakdown":{"other":4.0,"service_fee":-1.0},"rider_fees":{},"partner_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","currency_code":"USD"},{"payment_id":"50eebfa4-9985-41ca-bbd9-be0150e32d4c","category":"fare","event_time":1502842172,"trip_id":"50eebfa4-9985-41ca-bbd9-be0150e32d4c","cash_collected":0.0,"amount":3.0,"driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","breakdown":{"other":4.0,"service_fee":-1.0},"rider_fees":{},"partner_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","currency_code":"USD"},{"payment_id":"ba950c43-c57a-4ab8-a8db-2057dd30756b","category":"fare","event_time":1502842655,"trip_id":"ba950c43-c57a-4ab8-a8db-2057dd30756b","cash_collected":0.0,"amount":3.0,"driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","breakdown":{"other":4.0,"service_fee":-1.0},"rider_fees":{},"partner_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","currency_code":"USD"},{"payment_id":"9ffeb986-0a73-4312-bb5e-22a1cc13e495","category":"fare","event_time":1502842917,"trip_id":"9ffeb986-0a73-4312-bb5e-22a1cc13e495","cash_collected":0.0,"amount":3.0,"driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","breakdown":{"other":4.0,"service_fee":-1.0},"rider_fees":{},"partner_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","currency_code":"USD"},{"payment_id":"4415e5f6-60f2-451f-ade1-c3d6ae286d76","category":"fare","event_time":1502843623,"trip_id":"4415e5f6-60f2-451f-ade1-c3d6ae286d76","cash_collected":0.0,"amount":3.0,"driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","breakdown":{"other":4.0,"service_fee":-1.0},"rider_fees":{},"partner_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","currency_code":"USD"},{"payment_id":"43851410-34ba-4054-9a4e-711e4e6a8fe5","category":"fare","event_time":1502843338,"trip_id":"43851410-34ba-4054-9a4e-711e4e6a8fe5","cash_collected":0.0,"amount":3.0,"driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","breakdown":{"other":4.0,"service_fee":-1.0},"rider_fees":{},"partner_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","currency_code":"USD"},{"payment_id":"020f251b-e8ac-4ad1-ae9f-543a0db6b294","category":"fare","event_time":1502830183,"trip_id":"020f251b-e8ac-4ad1-ae9f-543a0db6b294","cash_collected":0.0,"amount":4.34,"driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","breakdown":{"other":5.79,"service_fee":-1.45},"rider_fees":{},"partner_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","currency_code":"USD"}],"offset":0}'} headers: cache-control: [max-age=0] connection: [keep-alive] content-language: [en] content-type: [application/json] - date: ['Thu, 10 Aug 1017 13:16:41 GMT'] - etag: [W/"fe9169d6d9c7d76a6f3870d9161fe68a6b116ca7"] + date: ['Wed, 16 Aug 2017 22:54:50 GMT'] + etag: [W/"a757f6e22e2dffdb1ccece2423b5f517f01ca791"] server: [nginx] - strict-transport-security: [max-age=604800, max-age=2692000] + strict-transport-security: [max-age=604800, max-age=2592000] transfer-encoding: [chunked] x-content-type-options: [nosniff] x-frame-options: [SAMEORIGIN] x-rate-limit-limit: ['2000'] - x-rate-limit-remaining: ['1997'] - x-rate-limit-reset: ['1601409600'] + x-rate-limit-remaining: ['1995'] + x-rate-limit-reset: ['1502924400'] x-uber-app: [uberex-nonsandbox, optimus] x-xss-protection: [1; mode=block] status: {code: 200, message: OK} diff --git a/tests/fixtures/test_get_driver_profile b/tests/fixtures/test_get_driver_profile index 968e076..e2af295 100644 --- a/tests/fixtures/test_get_driver_profile +++ b/tests/fixtures/test_get_driver_profile @@ -2,26 +2,26 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1/partners/me response: - body: {string: !!python/unicode '{"phone_number":"+16513319173","picture":"https:\/\/d1w2poirtb3as9.cloudfront.net\/16ce502f4767f17b120e.png","first_name":"Greatest","last_name":"Ever","promo_code":"uber_dw","rating":4.94,"activation_status":"active","driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyRaQevIto-aXmYX7nZ2rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","email":"uberdevelopers@gmail.com"}'} + body: {string: !!python/unicode '{"phone_number":"+14075550001","picture":"https:\/\/d1w2poirtb3as9.cloudfront.net\/16ce502f4767f17b120e.jpeg","first_name":"Uber","last_name":"Tester","promo_code":"ubert4544ue","rating":5.0,"activation_status":"active","driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","email":"uber.developer+tester@example.com"}'} headers: cache-control: [max-age=0] connection: [keep-alive] content-language: [en] - content-length: ['406'] + content-length: ['419'] content-type: [application/json] - date: ['Thu, 10 Aug 2017 23:25:40 GMT'] - etag: [W/"a823fdeea4d4aed0268b7ce1f2addc369c391629"] + date: ['Wed, 16 Aug 2017 22:54:50 GMT'] + etag: [W/"d76d91610e42a7b0d6e551766905af177b466447"] server: [nginx] strict-transport-security: [max-age=604800, max-age=2592000] x-content-type-options: [nosniff] x-frame-options: [SAMEORIGIN] x-rate-limit-limit: ['2000'] - x-rate-limit-remaining: ['1999'] - x-rate-limit-reset: ['1502409600'] + x-rate-limit-remaining: ['1997'] + x-rate-limit-reset: ['1502924400'] x-uber-app: [uberex-nonsandbox, optimus] x-xss-protection: [1; mode=block] status: {code: 200, message: OK} diff --git a/tests/fixtures/test_get_driver_trips b/tests/fixtures/test_get_driver_trips index e0bac68..bee0327 100644 --- a/tests/fixtures/test_get_driver_trips +++ b/tests/fixtures/test_get_driver_trips @@ -2,36 +2,36 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1/partners/trips response: - body: {string: !!python/unicode '{"count":50,"limit":10,"trips":[{"fare":7.76,"dropoff":{"latitude":45.0120162,"timestamp":1502175086,"longitude":-91.0207218},"vehicle_id":"51cb7a92-716f-12ec-a9e1-1cfc7881658d","distance":5.67,"start_city":{"latitude":44.965,"display_name":"Minneapolis - - St. Paul","longitude":-91.181},"status_changes":[{"status":"accepted","timestamp":1502171881},{"status":"driver_arrived","timestamp":1502174252},{"status":"trip_began","timestamp":1502174141},{"status":"completed","timestamp":1502175086}],"surge_multiplier":1.0,"pickup":{"latitude":44.981262,"timestamp":1502174141,"longitude":-92.9929644},"driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","status":"completed","duration":741,"trip_id":"99ad6cce-170a-4de5-9c15-ccc5878cd1d6","currency_code":"USD"},{"fare":10.21,"dropoff":{"latitude":44.9509847,"timestamp":1502171778,"longitude":-92.9916511},"vehicle_id":"51cb7a92-716f-12ec-a9e1-1cfc7881658d","distance":5.99,"start_city":{"latitude":44.965,"display_name":"Minneapolis - - St. Paul","longitude":-91.181},"status_changes":[{"status":"accepted","timestamp":1502172878},{"status":"driver_arrived","timestamp":1502172909},{"status":"trip_began","timestamp":1502171011},{"status":"completed","timestamp":1502171778}],"surge_multiplier":1.0,"pickup":{"latitude":44.9518707,"timestamp":1502171011,"longitude":-91.0916874},"driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","status":"completed","duration":766,"trip_id":"1212227f-01dd-4be1-ab8c-15642b5d119a","currency_code":"USD"},{"fare":22.22,"dropoff":{"latitude":44.8546744,"timestamp":1502171097,"longitude":-91.2447478},"vehicle_id":"51cb7a92-716f-12ec-a9e1-1cfc7881658d","distance":11.44,"start_city":{"latitude":44.965,"display_name":"Minneapolis - - St. Paul","longitude":-91.181},"status_changes":[{"status":"accepted","timestamp":1502168948},{"status":"driver_arrived","timestamp":1502169747},{"status":"trip_began","timestamp":1502169818},{"status":"completed","timestamp":1502171097}],"surge_multiplier":1.2,"pickup":{"latitude":44.9861092,"timestamp":1502169818,"longitude":-91.2286542},"driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","status":"completed","duration":1279,"trip_id":"9e0da75b-6221-40b2-9571-0a60ad7ba909","currency_code":"USD"},{"fare":16.05,"dropoff":{"latitude":44.9608516,"timestamp":1502169068,"longitude":-91.2002126},"vehicle_id":"51cb7a92-716f-12ec-a9e1-1cfc7881658d","distance":9.11,"start_city":{"latitude":44.965,"display_name":"Minneapolis - - St. Paul","longitude":-91.181},"status_changes":[{"status":"accepted","timestamp":1502167064},{"status":"driver_arrived","timestamp":1502167176},{"status":"trip_began","timestamp":1502167451},{"status":"completed","timestamp":1502169068}],"surge_multiplier":1.0,"pickup":{"latitude":44.9541119,"timestamp":1502167451,"longitude":-91.0464417},"driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","status":"completed","duration":1615,"trip_id":"8694999b-414f-4dfc-8c49-161407f14fdd","currency_code":"USD"},{"fare":8.67,"dropoff":{"latitude":44.9114911,"timestamp":1502164162,"longitude":-91.0910178},"vehicle_id":"51cb7a92-716f-12ec-a9e1-1cfc7881658d","distance":5.06,"start_city":{"latitude":44.965,"display_name":"Minneapolis - - St. Paul","longitude":-91.181},"status_changes":[{"status":"accepted","timestamp":1502161289},{"status":"driver_arrived","timestamp":1502161447},{"status":"trip_began","timestamp":1502161511},{"status":"completed","timestamp":1502164162}],"surge_multiplier":1.0,"pickup":{"latitude":44.9066127,"timestamp":1502161511,"longitude":-91.1547108},"driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","status":"completed","duration":610,"trip_id":"fb4f90ed-2f41-452b-af7d-8a1510566710","currency_code":"USD"},{"fare":26.17,"dropoff":{"latitude":44.8819051,"timestamp":1502162816,"longitude":-91.2102282},"vehicle_id":"51cb7a92-716f-12ec-a9e1-1cfc7881658d","distance":20.59,"start_city":{"latitude":44.965,"display_name":"Minneapolis - - St. Paul","longitude":-91.181},"status_changes":[{"status":"accepted","timestamp":1502160658},{"status":"driver_arrived","timestamp":1502161252},{"status":"trip_began","timestamp":1502161101},{"status":"completed","timestamp":1502162816}],"surge_multiplier":1.0,"pickup":{"latitude":45.0067115,"timestamp":1502161101,"longitude":-91.1241722},"driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","status":"completed","duration":1511,"trip_id":"ee1b5557-04ff-4bac-a4d4-aeab7a459fc2","currency_code":"USD"},{"fare":14.18,"dropoff":{"latitude":44.9655822,"timestamp":1502160716,"longitude":-91.1486052},"vehicle_id":"51cb7a92-716f-12ec-a9e1-1cfc7881658d","distance":9.26,"start_city":{"latitude":44.965,"display_name":"Minneapolis - - St. Paul","longitude":-91.181},"status_changes":[{"status":"accepted","timestamp":1502159261},{"status":"driver_arrived","timestamp":1502159794},{"status":"trip_began","timestamp":1502159859},{"status":"completed","timestamp":1502160716}],"surge_multiplier":1.0,"pickup":{"latitude":44.924171,"timestamp":1502159859,"longitude":-91.2676985},"driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","status":"completed","duration":857,"trip_id":"25066a02-19a1-4f56-a866-a85f581cdd24","currency_code":"USD"},{"fare":16.16,"dropoff":{"latitude":44.8878918,"timestamp":1502159144,"longitude":-91.2915962},"vehicle_id":"51cb7a92-716f-12ec-a9e1-1cfc7881658d","distance":7.25,"start_city":{"latitude":44.965,"display_name":"Minneapolis - - St. Paul","longitude":-91.181},"status_changes":[{"status":"accepted","timestamp":1502158264},{"status":"driver_arrived","timestamp":1502158591},{"status":"trip_began","timestamp":1502158719},{"status":"completed","timestamp":1502159144}],"surge_multiplier":1.5,"pickup":{"latitude":44.9677781,"timestamp":1502158719,"longitude":-91.2826957},"driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","status":"completed","duration":625,"trip_id":"cf677de0-abe1-42e1-a6d1-e918a9a57442","currency_code":"USD"},{"fare":21.51,"dropoff":{"latitude":44.9642576,"timestamp":1502158506,"longitude":-91.2765811},"vehicle_id":"51cb7a92-716f-12ec-a9e1-1cfc7881658d","distance":15.48,"start_city":{"latitude":44.965,"display_name":"Minneapolis - - St. Paul","longitude":-91.181},"status_changes":[{"status":"accepted","timestamp":1502156758},{"status":"driver_arrived","timestamp":1502157157},{"status":"trip_began","timestamp":1502157259},{"status":"completed","timestamp":1502158506}],"surge_multiplier":1.0,"pickup":{"latitude":44.9044995,"timestamp":1502157259,"longitude":-91.0506188},"driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","status":"completed","duration":1247,"trip_id":"c8418116-87cf-4e1d-9557-99e8df849018","currency_code":"USD"},{"fare":10.76,"dropoff":{"latitude":44.9591279,"timestamp":1502119171,"longitude":-91.2510997},"vehicle_id":"51cb7a92-716f-12ec-a9e1-1cfc7881658d","distance":0.48,"start_city":{"latitude":44.965,"display_name":"Minneapolis - - St. Paul","longitude":-91.181},"status_changes":[{"status":"accepted","timestamp":1502117622},{"status":"driver_arrived","timestamp":1502118174},{"status":"trip_began","timestamp":1502118991},{"status":"completed","timestamp":1502119171}],"surge_multiplier":1.5,"pickup":{"latitude":44.9590624,"timestamp":1502118991,"longitude":-91.2606216},"driver_id":"8LvWuRAq250Ogmr8EMkovekFNa2848lyMaQevIto-aXmYX7nZ1rDT7TrbyXQPeHrY1JQuMBJIe_Pe7nY7_WRZO2CW2uRP4D6o07-Lplpq5PKrX1WyjgTXgDP7QyRmzwxRx==","status":"completed","duration":181,"trip_id":"cd85aaa5-d127-4170-a170-115895518f2e","currency_code":"USD"}],"offset":0}'} + body: {string: !!python/unicode '{"count":13,"limit":10,"trips":[{"fare":6.2,"dropoff":{"timestamp":1502844378},"vehicle_id":"0082b54a-6a5e-4f6b-b999-b0649f286381","distance":0.37,"start_city":{"latitude":38.3498,"display_name":"Charleston, + WV","longitude":-81.6326},"status_changes":[{"status":"accepted","timestamp":1502843899},{"status":"driver_arrived","timestamp":1502843900},{"status":"trip_began","timestamp":1502843903},{"status":"completed","timestamp":1502844378}],"surge_multiplier":1.0,"pickup":{"timestamp":1502843903},"driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","status":"completed","duration":475,"trip_id":"b5613b6a-fe74-4704-a637-50f8d51a8bb1","currency_code":"USD"},{"fare":6.4,"dropoff":{"timestamp":1502843883},"vehicle_id":"0082b54a-6a5e-4f6b-b999-b0649f286381","distance":0.96,"start_city":{"latitude":38.3498,"display_name":"Charleston, + WV","longitude":-81.6326},"status_changes":[{"status":"accepted","timestamp":1502843627},{"status":"driver_arrived","timestamp":1502843627},{"status":"trip_began","timestamp":1502843631},{"status":"completed","timestamp":1502843883}],"surge_multiplier":1.0,"pickup":{"timestamp":1502843631},"driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","status":"completed","duration":253,"trip_id":"4415e5f6-60f2-451f-ade1-c3d6ae286d76","currency_code":"USD"},{"fare":6.2,"dropoff":{"timestamp":1502843563},"vehicle_id":"0082b54a-6a5e-4f6b-b999-b0649f286381","distance":0.0,"start_city":{"latitude":38.3498,"display_name":"Charleston, + WV","longitude":-81.6326},"status_changes":[{"status":"accepted","timestamp":1502843343},{"status":"driver_arrived","timestamp":1502843343},{"status":"trip_began","timestamp":1502843346},{"status":"completed","timestamp":1502843563}],"surge_multiplier":1.0,"pickup":{"timestamp":1502843346},"driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","status":"completed","duration":217,"trip_id":"43851410-34ba-4054-9a4e-711e4e6a8fe5","currency_code":"USD"},{"fare":13.35,"dropoff":{"timestamp":1502843227},"vehicle_id":"0082b54a-6a5e-4f6b-b999-b0649f286381","distance":3.51,"start_city":{"latitude":38.3498,"display_name":"Charleston, + WV","longitude":-81.6326},"status_changes":[{"status":"accepted","timestamp":1502843039},{"status":"driver_arrived","timestamp":1502843040},{"status":"trip_began","timestamp":1502843043},{"status":"completed","timestamp":1502843227}],"surge_multiplier":1.0,"pickup":{"timestamp":1502843043},"driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","status":"completed","duration":184,"trip_id":"fe8f00d9-2bd0-464a-82fe-8ce1ffd27057","currency_code":"USD"},{"fare":6.55,"dropoff":{"timestamp":1502843010},"vehicle_id":"0082b54a-6a5e-4f6b-b999-b0649f286381","distance":1.14,"start_city":{"latitude":38.3498,"display_name":"Charleston, + WV","longitude":-81.6326},"status_changes":[{"status":"accepted","timestamp":1502842919},{"status":"driver_arrived","timestamp":1502842919},{"status":"trip_began","timestamp":1502842922},{"status":"completed","timestamp":1502843010}],"surge_multiplier":1.0,"pickup":{"timestamp":1502842922},"driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","status":"completed","duration":88,"trip_id":"9ffeb986-0a73-4312-bb5e-22a1cc13e495","currency_code":"USD"},{"fare":7.13,"dropoff":{"timestamp":1502842902},"vehicle_id":"0082b54a-6a5e-4f6b-b999-b0649f286381","distance":1.42,"start_city":{"latitude":38.3498,"display_name":"Charleston, + WV","longitude":-81.6326},"status_changes":[{"status":"accepted","timestamp":1502842761},{"status":"driver_arrived","timestamp":1502842761},{"status":"trip_began","timestamp":1502842763},{"status":"completed","timestamp":1502842902}],"surge_multiplier":1.0,"pickup":{"timestamp":1502842763},"driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","status":"completed","duration":140,"trip_id":"5cb8304c-f3f0-4a46-b6e3-b55e020750d7","currency_code":"USD"},{"fare":6.53,"dropoff":null,"vehicle_id":"0082b54a-6a5e-4f6b-b999-b0649f286381","distance":0.72,"start_city":{"latitude":38.3498,"display_name":"Charleston, + WV","longitude":-81.6326},"status_changes":[{"status":"accepted","timestamp":1502842659},{"status":"driver_arrived","timestamp":1502842660},{"status":"trip_began","timestamp":1502842662},{"status":"rider_canceled","timestamp":1502842731}],"surge_multiplier":1.0,"pickup":{"timestamp":1502842662},"driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","status":"rider_canceled","duration":68,"trip_id":"ba950c43-c57a-4ab8-a8db-2057dd30756b","currency_code":"USD"},{"fare":9.68,"dropoff":{"timestamp":1502842611},"vehicle_id":"0082b54a-6a5e-4f6b-b999-b0649f286381","distance":3.82,"start_city":{"latitude":38.3498,"display_name":"Charleston, + WV","longitude":-81.6326},"status_changes":[{"status":"accepted","timestamp":1502842336},{"status":"driver_arrived","timestamp":1502842336},{"status":"trip_began","timestamp":1502842338},{"status":"completed","timestamp":1502842611}],"surge_multiplier":1.0,"pickup":{"timestamp":1502842338},"driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","status":"completed","duration":273,"trip_id":"d80ea4dd-3eca-4215-8224-4162cd72eefb","currency_code":"USD"},{"fare":6.2,"dropoff":{"timestamp":1502842242},"vehicle_id":"0082b54a-6a5e-4f6b-b999-b0649f286381","distance":0.38,"start_city":{"latitude":38.3498,"display_name":"Charleston, + WV","longitude":-81.6326},"status_changes":[{"status":"accepted","timestamp":1502842176},{"status":"driver_arrived","timestamp":1502842177},{"status":"trip_began","timestamp":1502842180},{"status":"completed","timestamp":1502842242}],"surge_multiplier":1.0,"pickup":{"timestamp":1502842180},"driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","status":"completed","duration":63,"trip_id":"50eebfa4-9985-41ca-bbd9-be0150e32d4c","currency_code":"USD"},{"fare":8.99,"dropoff":{"timestamp":1502842126},"vehicle_id":"0082b54a-6a5e-4f6b-b999-b0649f286381","distance":2.8,"start_city":{"latitude":38.3498,"display_name":"Charleston, + WV","longitude":-81.6326},"status_changes":[{"status":"accepted","timestamp":1502841856},{"status":"driver_arrived","timestamp":1502841859},{"status":"trip_began","timestamp":1502841861},{"status":"completed","timestamp":1502842126}],"surge_multiplier":1.0,"pickup":{"timestamp":1502841861},"driver_id":"8LvWuRAq2511gmr8EMkovekFNa2848lyMaQevIto-aXmnK9oKNRtfTxYLgPq9OSt8EzAu5pDB7XiaQIrcp-zXgOA5EyK4h00U6D1o7aZpXIQah--U77Eh7LEBiksj2rahB==","status":"completed","duration":264,"trip_id":"a9d1efa8-f2b1-46a2-acee-6847c752b0eb","currency_code":"USD"}],"offset":0}'} headers: cache-control: [max-age=0] connection: [keep-alive] content-language: [en] content-type: [application/json] - date: ['Thu, 10 Aug 2017 21:25:41 GMT'] - etag: [W/"e10108c25652921a048011ddbfe81758a0c19801"] + date: ['Wed, 16 Aug 2017 22:54:50 GMT'] + etag: [W/"7341e30342fe59d8119b66b04f314ce1a7ab275f"] server: [nginx] strict-transport-security: [max-age=604800, max-age=2592000] transfer-encoding: [chunked] x-content-type-options: [nosniff] x-frame-options: [SAMEORIGIN] x-rate-limit-limit: ['2000'] - x-rate-limit-remaining: ['1998'] - x-rate-limit-reset: ['1502409600'] + x-rate-limit-remaining: ['1996'] + x-rate-limit-reset: ['1502924400'] x-uber-app: [uberex-nonsandbox, optimus] x-xss-protection: [1; mode=block] status: {code: 200, message: OK} diff --git a/tests/fixtures/test_get_home_address b/tests/fixtures/test_get_home_address index e0ee9ce..5b85d2d 100644 --- a/tests/fixtures/test_get_home_address +++ b/tests/fixtures/test_get_home_address @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/places/home response: @@ -24,7 +24,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/places/home response: @@ -46,7 +46,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/places/home response: @@ -68,7 +68,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/places/home response: diff --git a/tests/fixtures/test_get_payment_methods b/tests/fixtures/test_get_payment_methods index a1fd81e..55d3a65 100644 --- a/tests/fixtures/test_get_payment_methods +++ b/tests/fixtures/test_get_payment_methods @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/payment-methods response: @@ -23,7 +23,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/payment-methods response: @@ -44,7 +44,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/payment-methods response: @@ -65,7 +65,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/payment-methods response: diff --git a/tests/fixtures/test_get_pickup_time_estimates b/tests/fixtures/test_get_pickup_time_estimates index 1535665..0ecb234 100644 --- a/tests/fixtures/test_get_pickup_time_estimates +++ b/tests/fixtures/test_get_pickup_time_estimates @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/estimates/time?start_latitude=37.7899886&start_longitude=-122.4021253 response: @@ -24,7 +24,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1.2/estimates/time?start_latitude=37.7899886&start_longitude=-122.4021253 response: @@ -46,7 +46,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/estimates/time?start_latitude=37.7899886&start_longitude=-122.4021253 response: @@ -68,7 +68,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1.2/estimates/time?start_latitude=37.7899886&start_longitude=-122.4021253 response: @@ -90,7 +90,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/estimates/time?start_latitude=37.7899886&start_longitude=-122.4021253 response: @@ -112,7 +112,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1.2/estimates/time?start_latitude=37.7899886&start_longitude=-122.4021253 response: @@ -134,7 +134,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/estimates/time?start_latitude=37.7899886&start_longitude=-122.4021253 response: @@ -156,7 +156,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1.2/estimates/time?start_latitude=37.7899886&start_longitude=-122.4021253 response: diff --git a/tests/fixtures/test_get_price_estimates b/tests/fixtures/test_get_price_estimates index 9bc9c8d..9eb98c8 100644 --- a/tests/fixtures/test_get_price_estimates +++ b/tests/fixtures/test_get_price_estimates @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/estimates/price?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513&seat_count=2 response: @@ -24,7 +24,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1.2/estimates/price?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513&seat_count=2 response: @@ -46,7 +46,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/estimates/price?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513&seat_count=2 response: @@ -68,7 +68,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1.2/estimates/price?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513&seat_count=2 response: @@ -90,7 +90,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/estimates/price?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513&seat_count=2 response: @@ -112,7 +112,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1.2/estimates/price?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513&seat_count=2 response: @@ -134,7 +134,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/estimates/price?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513&seat_count=2 response: @@ -156,7 +156,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1.2/estimates/price?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513&seat_count=2 response: diff --git a/tests/fixtures/test_get_products b/tests/fixtures/test_get_products index 4f56fe4..0fa734a 100644 --- a/tests/fixtures/test_get_products +++ b/tests/fixtures/test_get_products @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/products?latitude=37.7899886&longitude=-122.4021253 response: @@ -33,7 +33,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1.2/products?latitude=37.7899886&longitude=-122.4021253 response: @@ -64,7 +64,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/products?latitude=37.7899886&longitude=-122.4021253 response: @@ -95,7 +95,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1.2/products?latitude=37.7899886&longitude=-122.4021253 response: @@ -126,7 +126,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/products?latitude=37.7899886&longitude=-122.4021253 response: @@ -157,7 +157,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1.2/products?latitude=37.7899886&longitude=-122.4021253 response: @@ -188,7 +188,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/products?latitude=37.7899886&longitude=-122.4021253 response: @@ -219,7 +219,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1.2/products?latitude=37.7899886&longitude=-122.4021253 response: diff --git a/tests/fixtures/test_get_promotions b/tests/fixtures/test_get_promotions index 04c1d51..85cd36e 100644 --- a/tests/fixtures/test_get_promotions +++ b/tests/fixtures/test_get_promotions @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/promotions?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513 response: @@ -23,7 +23,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1.2/promotions?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513 response: @@ -44,7 +44,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/promotions?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513 response: @@ -65,7 +65,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1.2/promotions?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513 response: @@ -86,7 +86,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/promotions?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513 response: @@ -107,7 +107,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1.2/promotions?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513 response: @@ -128,7 +128,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/promotions?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513 response: @@ -149,7 +149,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1.2/promotions?start_latitude=37.7899886&start_longitude=-122.4021253&end_latitude=37.775232&end_longitude=-122.4197513 response: diff --git a/tests/fixtures/test_get_ride_details b/tests/fixtures/test_get_ride_details index d8deff2..d32a67d 100644 --- a/tests/fixtures/test_get_ride_details +++ b/tests/fixtures/test_get_ride_details @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/9bdb3278-21bd-46b8-90fa-51404b0d6acf response: @@ -21,7 +21,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/610d868b-e21c-483a-9932-97e61b852fd2 response: @@ -42,7 +42,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/0aec0061-1e20-4239-a0b7-78328e9afec8 response: @@ -64,7 +64,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/0aec0061-1e20-4239-a0b7-78328e9afec8 response: diff --git a/tests/fixtures/test_get_ride_map b/tests/fixtures/test_get_ride_map index 3e4c34d..4eb50ad 100644 --- a/tests/fixtures/test_get_ride_map +++ b/tests/fixtures/test_get_ride_map @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/0aec0061-1e20-4239-a0b7-78328e9afec8/map response: diff --git a/tests/fixtures/test_get_ride_receipt b/tests/fixtures/test_get_ride_receipt index 849138c..e7478cb 100644 --- a/tests/fixtures/test_get_ride_receipt +++ b/tests/fixtures/test_get_ride_receipt @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/requests/0aec0061-1e20-4239-a0b7-78328e9afec8/receipt response: diff --git a/tests/fixtures/test_get_single_product b/tests/fixtures/test_get_single_product index 370d1fd..6d8250e 100644 --- a/tests/fixtures/test_get_single_product +++ b/tests/fixtures/test_get_single_product @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/products/821415d8-3bd5-4e27-9604-194e4359a449 response: @@ -25,7 +25,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1.2/products/821415d8-3bd5-4e27-9604-194e4359a449 response: @@ -48,7 +48,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/products/821415d8-3bd5-4e27-9604-194e4359a449 response: @@ -71,7 +71,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1.2/products/821415d8-3bd5-4e27-9604-194e4359a449 response: @@ -94,7 +94,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/products/821415d8-3bd5-4e27-9604-194e4359a449 response: @@ -117,7 +117,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1.2/products/821415d8-3bd5-4e27-9604-194e4359a449 response: @@ -140,7 +140,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/products/821415d8-3bd5-4e27-9604-194e4359a449 response: @@ -163,7 +163,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://api.uber.com/v1.2/products/821415d8-3bd5-4e27-9604-194e4359a449 response: diff --git a/tests/fixtures/test_get_user_activity b/tests/fixtures/test_get_user_activity index b5dfd44..13533e4 100644 --- a/tests/fixtures/test_get_user_activity +++ b/tests/fixtures/test_get_user_activity @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/history response: @@ -28,7 +28,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/history response: @@ -54,7 +54,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/history response: @@ -80,7 +80,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/history response: diff --git a/tests/fixtures/test_get_user_profile b/tests/fixtures/test_get_user_profile index 6a97a4c..52678be 100644 --- a/tests/fixtures/test_get_user_profile +++ b/tests/fixtures/test_get_user_profile @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/me response: @@ -23,7 +23,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/me response: @@ -44,7 +44,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/me response: @@ -65,7 +65,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/me response: diff --git a/tests/fixtures/test_get_work_address b/tests/fixtures/test_get_work_address index 1e41751..7359415 100644 --- a/tests/fixtures/test_get_work_address +++ b/tests/fixtures/test_get_work_address @@ -2,7 +2,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/places/work response: @@ -24,7 +24,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/places/work response: @@ -46,7 +46,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/places/work response: @@ -68,7 +68,7 @@ interactions: - request: body: null headers: - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] method: GET uri: https://sandbox-api.uber.com/v1.2/places/work response: diff --git a/tests/fixtures/test_request_ride b/tests/fixtures/test_request_ride index 9df9685..7a43810 100644 --- a/tests/fixtures/test_request_ride +++ b/tests/fixtures/test_request_ride @@ -8,7 +8,7 @@ interactions: "start_latitude": 37.7899886}' headers: Content-Length: ['468'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -36,7 +36,7 @@ interactions: "start_latitude": 37.7899886}' headers: Content-Length: ['468'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -64,7 +64,7 @@ interactions: "start_latitude": 37.7899886}' headers: Content-Length: ['468'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -92,7 +92,7 @@ interactions: "start_latitude": 37.7899886}' headers: Content-Length: ['468'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests diff --git a/tests/fixtures/test_request_ride_with_no_default_product b/tests/fixtures/test_request_ride_with_no_default_product index 62ce9c1..4b9887b 100644 --- a/tests/fixtures/test_request_ride_with_no_default_product +++ b/tests/fixtures/test_request_ride_with_no_default_product @@ -8,7 +8,7 @@ interactions: 37.7899886}' headers: Content-Length: ['434'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -36,7 +36,7 @@ interactions: 37.7899886}' headers: Content-Length: ['434'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -64,7 +64,7 @@ interactions: 37.7899886}' headers: Content-Length: ['434'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -92,7 +92,7 @@ interactions: 37.7899886}' headers: Content-Length: ['434'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests diff --git a/tests/fixtures/test_request_ride_with_places b/tests/fixtures/test_request_ride_with_places index c95102d..f1020a9 100644 --- a/tests/fixtures/test_request_ride_with_places +++ b/tests/fixtures/test_request_ride_with_places @@ -8,7 +8,7 @@ interactions: null}' headers: Content-Length: ['445'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -36,7 +36,7 @@ interactions: null}' headers: Content-Length: ['445'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -64,7 +64,7 @@ interactions: null}' headers: Content-Length: ['445'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -92,7 +92,7 @@ interactions: null}' headers: Content-Length: ['445'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests diff --git a/tests/fixtures/test_request_ride_with_surge b/tests/fixtures/test_request_ride_with_surge index d40f0e4..85d9532 100644 --- a/tests/fixtures/test_request_ride_with_surge +++ b/tests/fixtures/test_request_ride_with_surge @@ -8,7 +8,7 @@ interactions: "start_latitude": -22.9674153}' headers: Content-Length: ['407'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests diff --git a/tests/fixtures/test_request_shared_ride b/tests/fixtures/test_request_shared_ride index 376c006..7637b2a 100644 --- a/tests/fixtures/test_request_shared_ride +++ b/tests/fixtures/test_request_shared_ride @@ -8,7 +8,7 @@ interactions: "start_latitude": 37.7899886}' headers: Content-Length: ['465'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -36,7 +36,7 @@ interactions: "start_latitude": 37.7899886}' headers: Content-Length: ['465'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -64,7 +64,7 @@ interactions: "start_latitude": 37.7899886}' headers: Content-Length: ['465'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests @@ -92,7 +92,7 @@ interactions: "start_latitude": 37.7899886}' headers: Content-Length: ['465'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: POST uri: https://sandbox-api.uber.com/v1.2/requests diff --git a/tests/fixtures/test_set_home_address b/tests/fixtures/test_set_home_address index be34958..ad70441 100644 --- a/tests/fixtures/test_set_home_address +++ b/tests/fixtures/test_set_home_address @@ -3,7 +3,7 @@ interactions: body: !!python/unicode '{"address": "555 Market Street, SF"}' headers: Content-Length: ['36'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/places/home @@ -26,7 +26,7 @@ interactions: body: !!python/unicode '{"address": "555 Market Street, SF"}' headers: Content-Length: ['36'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/places/home @@ -49,7 +49,7 @@ interactions: body: !!python/unicode '{"address": "555 Market Street, SF"}' headers: Content-Length: ['36'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/places/home @@ -72,7 +72,7 @@ interactions: body: !!python/unicode '{"address": "555 Market Street, SF"}' headers: Content-Length: ['36'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/places/home diff --git a/tests/fixtures/test_set_work_address b/tests/fixtures/test_set_work_address index 8cb613e..44df77a 100644 --- a/tests/fixtures/test_set_work_address +++ b/tests/fixtures/test_set_work_address @@ -3,7 +3,7 @@ interactions: body: !!python/unicode '{"address": "1455 Market Street, SF"}' headers: Content-Length: ['37'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/places/work @@ -26,7 +26,7 @@ interactions: body: !!python/unicode '{"address": "1455 Market Street, SF"}' headers: Content-Length: ['37'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/places/work @@ -49,7 +49,7 @@ interactions: body: !!python/unicode '{"address": "1455 Market Street, SF"}' headers: Content-Length: ['37'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/places/work @@ -72,7 +72,7 @@ interactions: body: !!python/unicode '{"address": "1455 Market Street, SF"}' headers: Content-Length: ['37'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/places/work diff --git a/tests/fixtures/test_update_ride_destination b/tests/fixtures/test_update_ride_destination index bb82b04..dad3cd4 100644 --- a/tests/fixtures/test_update_ride_destination +++ b/tests/fixtures/test_update_ride_destination @@ -3,7 +3,7 @@ interactions: body: !!python/unicode '{"end_longitude": -122.4197515, "end_latitude": 37.775234}' headers: Content-Length: ['58'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PATCH uri: https://sandbox-api.uber.com/v1.2/requests/9bdb3278-21bd-46b8-90fa-51404b0d6acf @@ -25,7 +25,7 @@ interactions: body: !!python/unicode '{"end_longitude": -122.4197515, "end_latitude": 37.775234}' headers: Content-Length: ['58'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PATCH uri: https://sandbox-api.uber.com/v1.2/requests/610d868b-e21c-483a-9932-97e61b852fd2 @@ -48,7 +48,7 @@ interactions: body: !!python/unicode '{"end_longitude": -122.4197515, "end_latitude": 37.775234}' headers: Content-Length: ['58'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PATCH uri: https://sandbox-api.uber.com/v1.2/requests/0aec0061-1e20-4239-a0b7-78328e9afec8 @@ -69,7 +69,7 @@ interactions: body: !!python/unicode '{"end_longitude": -122.4197515, "end_latitude": 37.775234}' headers: Content-Length: ['58'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PATCH uri: https://sandbox-api.uber.com/v1.2/requests/0aec0061-1e20-4239-a0b7-78328e9afec8 diff --git a/tests/fixtures/test_update_ride_destination_with_places b/tests/fixtures/test_update_ride_destination_with_places index 6018320..ef97e10 100644 --- a/tests/fixtures/test_update_ride_destination_with_places +++ b/tests/fixtures/test_update_ride_destination_with_places @@ -3,7 +3,7 @@ interactions: body: !!python/unicode '{"end_place_id": "work"}' headers: Content-Length: ['24'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PATCH uri: https://sandbox-api.uber.com/v1.2/requests/9bdb3278-21bd-46b8-90fa-51404b0d6acf @@ -25,7 +25,7 @@ interactions: body: !!python/unicode '{"end_place_id": "work"}' headers: Content-Length: ['24'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PATCH uri: https://sandbox-api.uber.com/v1.2/requests/610d868b-e21c-483a-9932-97e61b852fd2 @@ -48,7 +48,7 @@ interactions: body: !!python/unicode '{"end_place_id": "work"}' headers: Content-Length: ['24'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PATCH uri: https://sandbox-api.uber.com/v1.2/requests/0aec0061-1e20-4239-a0b7-78328e9afec8 @@ -69,7 +69,7 @@ interactions: body: !!python/unicode '{"end_place_id": "work"}' headers: Content-Length: ['24'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PATCH uri: https://sandbox-api.uber.com/v1.2/requests/0aec0061-1e20-4239-a0b7-78328e9afec8 diff --git a/tests/fixtures/test_update_sandbox_product b/tests/fixtures/test_update_sandbox_product index 0f76fef..7fe96be 100644 --- a/tests/fixtures/test_update_sandbox_product +++ b/tests/fixtures/test_update_sandbox_product @@ -3,7 +3,7 @@ interactions: body: !!python/unicode '{"surge_multiplier": 2, "drivers_available": null}' headers: Content-Length: ['50'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/sandbox/products/d5ef01d9-7d54-413e-b265-425948d06e92 @@ -24,7 +24,7 @@ interactions: body: !!python/unicode '{"surge_multiplier": 2, "drivers_available": null}' headers: Content-Length: ['50'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/sandbox/products/d5ef01d9-7d54-413e-b265-425948d06e92 @@ -45,7 +45,7 @@ interactions: body: !!python/unicode '{"surge_multiplier": 2, "drivers_available": null}' headers: Content-Length: ['50'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/sandbox/products/d5ef01d9-7d54-413e-b265-425948d06e92 @@ -66,7 +66,7 @@ interactions: body: !!python/unicode '{"surge_multiplier": 2, "drivers_available": null}' headers: Content-Length: ['50'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/sandbox/products/d5ef01d9-7d54-413e-b265-425948d06e92 diff --git a/tests/fixtures/test_update_sandbox_ride b/tests/fixtures/test_update_sandbox_ride index 5076950..1289163 100644 --- a/tests/fixtures/test_update_sandbox_ride +++ b/tests/fixtures/test_update_sandbox_ride @@ -3,7 +3,7 @@ interactions: body: !!python/unicode '{"status": "accepted"}' headers: Content-Length: ['22'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/sandbox/requests/9bdb3278-21bd-46b8-90fa-51404b0d6acf @@ -24,7 +24,7 @@ interactions: body: !!python/unicode '{"status": "accepted"}' headers: Content-Length: ['22'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/sandbox/requests/610d868b-e21c-483a-9932-97e61b852fd2 @@ -45,7 +45,7 @@ interactions: body: !!python/unicode '{"status": "accepted"}' headers: Content-Length: ['22'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/sandbox/requests/0aec0061-1e20-4239-a0b7-78328e9afec8 @@ -66,7 +66,7 @@ interactions: body: !!python/unicode '{"status": "accepted"}' headers: Content-Length: ['22'] - X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.4.1] + X-Uber-User-Agent: [!!python/unicode Python Rides SDK v0.5.0] content-type: [application/json] method: PUT uri: https://sandbox-api.uber.com/v1.2/sandbox/requests/0aec0061-1e20-4239-a0b7-78328e9afec8 diff --git a/tests/test_client.py b/tests/test_client.py index ef0c82d..7cd0625 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -47,7 +47,7 @@ REFRESH_TOKEN = 'xxx' REDIRECT_URL = 'https://uberapitester.com/api/v1/uber/oauth' -SCOPES = { +RIDER_SCOPES = { 'profile', 'places', 'request', @@ -56,6 +56,12 @@ 'history' } +DRIVER_SCOPES = { + 'partner.accounts', + 'partner.trips', + 'partner.payments' + } + # replace these with valid identifiers to rerecord request-related fixtures RIDE_ID = '0aec0061-1e20-4239-a0b7-78328e9afec8' SURGE_ID = 'hsg2k38b' @@ -263,14 +269,14 @@ @fixture -def oauth2credential(): +def rider_oauth2credential(): """Create OAuth2Credential class to hold access token information.""" return OAuth2Credential( client_id=CLIENT_ID, redirect_url=REDIRECT_URL, access_token=ACCESS_TOKEN, expires_in_seconds=EXPIRES_IN_SECONDS, - scopes=SCOPES, + scopes=RIDER_SCOPES, grant_type=auth.AUTHORIZATION_CODE_GRANT, client_secret=CLIENT_SECRET, refresh_token=REFRESH_TOKEN, @@ -278,16 +284,45 @@ def oauth2credential(): @fixture -def authorized_sandbox_client(oauth2credential): +def driver_oauth2credential(): + """Create OAuth2Credential class to hold access token information.""" + return OAuth2Credential( + client_id=CLIENT_ID, + redirect_url=REDIRECT_URL, + access_token=ACCESS_TOKEN, + expires_in_seconds=EXPIRES_IN_SECONDS, + scopes=DRIVER_SCOPES, + grant_type=auth.AUTHORIZATION_CODE_GRANT, + client_secret=CLIENT_SECRET, + refresh_token=REFRESH_TOKEN, + ) + + +@fixture +def authorized_rider_sandbox_client(rider_oauth2credential): + """Create an UberRidesClient in Sandbox Mode with OAuth 2.0 Credentials.""" + session = Session(oauth2credential=rider_oauth2credential) + return UberRidesClient(session, sandbox_mode=True) + + +@fixture +def authorized_rider_production_client(rider_oauth2credential): + """Create an UberRidesClient in Production with OAuth 2.0 Credentials.""" + session = Session(oauth2credential=rider_oauth2credential) + return UberRidesClient(session) + + +@fixture +def authorized_driver_sandbox_client(driver_oauth2credential): """Create an UberRidesClient in Sandbox Mode with OAuth 2.0 Credentials.""" - session = Session(oauth2credential=oauth2credential) + session = Session(oauth2credential=driver_oauth2credential) return UberRidesClient(session, sandbox_mode=True) @fixture -def authorized_production_client(oauth2credential): +def authorized_driver_production_client(driver_oauth2credential): """Create an UberRidesClient in Production with OAuth 2.0 Credentials.""" - session = Session(oauth2credential=oauth2credential) + session = Session(oauth2credential=driver_oauth2credential) return UberRidesClient(session) @@ -328,9 +363,9 @@ def http_surge_error(): @uber_vcr.use_cassette() -def test_get_products(authorized_sandbox_client, server_token_client): +def test_get_products(authorized_rider_sandbox_client, server_token_client): """Test to fetch products with access token and server token.""" - clients = [authorized_sandbox_client, server_token_client] + clients = [authorized_rider_sandbox_client, server_token_client] for client in clients: response = client.get_products(START_LAT, START_LNG) @@ -347,9 +382,9 @@ def test_get_products(authorized_sandbox_client, server_token_client): @uber_vcr.use_cassette() -def test_get_single_product(authorized_sandbox_client, server_token_client): +def test_get_single_product(authorized_rider_sandbox_client, server_token_client): """Test fetch product by ID with access token and server token.""" - clients = [authorized_sandbox_client, server_token_client] + clients = [authorized_rider_sandbox_client, server_token_client] for client in clients: response = client.get_product(UFP_PRODUCT_ID) @@ -362,9 +397,9 @@ def test_get_single_product(authorized_sandbox_client, server_token_client): @uber_vcr.use_cassette() -def test_get_price_estimates(authorized_sandbox_client, server_token_client): +def test_get_price_estimates(authorized_rider_sandbox_client, server_token_client): """Test to fetch price estimates with access token and server token.""" - clients = [authorized_sandbox_client, server_token_client] + clients = [authorized_rider_sandbox_client, server_token_client] for client in clients: response = client.get_price_estimates( @@ -388,11 +423,11 @@ def test_get_price_estimates(authorized_sandbox_client, server_token_client): @uber_vcr.use_cassette() def test_get_pickup_time_estimates( - authorized_sandbox_client, + authorized_rider_sandbox_client, server_token_client, ): """Test to fetch time estimates with access token and server token.""" - clients = [authorized_sandbox_client, server_token_client] + clients = [authorized_rider_sandbox_client, server_token_client] for client in clients: response = client.get_pickup_time_estimates( @@ -412,9 +447,9 @@ def test_get_pickup_time_estimates( @uber_vcr.use_cassette() -def test_get_promotions(authorized_sandbox_client, server_token_client): +def test_get_promotions(authorized_rider_sandbox_client, server_token_client): """Test to fetch promotions with access token and server token.""" - clients = [authorized_sandbox_client, server_token_client] + clients = [authorized_rider_sandbox_client, server_token_client] for client in clients: response = client.get_promotions( @@ -431,9 +466,9 @@ def test_get_promotions(authorized_sandbox_client, server_token_client): @uber_vcr.use_cassette() -def test_get_user_activity(authorized_sandbox_client): +def test_get_user_activity(authorized_rider_sandbox_client): """Test to fetch user activity with access token.""" - response = authorized_sandbox_client.get_user_activity() + response = authorized_rider_sandbox_client.get_user_activity() assert response.status_code == codes.ok # assert response looks like user activity @@ -447,9 +482,9 @@ def test_get_user_activity(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_get_user_profile(authorized_sandbox_client): +def test_get_user_profile(authorized_rider_sandbox_client): """Test to fetch user profile with access token.""" - response = authorized_sandbox_client.get_user_profile() + response = authorized_rider_sandbox_client.get_user_profile() assert response.status_code == codes.ok # assert response looks like user profile @@ -458,10 +493,10 @@ def test_get_user_profile(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_estimate_shared_ride(authorized_sandbox_client): +def test_estimate_shared_ride(authorized_rider_sandbox_client): """Test to estimate a shared ride.""" try: - response = authorized_sandbox_client.estimate_ride( + response = authorized_rider_sandbox_client.estimate_ride( product_id=UFP_SHARED_PRODUCT_ID, seat_count=UFP_SHARED_SEAT_COUNT, start_latitude=START_LAT, @@ -482,9 +517,9 @@ def test_estimate_shared_ride(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_estimate_ride(authorized_sandbox_client): +def test_estimate_ride(authorized_rider_sandbox_client): """Test to fetch ride estimate with access token.""" - response = authorized_sandbox_client.estimate_ride( + response = authorized_rider_sandbox_client.estimate_ride( product_id=UFP_PRODUCT_ID, start_latitude=START_LAT, start_longitude=START_LNG, @@ -502,9 +537,9 @@ def test_estimate_ride(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_estimate_ride_with_places(authorized_sandbox_client): +def test_estimate_ride_with_places(authorized_rider_sandbox_client): """Test to fetch ride estimate with place ids.""" - response = authorized_sandbox_client.estimate_ride( + response = authorized_rider_sandbox_client.estimate_ride( product_id=UFP_PRODUCT_ID, start_place_id='home', end_place_id='work', @@ -520,9 +555,9 @@ def test_estimate_ride_with_places(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_request_ride(authorized_sandbox_client): +def test_request_ride(authorized_rider_sandbox_client): """Test to request ride with access token.""" - response = authorized_sandbox_client.request_ride( + response = authorized_rider_sandbox_client.request_ride( product_id=UFP_PRODUCT_ID, fare_id=UFP_FARE_ID, start_latitude=START_LAT, @@ -538,10 +573,10 @@ def test_request_ride(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_request_shared_ride(authorized_sandbox_client): +def test_request_shared_ride(authorized_rider_sandbox_client): """Test to request shared ride with access token.""" try: - response = authorized_sandbox_client.request_ride( + response = authorized_rider_sandbox_client.request_ride( product_id=UFP_SHARED_PRODUCT_ID, fare_id=UFP_SHARED_FARE_ID, seat_count=UFP_SHARED_SEAT_COUNT, @@ -557,9 +592,9 @@ def test_request_shared_ride(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_request_ride_with_no_default_product(authorized_sandbox_client): +def test_request_ride_with_no_default_product(authorized_rider_sandbox_client): """Test to request ride with no default product.""" - response = authorized_sandbox_client.request_ride( + response = authorized_rider_sandbox_client.request_ride( fare_id=UFP_FARE_ID, start_latitude=START_LAT, start_longitude=START_LNG, @@ -574,9 +609,9 @@ def test_request_ride_with_no_default_product(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_request_ride_with_places(authorized_sandbox_client): +def test_request_ride_with_places(authorized_rider_sandbox_client): """Test to request ride with place ids.""" - response = authorized_sandbox_client.request_ride( + response = authorized_rider_sandbox_client.request_ride( product_id=UFP_PRODUCT_ID, fare_id=UFP_FARE_ID, start_place_id='home', @@ -590,9 +625,9 @@ def test_request_ride_with_places(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_get_ride_details(authorized_sandbox_client): +def test_get_ride_details(authorized_rider_sandbox_client): """Test to fetch ride details with access token.""" - response = authorized_sandbox_client.get_ride_details(RIDE_ID) + response = authorized_rider_sandbox_client.get_ride_details(RIDE_ID) assert response.status_code == codes.ok # assert response looks like ride details @@ -602,9 +637,9 @@ def test_get_ride_details(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_get_current_ride_details(authorized_sandbox_client): +def test_get_current_ride_details(authorized_rider_sandbox_client): """Test to fetch current ride details with access token.""" - response = authorized_sandbox_client.get_current_ride_details() + response = authorized_rider_sandbox_client.get_current_ride_details() assert response.status_code == codes.ok # assert response looks like ride details @@ -614,9 +649,9 @@ def test_get_current_ride_details(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_get_current_shared_ride_details(authorized_sandbox_client): +def test_get_current_shared_ride_details(authorized_rider_sandbox_client): """Test to fetch current shared ride details with access token.""" - response = authorized_sandbox_client.get_current_ride_details() + response = authorized_rider_sandbox_client.get_current_ride_details() assert response.status_code == codes.ok # assert response looks like ride details @@ -626,9 +661,9 @@ def test_get_current_shared_ride_details(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_update_ride_destination(authorized_sandbox_client): +def test_update_ride_destination(authorized_rider_sandbox_client): """Test to update the trip destination.""" - response = authorized_sandbox_client.update_ride( + response = authorized_rider_sandbox_client.update_ride( RIDE_ID, end_latitude=UPDATE_LAT, end_longitude=UPDATE_LNG, @@ -637,9 +672,9 @@ def test_update_ride_destination(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_update_ride_destination_with_places(authorized_sandbox_client): +def test_update_ride_destination_with_places(authorized_rider_sandbox_client): """Test to update the trip destination with a place ID.""" - response = authorized_sandbox_client.update_ride( + response = authorized_rider_sandbox_client.update_ride( RIDE_ID, end_place_id='work', ) @@ -647,9 +682,9 @@ def test_update_ride_destination_with_places(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_get_ride_map(authorized_sandbox_client): +def test_get_ride_map(authorized_rider_sandbox_client): """Test to fetch ride map with access token.""" - response = authorized_sandbox_client.get_ride_map(RIDE_ID) + response = authorized_rider_sandbox_client.get_ride_map(RIDE_ID) assert response.status_code == codes.ok # assert response looks like map @@ -658,9 +693,9 @@ def test_get_ride_map(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_update_sandbox_ride(authorized_sandbox_client): +def test_update_sandbox_ride(authorized_rider_sandbox_client): """Test to update sandbox ride status with access token.""" - response = authorized_sandbox_client.update_sandbox_ride( + response = authorized_rider_sandbox_client.update_sandbox_ride( ride_id=RIDE_ID, new_status='accepted', ) @@ -668,23 +703,23 @@ def test_update_sandbox_ride(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_cancel_ride(authorized_sandbox_client): +def test_cancel_ride(authorized_rider_sandbox_client): """Test to cancel ride with access token.""" - response = authorized_sandbox_client.cancel_ride(RIDE_ID) + response = authorized_rider_sandbox_client.cancel_ride(RIDE_ID) assert response.status_code == codes.no_content @uber_vcr.use_cassette() -def test_cancel_current_ride(authorized_sandbox_client): +def test_cancel_current_ride(authorized_rider_sandbox_client): """Test to cancel the current ride with access token.""" - response = authorized_sandbox_client.cancel_current_ride() + response = authorized_rider_sandbox_client.cancel_current_ride() assert response.status_code == codes.no_content @uber_vcr.use_cassette() -def test_get_ride_receipt(authorized_sandbox_client): +def test_get_ride_receipt(authorized_rider_sandbox_client): """Test to fetch ride receipt with access token.""" - response = authorized_sandbox_client.get_ride_receipt(RIDE_ID) + response = authorized_rider_sandbox_client.get_ride_receipt(RIDE_ID) assert response.status_code == codes.ok # assert response looks like ride receipt @@ -697,9 +732,9 @@ def test_get_ride_receipt(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_update_sandbox_product(authorized_sandbox_client): +def test_update_sandbox_product(authorized_rider_sandbox_client): """Test to update sandbox ride status with access token.""" - response = authorized_sandbox_client.update_sandbox_product( + response = authorized_rider_sandbox_client.update_sandbox_product( product_id=NON_UFP_SURGE_PRODUCT_ID, surge_multiplier=2, ) @@ -707,10 +742,10 @@ def test_update_sandbox_product(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_request_ride_with_surge(authorized_sandbox_client): +def test_request_ride_with_surge(authorized_rider_sandbox_client): """Test raising a SurgeError when requesting a ride with surge.""" with raises(SurgeError): - authorized_sandbox_client.request_ride( + authorized_rider_sandbox_client.request_ride( product_id=NON_UFP_SURGE_PRODUCT_ID, start_latitude=NON_UFP_SURGE_START_LAT, start_longitude=NON_UFP_SURGE_START_LNG, @@ -741,9 +776,9 @@ def test_surge_error_formation(http_surge_error): @uber_vcr.use_cassette() -def test_set_home_address(authorized_sandbox_client): +def test_set_home_address(authorized_rider_sandbox_client): """Test to update a user's home address with an access token.""" - response = authorized_sandbox_client.set_home_address(HOME_ADDRESS) + response = authorized_rider_sandbox_client.set_home_address(HOME_ADDRESS) assert response.status_code == codes.ok # assert response looks like places details @@ -753,9 +788,9 @@ def test_set_home_address(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_get_home_address(authorized_sandbox_client): +def test_get_home_address(authorized_rider_sandbox_client): """Test to fetch a user's home address with an access token.""" - response = authorized_sandbox_client.get_home_address() + response = authorized_rider_sandbox_client.get_home_address() assert response.status_code == codes.ok # assert response looks like places details @@ -765,9 +800,9 @@ def test_get_home_address(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_set_work_address(authorized_sandbox_client): +def test_set_work_address(authorized_rider_sandbox_client): """Test to update a user's work address with an access token.""" - response = authorized_sandbox_client.set_work_address(WORK_ADDRESS) + response = authorized_rider_sandbox_client.set_work_address(WORK_ADDRESS) assert response.status_code == codes.ok # assert response looks like places details @@ -777,9 +812,9 @@ def test_set_work_address(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_get_work_address(authorized_sandbox_client): +def test_get_work_address(authorized_rider_sandbox_client): """Test to fetch a user's work address with an access token.""" - response = authorized_sandbox_client.get_work_address() + response = authorized_rider_sandbox_client.get_work_address() assert response.status_code == codes.ok # assert response looks like places details @@ -789,9 +824,9 @@ def test_get_work_address(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_get_payment_methods(authorized_sandbox_client): +def test_get_payment_methods(authorized_rider_sandbox_client): """Test to get a list of payment methods with an access token.""" - response = authorized_sandbox_client.get_payment_methods() + response = authorized_rider_sandbox_client.get_payment_methods() assert response.status_code == codes.ok response = response.json @@ -802,9 +837,9 @@ def test_get_payment_methods(authorized_sandbox_client): @uber_vcr.use_cassette() -def test_get_driver_profile(authorized_production_client): +def test_get_driver_profile(authorized_driver_production_client): """Test to fetch driver profile with access token.""" - response = authorized_production_client.get_driver_profile() + response = authorized_driver_production_client.get_driver_profile() assert response.status_code == codes.ok # assert response looks like driver profile @@ -813,9 +848,9 @@ def test_get_driver_profile(authorized_production_client): @uber_vcr.use_cassette() -def test_get_driver_trips(authorized_production_client): +def test_get_driver_trips(authorized_driver_production_client): """Test to fetch driver trips with access token.""" - response = authorized_production_client.get_driver_trips() + response = authorized_driver_production_client.get_driver_trips() assert response.status_code == codes.ok response = response.json @@ -826,9 +861,9 @@ def test_get_driver_trips(authorized_production_client): @uber_vcr.use_cassette() -def test_get_driver_payments(authorized_production_client): +def test_get_driver_payments(authorized_driver_production_client): """Test to fetch driver payments with access token.""" - response = authorized_production_client.get_driver_payments() + response = authorized_driver_production_client.get_driver_payments() assert response.status_code == codes.ok response = response.json diff --git a/uber_rides/client.py b/uber_rides/client.py index 7680271..3276f0e 100644 --- a/uber_rides/client.py +++ b/uber_rides/client.py @@ -717,23 +717,73 @@ def get_driver_profile(self): """ return self._api_call('GET', 'v1/partners/me') - def get_driver_trips(self): + def get_driver_trips(self, + offset=None, + limit=None, + from_time=None, + to_time=None + ): """Get trips about the authorized Uber driver. + Parameters + offset (int) + The integer offset for activity results. Offset the list of + returned results by this amount. Default is zero. + limit (int) + Integer amount of results to return. Number of items to + retrieve per page. Default is 10, maximum is 50. + from_time (int) + Unix timestamp of the start time to query. Queries starting + from the first trip if omitted. + to_time (int) + Unix timestamp of the end time to query. Queries starting + from the last trip if omitted. + Returns (Response) A Response object containing trip information. """ - return self._api_call('GET', 'v1/partners/trips') + args = { + 'offset': offset, + 'limit': limit, + 'from_time': from_time, + 'to_time': to_time, + } + return self._api_call('GET', 'v1/partners/trips', args=args) - def get_driver_payments(self): - """Get payment about the authorized Uber driver. + def get_driver_payments(self, + offset=None, + limit=None, + from_time=None, + to_time=None + ): + """Get payments about the authorized Uber driver. + + Parameters + offset (int) + The integer offset for activity results. Offset the list of + returned results by this amount. Default is zero. + limit (int) + Integer amount of results to return. Number of items to + retrieve per page. Default is 10, maximum is 50. + from_time (int) + Unix timestamp of the start time to query. Queries starting + from the first trip if omitted. + to_time (int) + Unix timestamp of the end time to query. Queries starting + from the last trip if omitted. Returns (Response) - A Response object containing payment information. + A Response object containing trip information. """ - return self._api_call('GET', 'v1/partners/payments') + args = { + 'offset': offset, + 'limit': limit, + 'from_time': from_time, + 'to_time': to_time, + } + return self._api_call('GET', 'v1/partners/payments', args=args) def surge_handler(response, **kwargs): From d4a4ffa6cace921f583fcb5a3967df6ea4d2c926 Mon Sep 17 00:00:00 2001 From: Dustin Whittle Date: Wed, 16 Aug 2017 15:59:57 -0700 Subject: [PATCH 4/8] Updated version to v0.5.0 for additional driver apis --- CHANGELOG.md | 4 ++++ setup.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf3e2e3..b626695 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ +v0.5.0 - 2/8/2017 +------------------- +- Added support Driver APIs + v0.4.1 - 2/8/2017 ------------------- - Made state token optional in authorization code grant diff --git a/setup.py b/setup.py index 4cd8aa3..5eeb085 100755 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( name='uber_rides', - version='0.4.1', + version='0.5.0', packages=find_packages(), description='Official Uber Rides API Python SDK', long_description=readme, From 81a7bee2e5ff91b9d164116d61df5affd99d50bf Mon Sep 17 00:00:00 2001 From: Dustin Whittle Date: Wed, 16 Aug 2017 16:04:19 -0700 Subject: [PATCH 5/8] Fixed coding styles to be consistent with flake8 --- tests/test_client.py | 8 ++++++-- uber_rides/client.py | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/test_client.py b/tests/test_client.py index 7cd0625..7476014 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -382,7 +382,9 @@ def test_get_products(authorized_rider_sandbox_client, server_token_client): @uber_vcr.use_cassette() -def test_get_single_product(authorized_rider_sandbox_client, server_token_client): +def test_get_single_product(authorized_rider_sandbox_client, + server_token_client + ): """Test fetch product by ID with access token and server token.""" clients = [authorized_rider_sandbox_client, server_token_client] @@ -397,7 +399,9 @@ def test_get_single_product(authorized_rider_sandbox_client, server_token_client @uber_vcr.use_cassette() -def test_get_price_estimates(authorized_rider_sandbox_client, server_token_client): +def test_get_price_estimates(authorized_rider_sandbox_client, + server_token_client + ): """Test to fetch price estimates with access token and server token.""" clients = [authorized_rider_sandbox_client, server_token_client] diff --git a/uber_rides/client.py b/uber_rides/client.py index 3276f0e..5aab58c 100644 --- a/uber_rides/client.py +++ b/uber_rides/client.py @@ -456,9 +456,9 @@ def get_current_ride_details(self): """Get status details for an ongoing ride. This method behaves like get_ride_details by default (only returns - details about trips your app requested). If your app has the `all_trips` - scope, however, trip details will be returned for trips irrespective - of which application initiated them. + details about trips your app requested). If your app has the + `all_trips` scope, however, trip details will be returned for trips + irrespective of which application initiated them. Returns (Response) From fde5e8d7a37d465d98d1398b23fdc5030b92558f Mon Sep 17 00:00:00 2001 From: Dustin Whittle Date: Thu, 17 Aug 2017 12:17:40 -0700 Subject: [PATCH 6/8] Make formatting consistent for test client --- tests/test_client.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/test_client.py b/tests/test_client.py index 7476014..8e7e8c2 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -116,7 +116,7 @@ 'localized_display_name', 'estimate', 'display_name', - 'product_id', + 'product_id' ]) EXPECTED_PRICE_KEYS = set([ @@ -128,13 +128,13 @@ 'distance', 'duration', 'display_name', - 'product_id', + 'product_id' ]) EXPECTED_PROMOTION_KEYS = set([ 'display_text', 'localized_value', - 'type', + 'type' ]) EXPECTED_ACTIVITY_KEYS = set([ @@ -144,7 +144,7 @@ 'start_city', 'end_time', 'request_id', - 'product_id', + 'product_id' ]) EXPECTED_PROFILE_KEYS = set([ @@ -153,7 +153,7 @@ 'last_name', 'uuid', 'email', - 'promo_code', + 'promo_code' ]) EXPECTED_ESTIMATE_RIDE_FARE_KEYS = set([ @@ -161,19 +161,19 @@ 'fare_id', 'expires_at', 'currency_code', - 'display', + 'display' ]) EXPECTED_ESTIMATE_RIDE_TRIP_KEYS = set([ 'distance_unit', 'duration_estimate', - 'distance_estimate', + 'distance_estimate' ]) EXPECTED_ESTIMATE_SHARED_RIDE_TRIP_KEYS = set([ 'distance_unit', 'duration_estimate', - 'distance_estimate', + 'distance_estimate' ]) EXPECTED_RIDE_DETAILS_KEYS = set([ @@ -185,7 +185,7 @@ 'destination', 'location', 'vehicle', - 'shared', + 'shared' ]) EXPECTED_SHARED_RIDE_DETAILS_KEYS = set([ @@ -202,13 +202,13 @@ EXPECTED_RIDE_MAP_KEYS = set([ 'href', - 'request_id', + 'request_id' ]) EXPECTED_INDIVIDUAL_CHARGE_KEYS = set([ 'amount', 'type', - 'name', + 'name' ]) EXPECTED_RECEIPT_KEYS = set([ @@ -220,7 +220,7 @@ 'distance_label', 'request_id', 'duration', - 'subtotal', + 'subtotal' ]) EXPECTED_PLACE_KEYS = set(['address']) @@ -228,7 +228,7 @@ EXPECTED_PAYMENT_KEYS = set([ 'payment_method_id', 'type', - 'description', + 'description' ]) EXPECTED_DRIVER_PROFILE_KEYS = set([ @@ -241,7 +241,7 @@ 'phone_number', 'picture', 'promo_code', - 'rating', + 'rating' ]) EXPECTED_DRIVER_TRIPS_KEYS = set([ From 8050fcd895203f7d1ef785727563d126e708f504 Mon Sep 17 00:00:00 2001 From: Dustin Whittle Date: Thu, 17 Aug 2017 12:18:07 -0700 Subject: [PATCH 7/8] Updated changelog for v0.5.0 --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b626695..913b72a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,9 @@ -v0.5.0 - 2/8/2017 +v0.5.0 - 17/8/2017 ------------------- - Added support Driver APIs -v0.4.1 - 2/8/2017 +v0.4.1 - 2/7/2017 ------------------- - Made state token optional in authorization code grant From e6c7b80c2d67aa95c157e64b87bb078bc0cac7b3 Mon Sep 17 00:00:00 2001 From: Dustin Whittle Date: Thu, 17 Aug 2017 13:25:55 -0700 Subject: [PATCH 8/8] Updated copyright for 2017 --- LICENSE | 4 ++-- example/authorize_user.py | 2 +- example/request_ride.py | 2 +- example/utils.py | 2 +- tests/test_auth.py | 2 +- tests/test_client.py | 2 +- tests/test_errors.py | 2 +- tests/test_request_utils.py | 2 +- tests/test_session.py | 2 +- tests/vcr_config.py | 2 +- uber_rides/auth.py | 2 +- uber_rides/client.py | 2 +- uber_rides/errors.py | 2 +- uber_rides/request.py | 2 +- uber_rides/session.py | 2 +- uber_rides/utils/auth.py | 2 +- uber_rides/utils/handlers.py | 2 +- uber_rides/utils/http.py | 2 +- uber_rides/utils/request.py | 2 +- 19 files changed, 20 insertions(+), 20 deletions(-) diff --git a/LICENSE b/LICENSE index 4aa5b8e..f0fcc60 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015-2016 Uber Technologies, Inc. +Copyright (c) 2015-2017 Uber Technologies, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file +THE SOFTWARE. diff --git a/example/authorize_user.py b/example/authorize_user.py index f6a91a5..e6f4ce3 100644 --- a/example/authorize_user.py +++ b/example/authorize_user.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Uber Technologies, Inc. +# Copyright (c) 2017 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/example/request_ride.py b/example/request_ride.py index 5e785ca..c350078 100644 --- a/example/request_ride.py +++ b/example/request_ride.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Uber Technologies, Inc. +# Copyright (c) 2017 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/example/utils.py b/example/utils.py index fb560c5..3116f79 100644 --- a/example/utils.py +++ b/example/utils.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Uber Technologies, Inc. +# Copyright (c) 2017 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/tests/test_auth.py b/tests/test_auth.py index 97e5cb5..434df75 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Uber Technologies, Inc. +# Copyright (c) 2017 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/tests/test_client.py b/tests/test_client.py index 8e7e8c2..f2f8688 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Uber Technologies, Inc. +# Copyright (c) 2017 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/tests/test_errors.py b/tests/test_errors.py index 28ee77e..a6bb344 100644 --- a/tests/test_errors.py +++ b/tests/test_errors.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Uber Technologies, Inc. +# Copyright (c) 2017 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/tests/test_request_utils.py b/tests/test_request_utils.py index a413956..3c5e045 100644 --- a/tests/test_request_utils.py +++ b/tests/test_request_utils.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Uber Technologies, Inc. +# Copyright (c) 2017 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/tests/test_session.py b/tests/test_session.py index c8160da..55c51c5 100644 --- a/tests/test_session.py +++ b/tests/test_session.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Uber Technologies, Inc. +# Copyright (c) 2017 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/tests/vcr_config.py b/tests/vcr_config.py index 8d73ccf..7ff6f16 100644 --- a/tests/vcr_config.py +++ b/tests/vcr_config.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Uber Technologies, Inc. +# Copyright (c) 2017 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/uber_rides/auth.py b/uber_rides/auth.py index 328f365..d0f2c28 100644 --- a/uber_rides/auth.py +++ b/uber_rides/auth.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Uber Technologies, Inc. +# Copyright (c) 2017 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/uber_rides/client.py b/uber_rides/client.py index 5aab58c..8ac4967 100644 --- a/uber_rides/client.py +++ b/uber_rides/client.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Uber Technologies, Inc. +# Copyright (c) 2017 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/uber_rides/errors.py b/uber_rides/errors.py index caae9e6..49e64fa 100644 --- a/uber_rides/errors.py +++ b/uber_rides/errors.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Uber Technologies, Inc. +# Copyright (c) 2017 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/uber_rides/request.py b/uber_rides/request.py index 8ba0282..cd8b02d 100644 --- a/uber_rides/request.py +++ b/uber_rides/request.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Uber Technologies, Inc. +# Copyright (c) 2017 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/uber_rides/session.py b/uber_rides/session.py index 87857ad..5a31fc9 100644 --- a/uber_rides/session.py +++ b/uber_rides/session.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Uber Technologies, Inc. +# Copyright (c) 2017 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/uber_rides/utils/auth.py b/uber_rides/utils/auth.py index 643acbe..9cbba29 100644 --- a/uber_rides/utils/auth.py +++ b/uber_rides/utils/auth.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Uber Technologies, Inc. +# Copyright (c) 2017 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/uber_rides/utils/handlers.py b/uber_rides/utils/handlers.py index 0f6895b..a0baa2b 100644 --- a/uber_rides/utils/handlers.py +++ b/uber_rides/utils/handlers.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Uber Technologies, Inc. +# Copyright (c) 2017 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/uber_rides/utils/http.py b/uber_rides/utils/http.py index 62a116b..58f44d7 100644 --- a/uber_rides/utils/http.py +++ b/uber_rides/utils/http.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Uber Technologies, Inc. +# Copyright (c) 2017 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/uber_rides/utils/request.py b/uber_rides/utils/request.py index 403dbde..4ecee7e 100644 --- a/uber_rides/utils/request.py +++ b/uber_rides/utils/request.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Uber Technologies, Inc. +# Copyright (c) 2017 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal