Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should OfferRequestSlice origin and destination be type Place? #657

Closed
nathanlindsay opened this issue Dec 21, 2022 · 2 comments
Closed

Comments

@nathanlindsay
Copy link

Me again... Really sorry!

interface OfferRequestSlice {
    ...
    /**
     * The city or airport the passengers want to travel to
     */
    destination: Place | string;
    /**
     * The city or airport the passengers want to depart from
     */
    origin: Place | string;
   ....
}

Should these just be set to Place? Is there an example of a time when these might be a string?

@shaundon
Copy link
Contributor

Hey – I'm not 100% on this, I think there may be use cases where it's appropriate to use a string, so it may be best to leave it as is.

@igorp1
Copy link
Contributor

igorp1 commented Mar 6, 2023

Hey @nathanlindsay! I'll be closing this for now since there hasn't been any activity, but please feel free to re-open if you have any other question. To clarify, we do seem to reuse the OfferRequestSlice type on the CreateOfferRequest type. CreateOfferRequest is used for the payload, where your input and destination are strings with the iata code.That's why we have origin and destination as either Place or string

@igorp1 igorp1 closed this as completed Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants