UpdateParkingSession method

This endpoint extends existing parking sessions.

Request

UpdateParkingSessionRequest

Return value

UpdateParkingSessionResponse

Related Specifications

ParkingSession
Price
ParkingSessionFailure

// Request to fetch zone information, given the zone_code.
message UpdateParkingSessionRequest {
  // Opaque identifier for the session intended for extension, must be globally
  // unique.
  // Required.
  string session_id = 1;

  // Parameters used to extend an existing parking session.
  // Required for extension.
  SessionExtension session_extension = 2;

  // Idempotency token for UpdateParkingSession requests.
  // Required.
  string idempotency_token = 3;
}

message SessionExtension {
  // Duration of this extension in seconds.
  // Required.
  int64 extension_duration_sec = 1;

  // Note: all monetary fields here are for the extension part, and should be
  // consistent with the monetary fields from ParkingAvailability.

  // Amount the user is to be charged for this extension. If fees or taxes is
  // unset, this amount includes any fees and taxes.
  // Required.
  Price amount = 2;

  // Fees associated with this extension. If present, the total amount
  // to be charged to the user for this operation is the sum of price,
  // fees, taxes.
  // Optional.
  Price fees = 3;

  // Taxes associated with this extension. If present, the total amount
  // to be charged to the user for this operation is the sum of price,
  // fees, taxes.
  // Optional.
  Price taxes = 4;
}

message UpdateParkingSessionResponse {
  // The updated parking session, if successful.
  // Required.
  ParkingSession session = 1;

  // If updating a session fails, this field should reflect the business logic
  // error (e.g., session has expired) (required if failure occurs).
  ParkingSessionFailure failure = 2;
}