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

SilverRail: MODE_TRAIN schema #107

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

SilverRail: MODE_TRAIN schema #107

wants to merge 4 commits into from

Conversation

nanuuki
Copy link
Contributor

@nanuuki nanuuki commented Feb 21, 2017

Notes:

  • Turns out we the SilverRail cancellation can be done without the additional fields in the cancel request

@nanuuki nanuuki changed the title SilverRail: MODE_TRAIN schema, cancellation fields, GBP support SilverRail: MODE_TRAIN schema, GBP support Feb 27, 2017
"description": "Seat number, e.g. 42",
"type": "string",
"minLength": 1
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we merge the 'coach' and 'seatNumber' to just 'seat' or something that would uniquely identify the place you have. Remember that from MaaS-backend viewpoint, we only need to identify the place, whereas TSP can parse whatever it offered.

That might make it more compatible with providers that could not make it as unique (cross-compare e.g. with VR). BTW VR also identifies the number of 'car' (vaunu) (or is that what coach denotes here?), which might help identifying these places.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we could. I'd keep them separate to allow for flexibility on the UI side - "coach" is the same as "car" ("The coach in which the seat is located." according to the SR docs).

"minLength": 1
}
},
"additionalProperties": false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember to set '"required": ["trainId", ...] if you intend to expect & use these variables - otherwise the caller may leave them away.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, left it out since I didn't have the trainId in the options-list response but luckily the info is available at that stage - made a commit to improve booking-silverrail-options-list so that tests will pass with the trainId set as required.

@@ -180,7 +180,7 @@
"currency": {
"description": "Accepted monetary unit in ISO 4127 format, see https://en.wikipedia.org/wiki/ISO_4217#cite_note-1",
"type": "string",
"enum": [ "EUR" ]
"enum": [ "EUR", "GBP" ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we get the unit change as a separate PR? That would help merging it together with the actual implementation changes.

BTW It might be that we need external meta somewhere to denote what are the actual currencies the particular TSP accepts. I believe SilverRail only operates with pounds?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll separate this to another PR.

The current configuration that we have uses pounds but it might also be possible to switch it to EUR - but that's uncertain.

@nanuuki nanuuki changed the title SilverRail: MODE_TRAIN schema, GBP support SilverRail: MODE_TRAIN schema Feb 27, 2017
@nanuuki
Copy link
Contributor Author

nanuuki commented Feb 27, 2017

Moved the GBP related stuff to #109

@konker konker added the Later label Nov 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants