From 4cabfb37ea772e1f1c8201b0122293c2b8e3f9a4 Mon Sep 17 00:00:00 2001 From: Marvin Muxfeld Date: Thu, 20 Jun 2024 11:57:16 +0200 Subject: [PATCH] PISHPS-282: added openapi v3 documentation for store-api and admin-api --- .../admin-api/create-support-request.json | 104 +++++++ .../Schema/admin-api/order-payment-url.json | 59 ++++ .../admin-api/payment-method-update.json | 62 ++++ .../Schema/admin-api/refund-list.json | 121 ++++++++ .../Schema/admin-api/refund-manager-data.json | 178 +++++++++++ .../Schema/admin-api/refund-order-get.json | 110 +++++++ .../Schema/admin-api/refund-order-post.json | 111 +++++++ .../Schema/admin-api/refund-total.json | 109 +++++++ .../admin-api/ship-order-operational.json | 283 ++++++++++++++++++ .../Schema/admin-api/shipping-status.json | 110 +++++++ .../Schema/admin-api/shipping-total.json | 89 ++++++ .../Schema/admin-api/subscription-cancel.json | 86 ++++++ .../Schema/admin-api/subscription-pause.json | 86 ++++++ .../Schema/admin-api/subscription-resume.json | 86 ++++++ .../Schema/admin-api/subscription-skip.json | 86 ++++++ .../admin-api/webhook-mandate-update.json | 134 +++++++++ .../webhook-subscription-action.json | 167 +++++++++++ .../admin-api/webhook-subscription-renew.json | 167 +++++++++++ .../Schema/admin-api/weebhook-action.json | 74 +++++ .../store-api/apple-pay-add-product.json | 71 +++++ .../apple-pay-create-payment-session.json | 58 ++++ .../Schema/store-api/apple-pay-enabled.json | 39 +++ .../Schema/store-api/apple-pay-get-by-id.json | 45 +++ .../apple-pay-get-shipping-methods.json | 85 ++++++ .../Schema/store-api/apple-pay-pay.json | 140 +++++++++ .../store-api/apple-pay-restore-cart.json | 39 +++ .../apple-pay-set-shipping-method.json | 59 ++++ .../credit-card-store-card-token.json | 72 +++++ .../credit-card-store-mandate-id.json | 72 +++++ .../creditr-card-revoke-mandate.json | 74 +++++ .../Schema/store-api/ideal-store-issuer.json | 72 +++++ .../Schema/store-api/payment-failed.json | 54 ++++ .../Schema/store-api/pos-checkout.json | 30 ++ .../Schema/store-api/pos-status-action.json | 68 +++++ .../Schema/store-api/pos-store-terminal.json | 72 +++++ .../Schema/store-api/retry-payment.json | 54 ++++ src/Resources/Schema/store-api/return.json | 54 ++++ .../Schema/store-api/webhook-received.json | 128 ++++++++ .../webhook-subscription-received.json | 128 ++++++++ 39 files changed, 3636 insertions(+) create mode 100644 src/Resources/Schema/admin-api/create-support-request.json create mode 100644 src/Resources/Schema/admin-api/order-payment-url.json create mode 100644 src/Resources/Schema/admin-api/payment-method-update.json create mode 100644 src/Resources/Schema/admin-api/refund-list.json create mode 100644 src/Resources/Schema/admin-api/refund-manager-data.json create mode 100644 src/Resources/Schema/admin-api/refund-order-get.json create mode 100644 src/Resources/Schema/admin-api/refund-order-post.json create mode 100644 src/Resources/Schema/admin-api/refund-total.json create mode 100644 src/Resources/Schema/admin-api/ship-order-operational.json create mode 100644 src/Resources/Schema/admin-api/shipping-status.json create mode 100644 src/Resources/Schema/admin-api/shipping-total.json create mode 100644 src/Resources/Schema/admin-api/subscription-cancel.json create mode 100644 src/Resources/Schema/admin-api/subscription-pause.json create mode 100644 src/Resources/Schema/admin-api/subscription-resume.json create mode 100644 src/Resources/Schema/admin-api/subscription-skip.json create mode 100644 src/Resources/Schema/admin-api/webhook-mandate-update.json create mode 100644 src/Resources/Schema/admin-api/webhook-subscription-action.json create mode 100644 src/Resources/Schema/admin-api/webhook-subscription-renew.json create mode 100644 src/Resources/Schema/admin-api/weebhook-action.json create mode 100644 src/Resources/Schema/store-api/apple-pay-add-product.json create mode 100644 src/Resources/Schema/store-api/apple-pay-create-payment-session.json create mode 100644 src/Resources/Schema/store-api/apple-pay-enabled.json create mode 100644 src/Resources/Schema/store-api/apple-pay-get-by-id.json create mode 100644 src/Resources/Schema/store-api/apple-pay-get-shipping-methods.json create mode 100644 src/Resources/Schema/store-api/apple-pay-pay.json create mode 100644 src/Resources/Schema/store-api/apple-pay-restore-cart.json create mode 100644 src/Resources/Schema/store-api/apple-pay-set-shipping-method.json create mode 100644 src/Resources/Schema/store-api/credit-card-store-card-token.json create mode 100644 src/Resources/Schema/store-api/credit-card-store-mandate-id.json create mode 100644 src/Resources/Schema/store-api/creditr-card-revoke-mandate.json create mode 100644 src/Resources/Schema/store-api/ideal-store-issuer.json create mode 100644 src/Resources/Schema/store-api/payment-failed.json create mode 100644 src/Resources/Schema/store-api/pos-checkout.json create mode 100644 src/Resources/Schema/store-api/pos-status-action.json create mode 100644 src/Resources/Schema/store-api/pos-store-terminal.json create mode 100644 src/Resources/Schema/store-api/retry-payment.json create mode 100644 src/Resources/Schema/store-api/return.json create mode 100644 src/Resources/Schema/store-api/webhook-received.json create mode 100644 src/Resources/Schema/store-api/webhook-subscription-received.json diff --git a/src/Resources/Schema/admin-api/create-support-request.json b/src/Resources/Schema/admin-api/create-support-request.json new file mode 100644 index 000000000..0e3c62418 --- /dev/null +++ b/src/Resources/Schema/admin-api/create-support-request.json @@ -0,0 +1,104 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Support Request API", + "description": "API for submitting support requests to Mollie.", + "version": "1.0.0" + }, + "paths": { + "/api/_action/mollie/support/request": { + "post": { + "summary": "Submit Support Request to Mollie", + "description": "Submits a support request to Mollie.", + "operationId": "submitSupportRequest", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the person submitting the request." + }, + "email": { + "type": "string", + "format": "email", + "description": "The email address of the person submitting the request." + }, + "recipientLocale": { + "type": "string", + "description": "The locale of the recipient for the support request." + }, + "subject": { + "type": "string", + "description": "The subject of the support request." + }, + "message": { + "type": "string", + "description": "The message content of the support request." + } + }, + "required": ["name", "email", "recipientLocale", "subject", "message"], + "example": { + "name": "John Doe", + "email": "john.doe@example.com", + "recipientLocale": "en_US", + "subject": "Issue with payment processing", + "message": "I'm encountering issues with processing payments." + } + } + } + } + }, + "responses": { + "200": { + "description": "Support request submitted successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + } + }, + "required": ["success"] + }, + "example": { + "success": true + } + } + } + }, + "500": { + "description": "Internal server error.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false + }, + "error": { + "type": "string" + } + }, + "required": ["success", "error"] + }, + "example": { + "success": false, + "error": "Internal server error occurred." + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/admin-api/order-payment-url.json b/src/Resources/Schema/admin-api/order-payment-url.json new file mode 100644 index 000000000..6e3514b25 --- /dev/null +++ b/src/Resources/Schema/admin-api/order-payment-url.json @@ -0,0 +1,59 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Order Payment URL API", + "description": "API for generating a payment URL for a Mollie order.", + "version": "1.0.0" + }, + "paths": { + "/api/_action/mollie/order/payment-url": { + "post": { + "summary": "Generate Mollie Order Payment URL", + "description": "Creates a payment URL for a Mollie order.", + "operationId": "paymentUrl", + "responses": { + "201": { + "description": "Payment URL successfully created.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "example": "https://example.com" + } + } + }, + "example": { + "url": "https://example.com" + } + } + } + }, + "404": { + "description": "Resource not found.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": {} + }, + "example": [] + } + } + } + } + } + } + }, + "components": { + "schemas": { + "EmptyArray": { + "type": "array", + "items": {} + } + } + } +} diff --git a/src/Resources/Schema/admin-api/payment-method-update.json b/src/Resources/Schema/admin-api/payment-method-update.json new file mode 100644 index 000000000..bf0abf253 --- /dev/null +++ b/src/Resources/Schema/admin-api/payment-method-update.json @@ -0,0 +1,62 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Payment Method Update API", + "description": "API for updating payment methods for Mollie.", + "version": "1.0.0" + }, + "paths": { + "/api/_action/mollie/payment-method/update-methods": { + "get": { + "summary": "Update Mollie Payment Methods", + "description": "Updates the payment methods for Mollie.", + "operationId": "paymentMethodUpdate", + "responses": { + "200": { + "description": "Payment methods successfully updated.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + } + } + }, + "example": { + "success": true + } + } + } + }, + "500": { + "description": "Internal server error.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Error message" + }, + "success": { + "type": "string", + "example": "false" + } + } + }, + "example": { + "message": "Error message", + "success": "false" + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/admin-api/refund-list.json b/src/Resources/Schema/admin-api/refund-list.json new file mode 100644 index 000000000..74d55dfc0 --- /dev/null +++ b/src/Resources/Schema/admin-api/refund-list.json @@ -0,0 +1,121 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Refund List API", + "description": "API for listing refund items for a Mollie order.", + "version": "1.0.0" + }, + "paths": { + "/api/_action/mollie/refund/list": { + "post": { + "summary": "List Refund Items for Mollie Order", + "description": "Retrieves a list of refund items for a Mollie order.", + "operationId": "listRefundItems", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "orderId": { + "type": "string", + "format": "uuid", + "description": "The UUID of the order." + } + }, + "required": ["orderId"] + }, + "example": { + "orderId": "123e4567-e89b-12d3-a456-426614174000" + } + } + } + }, + "responses": { + "200": { + "description": "List of refund items successfully retrieved.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "swLineId": { + "type": "string", + "example": "line_123456" + }, + "swLineVersionId": { + "type": "string", + "example": "version_123456" + }, + "mollieLineId": { + "type": "string", + "example": "mollie_line_123456" + }, + "swReference": { + "type": "string", + "example": "Product ABC" + }, + "quantity": { + "type": "integer", + "example": 1 + }, + "amount": { + "type": "number", + "format": "float", + "example": 50.00 + } + } + } + }, + "example": [ + { + "swLineId": "line_123456", + "swLineVersionId": "version_123456", + "mollieLineId": "mollie_line_123456", + "swReference": "Product ABC", + "quantity": 1, + "amount": 50.00 + } + ] + } + } + }, + "500": { + "description": "Internal server error.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false + }, + "errors": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "Error message" + ] + } + } + }, + "example": { + "success": false, + "errors": [ + "Error message" + ] + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/admin-api/refund-manager-data.json b/src/Resources/Schema/admin-api/refund-manager-data.json new file mode 100644 index 000000000..a683ca367 --- /dev/null +++ b/src/Resources/Schema/admin-api/refund-manager-data.json @@ -0,0 +1,178 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Refund Manager API", + "description": "API for managing refunds for a Mollie order.", + "version": "1.0.0" + }, + "paths": { + "/api/_action/mollie/refund-manager/data": { + "post": { + "summary": "Get Refund Manager Data", + "description": "Retrieves refund manager data for a Mollie order.", + "operationId": "getRefundManagerData", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "orderId": { + "type": "string", + "format": "uuid", + "description": "The UUID of the order." + } + }, + "required": ["orderId"] + }, + "example": { + "orderId": "123e4567-e89b-12d3-a456-426614174000" + } + } + } + }, + "responses": { + "200": { + "description": "Refund manager data successfully retrieved.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "totals": { + "type": "object", + "properties": { + "remaining": { + "type": "number", + "format": "float", + "example": 50.00 + }, + "voucherAmount": { + "type": "number", + "format": "float", + "example": 10.00 + }, + "pendingRefunds": { + "type": "number", + "format": "float", + "example": 5.00 + }, + "refunded": { + "type": "number", + "format": "float", + "example": 35.00 + }, + "roundingDiff": { + "type": "number", + "format": "float", + "example": 0.00 + } + } + }, + "cart": { + "type": "array", + "items": { + "type": "object", + "properties": { + "itemId": { + "type": "string", + "example": "item_123456" + }, + "quantity": { + "type": "integer", + "example": 1 + }, + "price": { + "type": "number", + "format": "float", + "example": 50.00 + } + } + } + }, + "refunds": { + "type": "array", + "items": { + "type": "object", + "properties": { + "refundId": { + "type": "string", + "example": "refund_123456" + }, + "amount": { + "type": "number", + "format": "float", + "example": 10.00 + } + } + } + }, + "taxStatus": { + "type": "string", + "example": "included" + } + } + }, + "example": { + "totals": { + "remaining": 50.00, + "voucherAmount": 10.00, + "pendingRefunds": 5.00, + "refunded": 35.00, + "roundingDiff": 0.00 + }, + "cart": [ + { + "itemId": "item_123456", + "quantity": 1, + "price": 50.00 + } + ], + "refunds": [ + { + "refundId": "refund_123456", + "amount": 10.00 + } + ], + "taxStatus": "included" + } + } + } + }, + "500": { + "description": "Internal server error.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false + }, + "errors": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "Error message" + ] + } + } + }, + "example": { + "success": false, + "errors": [ + "Error message" + ] + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/admin-api/refund-order-get.json b/src/Resources/Schema/admin-api/refund-order-get.json new file mode 100644 index 000000000..154124670 --- /dev/null +++ b/src/Resources/Schema/admin-api/refund-order-get.json @@ -0,0 +1,110 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Refund Order API", + "description": "API for processing refunds for a Mollie order.", + "version": "1.0.0" + }, + "paths": { + "/api/mollie/refund/order": { + "post": { + "summary": "Process Refund for Mollie Order", + "description": "Processes a refund for a Mollie order.", + "operationId": "refundOrder", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "number": { + "type": "string", + "description": "The order number." + }, + "description": { + "type": "string", + "description": "The refund description." + }, + "internalDescription": { + "type": "string", + "description": "Internal description for the refund." + }, + "amount": { + "type": "number", + "description": "The refund amount.", + "nullable": true + } + }, + "required": ["number", "description", "internalDescription"] + }, + "example": { + "number": "123456", + "description": "Refund for order 123456", + "internalDescription": "Customer requested refund", + "amount": 100.00 + } + } + } + }, + "responses": { + "200": { + "description": "Refund successfully processed.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "refundId": { + "type": "string", + "example": "refund_123456" + } + } + }, + "example": { + "success": true, + "refundId": "refund_123456" + } + } + } + }, + "500": { + "description": "Internal server error.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false + }, + "errors": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "Error message" + ] + } + } + }, + "example": { + "success": false, + "errors": [ + "Error message" + ] + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/admin-api/refund-order-post.json b/src/Resources/Schema/admin-api/refund-order-post.json new file mode 100644 index 000000000..2292a4dfb --- /dev/null +++ b/src/Resources/Schema/admin-api/refund-order-post.json @@ -0,0 +1,111 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Refund API", + "description": "API for processing a refund for a Mollie order.", + "version": "1.0.0" + }, + "paths": { + "/api/_action/mollie/refund": { + "post": { + "summary": "Process Refund for Mollie Order", + "description": "Processes a refund for a Mollie order.", + "operationId": "processRefund", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "orderId": { + "type": "string", + "format": "uuid", + "description": "The UUID of the order." + }, + "description": { + "type": "string", + "description": "The refund description." + }, + "internalDescription": { + "type": "string", + "description": "Internal description for the refund." + }, + "amount": { + "type": "number", + "format": "float", + "description": "The refund amount." + } + }, + "required": ["orderId", "description", "internalDescription", "amount"] + }, + "example": { + "orderId": "123e4567-e89b-12d3-a456-426614174000", + "description": "Refund for order 123456", + "internalDescription": "Customer requested refund", + "amount": 100.00 + } + } + } + }, + "responses": { + "200": { + "description": "Refund successfully processed.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "refundId": { + "type": "string", + "example": "refund_123456" + } + } + }, + "example": { + "success": true, + "refundId": "refund_123456" + } + } + } + }, + "500": { + "description": "Internal server error.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false + }, + "errors": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "Error message" + ] + } + } + }, + "example": { + "success": false, + "errors": [ + "Error message" + ] + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/admin-api/refund-total.json b/src/Resources/Schema/admin-api/refund-total.json new file mode 100644 index 000000000..e5c13cf50 --- /dev/null +++ b/src/Resources/Schema/admin-api/refund-total.json @@ -0,0 +1,109 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Refund Total API", + "description": "API for retrieving the total refund information for a Mollie order.", + "version": "1.0.0" + }, + "paths": { + "/api/_action/mollie/refund/total": { + "post": { + "summary": "Get Total Refund Information", + "description": "Retrieves the total refund information for a Mollie order.", + "operationId": "getTotalRefundInfo", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "orderId": { + "type": "string", + "format": "uuid", + "description": "The UUID of the order." + } + }, + "required": ["orderId"] + }, + "example": { + "orderId": "123e4567-e89b-12d3-a456-426614174000" + } + } + } + }, + "responses": { + "200": { + "description": "Total refund information successfully retrieved.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "remaining": { + "type": "number", + "format": "float", + "example": 50.00 + }, + "refunded": { + "type": "number", + "format": "float", + "example": 35.00 + }, + "voucherAmount": { + "type": "number", + "format": "float", + "example": 10.00 + }, + "pendingRefunds": { + "type": "number", + "format": "float", + "example": 5.00 + } + } + }, + "example": { + "remaining": 50.00, + "refunded": 35.00, + "voucherAmount": 10.00, + "pendingRefunds": 5.00 + } + } + } + }, + "500": { + "description": "Internal server error.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false + }, + "errors": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "Error message" + ] + } + } + }, + "example": { + "success": false, + "errors": [ + "Error message" + ] + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/admin-api/ship-order-operational.json b/src/Resources/Schema/admin-api/ship-order-operational.json new file mode 100644 index 000000000..eb9630fd7 --- /dev/null +++ b/src/Resources/Schema/admin-api/ship-order-operational.json @@ -0,0 +1,283 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Ship Order API", + "description": "API for shipping orders via Mollie.", + "version": "1.0.0" + }, + "paths": { + "/api/mollie/ship/order": { + "post": { + "summary": "Ship Order via Mollie", + "description": "Ships an order via Mollie with tracking information.", + "operationId": "shipOrderViaMollie", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "orderNumber": { + "type": "string", + "description": "The number of the order." + }, + "trackingCarrier": { + "type": "string", + "description": "The carrier name for tracking." + }, + "trackingCode": { + "type": "string", + "description": "The tracking code for the shipment." + }, + "trackingUrl": { + "type": "string", + "description": "The tracking URL for the shipment." + } + }, + "required": ["orderNumber", "trackingCarrier", "trackingCode", "trackingUrl"], + "example": { + "orderNumber": "ORD-12345", + "trackingCarrier": "UPS", + "trackingCode": "123456789", + "trackingUrl": "https://example.com/tracking/123456789" + } + } + } + } + }, + "responses": { + "200": { + "description": "Order shipped successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the shipment." + }, + "orderId": { + "type": "string", + "description": "The ID of the order." + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The date and time when the shipment was created." + }, + "lines": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the order line item." + }, + "orderId": { + "type": "string", + "description": "The ID of the order." + }, + "name": { + "type": "string", + "description": "The name of the order line item." + }, + "sku": { + "type": "string", + "description": "The SKU of the order line item." + }, + "type": { + "type": "string", + "description": "The type of the order line item." + }, + "status": { + "type": "string", + "description": "The status of the order line item." + }, + "quantity": { + "type": "integer", + "description": "The quantity of the order line item." + }, + "unitPrice": { + "type": "object", + "properties": { + "currency": { + "type": "string", + "description": "The currency of the unit price." + }, + "value": { + "type": "number", + "format": "float", + "description": "The value of the unit price." + } + }, + "required": ["currency", "value"] + }, + "vatRate": { + "type": "number", + "format": "float", + "description": "The VAT rate of the order line item." + }, + "vatAmount": { + "type": "object", + "properties": { + "currency": { + "type": "string", + "description": "The currency of the VAT amount." + }, + "value": { + "type": "number", + "format": "float", + "description": "The value of the VAT amount." + } + }, + "required": ["currency", "value"] + }, + "totalAmount": { + "type": "object", + "properties": { + "currency": { + "type": "string", + "description": "The currency of the total amount." + }, + "value": { + "type": "number", + "format": "float", + "description": "The value of the total amount." + } + }, + "required": ["currency", "value"] + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The date and time when the order line item was created." + } + }, + "required": ["id", "orderId", "name", "sku", "type", "status", "quantity", "unitPrice", "vatRate", "vatAmount", "totalAmount", "createdAt"] + } + }, + "tracking": { + "type": "object", + "properties": { + "carrier": { + "type": "string", + "description": "The carrier name for tracking." + }, + "code": { + "type": "string", + "description": "The tracking code for the shipment." + }, + "url": { + "type": "string", + "description": "The tracking URL for the shipment." + } + }, + "required": ["carrier", "code", "url"] + } + }, + "required": ["id", "orderId", "createdAt", "lines", "tracking"] + }, + "example": { + "id": "shipment_123", + "orderId": "ORD-12345", + "createdAt": "2024-06-20T12:00:00Z", + "lines": [ + { + "id": "line_1", + "orderId": "ORD-12345", + "name": "Product A", + "sku": "SKU-123", + "type": "physical", + "status": "shipped", + "quantity": 2, + "unitPrice": { + "currency": "USD", + "value": 25.0 + }, + "vatRate": 20.0, + "vatAmount": { + "currency": "USD", + "value": 5.0 + }, + "totalAmount": { + "currency": "USD", + "value": 50.0 + }, + "createdAt": "2024-06-18T10:00:00Z" + } + ], + "tracking": { + "carrier": "UPS", + "code": "123456789", + "url": "https://example.com/tracking/123456789" + } + } + } + } + }, + "400": { + "description": "Bad request - Invalid request parameters.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "InvalidArgumentException" + }, + "message": { + "type": "string", + "example": "Invalid tracking information." + }, + "data": { + "type": "object", + "properties": { + "orderNumber": { + "type": "string", + "description": "The number of the order." + }, + "trackingCarrier": { + "type": "string", + "description": "The carrier name for tracking." + }, + "trackingCode": { + "type": "string", + "description": "The tracking code for the shipment." + }, + "trackingUrl": { + "type": "string", + "description": "The tracking URL for the shipment." + } + }, + "required": ["orderNumber", "trackingCarrier", "trackingCode", "trackingUrl"], + "example": { + "orderNumber": "ORD-12345", + "trackingCarrier": "UPS", + "trackingCode": "123456789", + "trackingUrl": "https://example.com/tracking/123456789" + } + } + } + }, + "example": { + "error": "InvalidArgumentException", + "message": "Invalid tracking information.", + "data": { + "orderNumber": "ORD-12345", + "trackingCarrier": "UPS", + "trackingCode": "123456789", + "trackingUrl": "https://example.com/tracking/123456789" + } + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Resources/Schema/admin-api/shipping-status.json b/src/Resources/Schema/admin-api/shipping-status.json new file mode 100644 index 000000000..e0ebace1a --- /dev/null +++ b/src/Resources/Schema/admin-api/shipping-status.json @@ -0,0 +1,110 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Ship Status API", + "description": "API for retrieving shipping status for Mollie orders.", + "version": "1.0.0" + }, + "paths": { + "/api/_action/mollie/ship/status": { + "post": { + "summary": "Retrieve Mollie Order Shipping Status", + "description": "Retrieves the shipping status for a Mollie order.", + "operationId": "retrieveMollieShipStatus", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "orderId": { + "type": "string", + "description": "The ID of the order." + } + }, + "required": ["orderId"] + }, + "example": { + "orderId": "123e4567-e89b-12d3-a456-426614174000" + } + } + } + }, + "responses": { + "200": { + "description": "Shipping status retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the order line item." + }, + "mollieOrderLineId": { + "type": "string", + "description": "The ID of the Mollie order line." + }, + "quantity": { + "type": "integer", + "description": "The total quantity of the order line item." + }, + "quantityShippable": { + "type": "integer", + "description": "The quantity of the order line item that is shippable." + }, + "quantityShipped": { + "type": "integer", + "description": "The quantity of the order line item that has been shipped." + } + }, + "required": ["id", "mollieOrderLineId", "quantity", "quantityShippable", "quantityShipped"] + } + }, + "example": [ + { + "id": "item_1", + "mollieOrderLineId": "mollie_item_1", + "quantity": 2, + "quantityShippable": 2, + "quantityShipped": 0 + }, + { + "id": "item_2", + "mollieOrderLineId": "mollie_item_2", + "quantity": 1, + "quantityShippable": 0, + "quantityShipped": 0 + } + ] + } + } + }, + "500": { + "description": "Internal server error.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Internal server error occurred." + } + } + }, + "example": { + "message": "Internal server error occurred." + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/admin-api/shipping-total.json b/src/Resources/Schema/admin-api/shipping-total.json new file mode 100644 index 000000000..749163ed8 --- /dev/null +++ b/src/Resources/Schema/admin-api/shipping-total.json @@ -0,0 +1,89 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Shipping Total API", + "description": "API for retrieving total shipping information for Mollie orders.", + "version": "1.0.0" + }, + "paths": { + "/api/_action/mollie/ship/total": { + "post": { + "summary": "Retrieve Total Shipping Information", + "description": "Retrieves the total shipping information for a Mollie order.", + "operationId": "retrieveTotalShippingInfo", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "orderId": { + "type": "string", + "description": "The ID of the order." + } + }, + "required": ["orderId"] + }, + "example": { + "orderId": "123e4567-e89b-12d3-a456-426614174000" + } + } + } + }, + "responses": { + "200": { + "description": "Total shipping information retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "amount": { + "type": "number", + "format": "float", + "description": "The total amount of shipping." + }, + "quantity": { + "type": "integer", + "description": "The total quantity of items." + } + }, + "required": ["amount", "quantity"] + } + }, + "example": [ + { + "amount": 10.5, + "quantity": 3 + } + ] + } + } + }, + "500": { + "description": "Internal server error.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Internal server error occurred." + } + } + }, + "example": { + "message": "Internal server error occurred." + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/admin-api/subscription-cancel.json b/src/Resources/Schema/admin-api/subscription-cancel.json new file mode 100644 index 000000000..d606df49f --- /dev/null +++ b/src/Resources/Schema/admin-api/subscription-cancel.json @@ -0,0 +1,86 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Subscription Cancel API", + "description": "API for canceling Mollie subscriptions.", + "version": "1.0.0" + }, + "paths": { + "/api/_action/mollie/subscriptions/cancel": { + "post": { + "summary": "Cancel Mollie Subscription", + "description": "Cancels a subscription in Mollie.", + "operationId": "cancelMollieSubscription", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the subscription to cancel." + } + }, + "required": ["id"], + "example": { + "id": "sub_123456789" + } + } + } + } + }, + "responses": { + "200": { + "description": "Subscription canceled successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + } + }, + "required": ["success"] + }, + "example": { + "success": true + } + } + } + }, + "500": { + "description": "Internal server error.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false + }, + "errors": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["success", "errors"] + }, + "example": { + "success": false, + "errors": ["Internal server error occurred."] + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/admin-api/subscription-pause.json b/src/Resources/Schema/admin-api/subscription-pause.json new file mode 100644 index 000000000..e204776fc --- /dev/null +++ b/src/Resources/Schema/admin-api/subscription-pause.json @@ -0,0 +1,86 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Subscription Pause API", + "description": "API for pausing Mollie subscriptions.", + "version": "1.0.0" + }, + "paths": { + "/api/_action/mollie/subscriptions/pause": { + "post": { + "summary": "Pause Mollie Subscription", + "description": "Pauses a subscription in Mollie.", + "operationId": "pauseMollieSubscription", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the subscription to pause." + } + }, + "required": ["id"], + "example": { + "id": "sub_123456789" + } + } + } + } + }, + "responses": { + "200": { + "description": "Subscription paused successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + } + }, + "required": ["success"] + }, + "example": { + "success": true + } + } + } + }, + "500": { + "description": "Internal server error.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false + }, + "errors": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["success", "errors"] + }, + "example": { + "success": false, + "errors": ["Internal server error occurred."] + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/admin-api/subscription-resume.json b/src/Resources/Schema/admin-api/subscription-resume.json new file mode 100644 index 000000000..6e2b7f74a --- /dev/null +++ b/src/Resources/Schema/admin-api/subscription-resume.json @@ -0,0 +1,86 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Subscription Resume API", + "description": "API for resuming Mollie subscriptions.", + "version": "1.0.0" + }, + "paths": { + "/api/_action/mollie/subscriptions/resume": { + "post": { + "summary": "Resume Mollie Subscription", + "description": "Resumes a paused subscription in Mollie.", + "operationId": "resumeMollieSubscription", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the subscription to resume." + } + }, + "required": ["id"], + "example": { + "id": "sub_123456789" + } + } + } + } + }, + "responses": { + "200": { + "description": "Subscription resumed successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + } + }, + "required": ["success"] + }, + "example": { + "success": true + } + } + } + }, + "500": { + "description": "Internal server error.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false + }, + "errors": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["success", "errors"] + }, + "example": { + "success": false, + "errors": ["Internal server error occurred."] + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/admin-api/subscription-skip.json b/src/Resources/Schema/admin-api/subscription-skip.json new file mode 100644 index 000000000..c3ce1284d --- /dev/null +++ b/src/Resources/Schema/admin-api/subscription-skip.json @@ -0,0 +1,86 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Subscription Skip API", + "description": "API for skipping Mollie subscriptions.", + "version": "1.0.0" + }, + "paths": { + "/api/_action/mollie/subscriptions/skip": { + "post": { + "summary": "Skip Mollie Subscription", + "description": "Skips the next scheduled payment for a subscription in Mollie.", + "operationId": "skipMollieSubscription", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the subscription to skip." + } + }, + "required": ["id"], + "example": { + "id": "sub_123456789" + } + } + } + } + }, + "responses": { + "200": { + "description": "Subscription skipped successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + } + }, + "required": ["success"] + }, + "example": { + "success": true + } + } + } + }, + "500": { + "description": "Internal server error.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false + }, + "errors": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["success", "errors"] + }, + "example": { + "success": false, + "errors": ["Internal server error occurred."] + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/admin-api/webhook-mandate-update.json b/src/Resources/Schema/admin-api/webhook-mandate-update.json new file mode 100644 index 000000000..993b4b374 --- /dev/null +++ b/src/Resources/Schema/admin-api/webhook-mandate-update.json @@ -0,0 +1,134 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Subscription Mandate Update Webhook Endpoint", + "description": "Endpoint for handling Mollie subscription mandate update webhook notifications.", + "version": "1.0.0" + }, + "paths": { + "/api/mollie/webhook/subscription/{swSubscriptionId}/mandate/update": { + "get": { + "summary": "Handle Mollie Subscription Mandate Update Webhook Notification (GET)", + "operationId": "handleMollieSubscriptionMandateUpdateWebhookGet", + "parameters": [ + { + "name": "swSubscriptionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the subscription associated with the mandate update webhook." + } + ], + "responses": { + "200": { + "description": "Webhook handled successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + } + }, + "required": ["success"] + }, + "example": { + "success": true + } + } + } + }, + "422": { + "description": "Unprocessable entity.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false + }, + "error": { + "type": "string" + } + }, + "required": ["success", "error"] + }, + "example": { + "success": false, + "error": "Unprocessable entity error message." + } + } + } + } + } + }, + "post": { + "summary": "Handle Mollie Subscription Mandate Update Webhook Notification (POST)", + "operationId": "handleMollieSubscriptionMandateUpdateWebhookPost", + "parameters": [ + { + "name": "swSubscriptionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the subscription associated with the mandate update webhook." + } + ], + "responses": { + "200": { + "description": "Webhook handled successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + } + }, + "required": ["success"] + }, + "example": { + "success": true + } + } + } + }, + "422": { + "description": "Unprocessable entity.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false + }, + "error": { + "type": "string" + } + }, + "required": ["success", "error"] + }, + "example": { + "success": false, + "error": "Unprocessable entity error message." + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/admin-api/webhook-subscription-action.json b/src/Resources/Schema/admin-api/webhook-subscription-action.json new file mode 100644 index 000000000..c7746e808 --- /dev/null +++ b/src/Resources/Schema/admin-api/webhook-subscription-action.json @@ -0,0 +1,167 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Subscription Webhook Endpoint", + "description": "Endpoint for handling Mollie subscription webhook notifications.", + "version": "1.0.0" + }, + "paths": { + "/api/mollie/webhook/subscription/{swSubscriptionId}": { + "get": { + "summary": "Handle Mollie Subscription Webhook Notification (GET)", + "operationId": "handleMollieSubscriptionWebhookGet", + "parameters": [ + { + "name": "swSubscriptionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the subscription associated with the webhook." + } + ], + "responses": { + "200": { + "description": "Webhook handled successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "message": { + "type": "string", + "example": "Optional success message." + } + }, + "required": ["success"] + }, + "example": { + "success": true + } + } + } + }, + "422": { + "description": "Unprocessable entity.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false + }, + "error": { + "type": "string" + } + }, + "required": ["success", "error"] + }, + "example": { + "success": false, + "error": "Unprocessable entity error message." + } + } + } + } + } + }, + "post": { + "summary": "Handle Mollie Subscription Webhook Notification (POST)", + "operationId": "handleMollieSubscriptionWebhookPost", + "parameters": [ + { + "name": "swSubscriptionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the subscription associated with the webhook." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the Mollie payment associated with the webhook." + }, + "subscriptionId": { + "type": "string", + "description": "The ID of the Mollie subscription associated with the webhook." + } + }, + "required": ["id", "subscriptionId"], + "example": { + "id": "tr_123456789", + "subscriptionId": "sub_987654321" + } + } + } + } + }, + "responses": { + "200": { + "description": "Webhook handled successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "message": { + "type": "string", + "example": "Optional success message." + } + }, + "required": ["success"] + }, + "example": { + "success": true + } + } + } + }, + "422": { + "description": "Unprocessable entity.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false + }, + "error": { + "type": "string" + } + }, + "required": ["success", "error"] + }, + "example": { + "success": false, + "error": "Unprocessable entity error message." + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/admin-api/webhook-subscription-renew.json b/src/Resources/Schema/admin-api/webhook-subscription-renew.json new file mode 100644 index 000000000..e5160a559 --- /dev/null +++ b/src/Resources/Schema/admin-api/webhook-subscription-renew.json @@ -0,0 +1,167 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Subscription Renew Webhook Endpoint", + "description": "Endpoint for handling Mollie subscription renewal webhook notifications.", + "version": "1.0.0" + }, + "paths": { + "/api/mollie/webhook/subscription/{swSubscriptionId}/renew": { + "get": { + "summary": "Handle Mollie Subscription Renewal Webhook Notification (GET)", + "operationId": "handleMollieSubscriptionRenewalWebhookGet", + "parameters": [ + { + "name": "swSubscriptionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the subscription associated with the renewal webhook." + } + ], + "responses": { + "200": { + "description": "Webhook handled successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "message": { + "type": "string", + "example": "Optional success message." + } + }, + "required": ["success"] + }, + "example": { + "success": true + } + } + } + }, + "422": { + "description": "Unprocessable entity.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false + }, + "error": { + "type": "string" + } + }, + "required": ["success", "error"] + }, + "example": { + "success": false, + "error": "Unprocessable entity error message." + } + } + } + } + } + }, + "post": { + "summary": "Handle Mollie Subscription Renewal Webhook Notification (POST)", + "operationId": "handleMollieSubscriptionRenewalWebhookPost", + "parameters": [ + { + "name": "swSubscriptionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the subscription associated with the renewal webhook." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the Mollie payment associated with the renewal webhook." + }, + "subscriptionId": { + "type": "string", + "description": "The ID of the Mollie subscription associated with the renewal webhook." + } + }, + "required": ["id", "subscriptionId"], + "example": { + "id": "tr_123456789", + "subscriptionId": "sub_987654321" + } + } + } + } + }, + "responses": { + "200": { + "description": "Webhook handled successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "message": { + "type": "string", + "example": "Optional success message." + } + }, + "required": ["success"] + }, + "example": { + "success": true + } + } + } + }, + "422": { + "description": "Unprocessable entity.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false + }, + "error": { + "type": "string" + } + }, + "required": ["success", "error"] + }, + "example": { + "success": false, + "error": "Unprocessable entity error message." + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/admin-api/weebhook-action.json b/src/Resources/Schema/admin-api/weebhook-action.json new file mode 100644 index 000000000..d20da001f --- /dev/null +++ b/src/Resources/Schema/admin-api/weebhook-action.json @@ -0,0 +1,74 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Webhook Endpoint", + "description": "Endpoint for handling Mollie webhook notifications.", + "version": "1.0.0" + }, + "paths": { + "/api/mollie/webhook/{swTransactionId}": { + "post": { + "summary": "Handle Mollie Webhook Notification", + "description": "Handles incoming webhook notifications from Mollie.", + "operationId": "handleMollieWebhook", + "parameters": [ + { + "name": "swTransactionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The transaction ID associated with the webhook." + } + ], + "responses": { + "200": { + "description": "Webhook handled successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + } + }, + "required": ["success"] + }, + "example": { + "success": true + } + } + } + }, + "400": { + "description": "Bad request.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false + }, + "error": { + "type": "string" + } + }, + "required": ["success", "error"] + }, + "example": { + "success": false, + "error": "Bad request error message." + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/apple-pay-add-product.json b/src/Resources/Schema/store-api/apple-pay-add-product.json new file mode 100644 index 000000000..ca80e0c7c --- /dev/null +++ b/src/Resources/Schema/store-api/apple-pay-add-product.json @@ -0,0 +1,71 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Apple Pay Add Product Endpoint", + "description": "Endpoint to add a product for Apple Pay integration.", + "version": "1.0.0" + }, + "paths": { + "/store-api/mollie/applepay/add-product": { + "post": { + "summary": "Add Product for Apple Pay", + "operationId": "addProductForApplePay", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "productId": { + "type": "string", + "description": "The ID of the product to add." + }, + "quantity": { + "type": "integer", + "description": "The quantity of the product to add." + } + }, + "required": ["productId", "quantity"], + "example": { + "productId": "12345", + "quantity": 1 + } + } + } + } + }, + "responses": { + "200": { + "description": "Shopware cart containing added product.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "cart": { + "type": "object", + "description": "Shopware cart object." + } + }, + "required": ["cart"] + }, + "example": { + "cart": { + "id": "cart_12345", + "items": [ + { + "productId": "12345", + "quantity": 1 + } + ] + } + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/apple-pay-create-payment-session.json b/src/Resources/Schema/store-api/apple-pay-create-payment-session.json new file mode 100644 index 000000000..ef748d7b8 --- /dev/null +++ b/src/Resources/Schema/store-api/apple-pay-create-payment-session.json @@ -0,0 +1,58 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Apple Pay Validate Create Payment Session Endpoint", + "description": "Endpoint to validate and create an Apple Pay payment session.", + "version": "1.0.0" + }, + "paths": { + "/store-api/mollie/applepay/validate/createPaymentSession": { + "post": { + "summary": "Validate and Create Apple Pay Payment Session", + "operationId": "validateAndCreateApplePayPaymentSession", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "validationUrl": { + "type": "string", + "description": "The validation URL for Apple Pay session creation." + } + }, + "required": ["validationUrl"], + "example": { + "validationUrl": "https://example.com/applepay/validation" + } + } + } + } + }, + "responses": { + "200": { + "description": "Apple Pay payment session ID response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The session ID for Apple Pay payment session." + } + }, + "required": ["value"], + "example": { + "value": "applepay_session_12345" + } + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/apple-pay-enabled.json b/src/Resources/Schema/store-api/apple-pay-enabled.json new file mode 100644 index 000000000..1db5a417d --- /dev/null +++ b/src/Resources/Schema/store-api/apple-pay-enabled.json @@ -0,0 +1,39 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Apple Pay Enabled Endpoint", + "description": "Endpoint to check if Apple Pay integration is enabled.", + "version": "1.0.0" + }, + "paths": { + "/store-api/mollie/applepay/enabled": { + "get": { + "summary": "Check Apple Pay Integration Enabled Status", + "operationId": "checkApplePayEnabled", + "responses": { + "200": { + "description": "Apple Pay integration status.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "example": true, + "description": "Indicates if Apple Pay integration is enabled." + } + }, + "required": ["enabled"] + }, + "example": { + "enabled": true + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/apple-pay-get-by-id.json b/src/Resources/Schema/store-api/apple-pay-get-by-id.json new file mode 100644 index 000000000..c072d1663 --- /dev/null +++ b/src/Resources/Schema/store-api/apple-pay-get-by-id.json @@ -0,0 +1,45 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Apple Pay ID Endpoint", + "description": "Endpoint to retrieve Apple Pay ID.", + "version": "1.0.0" + }, + "paths": { + "/store-api/mollie/applepay/id": { + "get": { + "summary": "Retrieve Apple Pay ID", + "operationId": "retrieveApplePayId", + "responses": { + "200": { + "description": "Apple Pay ID retrieval response.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates if the operation was successful." + }, + "id": { + "type": "string", + "example": "applepay_12345", + "description": "The Apple Pay ID." + } + }, + "required": ["success", "id"] + }, + "example": { + "success": true, + "id": "applepay_12345" + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/apple-pay-get-shipping-methods.json b/src/Resources/Schema/store-api/apple-pay-get-shipping-methods.json new file mode 100644 index 000000000..fee4050e4 --- /dev/null +++ b/src/Resources/Schema/store-api/apple-pay-get-shipping-methods.json @@ -0,0 +1,85 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Apple Pay Shipping Methods Endpoint", + "description": "Endpoint to retrieve shipping methods for Apple Pay integration.", + "version": "1.0.0" + }, + "paths": { + "/store-api/mollie/applepay/shipping-methods": { + "post": { + "summary": "Retrieve Apple Pay Shipping Methods", + "operationId": "retrieveApplePayShippingMethods", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "countryCode": { + "type": "string", + "description": "The country code for which shipping methods are requested." + } + }, + "required": ["countryCode"], + "example": { + "countryCode": "NL" + } + } + } + } + }, + "responses": { + "200": { + "description": "Array of shipping methods.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the shipping method." + }, + "name": { + "type": "string", + "description": "The name of the shipping method." + }, + "description": { + "type": "string", + "description": "The description of the shipping method." + }, + "price": { + "type": "number", + "format": "float", + "description": "The price of the shipping method." + } + }, + "required": ["id", "name", "price"] + } + }, + "example": [ + { + "id": "shipping_method_1", + "name": "Standard Shipping", + "description": "Delivers within 3-5 business days", + "price": 5.99 + }, + { + "id": "shipping_method_2", + "name": "Express Shipping", + "description": "Delivers within 1-2 business days", + "price": 12.99 + } + ] + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/apple-pay-pay.json b/src/Resources/Schema/store-api/apple-pay-pay.json new file mode 100644 index 000000000..bc2e54eb7 --- /dev/null +++ b/src/Resources/Schema/store-api/apple-pay-pay.json @@ -0,0 +1,140 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Apple Pay Pay Endpoint", + "description": "Endpoint to initiate a payment with Apple Pay integration.", + "version": "1.0.0" + }, + "paths": { + "/store-api/mollie/applepay/pay": { + "post": { + "summary": "Initiate Apple Pay Payment", + "operationId": "initiateApplePayPayment", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "The email of the customer." + }, + "firstname": { + "type": "string", + "description": "The firstname of the customer." + }, + "lastname": { + "type": "string", + "description": "The lastname of the customer." + }, + "street": { + "type": "string", + "description": "The street address of the customer." + }, + "city": { + "type": "string", + "description": "The city of the customer." + }, + "postalCode": { + "type": "string", + "description": "The postal code of the customer." + }, + "countryCode": { + "type": "string", + "description": "The country code of the customer." + }, + "paymentToken": { + "type": "string", + "description": "The payment token for Apple Pay." + }, + "finishUrl": { + "type": "string", + "description": "The URL to redirect after successful payment." + }, + "errorUrl": { + "type": "string", + "description": "The URL to redirect after payment error." + } + }, + "required": ["email", "firstname", "lastname", "street", "city", "postalCode", "countryCode", "paymentToken", "finishUrl", "errorUrl"], + "example": { + "email": "john.doe@example.com", + "firstname": "John", + "lastname": "Doe", + "street": "123 Apple Pay St", + "city": "Apple City", + "postalCode": "12345", + "countryCode": "US", + "paymentToken": "applepay_payment_token_123", + "finishUrl": "https://example.com/success", + "errorUrl": "https://example.com/error" + } + } + } + } + }, + "responses": { + "200": { + "description": "Success response with payment details.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates if the operation was successful." + }, + "url": { + "type": "string", + "description": "The URL to redirect to." + }, + "message": { + "type": "string", + "description": "Additional message (optional)." + } + }, + "required": ["success", "url"] + }, + "example": { + "success": true, + "url": "https://applepay.mollie.com/redirect", + "message": "Payment initiated successfully." + } + } + } + }, + "default": { + "description": "Error response indicating payment initiation failure.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false, + "description": "Indicates if the operation was successful." + }, + "message": { + "type": "string", + "description": "Error message." + } + }, + "required": ["success", "message"] + }, + "example": { + "success": false, + "message": "Failed to initiate payment." + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/apple-pay-restore-cart.json b/src/Resources/Schema/store-api/apple-pay-restore-cart.json new file mode 100644 index 000000000..f343e3e9f --- /dev/null +++ b/src/Resources/Schema/store-api/apple-pay-restore-cart.json @@ -0,0 +1,39 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Apple Pay Restore Cart Endpoint", + "description": "Endpoint to restore the cart after Apple Pay session.", + "version": "1.0.0" + }, + "paths": { + "/store-api/mollie/applepay/restore-cart": { + "post": { + "summary": "Restore Apple Pay Cart", + "operationId": "restoreApplePayCart", + "responses": { + "200": { + "description": "Success response indicating the cart was restored.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates if the cart was restored successfully." + } + }, + "required": ["success"] + }, + "example": { + "success": true + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/apple-pay-set-shipping-method.json b/src/Resources/Schema/store-api/apple-pay-set-shipping-method.json new file mode 100644 index 000000000..c198ae4d8 --- /dev/null +++ b/src/Resources/Schema/store-api/apple-pay-set-shipping-method.json @@ -0,0 +1,59 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Apple Pay Select Shipping Method Endpoint", + "description": "Endpoint to select a shipping method for Apple Pay integration.", + "version": "1.0.0" + }, + "paths": { + "/store-api/mollie/applepay/shipping-method": { + "post": { + "summary": "Select Apple Pay Shipping Method", + "operationId": "selectApplePayShippingMethod", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "identifier": { + "type": "string", + "description": "The identifier of the selected shipping method." + } + }, + "required": ["identifier"], + "example": { + "identifier": "shipping_method_1" + } + } + } + } + }, + "responses": { + "200": { + "description": "Success response indicating the shipping method was selected.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates if the operation was successful." + } + }, + "required": ["success"] + }, + "example": { + "success": true + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/credit-card-store-card-token.json b/src/Resources/Schema/store-api/credit-card-store-card-token.json new file mode 100644 index 000000000..07e14d60c --- /dev/null +++ b/src/Resources/Schema/store-api/credit-card-store-card-token.json @@ -0,0 +1,72 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Store Card Token Endpoint", + "description": "Endpoint to store the card token for a customer.", + "version": "1.0.0" + }, + "paths": { + "/mollie/components/store-card-token/{customerId}/{cardToken}": { + "get": { + "summary": "Store Card Token", + "operationId": "storeCardToken", + "parameters": [ + { + "name": "customerId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the customer." + }, + { + "name": "cardToken", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The card token." + } + ], + "responses": { + "200": { + "description": "Success response indicating the card token was stored.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates if the operation was successful." + }, + "customerId": { + "type": "string", + "description": "The ID of the customer." + }, + "result": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of serialized exceptions, if any." + } + }, + "required": ["success", "customerId", "result"] + }, + "example": { + "success": true, + "customerId": "customer123", + "result": ["Exception1", "Exception2"] + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/credit-card-store-mandate-id.json b/src/Resources/Schema/store-api/credit-card-store-mandate-id.json new file mode 100644 index 000000000..6840745c5 --- /dev/null +++ b/src/Resources/Schema/store-api/credit-card-store-mandate-id.json @@ -0,0 +1,72 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Store Mandate ID Endpoint", + "description": "Endpoint to store the mandate ID for a customer.", + "version": "1.0.0" + }, + "paths": { + "/mollie/components/store-mandate-id/{customerId}/{mandateId}": { + "get": { + "summary": "Store Mandate ID", + "operationId": "storeMandateId", + "parameters": [ + { + "name": "customerId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the customer." + }, + { + "name": "mandateId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the mandate." + } + ], + "responses": { + "200": { + "description": "Success response indicating the mandate ID was stored.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates if the operation was successful." + }, + "customerId": { + "type": "string", + "description": "The ID of the customer." + }, + "result": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of serialized exceptions, if any." + } + }, + "required": ["success", "customerId", "result"] + }, + "example": { + "success": true, + "customerId": "customer123", + "result": ["Exception1", "Exception2"] + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/creditr-card-revoke-mandate.json b/src/Resources/Schema/store-api/creditr-card-revoke-mandate.json new file mode 100644 index 000000000..82b6337d2 --- /dev/null +++ b/src/Resources/Schema/store-api/creditr-card-revoke-mandate.json @@ -0,0 +1,74 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Revoke Mandate Endpoint", + "description": "Endpoint to revoke the mandate for a customer.", + "version": "1.0.0" + }, + "paths": { + "/mollie/components/revoke-mandate/{customerId}/{mandateId}": { + "get": { + "summary": "Revoke Mandate", + "operationId": "revokeMandate", + "parameters": [ + { + "name": "customerId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the customer." + }, + { + "name": "mandateId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the mandate." + } + ], + "responses": { + "200": { + "description": "Success response indicating the mandate was revoked.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates if the operation was successful." + }, + "customerId": { + "type": "string", + "description": "The ID of the customer." + }, + "mandateId": { + "type": "string", + "description": "The ID of the mandate." + }, + "result": { + "type": "string", + "description": "The result of the operation, including any errors." + } + }, + "required": ["success", "customerId", "mandateId", "result"] + }, + "example": { + "success": true, + "customerId": "customer123", + "mandateId": "mandate456", + "result": "Error details or success message" + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/ideal-store-issuer.json b/src/Resources/Schema/store-api/ideal-store-issuer.json new file mode 100644 index 000000000..9b4ee4690 --- /dev/null +++ b/src/Resources/Schema/store-api/ideal-store-issuer.json @@ -0,0 +1,72 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Store iDEAL Issuer Endpoint", + "description": "Endpoint to store the iDEAL issuer for a customer.", + "version": "1.0.0" + }, + "paths": { + "/mollie/ideal/store-issuer/{customerId}/{issuerId}": { + "get": { + "summary": "Store iDEAL Issuer", + "operationId": "storeIdealIssuer", + "parameters": [ + { + "name": "customerId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the customer." + }, + { + "name": "issuerId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the iDEAL issuer." + } + ], + "responses": { + "200": { + "description": "Success response indicating the iDEAL issuer was stored.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates if the operation was successful." + }, + "customerId": { + "type": "string", + "description": "The ID of the customer." + }, + "result": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of serialized exceptions, if any." + } + }, + "required": ["success", "customerId", "result"] + }, + "example": { + "success": true, + "customerId": "customer123", + "result": ["Exception1", "Exception2"] + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/payment-failed.json b/src/Resources/Schema/store-api/payment-failed.json new file mode 100644 index 000000000..73cfe0b1f --- /dev/null +++ b/src/Resources/Schema/store-api/payment-failed.json @@ -0,0 +1,54 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Payment Failed Endpoint", + "description": "Endpoint to handle failed Mollie payments.", + "version": "1.0.0" + }, + "paths": { + "/mollie/payment/failed/{transactionId}": { + "get": { + "summary": "Handle Failed Payment (GET)", + "operationId": "handleFailedPaymentGet", + "parameters": [ + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the transaction." + } + ], + "responses": { + "200": { + "description": "Successfully handled the failed payment.", + "content": {} + } + } + }, + "post": { + "summary": "Handle Failed Payment (POST)", + "operationId": "handleFailedPaymentPost", + "parameters": [ + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the transaction." + } + ], + "responses": { + "200": { + "description": "Successfully handled the failed payment.", + "content": {} + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/pos-checkout.json b/src/Resources/Schema/store-api/pos-checkout.json new file mode 100644 index 000000000..23b3c46b6 --- /dev/null +++ b/src/Resources/Schema/store-api/pos-checkout.json @@ -0,0 +1,30 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "POS Checkout Endpoint", + "description": "Endpoint to render the POS checkout template.", + "version": "1.0.0" + }, + "paths": { + "/mollie/pos/checkout": { + "get": { + "summary": "Render POS Checkout", + "operationId": "renderPosCheckout", + "responses": { + "200": { + "description": "Successfully rendered the POS checkout template.", + "content": { + "text/html": { + "schema": { + "type": "string", + "description": "HTML content of the rendered template." + }, + "example": "

POS Checkout

" + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/pos-status-action.json b/src/Resources/Schema/store-api/pos-status-action.json new file mode 100644 index 000000000..bb0216b69 --- /dev/null +++ b/src/Resources/Schema/store-api/pos-status-action.json @@ -0,0 +1,68 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "POS Payment Status Endpoint", + "description": "Endpoint to check the status of a POS payment.", + "version": "1.0.0" + }, + "paths": { + "/mollie/pos/{orderId}/{molliePaymentId}/status": { + "get": { + "summary": "Check POS Payment Status", + "operationId": "checkPosPaymentStatus", + "parameters": [ + { + "name": "orderId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the order." + }, + { + "name": "molliePaymentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the Mollie payment." + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the POS payment status.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "ready": { + "type": "boolean", + "description": "Indicates if the payment is ready." + }, + "redirectUrl": { + "type": "string", + "description": "URL to redirect to after the payment is ready." + }, + "success": { + "type": "boolean", + "description": "Indicates if the payment was successful." + } + }, + "required": ["ready", "redirectUrl", "success"] + }, + "example": { + "ready": true, + "redirectUrl": "https://example.com/redirect", + "success": true + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/pos-store-terminal.json b/src/Resources/Schema/store-api/pos-store-terminal.json new file mode 100644 index 000000000..750b77bbc --- /dev/null +++ b/src/Resources/Schema/store-api/pos-store-terminal.json @@ -0,0 +1,72 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Store POS Terminal Endpoint", + "description": "Endpoint to store the POS terminal for a customer.", + "version": "1.0.0" + }, + "paths": { + "/mollie/pos/store-terminal/{customerId}/{terminalId}": { + "get": { + "summary": "Store POS Terminal", + "operationId": "storePosTerminal", + "parameters": [ + { + "name": "customerId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the customer." + }, + { + "name": "terminalId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the POS terminal." + } + ], + "responses": { + "200": { + "description": "Success response indicating the POS terminal was stored.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates if the operation was successful." + }, + "customerId": { + "type": "string", + "description": "The ID of the customer." + }, + "result": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of serialized exceptions, if any." + } + }, + "required": ["success", "customerId", "result"] + }, + "example": { + "success": true, + "customerId": "customer123", + "result": ["Exception1", "Exception2"] + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/retry-payment.json b/src/Resources/Schema/store-api/retry-payment.json new file mode 100644 index 000000000..3f2195b62 --- /dev/null +++ b/src/Resources/Schema/store-api/retry-payment.json @@ -0,0 +1,54 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Payment Retry Endpoint", + "description": "Endpoint to retry Mollie payments.", + "version": "1.0.0" + }, + "paths": { + "/mollie/payment/retry/{transactionId}": { + "get": { + "summary": "Retry Payment (GET)", + "operationId": "retryPaymentGet", + "parameters": [ + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the transaction." + } + ], + "responses": { + "200": { + "description": "Successfully retried the payment.", + "content": {} + } + } + }, + "post": { + "summary": "Retry Payment (POST)", + "operationId": "retryPaymentPost", + "parameters": [ + { + "name": "transactionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the transaction." + } + ], + "responses": { + "200": { + "description": "Successfully retried the payment.", + "content": {} + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/return.json b/src/Resources/Schema/store-api/return.json new file mode 100644 index 000000000..123bc12c5 --- /dev/null +++ b/src/Resources/Schema/store-api/return.json @@ -0,0 +1,54 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Payment Endpoint", + "description": "Endpoint to handle Mollie payments.", + "version": "1.0.0" + }, + "paths": { + "/mollie/payment/{swTransactionId}": { + "get": { + "summary": "Handle Mollie Payment (GET)", + "operationId": "handleMolliePaymentGet", + "parameters": [ + { + "name": "swTransactionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The Shopware transaction ID." + } + ], + "responses": { + "200": { + "description": "Mollie payment handled successfully.", + "content": {} + } + } + }, + "post": { + "summary": "Handle Mollie Payment (POST)", + "operationId": "handleMolliePaymentPost", + "parameters": [ + { + "name": "swTransactionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The Shopware transaction ID." + } + ], + "responses": { + "200": { + "description": "Mollie payment handled successfully.", + "content": {} + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/webhook-received.json b/src/Resources/Schema/store-api/webhook-received.json new file mode 100644 index 000000000..f965e99da --- /dev/null +++ b/src/Resources/Schema/store-api/webhook-received.json @@ -0,0 +1,128 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Webhook Endpoint", + "description": "Endpoint to handle Mollie webhooks.", + "version": "1.0.0" + }, + "paths": { + "/mollie/webhook/{swTransactionId}": { + "get": { + "summary": "Handle Mollie Webhook (GET)", + "operationId": "handleMollieWebhookGet", + "parameters": [ + { + "name": "swTransactionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The Shopware transaction ID." + } + ], + "responses": { + "200": { + "description": "Mollie webhook handled successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates if the webhook was successfully processed." + } + }, + "required": ["success"] + } + } + } + }, + "422": { + "description": "Failed to handle Mollie webhook.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false, + "description": "Indicates if the webhook processing failed." + }, + "error": { + "type": "string", + "example": "Invalid webhook data.", + "description": "Error message describing the reason for failure." + } + }, + "required": ["success", "error"] + } + } + } + } + } + }, + "post": { + "summary": "Handle Mollie Webhook (POST)", + "operationId": "handleMollieWebhookPost", + "parameters": [ + { + "name": "swTransactionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The Shopware transaction ID." + } + ], + "responses": { + "200": { + "description": "Mollie webhook handled successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates if the webhook was successfully processed." + } + }, + "required": ["success"] + } + } + } + }, + "422": { + "description": "Failed to handle Mollie webhook.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false, + "description": "Indicates if the webhook processing failed." + }, + "error": { + "type": "string", + "example": "Invalid webhook data.", + "description": "Error message describing the reason for failure." + } + }, + "required": ["success", "error"] + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/webhook-subscription-received.json b/src/Resources/Schema/store-api/webhook-subscription-received.json new file mode 100644 index 000000000..b591dd34c --- /dev/null +++ b/src/Resources/Schema/store-api/webhook-subscription-received.json @@ -0,0 +1,128 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Subscription Webhook Endpoint", + "description": "Endpoint to handle Mollie subscription webhooks.", + "version": "1.0.0" + }, + "paths": { + "/mollie/webhook/subscription/{swSubscriptionId}": { + "get": { + "summary": "Handle Mollie Subscription Webhook (GET)", + "operationId": "handleMollieSubscriptionWebhookGet", + "parameters": [ + { + "name": "swSubscriptionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The Shopware subscription ID." + } + ], + "responses": { + "200": { + "description": "Mollie subscription webhook handled successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates if the webhook was successfully processed." + } + }, + "required": ["success"] + } + } + } + }, + "422": { + "description": "Failed to handle Mollie subscription webhook.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false, + "description": "Indicates if the webhook processing failed." + }, + "error": { + "type": "string", + "example": "Invalid subscription webhook data.", + "description": "Error message describing the reason for failure." + } + }, + "required": ["success", "error"] + } + } + } + } + } + }, + "post": { + "summary": "Handle Mollie Subscription Webhook (POST)", + "operationId": "handleMollieSubscriptionWebhookPost", + "parameters": [ + { + "name": "swSubscriptionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The Shopware subscription ID." + } + ], + "responses": { + "200": { + "description": "Mollie subscription webhook handled successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates if the webhook was successfully processed." + } + }, + "required": ["success"] + } + } + } + }, + "422": { + "description": "Failed to handle Mollie subscription webhook.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false, + "description": "Indicates if the webhook processing failed." + }, + "error": { + "type": "string", + "example": "Invalid subscription webhook data.", + "description": "Error message describing the reason for failure." + } + }, + "required": ["success", "error"] + } + } + } + } + } + } + } + } +}