diff --git a/openapi.json b/openapi.json index cc9d3e6a..3217c6bb 100755 --- a/openapi.json +++ b/openapi.json @@ -7180,14 +7180,7 @@ "example": "2020-02-29T10:56:56.876Z" }, "status": { - "description": "Current status of the transaction.", - "type": "string", - "enum": [ - "SUCCESSFUL", - "CANCELLED", - "FAILED", - "PENDING" - ] + "$ref": "#/components/schemas/TransactionStatus" }, "payment_type": { "$ref": "#/components/schemas/PaymentType" @@ -7650,6 +7643,18 @@ ], "title": "Currency" }, + "TransactionStatus": { + "description": "Current status of the transaction.\n\n- `PENDING`: The transaction has been created but its final outcome is not known yet.\n- `SUCCESSFUL`: The transaction completed successfully.\n- `CANCELLED`: The transaction was cancelled or otherwise reversed before completion.\n- `FAILED`: The transaction attempt did not complete successfully.\n- `REFUNDED`: The transaction was refunded in full or in part.", + "type": "string", + "enum": [ + "SUCCESSFUL", + "CANCELLED", + "FAILED", + "PENDING", + "REFUNDED" + ], + "title": "Transaction Status" + }, "EventType": { "description": "Type of the transaction event.", "type": "string", diff --git a/openapi.yaml b/openapi.yaml index 75404776..bf3f4470 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -5026,13 +5026,7 @@ components: format: date-time example: 2020-02-29T10:56:56.876Z status: - description: Current status of the transaction. - type: string - enum: - - SUCCESSFUL - - CANCELLED - - FAILED - - PENDING + $ref: '#/components/schemas/TransactionStatus' payment_type: $ref: '#/components/schemas/PaymentType' installments_count: @@ -5406,6 +5400,23 @@ components: - SEK - USD title: Currency + TransactionStatus: + description: |- + Current status of the transaction. + + - `PENDING`: The transaction has been created but its final outcome is not known yet. + - `SUCCESSFUL`: The transaction completed successfully. + - `CANCELLED`: The transaction was cancelled or otherwise reversed before completion. + - `FAILED`: The transaction attempt did not complete successfully. + - `REFUNDED`: The transaction was refunded in full or in part. + type: string + enum: + - SUCCESSFUL + - CANCELLED + - FAILED + - PENDING + - REFUNDED + title: Transaction Status EventType: description: Type of the transaction event. type: string