heyitsmass / BayView

The next generation reservation tracking and notification system
https://bayview.dev
MIT License
1 stars 2 forks source link

Ticket implementation #6

Closed heyitsmass closed 11 months ago

heyitsmass commented 1 year ago

Ticket class should represent the ticket types returned from either park type and contain methods associated with them; for example

interface StartingPrice:
    subtotal: string
    currency: string
    tax: string
    total: string
    pricePerDay: string

interface Ticket{
    name: string
    numDays: number
    startingFromPrice: StartingPrice
    priceDates: string[]
}

is returned from the API when gathering available parks and could contain methods such as get_url(priceDate) to get the price for that specific date.

https://github.com/heyitsmass/BayView/blob/b335f46bd55299100313360e111e700b8bc3f6a0/src/types/ItineraryManager.ts#L390-L397