GetParkingZone method

This endpoint provided the parking requirements for a given parking zone.

Request

GetParkingZoneRequest

Return value

GetParkingZoneResponse

// Request to fetch zone information, given the zone_code.
message GetParkingZoneRequest {
  // Human readable number or code of the parking zone to search. This is often
  // visible on the meter or some other sign.
  // Required.
  string zone_code = 1;

  // A latitude and longitude to describe the location to help retrieving
  // the intended zone information and avoid disambiguation.

  // Latitude in degrees, must be in the range [-90.0, +90.0].
  // Required.
  double latitude_degrees = 2;
  // Longitude in degrees, must be in the range [-180.0, +180.0].
  // Required.
  double longitude_degrees = 3;
}

message GetParkingZoneResponse {
  // The parking zone info requested for. Or empty if no parking zone is found.
  ParkingZone parking_zone = 1;
}
// Message describes a parking zone.
message ParkingZone {
  // Opaque identifier of the parking zone, this is often not human readable and
  // must be globally unique for the partner.
  // Required.
  string zone_id = 1;

  // Human readable zone code. This is often visible on the signage and might
  // not be globally unique.
  // Required.
  string zone_code = 2;

  // Human readable name of the zone, which could be visible to user.
  // Required.
  Text name = 3;

  // Location data for this parking zone.
  // For now only GeoCoordinates (i.e. LatLng) needs to be specified for
  // on-street parking.
  // Required.
  Location location = 4;

  // Type of the parking zone. This will determine the type of session which can
  // be created.
  // Required.
  ZoneType zone_type = 5;

  // Payment configuration accepted at this zone.
  // Required.
  PaymentConfiguration payment_configuration = 6;

  // An short important notice which could be displayed to the user.
  // This field should be used to communicate information like "no parking on
  // XXX day", or "no parking on Tuesdays due to street cleaning". This should
  // be limited to one or two short sentences.
  // Optional.
  Text important_notice = 7;

  // Scheduling rules apply to this parking zone.
  // Required.
  ZoneRules zone_rules = 8;
}

// The type of the zone, whether it's space based or license based, or both.
enum ZoneType {
  PARKING_ENTITY_UNKNOWN = 0;
  // Space based. Space code is needed to get rates or create a session.
  ON_DEMAND_SPACE_NUMBER = 1;
  // License based. License info is needed to get rates or create a session.
  ON_DEMAND_LICENSE_PLATE = 2;
  // Both space code and license info are needed to get rates or create a
  // session.
  ON_DEMAND_LICENSE_AND_SPACE = 3;
}

// Additional scheduling/transacting rules for this parking zone.
message ZoneRules {
  // Whether this parking zone supports extending an existing session.
  bool supports_extension = 1;
}

