diff --git a/maas-schemas/package.json b/maas-schemas/package.json index 156441af0..a1f892ee3 100644 --- a/maas-schemas/package.json +++ b/maas-schemas/package.json @@ -1,6 +1,6 @@ { "name": "maas-schemas", - "version": "21.0.0", + "version": "21.1.0", "description": "Schemas for MaaS infrastructure", "main": "index.js", "engine": { diff --git a/maas-schemas/schemas/tsp/payments-initiate/request.json b/maas-schemas/schemas/tsp/payments-initiate/request.json new file mode 100644 index 000000000..7102646f3 --- /dev/null +++ b/maas-schemas/schemas/tsp/payments-initiate/request.json @@ -0,0 +1,21 @@ +{ + "$id": "https://schemas.maas.global/tsp/payments-initiate/request.json", + "description": "Request schema for creating payment through TSP api", + "type": "object", + "properties": { + "tspId": { + "$ref": "https://schemas.maas.global/core/booking.json#/definitions/tspId" + }, + "paymentAmount": { + "type": "number" + } + }, + "required": ["tspId", "paymentAmount"], + "additionalProperties": false, + "examples": [ + { + "tspId": "00000000-cafe-cafe-cafe-cafecafecafe", + "paymentAmount": 2405 + } + ] +} diff --git a/maas-schemas/schemas/tsp/payments-initiate/response.json b/maas-schemas/schemas/tsp/payments-initiate/response.json new file mode 100644 index 000000000..944991282 --- /dev/null +++ b/maas-schemas/schemas/tsp/payments-initiate/response.json @@ -0,0 +1,25 @@ +{ + "$id": "https://schemas.maas.global/tsp/payments-initiate/request.json", + "description": "Response schema for creating payment through TSP api", + "type": "object", + "properties": { + "tspId": { + "$ref": "https://schemas.maas.global/core/booking.json#/definitions/tspId" + }, + "amount": { + "type": "number" + }, + "paymentStatus": { + "type": "string" + } + }, + "required": ["tspId", "amount", "paymentStatus"], + "additionalProperties": false, + "examples": [ + { + "tspId": "00000000-cafe-cafe-cafe-cafecafecafe", + "amount": 2405, + "paymentStatus": "CONFIRMED" + } + ] +} diff --git a/maas-schemas/schemas/tsp/payments-retrieve/request.json b/maas-schemas/schemas/tsp/payments-retrieve/request.json new file mode 100644 index 000000000..6203eb62b --- /dev/null +++ b/maas-schemas/schemas/tsp/payments-retrieve/request.json @@ -0,0 +1,17 @@ +{ + "$id": "https://schemas.maas.global/tsp/payments-retrieve/request.json", + "description": "Request schema for retrieving a TSP payment from TSP api", + "type": "object", + "properties": { + "tspId": { + "$ref": "https://schemas.maas.global/core/booking.json#/definitions/tspId" + } + }, + "required": ["tspId"], + "additionalProperties": false, + "examples": [ + { + "tspId": "00000000-cafe-cafe-cafe-cafecafecafe" + } + ] +} diff --git a/maas-schemas/schemas/tsp/payments-retrieve/response.json b/maas-schemas/schemas/tsp/payments-retrieve/response.json new file mode 100644 index 000000000..2a63ac73d --- /dev/null +++ b/maas-schemas/schemas/tsp/payments-retrieve/response.json @@ -0,0 +1,25 @@ +{ + "$id": "https://schemas.maas.global/tsp/payments-retrieve/request.json", + "description": "Response schema for retrieving a TSP payment from TSP api", + "type": "object", + "properties": { + "tspId": { + "$ref": "https://schemas.maas.global/core/booking.json#/definitions/tspId" + }, + "amount": { + "type": "number" + }, + "paymentStatus": { + "type": "string" + } + }, + "required": ["tspId", "amount", "paymentStatus"], + "additionalProperties": false, + "examples": [ + { + "tspId": "00000000-cafe-cafe-cafe-cafecafecafe", + "amount": 2405, + "paymentStatus": "PENDING" + } + ] +}