-
Notifications
You must be signed in to change notification settings - Fork 0
Purchase request & delivery 20260702 #70
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
Open
edwinvandenbelt
wants to merge
1
commit into
main
Choose a base branch
from
Purchase-offers
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+408
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
deliverables/4 purchase package/personalInformationType.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| type: string | ||
| x-extensible-enum: | ||
| - fullName | ||
| - firstName | ||
| - lastName | ||
| - dateOfBirth # always in the format YYYY-MM-DD, ISO 8601 | ||
| - gender # M for male, F for female, X for non-binary, U for unknown | ||
| - nationality # ISO 3166-1 alpha-2 country code | ||
| - address # street, city, postal code, country | ||
| - phoneNumber | ||
| - mobileNumber | ||
| - passportNumber | ||
| - passportExpiryDate # always in the format YYYY-MM-DD, ISO 8601 | ||
| - passportIssuingCountry # ISO 3166-1 alpha-2 country code | ||
| - idCardNumber | ||
| - idCardAdditionalNumber | ||
| - idCardExpiryDate # always in the format YYYY-MM-DD, ISO 8601 | ||
| - idIssuingOrganisation | ||
| - drivingLicenseNumber | ||
| - drivingLicenseExpiryDate # always in the format YYYY-MM-DD, ISO 8601 | ||
| - drivingLicenseIssuingCountry # ISO 3166-1 alpha-2 country code | ||
| description: the type of personal information |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,179 @@ | ||
| # Purchase package Request - delivery | ||
|
|
||
| The purchase can be preceded by a validation of the package, to check if it is valid without executing a (expensive) call to purchase the package. | ||
|
|
||
| _Required items_ | ||
|
|
||
| | object | description | | ||
| | --- | --- | | ||
| | PURCHASE PACKAGE REQUEST | The purchase request | | ||
| | PURCHASE PACKAGE DELIVERY | The accompaning response | | ||
|
|
||
| ## PURCHASE REQUEST DETAILS | ||
|
|
||
| | field | type | optional/conditions | description | | ||
| | --- | --- | --- | --- | | ||
| | requestId | string | condition: a-sync | a unique ID, the response to this request MUST have the same ID (in case of a-sync call) | | ||
| | packageId | string | required | the reference of the package to purchase | | ||
| | version | string | required | the version of the locked offer package to purchase | | ||
| | personalInformation | List of personal data | conditional | when personal information is required to purchase | | ||
| | contentLanguage | string | optional | The language/localization of user-facing content, One IETF BCP 47 (RFC 5646) language tag. If missing, the local accepted language | | ||
|
|
||
|  | ||
|
|
||
| ```json | ||
| { "packageId": "offer-1", | ||
| "version": "305e50bfa0767185c3f0987277b60f53" | ||
| } | ||
| ``` | ||
|
|
||
| ## PURCHASE DELIVERY DETAILS | ||
|
|
||
|  | ||
|
|
||
| ### Purchase Delivery | ||
|
|
||
| | field | type | optional/conditions | description | | ||
| | --- | --- | --- | --- | | ||
| | requestId | string | condition: a-sync | a unique ID, the response to this request MUST have the same ID (in case of a-sync call) | | ||
| | package | Package | required, but nullable | when the purchases succeeds, there must be a package object | | ||
| | expiryTime | date-time | required | expiry time of rollback window, ISO 8601 | | ||
| | problems | list of string | required | a list of string, describing blocking issues, in the requested language (or local if not the requested language is not supported) | | ||
| | warnings | list of string | required | a list of string, describing non-blocking issues, in the requested language (or local if not the requested language is not supported) | | ||
|
|
||
| **Note**: take a look at the PR for the Search-offer Delivery. It contains the `PACKAGE` concept. | ||
|
|
||
| #### Effective Purchased Package | ||
| ```yaml | ||
| type: object | ||
| required: | ||
| - packageId | ||
| - summary | ||
| - name | ||
| - matching | ||
| - status | ||
| properties: | ||
| packageId: | ||
| type: string | ||
| description: Unique identifier for the package | ||
| version: | ||
| type: string | ||
| description: > | ||
| The version of the package, which can be used for version control and tracking changes over time. | ||
| Avoid using an increasing integer as the version number, as it may not accurately reflect the content changes. | ||
| Instead, consider using a hash of the package content or a combination of an internal ID and version number | ||
| to ensure uniqueness and integrity. | ||
| summary: | ||
| type: string | ||
| description: A brief summary of the package, providing an overview of its contents or purpose. | ||
| name: | ||
| type: string | ||
| description: The name of the package, which can be used for display purposes in user interfaces. | ||
| status: | ||
| type: string | ||
| description: The current status of the package. | ||
| # enum: | ||
| # - offered | ||
| # - locked | ||
| # - expired | ||
| # - released | ||
| # - purchased | ||
| # - rollback | ||
| # - cancelled | ||
| # - fulfilled | ||
| # - refunded | ||
| # - exchanged | ||
| # - in_progress | ||
| # - completed | ||
| const: purchased # from Purchased Package | ||
| elements: | ||
| type: array | ||
| description: A list of elements that are part of the package | ||
| items: | ||
| oneOf: | ||
| - $ref: .\TravelRight.yaml | ||
| - $ref: .\Ancillary.yaml | ||
| - $ref: .\Allocation.yaml | ||
| - $ref: .\AfterSalesFee.yaml | ||
| discriminator: | ||
| propertyName: packageElementType | ||
| mapping: | ||
| travelRight: .\TravelRight.yaml | ||
| ancillary: .\Ancillary.yaml | ||
| allocation: .\Allocation.yaml | ||
| afterSalesFee: .\AfterSalesFee.yaml | ||
| minimumPrice: | ||
| $ref: .\Cost.yaml | ||
| matching: | ||
| type: string | ||
| description: Indicates the matching status of the package. | ||
| enum: [match, partial-match] | ||
| summaryDetails: | ||
| type: array | ||
| description: A list of detailed summaries related to the package, providing additional context or information. | ||
| items: | ||
| $ref: .\SummaryDetail.yaml | ||
| trip: | ||
| $ref: .\Trip.yaml | ||
| guarantees: | ||
| type: array | ||
| description: A list of guarantees | ||
| items: | ||
| $ref: .\Guarantee.yaml | ||
| travelDocuments: | ||
| type: array | ||
| description: a list of travel documents | ||
| items: | ||
| $ref: .\TravelDocument.yaml | ||
| links: | ||
| type: array | ||
| description: A list of links related to the package, which can provide additional information or actions. | ||
| items: | ||
| $ref: .\Link.yaml | ||
| example: | ||
| { | ||
| "packageId": "PK-123", | ||
| "summary": "This is a sample package.", | ||
| "name": "Sample Package", | ||
| "status": "purchased", | ||
| "minimumPrice": { "amount": 100.00, "currency": "USD" }, | ||
| "summaryDetails": [ | ||
| { | ||
| "detailType": "geospatial", | ||
| "description": "A route from San Francisco to Los Angeles.", | ||
| "content": { "type": "Feature", "geometry": { "type": "LineString", "coordinates": [[-122.4194, 37.7749], [-118.2437, 34.0522]] } } | ||
| }, | ||
| { | ||
| "detailType": "condition", | ||
| "content": "No pets allowed" | ||
| } | ||
| ], | ||
| "elements": [ | ||
| { | ||
| "elementType": "travelRight", | ||
| "packageElementId": "PE-123", | ||
| "numberOfAvailableItems": "5", | ||
| "covering": [ { "startLeg": "L-789", "endLeg": "L-789" } ], | ||
| "price": { "amount": 23.20, "currency": "EUR" }, | ||
| "travellingEntities": [ "TE-123", "TE-456" ] | ||
| }, | ||
| { | ||
| "elementType": "allocation", | ||
| "packageElementId": "PE-124", | ||
| "allocationType": "spot", | ||
| "typeOfSpot": "seat", | ||
| "numberOfAllocatedUnits": 1, | ||
| "reference": "102/36B", | ||
| "appliesTo": [ "PE-123" ] | ||
| } | ||
| ], | ||
| "links": [ | ||
| { | ||
| "rel": "lock", | ||
| "href": "https://api.example.com/packages/PK-123/lock", | ||
| "method": "POST", | ||
| "type": "application/json" | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| type: object | ||
| properties: | ||
| requestId: | ||
| type: string | ||
| description: a unique ID, the response to this request MUST have the same ID (in case of a-sync call) condition a-sync | ||
| package: | ||
| $ref: .\PurchasedPackage.yaml | ||
| expiryTime: | ||
| type: string | ||
| format: date-time | ||
| description: expiry time of rollback window, ISO 8601 | ||
| problems: | ||
| type: array | ||
| items: | ||
| type: string | ||
| description: a list of string, describing blocking issues, in the requested language (or local if not the requested language is not supported) | ||
| warnings: | ||
| type: array | ||
| items: | ||
| type: string | ||
| description: a list of string, describing non-blocking issues, in the requested language (or local if not the requested language is not supported) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| type: object | ||
| required: | ||
| - packageId | ||
| - version | ||
| properties: | ||
| requestId: | ||
| type: string | ||
| message: >- | ||
| conditional, when using a-sync calls, a unique ID, the response to this request MUST have the same ID (in case of a-sync call) | ||
| packageId: | ||
| type: string | ||
| message: the reference of the package to validate | ||
| version: | ||
| type: string | ||
| message: the version of the locked offer package to validate | ||
| contentLanguage: | ||
| type: string | ||
| message: the requested language for the response content | ||
| personalInformation: | ||
| type: array | ||
| items: | ||
| type: object | ||
| properties: | ||
| travellingEntityId: | ||
| type: string | ||
| informationType: | ||
| $ref: .\personalInformationType.yaml | ||
| distributionType: | ||
| type: string | ||
| description: >- | ||
| the distribution type of the personal information. | ||
| enum: | ||
| - value | ||
| - reference | ||
| - VC | ||
| - referencedVC | ||
| value: | ||
| type: string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| # Validate Request - response | ||
|
|
||
| The purchase can be preceded by a validation of the package, to check if it is valid without executing a (expensive) call to purchase the package. | ||
|
|
||
| _Required items_ | ||
|
|
||
| | object | description | | ||
| | --- | --- | | ||
| | VALIDATE PACKAGE REQUEST | The request to validate the package before purchase, optional | | ||
| | VALIDATE PACKAGE DELIVERY | The accompaning response | | ||
|
|
||
| ## VALIDATE PACKAGE REQUEST DETAILS | ||
|
|
||
| | field | type | optional/conditions | description | | ||
| | --- | --- | --- | --- | | ||
| | requestId | string | condition: a-sync | a unique ID, the response to this request MUST have the same ID (in case of a-sync call) | | ||
| | packageId | string | required | the reference of the package to validate | | ||
| | version | string | required | the version of the locked offer package to validate | | ||
| | personalInformation | List of personal data | conditional | when personal information is required to validate | | ||
| | contentLanguage | string | optional | The language/localization of user-facing content, One IETF BCP 47 (RFC 5646) language tag. If missing, the local accepted language | | ||
|
|
||
| ### Personal Information Type | ||
| ```yaml | ||
| type: string | ||
| x-extensible-enum: | ||
| - fullName | ||
| - firstName | ||
| - lastName | ||
| - dateOfBirth # always in the format YYYY-MM-DD, ISO 8601 | ||
| - gender # M for male, F for female, X for non-binary, U for unknown | ||
| - nationality # ISO 3166-1 alpha-2 country code | ||
| - address # street, city, postal code, country | ||
| - phoneNumber | ||
| - mobileNumber | ||
| - passportNumber | ||
| - passportExpiryDate # always in the format YYYY-MM-DD, ISO 8601 | ||
| - passportIssuingCountry # ISO 3166-1 alpha-2 country code | ||
| - idCardNumber | ||
| - idCardAdditionalNumber | ||
| - idCardExpiryDate # always in the format YYYY-MM-DD, ISO 8601 | ||
| - idIssuingOrganisation | ||
| - drivingLicenseNumber | ||
| - drivingLicenseExpiryDate # always in the format YYYY-MM-DD, ISO 8601 | ||
| - drivingLicenseIssuingCountry # ISO 3166-1 alpha-2 country code | ||
| description: the type of personal information | ||
| ``` | ||
|
|
||
|  | ||
|
|
||
|
|
||
| ## Examples | ||
|
|
||
| Remark: the usage of the JSON below is only indicative, to clarify our intensions. It is not how the final result will look like. | ||
|
|
||
| ```json | ||
| { "packageId": "offer-1", | ||
| "version": "305e50bfa0767185c3f0987277b60f53", | ||
| "contentLanguage": "uk-EN" | ||
| } | ||
| ``` | ||
|
|
||
| A more advanced one, containing personal information: | ||
|
|
||
| ```json | ||
| { "packageId": "offer-1", | ||
| "version": "305e50bfa0767185c3f0987277b60f53", | ||
| "contentLanguage": "uk-EN", | ||
| "personalInformation": [ { "travellingEntityId": "TR-3492", | ||
| "fullName": "E. van Dam" | ||
| } ] | ||
| } | ||
| ``` | ||
|
|
||
| ## VALIDATE PACKAGE DELIVERY DETAILS | ||
|
|
||
| | field | type | optional/conditions | description | | ||
| | --- | --- | --- | --- | | ||
| | requestId | string | condition: a-sync | a unique ID, the response to this request MUST have the same ID (in case of a-sync call) | | ||
| | packageId | string | required | the reference of the validated package | | ||
| | version | string | required | the version of the validated locked offer package | | ||
| | expiryTime | date-time | required | expiry time of the locked offer, ISO 8601 | | ||
| | problems | list of string | required | a list of string, describing blocking issues, in the requested language (or local if not the requested language is not supported) | | ||
| | warnings | list of string | required | a list of string, describing non-blocking issues, in the requested language (or local if not the requested language is not supported) | | ||
|
|
||
|  | ||
|
|
||
| ```json | ||
| { "packageId": "offer-1", | ||
| "version": "305e50bfa0767185c3f0987277b60f53", | ||
| "expiryTime": "2027-07-01T10:55:00Z", | ||
| "problems": [], | ||
| "warnings": [] | ||
| } | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| type: object | ||
| required: | ||
| - packageId | ||
| - version | ||
| - expiryTime | ||
| properties: | ||
| requestId: | ||
| type: string | ||
| description: a unique ID, the response to this request MUST have the same ID (in case of a-sync call) | ||
| packageId: | ||
| type: string | ||
| description: the reference of the validated package | ||
| version: | ||
| type: string | ||
| description: the version of the validated locked offer package | ||
| expiryTime: | ||
| type: string | ||
| format: date-time | ||
| description: expiry time of the locked offer, ISO 8601 | ||
| problems: | ||
| type: array | ||
| items: | ||
| type: string | ||
| description: a list of string, describing blocking issues, in the requested language (or local if not the requested language is not supported) | ||
| warnings: | ||
| type: array | ||
| items: | ||
| type: string | ||
| description: a list of string, describing non-blocking issues, in the requested language (or local if not the requested language is not supported) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be linked with fulfillments, not linked directly to a purchase package