OVPAY-1040 - Added CRUD functions for ScheduledAction.

This commit is contained in:
Bas Boterman 2024-09-03 15:21:10 +02:00
parent dd7c4d1dcf
commit 9f24f84556

View File

@ -12,6 +12,7 @@ paths:
name: customerNumber name: customerNumber
schema: schema:
type: integer type: integer
example: 1001337
required: true required: true
description: The customerNumber. description: The customerNumber.
get: get:
@ -24,6 +25,7 @@ paths:
name: contractStatusId name: contractStatusId
schema: schema:
type: integer type: integer
example: 1
required: false required: false
description: Filter on possible contract status. 1 = new, 2 = active, 3 = suspended, 4 = cancelled, 5 = terminated. description: Filter on possible contract status. 1 = new, 2 = active, 3 = suspended, 4 = cancelled, 5 = terminated.
responses: responses:
@ -313,6 +315,7 @@ paths:
schema: schema:
type: string type: string
format: uuid format: uuid
example: d1dd439b-6072-4b97-89c9-724268865b93
required: true required: true
description: The contractId of the Contract, formatted as UUID. description: The contractId of the Contract, formatted as UUID.
get: get:
@ -426,7 +429,7 @@ paths:
} }
responses: responses:
"200": "200":
description: CREATED description: OK
content: content:
application/json: application/json:
schema: schema:
@ -446,6 +449,7 @@ paths:
schema: schema:
type: string type: string
format: uuid format: uuid
example: d1dd439b-6072-4b97-89c9-724268865b93
required: true required: true
description: The contractId of the Contract, formatted as UUID. description: The contractId of the Contract, formatted as UUID.
post: post:
@ -493,12 +497,14 @@ paths:
schema: schema:
type: string type: string
format: uuid format: uuid
example: d1dd439b-6072-4b97-89c9-724268865b93
required: true required: true
description: The contractId of the Contract, formatted as UUID. description: The contractId of the Contract, formatted as UUID.
- in: path - in: path
name: contractVersionId name: contractVersionId
schema: schema:
type: integer type: integer
example: 1
required: true required: true
description: The id of the ContractVersion, formatted as UUID. description: The id of the ContractVersion, formatted as UUID.
patch: patch:
@ -534,6 +540,7 @@ paths:
schema: schema:
type: string type: string
format: uuid format: uuid
example: d1dd439b-6072-4b97-89c9-724268865b93
required: true required: true
description: The contractId of the Contract, formatted as UUID. description: The contractId of the Contract, formatted as UUID.
post: post:
@ -597,6 +604,7 @@ paths:
name: createdFrom name: createdFrom
schema: schema:
type: string type: string
format: date-time
example: 2024-06-02 15:01:00.000 example: 2024-06-02 15:01:00.000
required: false required: false
description: Billing date of the invoice (from). description: Billing date of the invoice (from).
@ -604,6 +612,7 @@ paths:
name: createdUntil name: createdUntil
schema: schema:
type: string type: string
format: date-time
example: 2024-06-02 15:01:00.000 example: 2024-06-02 15:01:00.000
required: false required: false
description: Billing date of the invoice (until). description: Billing date of the invoice (until).
@ -611,6 +620,7 @@ paths:
name: updatedFrom name: updatedFrom
schema: schema:
type: string type: string
format: date-time
example: 2024-06-02 15:01:00.000 example: 2024-06-02 15:01:00.000
required: false required: false
description: Updated timestamp of the invoice (from). description: Updated timestamp of the invoice (from).
@ -618,6 +628,7 @@ paths:
name: updatedUntil name: updatedUntil
schema: schema:
type: string type: string
format: date-time
example: 2024-06-02 15:01:00.000 example: 2024-06-02 15:01:00.000
required: false required: false
description: Updated timestamp of the invoice (until). description: Updated timestamp of the invoice (until).
@ -656,6 +667,7 @@ paths:
schema: schema:
type: string type: string
format: uuid format: uuid
example: d1dd439b-6072-4b97-89c9-724268865b93
required: true required: true
description: The id of the ContractInvoice, formatted as UUID. description: The id of the ContractInvoice, formatted as UUID.
patch: patch:
@ -698,6 +710,7 @@ paths:
schema: schema:
type: string type: string
format: uuid format: uuid
example: d1dd439b-6072-4b97-89c9-724268865b93
required: true required: true
description: The contractId of the Contract, formatted as UUID. description: The contractId of the Contract, formatted as UUID.
post: post:
@ -735,6 +748,269 @@ paths:
"contractActionId": "8699d72a-cf4d-4e6b-9e9c-549d837ca51f", "contractActionId": "8699d72a-cf4d-4e6b-9e9c-549d837ca51f",
}, },
} }
/scheduledactions:
get:
summary: Get all scheduled actions.
description: Get all scheduled actions.
tags:
- ScheduledAction
parameters:
- in: query
name: scheduledActionTypeId
schema:
type: integer
example: 1
required: false
description: Type of scheduled action.
- in: query
name: scheduledActionStatusId
schema:
type: integer
example: 1
required: false
description: Status of scheduled action.
- in: query
name: executionTimeFrom
schema:
type: string
format: date-time
example: 2024-07-02 15:01:00.000
required: false
description: Execution timestmap (from).
- in: query
name: executionTimeUntil
schema:
type: string
format: date-time
example: 2024-07-02 15:01:00.000
required: false
description: Execution timestmap (until).
- in: query
name: contractId
schema:
type: string
format: uuid
example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf
required: false
description: ContractId of the action to perform.
- in: query
name: orderId
schema:
type: string
format: uuid
example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf
required: false
description: OrderId of the action to perform.
- in: query
name: orderLineId
schema:
type: string
format: uuid
example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf
required: false
description: OrderLineId of the action to perform.
- in: query
name: result
schema:
type: string
example: success
required: false
description: Result of the performed action.
- in: query
name: createdFrom
schema:
type: string
format: date-time
example: 2024-07-02 15:01:00.000
required: false
description: Find all tasks created from this timestamp.
- in: query
name: createdUntil
schema:
type: string
format: date-time
example: 2024-07-02 15:01:00.000
required: false
description: Find all tasks created until this timestamp.
- in: query
name: updatedFrom
schema:
type: string
format: date-time
example: 2024-07-02 15:01:00.000
required: false
description: Find all tasks updated from this timestamp.
- in: query
name: updatedUntil
schema:
type: string
format: date-time
example: 2024-07-02 15:01:00.000
required: false
description: Find all tasks updated until this timestamp.
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ScheduledAction"
example:
{
"scheduledActions":
[
{
"scheduledActionId": "d1dd439b-6072-4b97-89c9-724268865b93",
"scheduledActionType":
{ "scheduledActionTypeId": 1, "name": "gbo-refund" },
"scheduledActionStatus":
{ "scheduledActionStatusId": 1, "name": "created" },
"executionTime": "2024-07-02 15:01:00.000",
"contractId": "e911532c-8049-4068-955d-6d1230321cba",
"orderId": "6c512776-7365-4d29-8ddb-b30e826a2dfb",
"orderLineId": "161a3e25-ca15-47b8-b68e-e585cc3ff171",
"details": "xspit|xtat|refundMethod|refundAmount",
"result": "successful call to GBO",
"created": "2024-07-02 15:01:00.000",
"updated": "2024-07-02 15:01:00.000",
},
],
}
post:
summary: Add a new scheduled action.
description: Add a new scheduled action.
tags:
- ScheduledAction
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/ScheduledAction"
example:
{
"scheduledAction":
{
"scheduledActionType": 1,
"scheduledActionStatus": 1,
"executionTime": "2024-07-02 15:01:00.000",
"contractId": "e911532c-8049-4068-955d-6d1230321cba",
"orderId": "6c512776-7365-4d29-8ddb-b30e826a2dfb",
"orderLineId": "161a3e25-ca15-47b8-b68e-e585cc3ff171",
"details": "xspit|xtat|refundMethod|refundAmount",
"result": "successful call to GBO",
"created": "2024-07-02 15:01:00.000",
"updated": "2024-07-02 15:01:00.000",
},
}
responses:
"201":
description: CREATED
content:
application/json:
schema:
$ref: "#/components/schemas/ContractAction"
example:
{
"scheduledAction":
{
"scheduledActionId": "d1dd439b-6072-4b97-89c9-724268865b93",
},
}
/scheduledactions/{scheduledActionId}:
parameters:
- in: path
name: scheduledActionId
schema:
type: string
format: uuid
example: d1dd439b-6072-4b97-89c9-724268865b93
required: true
description: The id of the ScheduledAction, formatted as UUID.
get:
summary: Get a specific scheduled action.
description: Get a specific scheduled action.
tags:
- ScheduledAction
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ScheduledAction"
example:
{
"scheduledAction":
{
"scheduledActionId": "d1dd439b-6072-4b97-89c9-724268865b93",
"scheduledActionType":
{ "scheduledActionTypeId": 1, "name": "gbo-refund" },
"scheduledActionStatus":
{ "scheduledActionStatusId": 1, "name": "created" },
"executionTime": "2024-07-02 15:01:00.000",
"contractId": "e911532c-8049-4068-955d-6d1230321cba",
"orderId": "6c512776-7365-4d29-8ddb-b30e826a2dfb",
"orderLineId": "161a3e25-ca15-47b8-b68e-e585cc3ff171",
"details": "xspit|xtat|refundMethod|refundAmount",
"result": "successful call to GBO",
"created": "2024-07-02 15:01:00.000",
"updated": "2024-07-02 15:01:00.000",
},
}
patch:
summary: Update a specific scheduled action.
description: Update a specific scheduled action.
tags:
- ScheduledAction
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/ScheduledAction"
example:
{
"scheduledAction":
{
"scheduledActionStatus": 1,
"executionTime": "2024-07-02 15:01:00.000",
"details": "xspit|xtat|refundMethod|refundAmount",
"result": "successful call to GBO",
"updated": "2024-07-02 15:01:00.000",
},
}
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ScheduledAction"
example:
{
"scheduledAction":
{
"scheduledActionId": "d1dd439b-6072-4b97-89c9-724268865b93",
},
}
delete:
summary: Delete a specific scheduled action.
description: Delete a specific scheduled action.
tags:
- ScheduledAction
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ScheduledAction"
example:
{
"scheduledAction":
{
"scheduledActionId": "d1dd439b-6072-4b97-89c9-724268865b93",
},
}
/contractstatuses: /contractstatuses:
get: get:
summary: Return a list of all possible values of the ContractStatus reference table. Used for populating drop down lists for example. summary: Return a list of all possible values of the ContractStatus reference table. Used for populating drop down lists for example.
@ -946,6 +1222,69 @@ components:
type: string type: string
format: json format: json
example: { json } example: { json }
ScheduledAction:
type: object
properties:
scheduledActionId:
type: string
format: uuid
example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f
scheduledActionType:
type: object
$ref: "#/components/schemas/ScheduledActionType"
scheduledActionStatus:
type: object
$ref: "#/components/schemas/ScheduledActionStatus"
executionTime:
type: string
format: date-time
example: 2024-07-02 15:01:00.000
contractId:
type: string
format: uuid
example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f
orderId:
type: string
format: uuid
example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f
orderLineId:
type: string
format: uuid
example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f
details:
type: string
example: xspit|xtat|refundMethod|refundAmount
result:
type: string
example: successful call to GBO
created:
type: string
format: date-time
example: 2024-07-02 15:01:00.000
updated:
type: string
format: date-time
example: 2024-07-02 15:01:00.000
ScheduledActionType:
type: object
properties:
scheduledActionTypeId:
type: integer
example: 1
name:
type: string
enum: [gbo-refund]
example: gbo-refund
ScheduledActionStatus:
type: object
properties:
scheduledActionStatusId:
type: integer
example: 1
name:
type: string
enum: [created, pending, processed, failed]
example: created
ContractStatus: ContractStatus:
type: object type: object
properties: properties: