Specifica delle tariffe
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Definizione del protocollo
// Represents a fare with a breakdown of the different amounts that compose its
// total price.
message Fare {
// Message to represent a fare breakdown.
message LineItem {
// The line item type is used to provide a breakdown of the fare for display
// to the user. If additional line item types are required please reach out
// to the Google Transport team.
enum LineItemType {
BASE_FARE = 1;
SERVICE_CHARGE = 2;
TAXES = 3;
}
LineItemType line_item_type = 1;
.google.type.Money amount = 2;
}
// Total amount of the fare. This is equal to the sum of all the line items.
.google.type.Money total_amount = 1;
// Details about the different parts that constitute the total amount. The
// sum of all the line items must be equal to total_amount.
repeated LineItem line_items = 2;
}
Esempio JSON
{
"total_amount": {
"units": 2,
"nanos": 0,
"currency_code": "USD"
},
"line_items": [
{
"line_item_type": "BASE_FARE",
"amount": {
"units": 1,
"nanos": 950000000,
"currency_code": "USD"
}
},
{
"line_item_type": "SERVICE_CHARGE",
"amount": {
"units": 0,
"nanos": 50000000,
"currency_code": "USD"
}
}
]
}
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-25 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-07-25 UTC."],[],[]]