Fare Data Type

Fare is a set of fares for different classes of users.

Properties
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" : {
        "feedId" : "...",
        "id" : "..."
      },
      "price" : {
        "currency" : { },
        "cents" : 12345
      },
      "routes" : [ {
        "feedId" : "...",
        "id" : "..."
      }, {
        "feedId" : "...",
        "id" : "..."
      } ]
    }, {
      "fareId" : {
        "feedId" : "...",
        "id" : "..."
      },
      "price" : {
        "currency" : { },
        "cents" : 12345
      },
      "routes" : [ {
        "feedId" : "...",
        "id" : "..."
      }, {
        "feedId" : "...",
        "id" : "..."
      } ]
    } ],
    "property2" : [ {
      "fareId" : {
        "feedId" : "...",
        "id" : "..."
      },
      "price" : {
        "currency" : { },
        "cents" : 12345
      },
      "routes" : [ {
        "feedId" : "...",
        "id" : "..."
      }, {
        "feedId" : "...",
        "id" : "..."
      } ]
    }, {
      "fareId" : {
        "feedId" : "...",
        "id" : "..."
      },
      "price" : {
        "currency" : { },
        "cents" : 12345
      },
      "routes" : [ {
        "feedId" : "...",
        "id" : "..."
      }, {
        "feedId" : "...",
        "id" : "..."
      } ]
    } ]
  }
}