// A possibly-localized text payload. Some Text fields may contain marked-up
// content.
message Text {
  // Text value in an unknown locale. Required if and only if `localized_value`
  // is empty. The locale for this value may depend on the partner or service
  // provider -- it should not be assumed to be any specific language.
  string value = 1;

  // Per-locale text values. Optional.
  repeated LocalizedString localized_value = 2;
}
// Instance of a string in one locale.
message LocalizedString {
  // IETF BCP 47 language code, such as "en", "mas", "zh-Hant", "de-CH-1901".
  // See http://www.w3.org/International/articles/language-tags/.
  string locale = 1;

  // Message in the locale above (UTF-8).
  string value = 2;
}
// Geographic information about a location.
message Location {
  // The Place ID for a place in the Google Places database and on Google Maps.
  // See https://developers.google.com/places/place-id for more about Place IDs.
  // If this is provided, Google will match the location to this place.
  // (optional)
  string place_id = 1;

  // The location's name, telephone, url and geo are used to support matching
  // the location with places already present on Google Maps. It is recommended
  // to provide the location name if possible. (optional)
  //
  // The name of the location. (optional)
  string name = 2;

  // The public telephone number of the location including its country and area
  // codes, e.g. +14567891234. (optional)
  string telephone = 3;

  // The url of the location's public website. (optional)
  string url = 4;

  // The Geo info of the location, including latitude, longitude, and address.
  // (optional)
  GeoCoordinates geo = 5;

  // Optional text to provide more precise description of the location, or
  // instructions assisting locating the place. E.g. "Front entrance of the
  // library", "meet at the intersect of Road A and Street B". (optional)
  Text description = 6;

  // The type of the location. Note that this field may be required when
  // attached to a Service, see comments in Service.location for more details.
  // (optional)
  LocationType location_type = 7;

  // Unique reference of the location within the service. This id can be used to
  // refer to this location in other service fields. E.g in the custom intake
  // form, a set of location ids can be used to specify pick up location
  // options. If set, this id should be unique within the same service.
  // Note this is only applicable for Service.
  // (optional)
  string location_id = 8;
}
// The Geo data of a location, including latitude, longitude, and address.
// At least one of [lat/lng or address] should be provided (or both).
message GeoCoordinates {
  double latitude = 1;   // In degrees. (optional)
  double longitude = 2;  // In degrees. (optional)

  // Address for a location, could either be structured or unstructured.
  oneof addresses {
    // Postal address of the location, preferred.
    PostalAddress address = 3;
    // An unstructured address could also be provided as a fallback.
    // E.g. "1600 amphitheatre parkway mountain view, ca 94043"
    string unstructured_address = 4;
  }
}
message PaymentConfiguration {
  // Restrictions to the payment methods this merchant accepts. We assume no
  // restrictions exist if this field is not set.
  // Optional, only when certain payment methods are not accepted.
  PaymentRestrictions payment_restrictions = 1;
  // Required for Tokenization Payment configurations.
  TokenizationConfig tokenization_config = 2;
}
// Restrictions to the payment methods this merchant accepts.
message PaymentRestrictions {
  // Restrictions to the credit cards this merchant accepts. We assume all
  // credit cards are accepted if this field is not set.
  // Note that the list of cards supported by CreditCardType will grow over
  // time, meaning that leaving this empty subjects a configuration to future
  // changes. (optional)
  CreditCardRestrictions credit_card_restrictions = 1;
}
// Restrictions to the credit card types this merchant accepts.
message CreditCardRestrictions {
  // A credit card type.
  enum CreditCardType {
    // Unused.
    CREDIT_CARD_TYPE_UNSPECIFIED = 0;

    // A Visa credit card.
    VISA = 1;

    // A Mastercard credit card.
    MASTERCARD = 2;

    // An American Express credit card.
    AMERICAN_EXPRESS = 3;

    // A Discover credit card.
    DISCOVER = 4;

    // A JCB credit card.
    JCB = 5;
  }
  // A list of supported credit cards. No credit cards are supported if empty.
  // (optional)
  repeated CreditCardType credit_card_type = 1;
}
// A configuration for payment-processor tokenization, set up on a per-Merchant
// basis.
message TokenizationConfig {
  // A tokenization configuration will typically have one
  // tokenization_parameter whose key is "gateway" and whose value is the
  // name of the processor.
  //
  // The rest of the parameters are dependent on the processor.  See
  // documentation from Google Pay and your processor for further information.
  // https://developers.google.com/pay/api/web/object-reference# \
  //   PaymentMethodTokenizationSpecification
  // https://developers.google.com/pay/api/#participating-google-pay-processors
  //
  // Braintree example:
  // tokenization_parameter { key: "gateway" value: "braintree" }
  // tokenization_parameter { key: "braintree:apiVersion" value: "v1" }
  // tokenization_parameter { key: "braintree:sdkVersion" value: "2.30.0" }
  // tokenization_parameter { key: "braintree:merchantId" value: "abcdef" }
  // tokenization_parameter { key: "braintree:clientKey"
  //                          value: "production_xxx_yyy" }
  //
  // Stripe example:
  // tokenization_parameter { key: "gateway" value: "stripe" }
  // tokenization_parameter { key: "stripe:version" value: "2018-02-28" }
  // tokenization_parameter { key: "stripe:publishableKey" value: "pk_1234" }
  //
  // Adyen example:
  // tokenization_parameter { key: "gateway" value: "adyen" }
  // tokenization_parameter { key: "gatewayMerchantId" value: "yourId" }
  map<string, string> tokenization_parameter = 1;

  // The following field controls how much billing information to include in the
  // payment token. Verification of billing information is the responsibility of
  // Google Pay upon entry of Form Of Payment (FOP). If the FOP is currently in
  // Google Pay without the requested level of billing information, the user
  // will not see their FOP as a choice, and they will have to enter the FOP and
  // required information according to the current Google Pay UI.
  //
  // Some merchants like to keep the requested information minimal because
  // requesting more information can lead to lower conversion rates.
  //
  // Note that they can also go to payments.google.com to enhance an FOP but
  // most users will not know to do so.

  // How much of the Billing Address to require of the user and include in the
  // token. The enum values correspond to parameters in the Google Pay API (see
  // https://developers.google.com/pay/api/web/reference/object\
  //  #BillingAddressParameters).
  enum BillingInformationFormat {
    BILLING_INFORMATION_FORMAT_UNSPECIFIED = 0;
    // name, country code, and postal code (GPay default setting).
    MIN = 1;
    // name, street address, locality, region, country code, and postal code
    FULL = 2;
  }

  // Include in the payment token the user's billing information as entered into
  // Google Pay with their FOP (see above).
  BillingInformationFormat billing_information_format = 2;

  // Name of the Merchant Of Record (MOR).  This user-visible name will be shown
  // in 3DS2 challenges.  In some cases, this is the Merchant, in others this is
  // the Aggregator.
  string merchant_of_record_name = 3;

  // Country where transaction will be processed, in ISO 3166-1 alpha-2 form.
  string payment_country_code = 4;

  // Per CardNetwork Processing information.
  message CardNetworkParameters {
    // The Card Network that these parameters are about
    CreditCardRestrictions.CreditCardType card_network = 1;
    // The Bank Identification Number of the acquiring bank used for processing
    // of the card.
    //
    // If this value is not known to you, you should ask your acquirer or
    // merchant processor representative.
    string acquirer_bin = 2;
    // The merchant identifier assigned by the acquirer to the merchant for use
    // in transaction authorization (for Visa and American Express
    // transactions).
    //
    // If this value is not known to you, you should ask their acquirer or
    // merchant processor representative.
    string acquirer_merchant_id = 3;
  }

  // Per-Card Network processing parameters.
  //
  // These are currently only required for PSD2
  // (https://en.wikipedia.org/wiki/Payment_Services_Directive)
  // processing when payment_country_code is a European country where PSD2 is in
  // effect.  They are also only currently required for VISA and
  // AMERICAN_EXPRESS.
  repeated CardNetworkParameters card_network_parameters = 5;

  // Fields supported to authorize a card transaction.
  //
  // See the GPay documentation at
  // https://developers.google.com/pay/api/web/reference/object#CardParameters
  enum AuthMethod {
    AUTH_METHOD_UNSPECIFIED = 0;
    // This authentication method is associated with payment cards stored on
    // file with the user's Google Account. Returned payment data includes
    // personal account number (PAN) with the expiration month and the
    // expiration year.
    PAN_ONLY = 1;
    // This authentication method is associated with cards stored as Android
    // device tokens. Returned payment data includes a 3-D Secure (3DS)
    // cryptogram generated on the device.
    CRYPTOGRAM_3DS = 2;
  }

  // Defines types of cardholder data that are accepted by the gateway.
  // If not specified, no restrictions are applied.
  //
  // Note that partners who use commercial gateways should leave this
  // empty unless their gateway provider has specified otherwise.  Restricting
  // allowed_auth_methods is most useful in the scenario that a partner
  // integrates with GPay as a gateway themselves.
  repeated AuthMethod allowed_auth_methods = 6;
}