-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
4,049 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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,107 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"id": "https://api.maas.global/maas-backend/invoices/invoice", | ||
"description": "MaaS Invoice schema", | ||
"definitions": { | ||
"InvoiceId": { | ||
"type": "string", | ||
"minLength": 2 | ||
}, | ||
"Invoice": { | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"minLength": 2 | ||
}, | ||
"customerId": { | ||
"type": "string", | ||
"pattern": "^[aepsu]{2}\\-[0-9A-Z_a-z]{4}\\-[0-9]:[0-9a-f]{8}(\\-[0-9a-f]{4}){3}\\-[0-9a-f]{12}$" | ||
}, | ||
"bookingId": { | ||
"description": "bookingId of the requested booking", | ||
"type": "string", | ||
"pattern": "^[0-9A-Fa-f]{8}(\\-[0-9A-Fa-f]{4}){3}\\-[0-9A-Fa-f]{12}$" | ||
}, | ||
"lineItems": { | ||
"type": "array", | ||
"items": { | ||
"description": "Invoice line item", | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"minLength": 2 | ||
}, | ||
"gatewayId": { | ||
"type": "string", | ||
"minLength": 4 | ||
}, | ||
"invoiceId": { | ||
"type": "string", | ||
"minLength": 2 | ||
}, | ||
"type": { | ||
"type": "string", | ||
"enum": [ | ||
"authorization", | ||
"capture", | ||
"charge", | ||
"refund" | ||
] | ||
}, | ||
"paymentSourceId": { | ||
"type": "string", | ||
"minLength": 4 | ||
}, | ||
"date": { | ||
"description": "POSIX time in milliseconds, https://en.wikipedia.org/wiki/Unix_time", | ||
"type": "integer", | ||
"maximum": 9007199254740991, | ||
"minimum": 1451606400 | ||
}, | ||
"description": { | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"amount": { | ||
"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" | ||
] | ||
}, | ||
"referenceInvoiceLineItemId": { | ||
"type": "string", | ||
"minLength": 2 | ||
} | ||
}, | ||
"required": [ | ||
"id", | ||
"gatewayId", | ||
"description", | ||
"amount", | ||
"currency", | ||
"type" | ||
], | ||
"additionalProperties": false | ||
}, | ||
"minLength": 1 | ||
} | ||
}, | ||
"required": [ | ||
"id", | ||
"customerId", | ||
"bookingId", | ||
"lineItems" | ||
], | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
This file contains 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,78 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"id": "https://api.maas.global/maas-backend/invoices/invoice", | ||
"description": "MaaS InvoiceLineItem schema", | ||
"definitions": { | ||
"InvoiceLineItemId": { | ||
"type": "string", | ||
"minLength": 2 | ||
}, | ||
"InvoiceLineItem": { | ||
"description": "Invoice line item", | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"minLength": 2 | ||
}, | ||
"gatewayId": { | ||
"type": "string", | ||
"minLength": 4 | ||
}, | ||
"invoiceId": { | ||
"type": "string", | ||
"minLength": 2 | ||
}, | ||
"type": { | ||
"type": "string", | ||
"enum": [ | ||
"authorization", | ||
"capture", | ||
"charge", | ||
"refund" | ||
] | ||
}, | ||
"paymentSourceId": { | ||
"type": "string", | ||
"minLength": 4 | ||
}, | ||
"date": { | ||
"description": "POSIX time in milliseconds, https://en.wikipedia.org/wiki/Unix_time", | ||
"type": "integer", | ||
"maximum": 9007199254740991, | ||
"minimum": 1451606400 | ||
}, | ||
"description": { | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"amount": { | ||
"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" | ||
] | ||
}, | ||
"referenceInvoiceLineItemId": { | ||
"type": "string", | ||
"minLength": 2 | ||
} | ||
}, | ||
"required": [ | ||
"id", | ||
"gatewayId", | ||
"description", | ||
"amount", | ||
"currency", | ||
"type" | ||
], | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
1,924 changes: 1,924 additions & 0 deletions
1,924
prebuilt/maas-backend/bookings/bookings-estimate/request.json
Large diffs are not rendered by default.
Oops, something went wrong.
1,897 changes: 1,897 additions & 0 deletions
1,897
prebuilt/maas-backend/bookings/bookings-estimate/response.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
22 changes: 22 additions & 0 deletions
22
schemas/maas-backend/bookings/bookings-estimate/request.json
This file contains 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,22 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"id": "https://api.maas.global/maas-backend/bookings/bookings-create/request", | ||
"description": "Request schema for bookings-create", | ||
"type": "object", | ||
"properties": { | ||
"identityId": { | ||
"$ref": "../../../core/components/units.json#/definitions/identityId" | ||
}, | ||
"payload": { | ||
"allOf": [ | ||
{ "$ref": "../../../core/booking.json" }, | ||
{ "required": [ "leg", "terms", "product" ] } | ||
] | ||
}, | ||
"headers": { | ||
"$ref": "../../../core/components/api-common.json#/definitions/headers" | ||
} | ||
}, | ||
"required": [ "identityId", "payload" ], | ||
"additionalProperties": false | ||
} |
17 changes: 17 additions & 0 deletions
17
schemas/maas-backend/bookings/bookings-estimate/response.json
This file contains 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,17 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"id": "https://api.maas.global/maas-backend/bookings/bookings-create/response", | ||
"description": "Response schema for bookings-create", | ||
"type": "object", | ||
"properties": { | ||
"booking": { | ||
"$ref": "../../../core/booking.json" | ||
}, | ||
"debug": { | ||
"type": "object", | ||
"additionalProperties": true | ||
} | ||
}, | ||
"required": ["booking"], | ||
"additionalProperties": false | ||
} |