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

予約API応答メモ #35

Closed
misodengaku opened this issue Sep 7, 2019 · 7 comments
Closed

予約API応答メモ #35

misodengaku opened this issue Sep 7, 2019 · 7 comments
Assignees

Comments

@misodengaku
Copy link
Collaborator

misodengaku commented Sep 7, 2019

内容は仮なので好きにいじってください

request

2020年1月1日 のぞみ99号の4号車1番E席を取る場合

dateは要検討

{
    "date": "2020-01-01T08:00:00+09:00", 
    "train_class": "のぞみ",
    "train_name": "99号",
    "car_num": 4,
    "origin": "東京",
    "destination": "大阪",
    "seats": [
        {
            "row": 1,
            "column": "E"
        }
    ]
}

response

{
    "reservation_id": "123567890", 
    "あああああ": true
}
@misodengaku
Copy link
Collaborator Author

複数席同時に取れた方がいい

@notchi590
Copy link
Collaborator

リクエストに支払い方法を追加する感じで

@notchi590
Copy link
Collaborator

{
    "date": "2020-01-01T08:00:00+09:00", 
    "train_class": "のぞみ",
    "train_name": "99号",
    "car_num": 4,
    "origin": "東京",
    "destination": "大阪",
    "payment": "creditcard",
    "seats": [
        {
            "row": 1,
            "column": "E"
        }
    ]
}

@notchi590
Copy link
Collaborator

ユーザIDも追加したく

{
    "date": "2020-01-01T08:00:00+09:00", 
    "train_class": "のぞみ",
    "train_name": "99号",
    "car_num": 4,
    "origin": "東京",
    "destination": "大阪",
    "user_id": 3,
    "payment": "creditcard",
    "seats": [
        {
            "row": 1,
            "column": "E"
        }
    ]
}

@notchi590
Copy link
Collaborator

あいまい予約に対応する

@notchi590
Copy link
Collaborator

datetimeをなんとかする

@notchi590
Copy link
Collaborator

{
    "date": "2020-01-01T08:00:00+09:00", 
    "train_class": "のぞみ",
    "train_name": "99号",
    "car_num": 4,
    "seat_class": "reserved",
    "origin": "東京",
    "destination": "大阪",
    "user_id": 3,
    "payment": "creditcard",
    "child": 1,
    "adult": 1,
    "type": "isle",
    "seats": [
        {
            "row": 1,
            "column": "E"
        }
    ]
}
  • 足したkey

    • child: 子供の数
    • adult: 大人の数
    • seat_class: 座席クラス
    • type: 指定タイプ
      • seat: 座席完全指定
      • isle: 通路あいまい指定
      • window: 窓側あいまい指定
      • center: 真ん中あいまい指定
  • あいまい指定は適当な席を選び、前後二列を検索して並びで取れるかどうか判定する

@chibiegg chibiegg closed this as completed Oct 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants