From 4cabfb37ea772e1f1c8201b0122293c2b8e3f9a4 Mon Sep 17 00:00:00 2001 From: Marvin Muxfeld Date: Thu, 20 Jun 2024 11:57:16 +0200 Subject: [PATCH 1/4] 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"] + } + } + } + } + } + } + } + } +} From f3d5a6233258c04dd8ad834ea0bba1e2e305f06f Mon Sep 17 00:00:00 2001 From: Marvin Muxfeld Date: Mon, 24 Jun 2024 14:26:28 +0200 Subject: [PATCH 2/4] PISHPS-282: removed /api/ and /store-api from routes, documented credit-card endpoints and renamed directory --- .../create-support-request.json | 2 +- .../order-payment-url.json | 2 +- .../payment-method-update.json | 2 +- .../{admin-api => AdminApi}/refund-list.json | 2 +- .../refund-manager-data.json | 2 +- .../refund-order-get.json | 2 +- .../refund-order-post.json | 2 +- .../{admin-api => AdminApi}/refund-total.json | 2 +- .../ship-order-operational.json | 2 +- .../shipping-status.json | 2 +- .../shipping-total.json | 2 +- .../subscription-cancel.json | 2 +- .../subscription-pause.json | 2 +- .../subscription-resume.json | 2 +- .../subscription-skip.json | 2 +- .../webhook-mandate-update.json | 2 +- .../webhook-subscription-action.json | 2 +- .../webhook-subscription-renew.json | 2 +- .../weebhook-action.json | 2 +- .../apple-pay-add-product.json | 2 +- .../apple-pay-create-payment-session.json | 2 +- .../apple-pay-enabled.json | 2 +- .../apple-pay-get-by-id.json | 2 +- .../apple-pay-get-shipping-methods.json | 2 +- .../apple-pay-pay.json | 2 +- .../apple-pay-restore-cart.json | 2 +- .../apple-pay-set-shipping-method.json | 2 +- .../StoreApi/credit-card-get-mandates.json | 109 ++++++++++++++++++ .../StoreApi/credit-card-revoke-mandate.json | 56 +++++++++ .../StoreApi/credit-card-save-card-token.json | 73 ++++++++++++ .../StoreApi/credit-card-save-mandate-id.json | 56 +++++++++ .../{store-api => StoreApi}/pos-checkout.json | 0 .../pos-status-action.json | 0 .../pos-store-terminal.json | 0 .../retry-payment.json | 0 .../{store-api => StoreApi}/return.json | 0 .../webhook-received.json | 0 .../webhook-subscription-received.json | 0 .../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 --------- 43 files changed, 321 insertions(+), 371 deletions(-) rename src/Resources/Schema/{admin-api => AdminApi}/create-support-request.json (98%) rename src/Resources/Schema/{admin-api => AdminApi}/order-payment-url.json (96%) rename src/Resources/Schema/{admin-api => AdminApi}/payment-method-update.json (96%) rename src/Resources/Schema/{admin-api => AdminApi}/refund-list.json (98%) rename src/Resources/Schema/{admin-api => AdminApi}/refund-manager-data.json (99%) rename src/Resources/Schema/{admin-api => AdminApi}/refund-order-get.json (98%) rename src/Resources/Schema/{admin-api => AdminApi}/refund-order-post.json (98%) rename src/Resources/Schema/{admin-api => AdminApi}/refund-total.json (98%) rename src/Resources/Schema/{admin-api => AdminApi}/ship-order-operational.json (99%) rename src/Resources/Schema/{admin-api => AdminApi}/shipping-status.json (98%) rename src/Resources/Schema/{admin-api => AdminApi}/shipping-total.json (98%) rename src/Resources/Schema/{admin-api => AdminApi}/subscription-cancel.json (97%) rename src/Resources/Schema/{admin-api => AdminApi}/subscription-pause.json (97%) rename src/Resources/Schema/{admin-api => AdminApi}/subscription-resume.json (97%) rename src/Resources/Schema/{admin-api => AdminApi}/subscription-skip.json (98%) rename src/Resources/Schema/{admin-api => AdminApi}/webhook-mandate-update.json (98%) rename src/Resources/Schema/{admin-api => AdminApi}/webhook-subscription-action.json (98%) rename src/Resources/Schema/{admin-api => AdminApi}/webhook-subscription-renew.json (98%) rename src/Resources/Schema/{admin-api => AdminApi}/weebhook-action.json (97%) rename src/Resources/Schema/{store-api => StoreApi}/apple-pay-add-product.json (97%) rename src/Resources/Schema/{store-api => StoreApi}/apple-pay-create-payment-session.json (96%) rename src/Resources/Schema/{store-api => StoreApi}/apple-pay-enabled.json (95%) rename src/Resources/Schema/{store-api => StoreApi}/apple-pay-get-by-id.json (96%) rename src/Resources/Schema/{store-api => StoreApi}/apple-pay-get-shipping-methods.json (98%) rename src/Resources/Schema/{store-api => StoreApi}/apple-pay-pay.json (99%) rename src/Resources/Schema/{store-api => StoreApi}/apple-pay-restore-cart.json (95%) rename src/Resources/Schema/{store-api => StoreApi}/apple-pay-set-shipping-method.json (97%) create mode 100644 src/Resources/Schema/StoreApi/credit-card-get-mandates.json create mode 100644 src/Resources/Schema/StoreApi/credit-card-revoke-mandate.json create mode 100644 src/Resources/Schema/StoreApi/credit-card-save-card-token.json create mode 100644 src/Resources/Schema/StoreApi/credit-card-save-mandate-id.json rename src/Resources/Schema/{store-api => StoreApi}/pos-checkout.json (100%) rename src/Resources/Schema/{store-api => StoreApi}/pos-status-action.json (100%) rename src/Resources/Schema/{store-api => StoreApi}/pos-store-terminal.json (100%) rename src/Resources/Schema/{store-api => StoreApi}/retry-payment.json (100%) rename src/Resources/Schema/{store-api => StoreApi}/return.json (100%) rename src/Resources/Schema/{store-api => StoreApi}/webhook-received.json (100%) rename src/Resources/Schema/{store-api => StoreApi}/webhook-subscription-received.json (100%) delete mode 100644 src/Resources/Schema/store-api/credit-card-store-card-token.json delete mode 100644 src/Resources/Schema/store-api/credit-card-store-mandate-id.json delete mode 100644 src/Resources/Schema/store-api/creditr-card-revoke-mandate.json delete mode 100644 src/Resources/Schema/store-api/ideal-store-issuer.json delete mode 100644 src/Resources/Schema/store-api/payment-failed.json diff --git a/src/Resources/Schema/admin-api/create-support-request.json b/src/Resources/Schema/AdminApi/create-support-request.json similarity index 98% rename from src/Resources/Schema/admin-api/create-support-request.json rename to src/Resources/Schema/AdminApi/create-support-request.json index 0e3c62418..e207d4662 100644 --- a/src/Resources/Schema/admin-api/create-support-request.json +++ b/src/Resources/Schema/AdminApi/create-support-request.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/support/request": { + "/_action/mollie/support/request": { "post": { "summary": "Submit Support Request to Mollie", "description": "Submits a support request to Mollie.", diff --git a/src/Resources/Schema/admin-api/order-payment-url.json b/src/Resources/Schema/AdminApi/order-payment-url.json similarity index 96% rename from src/Resources/Schema/admin-api/order-payment-url.json rename to src/Resources/Schema/AdminApi/order-payment-url.json index 6e3514b25..87928fa96 100644 --- a/src/Resources/Schema/admin-api/order-payment-url.json +++ b/src/Resources/Schema/AdminApi/order-payment-url.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/order/payment-url": { + "/_action/mollie/order/payment-url": { "post": { "summary": "Generate Mollie Order Payment URL", "description": "Creates a payment URL for a Mollie order.", diff --git a/src/Resources/Schema/admin-api/payment-method-update.json b/src/Resources/Schema/AdminApi/payment-method-update.json similarity index 96% rename from src/Resources/Schema/admin-api/payment-method-update.json rename to src/Resources/Schema/AdminApi/payment-method-update.json index bf0abf253..842ef37eb 100644 --- a/src/Resources/Schema/admin-api/payment-method-update.json +++ b/src/Resources/Schema/AdminApi/payment-method-update.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/payment-method/update-methods": { + "/_action/mollie/payment-method/update-methods": { "get": { "summary": "Update Mollie Payment Methods", "description": "Updates the payment methods for Mollie.", diff --git a/src/Resources/Schema/admin-api/refund-list.json b/src/Resources/Schema/AdminApi/refund-list.json similarity index 98% rename from src/Resources/Schema/admin-api/refund-list.json rename to src/Resources/Schema/AdminApi/refund-list.json index 74d55dfc0..6b042069d 100644 --- a/src/Resources/Schema/admin-api/refund-list.json +++ b/src/Resources/Schema/AdminApi/refund-list.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/refund/list": { + "/_action/mollie/refund/list": { "post": { "summary": "List Refund Items for Mollie Order", "description": "Retrieves a list of refund items for a Mollie order.", diff --git a/src/Resources/Schema/admin-api/refund-manager-data.json b/src/Resources/Schema/AdminApi/refund-manager-data.json similarity index 99% rename from src/Resources/Schema/admin-api/refund-manager-data.json rename to src/Resources/Schema/AdminApi/refund-manager-data.json index a683ca367..0fbc45c01 100644 --- a/src/Resources/Schema/admin-api/refund-manager-data.json +++ b/src/Resources/Schema/AdminApi/refund-manager-data.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/refund-manager/data": { + "/_action/mollie/refund-manager/data": { "post": { "summary": "Get Refund Manager Data", "description": "Retrieves refund manager data for a Mollie order.", diff --git a/src/Resources/Schema/admin-api/refund-order-get.json b/src/Resources/Schema/AdminApi/refund-order-get.json similarity index 98% rename from src/Resources/Schema/admin-api/refund-order-get.json rename to src/Resources/Schema/AdminApi/refund-order-get.json index 154124670..2104d0161 100644 --- a/src/Resources/Schema/admin-api/refund-order-get.json +++ b/src/Resources/Schema/AdminApi/refund-order-get.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/mollie/refund/order": { + "/mollie/refund/order": { "post": { "summary": "Process Refund for Mollie Order", "description": "Processes a refund for a Mollie order.", diff --git a/src/Resources/Schema/admin-api/refund-order-post.json b/src/Resources/Schema/AdminApi/refund-order-post.json similarity index 98% rename from src/Resources/Schema/admin-api/refund-order-post.json rename to src/Resources/Schema/AdminApi/refund-order-post.json index 2292a4dfb..9be6966cb 100644 --- a/src/Resources/Schema/admin-api/refund-order-post.json +++ b/src/Resources/Schema/AdminApi/refund-order-post.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/refund": { + "/_action/mollie/refund": { "post": { "summary": "Process Refund for Mollie Order", "description": "Processes a refund for a Mollie order.", diff --git a/src/Resources/Schema/admin-api/refund-total.json b/src/Resources/Schema/AdminApi/refund-total.json similarity index 98% rename from src/Resources/Schema/admin-api/refund-total.json rename to src/Resources/Schema/AdminApi/refund-total.json index e5c13cf50..3f149af2e 100644 --- a/src/Resources/Schema/admin-api/refund-total.json +++ b/src/Resources/Schema/AdminApi/refund-total.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/refund/total": { + "/_action/mollie/refund/total": { "post": { "summary": "Get Total Refund Information", "description": "Retrieves the total refund information for a Mollie order.", diff --git a/src/Resources/Schema/admin-api/ship-order-operational.json b/src/Resources/Schema/AdminApi/ship-order-operational.json similarity index 99% rename from src/Resources/Schema/admin-api/ship-order-operational.json rename to src/Resources/Schema/AdminApi/ship-order-operational.json index eb9630fd7..521728467 100644 --- a/src/Resources/Schema/admin-api/ship-order-operational.json +++ b/src/Resources/Schema/AdminApi/ship-order-operational.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/mollie/ship/order": { + "/mollie/ship/order": { "post": { "summary": "Ship Order via Mollie", "description": "Ships an order via Mollie with tracking information.", diff --git a/src/Resources/Schema/admin-api/shipping-status.json b/src/Resources/Schema/AdminApi/shipping-status.json similarity index 98% rename from src/Resources/Schema/admin-api/shipping-status.json rename to src/Resources/Schema/AdminApi/shipping-status.json index e0ebace1a..8648a0f77 100644 --- a/src/Resources/Schema/admin-api/shipping-status.json +++ b/src/Resources/Schema/AdminApi/shipping-status.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/ship/status": { + "/_action/mollie/ship/status": { "post": { "summary": "Retrieve Mollie Order Shipping Status", "description": "Retrieves the shipping status for a Mollie order.", diff --git a/src/Resources/Schema/admin-api/shipping-total.json b/src/Resources/Schema/AdminApi/shipping-total.json similarity index 98% rename from src/Resources/Schema/admin-api/shipping-total.json rename to src/Resources/Schema/AdminApi/shipping-total.json index 749163ed8..fa79f801d 100644 --- a/src/Resources/Schema/admin-api/shipping-total.json +++ b/src/Resources/Schema/AdminApi/shipping-total.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/ship/total": { + "/_action/mollie/ship/total": { "post": { "summary": "Retrieve Total Shipping Information", "description": "Retrieves the total shipping information for a Mollie order.", diff --git a/src/Resources/Schema/admin-api/subscription-cancel.json b/src/Resources/Schema/AdminApi/subscription-cancel.json similarity index 97% rename from src/Resources/Schema/admin-api/subscription-cancel.json rename to src/Resources/Schema/AdminApi/subscription-cancel.json index d606df49f..7bcbbe327 100644 --- a/src/Resources/Schema/admin-api/subscription-cancel.json +++ b/src/Resources/Schema/AdminApi/subscription-cancel.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/subscriptions/cancel": { + "/_action/mollie/subscriptions/cancel": { "post": { "summary": "Cancel Mollie Subscription", "description": "Cancels a subscription in Mollie.", diff --git a/src/Resources/Schema/admin-api/subscription-pause.json b/src/Resources/Schema/AdminApi/subscription-pause.json similarity index 97% rename from src/Resources/Schema/admin-api/subscription-pause.json rename to src/Resources/Schema/AdminApi/subscription-pause.json index e204776fc..11c82964f 100644 --- a/src/Resources/Schema/admin-api/subscription-pause.json +++ b/src/Resources/Schema/AdminApi/subscription-pause.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/subscriptions/pause": { + "/_action/mollie/subscriptions/pause": { "post": { "summary": "Pause Mollie Subscription", "description": "Pauses a subscription in Mollie.", diff --git a/src/Resources/Schema/admin-api/subscription-resume.json b/src/Resources/Schema/AdminApi/subscription-resume.json similarity index 97% rename from src/Resources/Schema/admin-api/subscription-resume.json rename to src/Resources/Schema/AdminApi/subscription-resume.json index 6e2b7f74a..48db5e6dc 100644 --- a/src/Resources/Schema/admin-api/subscription-resume.json +++ b/src/Resources/Schema/AdminApi/subscription-resume.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/subscriptions/resume": { + "/_action/mollie/subscriptions/resume": { "post": { "summary": "Resume Mollie Subscription", "description": "Resumes a paused subscription in Mollie.", diff --git a/src/Resources/Schema/admin-api/subscription-skip.json b/src/Resources/Schema/AdminApi/subscription-skip.json similarity index 98% rename from src/Resources/Schema/admin-api/subscription-skip.json rename to src/Resources/Schema/AdminApi/subscription-skip.json index c3ce1284d..ec0f7b22e 100644 --- a/src/Resources/Schema/admin-api/subscription-skip.json +++ b/src/Resources/Schema/AdminApi/subscription-skip.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/_action/mollie/subscriptions/skip": { + "/_action/mollie/subscriptions/skip": { "post": { "summary": "Skip Mollie Subscription", "description": "Skips the next scheduled payment for a subscription in Mollie.", diff --git a/src/Resources/Schema/admin-api/webhook-mandate-update.json b/src/Resources/Schema/AdminApi/webhook-mandate-update.json similarity index 98% rename from src/Resources/Schema/admin-api/webhook-mandate-update.json rename to src/Resources/Schema/AdminApi/webhook-mandate-update.json index 993b4b374..987e78bee 100644 --- a/src/Resources/Schema/admin-api/webhook-mandate-update.json +++ b/src/Resources/Schema/AdminApi/webhook-mandate-update.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/mollie/webhook/subscription/{swSubscriptionId}/mandate/update": { + "/mollie/webhook/subscription/{swSubscriptionId}/mandate/update": { "get": { "summary": "Handle Mollie Subscription Mandate Update Webhook Notification (GET)", "operationId": "handleMollieSubscriptionMandateUpdateWebhookGet", diff --git a/src/Resources/Schema/admin-api/webhook-subscription-action.json b/src/Resources/Schema/AdminApi/webhook-subscription-action.json similarity index 98% rename from src/Resources/Schema/admin-api/webhook-subscription-action.json rename to src/Resources/Schema/AdminApi/webhook-subscription-action.json index c7746e808..047f8ca1a 100644 --- a/src/Resources/Schema/admin-api/webhook-subscription-action.json +++ b/src/Resources/Schema/AdminApi/webhook-subscription-action.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/mollie/webhook/subscription/{swSubscriptionId}": { + "/mollie/webhook/subscription/{swSubscriptionId}": { "get": { "summary": "Handle Mollie Subscription Webhook Notification (GET)", "operationId": "handleMollieSubscriptionWebhookGet", diff --git a/src/Resources/Schema/admin-api/webhook-subscription-renew.json b/src/Resources/Schema/AdminApi/webhook-subscription-renew.json similarity index 98% rename from src/Resources/Schema/admin-api/webhook-subscription-renew.json rename to src/Resources/Schema/AdminApi/webhook-subscription-renew.json index e5160a559..78ea7744a 100644 --- a/src/Resources/Schema/admin-api/webhook-subscription-renew.json +++ b/src/Resources/Schema/AdminApi/webhook-subscription-renew.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/mollie/webhook/subscription/{swSubscriptionId}/renew": { + "/mollie/webhook/subscription/{swSubscriptionId}/renew": { "get": { "summary": "Handle Mollie Subscription Renewal Webhook Notification (GET)", "operationId": "handleMollieSubscriptionRenewalWebhookGet", diff --git a/src/Resources/Schema/admin-api/weebhook-action.json b/src/Resources/Schema/AdminApi/weebhook-action.json similarity index 97% rename from src/Resources/Schema/admin-api/weebhook-action.json rename to src/Resources/Schema/AdminApi/weebhook-action.json index d20da001f..ec828ad05 100644 --- a/src/Resources/Schema/admin-api/weebhook-action.json +++ b/src/Resources/Schema/AdminApi/weebhook-action.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/api/mollie/webhook/{swTransactionId}": { + "/mollie/webhook/{swTransactionId}": { "post": { "summary": "Handle Mollie Webhook Notification", "description": "Handles incoming webhook notifications from Mollie.", diff --git a/src/Resources/Schema/store-api/apple-pay-add-product.json b/src/Resources/Schema/StoreApi/apple-pay-add-product.json similarity index 97% rename from src/Resources/Schema/store-api/apple-pay-add-product.json rename to src/Resources/Schema/StoreApi/apple-pay-add-product.json index ca80e0c7c..635981ed8 100644 --- a/src/Resources/Schema/store-api/apple-pay-add-product.json +++ b/src/Resources/Schema/StoreApi/apple-pay-add-product.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/store-api/mollie/applepay/add-product": { + "/mollie/applepay/add-product": { "post": { "summary": "Add Product for Apple Pay", "operationId": "addProductForApplePay", diff --git a/src/Resources/Schema/store-api/apple-pay-create-payment-session.json b/src/Resources/Schema/StoreApi/apple-pay-create-payment-session.json similarity index 96% rename from src/Resources/Schema/store-api/apple-pay-create-payment-session.json rename to src/Resources/Schema/StoreApi/apple-pay-create-payment-session.json index ef748d7b8..12c653209 100644 --- a/src/Resources/Schema/store-api/apple-pay-create-payment-session.json +++ b/src/Resources/Schema/StoreApi/apple-pay-create-payment-session.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/store-api/mollie/applepay/validate/createPaymentSession": { + "/mollie/applepay/validate/createPaymentSession": { "post": { "summary": "Validate and Create Apple Pay Payment Session", "operationId": "validateAndCreateApplePayPaymentSession", diff --git a/src/Resources/Schema/store-api/apple-pay-enabled.json b/src/Resources/Schema/StoreApi/apple-pay-enabled.json similarity index 95% rename from src/Resources/Schema/store-api/apple-pay-enabled.json rename to src/Resources/Schema/StoreApi/apple-pay-enabled.json index 1db5a417d..baad29697 100644 --- a/src/Resources/Schema/store-api/apple-pay-enabled.json +++ b/src/Resources/Schema/StoreApi/apple-pay-enabled.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/store-api/mollie/applepay/enabled": { + "/mollie/applepay/enabled": { "get": { "summary": "Check Apple Pay Integration Enabled Status", "operationId": "checkApplePayEnabled", diff --git a/src/Resources/Schema/store-api/apple-pay-get-by-id.json b/src/Resources/Schema/StoreApi/apple-pay-get-by-id.json similarity index 96% rename from src/Resources/Schema/store-api/apple-pay-get-by-id.json rename to src/Resources/Schema/StoreApi/apple-pay-get-by-id.json index c072d1663..1ced331b3 100644 --- a/src/Resources/Schema/store-api/apple-pay-get-by-id.json +++ b/src/Resources/Schema/StoreApi/apple-pay-get-by-id.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/store-api/mollie/applepay/id": { + "/mollie/applepay/id": { "get": { "summary": "Retrieve Apple Pay ID", "operationId": "retrieveApplePayId", diff --git a/src/Resources/Schema/store-api/apple-pay-get-shipping-methods.json b/src/Resources/Schema/StoreApi/apple-pay-get-shipping-methods.json similarity index 98% rename from src/Resources/Schema/store-api/apple-pay-get-shipping-methods.json rename to src/Resources/Schema/StoreApi/apple-pay-get-shipping-methods.json index fee4050e4..c06af0694 100644 --- a/src/Resources/Schema/store-api/apple-pay-get-shipping-methods.json +++ b/src/Resources/Schema/StoreApi/apple-pay-get-shipping-methods.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/store-api/mollie/applepay/shipping-methods": { + "/mollie/applepay/shipping-methods": { "post": { "summary": "Retrieve Apple Pay Shipping Methods", "operationId": "retrieveApplePayShippingMethods", diff --git a/src/Resources/Schema/store-api/apple-pay-pay.json b/src/Resources/Schema/StoreApi/apple-pay-pay.json similarity index 99% rename from src/Resources/Schema/store-api/apple-pay-pay.json rename to src/Resources/Schema/StoreApi/apple-pay-pay.json index bc2e54eb7..d8d229676 100644 --- a/src/Resources/Schema/store-api/apple-pay-pay.json +++ b/src/Resources/Schema/StoreApi/apple-pay-pay.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/store-api/mollie/applepay/pay": { + "/mollie/applepay/pay": { "post": { "summary": "Initiate Apple Pay Payment", "operationId": "initiateApplePayPayment", diff --git a/src/Resources/Schema/store-api/apple-pay-restore-cart.json b/src/Resources/Schema/StoreApi/apple-pay-restore-cart.json similarity index 95% rename from src/Resources/Schema/store-api/apple-pay-restore-cart.json rename to src/Resources/Schema/StoreApi/apple-pay-restore-cart.json index f343e3e9f..650e073ae 100644 --- a/src/Resources/Schema/store-api/apple-pay-restore-cart.json +++ b/src/Resources/Schema/StoreApi/apple-pay-restore-cart.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/store-api/mollie/applepay/restore-cart": { + "/mollie/applepay/restore-cart": { "post": { "summary": "Restore Apple Pay Cart", "operationId": "restoreApplePayCart", diff --git a/src/Resources/Schema/store-api/apple-pay-set-shipping-method.json b/src/Resources/Schema/StoreApi/apple-pay-set-shipping-method.json similarity index 97% rename from src/Resources/Schema/store-api/apple-pay-set-shipping-method.json rename to src/Resources/Schema/StoreApi/apple-pay-set-shipping-method.json index c198ae4d8..866c8f653 100644 --- a/src/Resources/Schema/store-api/apple-pay-set-shipping-method.json +++ b/src/Resources/Schema/StoreApi/apple-pay-set-shipping-method.json @@ -6,7 +6,7 @@ "version": "1.0.0" }, "paths": { - "/store-api/mollie/applepay/shipping-method": { + "/mollie/applepay/shipping-method": { "post": { "summary": "Select Apple Pay Shipping Method", "operationId": "selectApplePayShippingMethod", diff --git a/src/Resources/Schema/StoreApi/credit-card-get-mandates.json b/src/Resources/Schema/StoreApi/credit-card-get-mandates.json new file mode 100644 index 000000000..2085d2978 --- /dev/null +++ b/src/Resources/Schema/StoreApi/credit-card-get-mandates.json @@ -0,0 +1,109 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie API", + "description": "API for Mollie payment integration.", + "version": "1.0.0" + }, + "paths": { + "/mollie/mandates/{customerId}": { + "get": { + "summary": "Get Customer Mandates", + "description": "Retrieves a list of mandates for the specified customer.", + "operationId": "getCustomerMandates", + "parameters": [ + { + "name": "customerId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the customer whose mandates are being retrieved." + } + ], + "responses": { + "200": { + "description": "A list of customer mandates.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/mandate" + } + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "CreditCardDetailStruct": { + "type": "object", + "properties": { + "cardNumber": { + "type": "string" + }, + "expiryDate": { + "type": "string" + } + } + }, + "mandate": { + "type": "object", + "properties": { + "resource": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "mode": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "nullable": true + }, + "method": { + "type": "string", + "nullable": true + }, + "details": { + "$ref": "#/components/schemas/CreditCardDetailStruct" + }, + "customerId": { + "type": "string", + "nullable": true + }, + "mandateReference": { + "type": "string", + "nullable": true + }, + "signatureDate": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "nullable": true + }, + "beingUsedForSubscription": { + "type": "boolean" + } + }, + "required": [ + "details", + "beingUsedForSubscription" + ] + } + } + } +} diff --git a/src/Resources/Schema/StoreApi/credit-card-revoke-mandate.json b/src/Resources/Schema/StoreApi/credit-card-revoke-mandate.json new file mode 100644 index 000000000..6b34d3216 --- /dev/null +++ b/src/Resources/Schema/StoreApi/credit-card-revoke-mandate.json @@ -0,0 +1,56 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Mandate Revoke Endpoint", + "description": "Endpoint to revoke a Mollie mandate.", + "version": "1.0.0" + }, + "paths": { + "/mollie/mandate/revoke/{customerId}/{mandateId}": { + "post": { + "summary": "Revoke Mollie Mandate", + "operationId": "revokeMollieMandate", + "parameters": [ + { + "name": "customerId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The customer ID." + }, + { + "name": "mandateId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The mandate ID." + } + ], + "responses": { + "200": { + "description": "Response indicating the mandate revocation was successful.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates if revoking the mandate was successful." + } + }, + "required": ["success"] + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/StoreApi/credit-card-save-card-token.json b/src/Resources/Schema/StoreApi/credit-card-save-card-token.json new file mode 100644 index 000000000..d493560ca --- /dev/null +++ b/src/Resources/Schema/StoreApi/credit-card-save-card-token.json @@ -0,0 +1,73 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Credit Card Store Token Endpoint", + "description": "Endpoint to store a Mollie credit card token.", + "version": "1.0.0" + }, + "paths": { + "/mollie/creditcard/store-token/{customerId}/{cardToken}": { + "post": { + "summary": "Store Mollie Credit Card Token", + "operationId": "storeMollieCreditCardToken", + "parameters": [ + { + "name": "customerId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The customer ID." + }, + { + "name": "cardToken", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The credit card token." + } + ], + "requestBody": { + "description": "Optional body with a boolean key `shouldSaveCardDetail`.", + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "shouldSaveCardDetail": { + "type": "boolean", + "description": "Indicates whether to save card details." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Response indicating success or failure.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates if storing the token was successful." + } + }, + "required": ["success"] + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/StoreApi/credit-card-save-mandate-id.json b/src/Resources/Schema/StoreApi/credit-card-save-mandate-id.json new file mode 100644 index 000000000..8fac0967d --- /dev/null +++ b/src/Resources/Schema/StoreApi/credit-card-save-mandate-id.json @@ -0,0 +1,56 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Mollie Credit Card Store Mandate ID Endpoint", + "description": "Endpoint to store a Mollie credit card mandate ID.", + "version": "1.0.0" + }, + "paths": { + "/mollie/creditcard/store-mandate-id/{customerId}/{mandateId}": { + "post": { + "summary": "Store Mollie Credit Card Mandate ID", + "operationId": "storeMollieCreditCardMandateId", + "parameters": [ + { + "name": "customerId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The customer ID." + }, + { + "name": "mandateId", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The mandate ID." + } + ], + "responses": { + "200": { + "description": "Response indicating success or failure.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true, + "description": "Indicates if storing the mandate ID was successful." + } + }, + "required": ["success"] + } + } + } + } + } + } + } + } +} diff --git a/src/Resources/Schema/store-api/pos-checkout.json b/src/Resources/Schema/StoreApi/pos-checkout.json similarity index 100% rename from src/Resources/Schema/store-api/pos-checkout.json rename to src/Resources/Schema/StoreApi/pos-checkout.json diff --git a/src/Resources/Schema/store-api/pos-status-action.json b/src/Resources/Schema/StoreApi/pos-status-action.json similarity index 100% rename from src/Resources/Schema/store-api/pos-status-action.json rename to src/Resources/Schema/StoreApi/pos-status-action.json diff --git a/src/Resources/Schema/store-api/pos-store-terminal.json b/src/Resources/Schema/StoreApi/pos-store-terminal.json similarity index 100% rename from src/Resources/Schema/store-api/pos-store-terminal.json rename to src/Resources/Schema/StoreApi/pos-store-terminal.json diff --git a/src/Resources/Schema/store-api/retry-payment.json b/src/Resources/Schema/StoreApi/retry-payment.json similarity index 100% rename from src/Resources/Schema/store-api/retry-payment.json rename to src/Resources/Schema/StoreApi/retry-payment.json diff --git a/src/Resources/Schema/store-api/return.json b/src/Resources/Schema/StoreApi/return.json similarity index 100% rename from src/Resources/Schema/store-api/return.json rename to src/Resources/Schema/StoreApi/return.json diff --git a/src/Resources/Schema/store-api/webhook-received.json b/src/Resources/Schema/StoreApi/webhook-received.json similarity index 100% rename from src/Resources/Schema/store-api/webhook-received.json rename to src/Resources/Schema/StoreApi/webhook-received.json diff --git a/src/Resources/Schema/store-api/webhook-subscription-received.json b/src/Resources/Schema/StoreApi/webhook-subscription-received.json similarity index 100% rename from src/Resources/Schema/store-api/webhook-subscription-received.json rename to src/Resources/Schema/StoreApi/webhook-subscription-received.json 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 deleted file mode 100644 index 07e14d60c..000000000 --- a/src/Resources/Schema/store-api/credit-card-store-card-token.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "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 deleted file mode 100644 index 6840745c5..000000000 --- a/src/Resources/Schema/store-api/credit-card-store-mandate-id.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "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 deleted file mode 100644 index 82b6337d2..000000000 --- a/src/Resources/Schema/store-api/creditr-card-revoke-mandate.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "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 deleted file mode 100644 index 9b4ee4690..000000000 --- a/src/Resources/Schema/store-api/ideal-store-issuer.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "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 deleted file mode 100644 index 73cfe0b1f..000000000 --- a/src/Resources/Schema/store-api/payment-failed.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "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": {} - } - } - } - } - } -} From 98c5314ed28920f024c01a1b80292d6a2934699e Mon Sep 17 00:00:00 2001 From: Marvin Muxfeld Date: Tue, 25 Jun 2024 08:40:40 +0200 Subject: [PATCH 3/4] PISHPS-282: removed duplicated openapi v3 json files --- .../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 deletions(-) delete mode 100644 src/Resources/Schema/admin-api/create-support-request.json delete mode 100644 src/Resources/Schema/admin-api/order-payment-url.json delete mode 100644 src/Resources/Schema/admin-api/payment-method-update.json delete mode 100644 src/Resources/Schema/admin-api/refund-list.json delete mode 100644 src/Resources/Schema/admin-api/refund-manager-data.json delete mode 100644 src/Resources/Schema/admin-api/refund-order-get.json delete mode 100644 src/Resources/Schema/admin-api/refund-order-post.json delete mode 100644 src/Resources/Schema/admin-api/refund-total.json delete mode 100644 src/Resources/Schema/admin-api/ship-order-operational.json delete mode 100644 src/Resources/Schema/admin-api/shipping-status.json delete mode 100644 src/Resources/Schema/admin-api/shipping-total.json delete mode 100644 src/Resources/Schema/admin-api/subscription-cancel.json delete mode 100644 src/Resources/Schema/admin-api/subscription-pause.json delete mode 100644 src/Resources/Schema/admin-api/subscription-resume.json delete mode 100644 src/Resources/Schema/admin-api/subscription-skip.json delete mode 100644 src/Resources/Schema/admin-api/webhook-mandate-update.json delete mode 100644 src/Resources/Schema/admin-api/webhook-subscription-action.json delete mode 100644 src/Resources/Schema/admin-api/webhook-subscription-renew.json delete mode 100644 src/Resources/Schema/admin-api/weebhook-action.json delete mode 100644 src/Resources/Schema/store-api/apple-pay-add-product.json delete mode 100644 src/Resources/Schema/store-api/apple-pay-create-payment-session.json delete mode 100644 src/Resources/Schema/store-api/apple-pay-enabled.json delete mode 100644 src/Resources/Schema/store-api/apple-pay-get-by-id.json delete mode 100644 src/Resources/Schema/store-api/apple-pay-get-shipping-methods.json delete mode 100644 src/Resources/Schema/store-api/apple-pay-pay.json delete mode 100644 src/Resources/Schema/store-api/apple-pay-restore-cart.json delete mode 100644 src/Resources/Schema/store-api/apple-pay-set-shipping-method.json delete mode 100644 src/Resources/Schema/store-api/credit-card-store-card-token.json delete mode 100644 src/Resources/Schema/store-api/credit-card-store-mandate-id.json delete mode 100644 src/Resources/Schema/store-api/creditr-card-revoke-mandate.json delete mode 100644 src/Resources/Schema/store-api/ideal-store-issuer.json delete mode 100644 src/Resources/Schema/store-api/payment-failed.json delete mode 100644 src/Resources/Schema/store-api/pos-checkout.json delete mode 100644 src/Resources/Schema/store-api/pos-status-action.json delete mode 100644 src/Resources/Schema/store-api/pos-store-terminal.json delete mode 100644 src/Resources/Schema/store-api/retry-payment.json delete mode 100644 src/Resources/Schema/store-api/return.json delete mode 100644 src/Resources/Schema/store-api/webhook-received.json delete 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 deleted file mode 100644 index 0e3c62418..000000000 --- a/src/Resources/Schema/admin-api/create-support-request.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "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 deleted file mode 100644 index 6e3514b25..000000000 --- a/src/Resources/Schema/admin-api/order-payment-url.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "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 deleted file mode 100644 index bf0abf253..000000000 --- a/src/Resources/Schema/admin-api/payment-method-update.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "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 deleted file mode 100644 index 74d55dfc0..000000000 --- a/src/Resources/Schema/admin-api/refund-list.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "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 deleted file mode 100644 index a683ca367..000000000 --- a/src/Resources/Schema/admin-api/refund-manager-data.json +++ /dev/null @@ -1,178 +0,0 @@ -{ - "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 deleted file mode 100644 index 154124670..000000000 --- a/src/Resources/Schema/admin-api/refund-order-get.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "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 deleted file mode 100644 index 2292a4dfb..000000000 --- a/src/Resources/Schema/admin-api/refund-order-post.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "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 deleted file mode 100644 index e5c13cf50..000000000 --- a/src/Resources/Schema/admin-api/refund-total.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "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 deleted file mode 100644 index eb9630fd7..000000000 --- a/src/Resources/Schema/admin-api/ship-order-operational.json +++ /dev/null @@ -1,283 +0,0 @@ -{ - "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 deleted file mode 100644 index e0ebace1a..000000000 --- a/src/Resources/Schema/admin-api/shipping-status.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "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 deleted file mode 100644 index 749163ed8..000000000 --- a/src/Resources/Schema/admin-api/shipping-total.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "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 deleted file mode 100644 index d606df49f..000000000 --- a/src/Resources/Schema/admin-api/subscription-cancel.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "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 deleted file mode 100644 index e204776fc..000000000 --- a/src/Resources/Schema/admin-api/subscription-pause.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "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 deleted file mode 100644 index 6e2b7f74a..000000000 --- a/src/Resources/Schema/admin-api/subscription-resume.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "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 deleted file mode 100644 index c3ce1284d..000000000 --- a/src/Resources/Schema/admin-api/subscription-skip.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "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 deleted file mode 100644 index 993b4b374..000000000 --- a/src/Resources/Schema/admin-api/webhook-mandate-update.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "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 deleted file mode 100644 index c7746e808..000000000 --- a/src/Resources/Schema/admin-api/webhook-subscription-action.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "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 deleted file mode 100644 index e5160a559..000000000 --- a/src/Resources/Schema/admin-api/webhook-subscription-renew.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "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 deleted file mode 100644 index d20da001f..000000000 --- a/src/Resources/Schema/admin-api/weebhook-action.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "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 deleted file mode 100644 index ca80e0c7c..000000000 --- a/src/Resources/Schema/store-api/apple-pay-add-product.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "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 deleted file mode 100644 index ef748d7b8..000000000 --- a/src/Resources/Schema/store-api/apple-pay-create-payment-session.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "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 deleted file mode 100644 index 1db5a417d..000000000 --- a/src/Resources/Schema/store-api/apple-pay-enabled.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "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 deleted file mode 100644 index c072d1663..000000000 --- a/src/Resources/Schema/store-api/apple-pay-get-by-id.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "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 deleted file mode 100644 index fee4050e4..000000000 --- a/src/Resources/Schema/store-api/apple-pay-get-shipping-methods.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "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 deleted file mode 100644 index bc2e54eb7..000000000 --- a/src/Resources/Schema/store-api/apple-pay-pay.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "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 deleted file mode 100644 index f343e3e9f..000000000 --- a/src/Resources/Schema/store-api/apple-pay-restore-cart.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "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 deleted file mode 100644 index c198ae4d8..000000000 --- a/src/Resources/Schema/store-api/apple-pay-set-shipping-method.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "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 deleted file mode 100644 index 07e14d60c..000000000 --- a/src/Resources/Schema/store-api/credit-card-store-card-token.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "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 deleted file mode 100644 index 6840745c5..000000000 --- a/src/Resources/Schema/store-api/credit-card-store-mandate-id.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "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 deleted file mode 100644 index 82b6337d2..000000000 --- a/src/Resources/Schema/store-api/creditr-card-revoke-mandate.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "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 deleted file mode 100644 index 9b4ee4690..000000000 --- a/src/Resources/Schema/store-api/ideal-store-issuer.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "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 deleted file mode 100644 index 73cfe0b1f..000000000 --- a/src/Resources/Schema/store-api/payment-failed.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "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 deleted file mode 100644 index 23b3c46b6..000000000 --- a/src/Resources/Schema/store-api/pos-checkout.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "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 deleted file mode 100644 index bb0216b69..000000000 --- a/src/Resources/Schema/store-api/pos-status-action.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "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 deleted file mode 100644 index 750b77bbc..000000000 --- a/src/Resources/Schema/store-api/pos-store-terminal.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "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 deleted file mode 100644 index 3f2195b62..000000000 --- a/src/Resources/Schema/store-api/retry-payment.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "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 deleted file mode 100644 index 123bc12c5..000000000 --- a/src/Resources/Schema/store-api/return.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "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 deleted file mode 100644 index f965e99da..000000000 --- a/src/Resources/Schema/store-api/webhook-received.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "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 deleted file mode 100644 index b591dd34c..000000000 --- a/src/Resources/Schema/store-api/webhook-subscription-received.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "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"] - } - } - } - } - } - } - } - } -} From 90c7cf8f78c08cab01880481ab3c8841169d1cbe Mon Sep 17 00:00:00 2001 From: Marvin Muxfeld Date: Wed, 26 Jun 2024 13:23:13 +0200 Subject: [PATCH 4/4] PISHPS-293: added fallback for Shopware.Utils.dom.copyToClipboard if unavailable --- .../sw-order/view/sw-order-detail-general/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-general/index.js b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-general/index.js index f4aba23bf..bc8140c73 100644 --- a/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-general/index.js +++ b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/view/sw-order-detail-general/index.js @@ -221,12 +221,20 @@ Component.override('sw-order-detail-general', { return orderAttributes.getCreditCardAttributes(); }, + + /** * */ copyPaymentUrlToClipboard() { + let fallback = async function(e) { + await navigator.clipboard.writeText(e) + }; + + // eslint-disable-next-line no-undef + let clipboard = typeof Shopware.Utils.dom.copyToClipboard === 'function' ? Shopware.Utils.dom.copyToClipboard : fallback; // eslint-disable-next-line no-undef - Shopware.Utils.dom.copyToClipboard(this.molliePaymentUrl); + clipboard(this.molliePaymentUrl); this.molliePaymentUrlCopied = true; },