Fare is a set of fares for different classes of users.
name | data type | description |
---|---|---|
fare | map of Money | A mapping from FareType to Money. |
details | map of array of FareComponent | A mapping from FareType to a list of FareComponent. The FareComponents are stored in an array instead of a list because JAXB doesn't know how to deal with interfaces when serializing a trip planning response, and List is an interface. See https://stackoverflow.com/a/1119241/778449 |
Example
{ "fare" : { "property1" : { "currency" : { "defaultFractionDigits" : 12345, "currencyCode" : "...", "symbol" : "...", "currency" : "..." }, "cents" : 12345 }, "property2" : { "currency" : { "defaultFractionDigits" : 12345, "currencyCode" : "...", "symbol" : "...", "currency" : "..." }, "cents" : 12345 } }, "details" : { "property1" : [ { "fareId" : { "agencyId" : "...", "id" : "..." }, "price" : { "currency" : { }, "cents" : 12345 }, "routes" : [ { "agencyId" : "...", "id" : "..." }, { "agencyId" : "...", "id" : "..." } ] }, { "fareId" : { "agencyId" : "...", "id" : "..." }, "price" : { "currency" : { }, "cents" : 12345 }, "routes" : [ { "agencyId" : "...", "id" : "..." }, { "agencyId" : "...", "id" : "..." } ] } ], "property2" : [ { "fareId" : { "agencyId" : "...", "id" : "..." }, "price" : { "currency" : { }, "cents" : 12345 }, "routes" : [ { "agencyId" : "...", "id" : "..." }, { "agencyId" : "...", "id" : "..." } ] }, { "fareId" : { "agencyId" : "...", "id" : "..." }, "price" : { "currency" : { }, "cents" : 12345 }, "routes" : [ { "agencyId" : "...", "id" : "..." }, { "agencyId" : "...", "id" : "..." } ] } ] } }