Skip to content

Instantly share code, notes, and snippets.

@warm200
Last active January 4, 2018 22:22
Show Gist options
  • Save warm200/34499dc8ebc8d50eb26d809f8ea6272a to your computer and use it in GitHub Desktop.
Save warm200/34499dc8ebc8d50eb26d809f8ea6272a to your computer and use it in GitHub Desktop.
Unblock Instructions

Search user

@kitt search {phone_number} {last_name}

replace phone_number last_name, separated by space

example: Type:

 @kitt search 7032011190 Wallace

sample response:

{
  "id": 112233,
  "first_name": "John",
  "last_name": "Wallace"
}

Unblock User by a specific type

@kitt unblock (phone|bill|user) {user_id}

User id can be found through either shed or by command above

Use specific type if you know

let's assume: user id: 112233, is blocked by unresolved bill, to unblock, you can run

Type:

 @kitt unblock bill 112233

sample response:

{"result":"Unblock suceeded"}

same as phone type

Type:

 @kitt unblock phone 112233

sample response:

{"result":"Unblock suceeded"}

if there is no unresolved blocks, sample response will be

{"result":"No unresolved user blocks found"}

be cautious about using user type, it will loop through all of unresolved blocks no matter what type, and unblock them one by one, prefer to use exact type

example: Type:

 @kitt unblock user 112233

sample response:

{"result":"Unblock suceeded"}

Find all of unresolved blocks of a user

@kitt getblocks {user_id}

Type:

 @kitt geblocks 112233

sample response:

{
   "unresolved_blocks": [
   {
     "id": 1196,
     "blocked_at": "2017-05-23T08:31:17Z",
     "block_type_name": "billing",
     "blocker": {
       "block_bill_id": 37559,
       "payment_method_id": 25961,
       "formatted_amount": "$0.95",
       "ride_id": 37985
     }
   }
 ]
}

Additional commands

Search ride

@kitt ride[.attribute] {ride_id}

Type:

 @kitt ride 118443874   

This will return all of attributes about that ride sample response

{
 "ride_id": 118443874,
 "user_id": 1682320,
 "currency_type": "USD",
 "pickup_time": "2017/12/18 17:00:20 +0000",
 "pickup_time_utc": "2017-12-18T22:00:20Z",
 "pickup_time_local": "2017-12-18 17:00:20",
 "payment_type": "Other - 1",
 "is_asynchronous_bounce": true,
 "service_type": "taxi",
 "streethail": false,
 "pickup_location": {
   "city": "Brooklyn",
   "country": "US",
   "iata_code": null,
   "intersection": null,
   "latitude": 40.587368,
   "line1": "1722 Jerome Avenue",
   "line2": null,
   "longitude": -73.951637,
   "name": null,
   "postal_code": "11235",
   "postal_code_add_on": null,
   "region_id": null,
   "special_instructions": null,
   "state": "NY",
   "street": null,
   "street_number": null,
   "unit": null,
   "unit_prefix": null
 },
 {more.....}
}

Or you want to see specific attribute only, can do

@kitt ride.attribute {ride_id} for example:

@kitt ride.ride_status 113140508

sample response:

{
  "ride_status_code": "canceled",
  "esigned": true,
  "cancel_code": "rider_cancel",
  "latitude": "36.101",
  "longitude": "-115.1911",
  "driver_available": true,
  "bounce_payment_status": "in_progress",
  "tip_amount": "0.0",
  "tip_type": "amount",
  "status_code_changed_at": "2017-11-30T22:20:24Z"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment