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

Add cancellation terms #113

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
222 changes: 216 additions & 6 deletions prebuilt/core/booking.json
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,14 @@
"maximum": 9007199254740991,
"minimum": 1451606400
}
}
},
"additionalProperties": false
},
"value": {
"description": "Arbitrary token value",
"type": "string",
"minLength": 1,
"maxLength": 9999
},
"data": {
"description": "Arbitrary ticket data for the client",
Expand Down Expand Up @@ -539,12 +546,75 @@
"minimum": 1451606400
}
},
"additionalProperties": false,
"required": [
"startTime",
"endTime"
]
},
"cancellation": {
"description": "Booking cancellation info",
"type": "object",
"properties": {
"isCancellable": {
"description": "Indicates whether or not the booking is cancellable",
"type": "boolean"
},
"cost": {
"description": "Cost of the cancellation",
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "number",
"minimum": 0,
"multipleOf": 0.01
},
"discount": {
"type": "number",
"minimum": 0,
"multipleOf": 0.01
},
"taxes": {
"type": "number",
"minimum": 0,
"multipleOf": 0.01
},
"currency": {
"description": "Accepted monetary unit in ISO 4127 format, see https://en.wikipedia.org/wiki/ISO_4217#cite_note-1",
"type": "string",
"enum": [
"EUR",
"GBP"
]
}
},
"additionalProperties": false
},
"expiration": {
"description": "Expiration date of the cancellation terms.",
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1451606400
}
}
},
"validFrom": {
"description": "[DEPRECATED] Validity starting time",
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1451606400
},
"validSeconds": {
"description": "[DEPRECATED] Validity duration in seconds",
"type": "integer",
"minimum": 0
}
}
},
"additionalProperties": false
},
"customer": {
"type": "object",
Expand Down Expand Up @@ -956,7 +1026,14 @@
"maximum": 9007199254740991,
"minimum": 1451606400
}
}
},
"additionalProperties": false
},
"value": {
"description": "Arbitrary token value",
"type": "string",
"minLength": 1,
"maxLength": 9999
},
"data": {
"description": "Arbitrary ticket data for the client",
Expand Down Expand Up @@ -1138,12 +1215,75 @@
"minimum": 1451606400
}
},
"additionalProperties": false,
"required": [
"startTime",
"endTime"
]
},
"cancellation": {
"description": "Booking cancellation info",
"type": "object",
"properties": {
"isCancellable": {
"description": "Indicates whether or not the booking is cancellable",
"type": "boolean"
},
"cost": {
"description": "Cost of the cancellation",
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "number",
"minimum": 0,
"multipleOf": 0.01
},
"discount": {
"type": "number",
"minimum": 0,
"multipleOf": 0.01
},
"taxes": {
"type": "number",
"minimum": 0,
"multipleOf": 0.01
},
"currency": {
"description": "Accepted monetary unit in ISO 4127 format, see https://en.wikipedia.org/wiki/ISO_4217#cite_note-1",
"type": "string",
"enum": [
"EUR",
"GBP"
]
}
},
"additionalProperties": false
},
"expiration": {
"description": "Expiration date of the cancellation terms.",
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1451606400
}
}
},
"validFrom": {
"description": "[DEPRECATED] Validity starting time",
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1451606400
},
"validSeconds": {
"description": "[DEPRECATED] Validity duration in seconds",
"type": "integer",
"minimum": 0
}
}
},
"additionalProperties": false
},
"customer": {
"type": "object",
Expand Down Expand Up @@ -1690,12 +1830,75 @@
"minimum": 1451606400
}
},
"additionalProperties": false,
"required": [
"startTime",
"endTime"
]
},
"cancellation": {
"description": "Booking cancellation info",
"type": "object",
"properties": {
"isCancellable": {
"description": "Indicates whether or not the booking is cancellable",
"type": "boolean"
},
"cost": {
"description": "Cost of the cancellation",
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "number",
"minimum": 0,
"multipleOf": 0.01
},
"discount": {
"type": "number",
"minimum": 0,
"multipleOf": 0.01
},
"taxes": {
"type": "number",
"minimum": 0,
"multipleOf": 0.01
},
"currency": {
"description": "Accepted monetary unit in ISO 4127 format, see https://en.wikipedia.org/wiki/ISO_4217#cite_note-1",
"type": "string",
"enum": [
"EUR",
"GBP"
]
}
},
"additionalProperties": false
},
"expiration": {
"description": "Expiration date of the cancellation terms.",
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1451606400
}
}
},
"validFrom": {
"description": "[DEPRECATED] Validity starting time",
"type": "integer",
"maximum": 9007199254740991,
"minimum": 1451606400
},
"validSeconds": {
"description": "[DEPRECATED] Validity duration in seconds",
"type": "integer",
"minimum": 0
}
}
},
"additionalProperties": false
},
"token": {
"description": "The validity token (such as booking ID, travel ticket etc.) that MaaS clients will display to validate the trip when starting the leg.",
Expand All @@ -1717,7 +1920,14 @@
"maximum": 9007199254740991,
"minimum": 1451606400
}
}
},
"additionalProperties": false
},
"value": {
"description": "Arbitrary token value",
"type": "string",
"minLength": 1,
"maxLength": 9999
},
"data": {
"description": "Arbitrary ticket data for the client",
Expand Down
Loading