naftiko: 1.0.0-alpha2 info: label: Modern Treasury — Reversal description: 'Modern Treasury — Reversal. 3 operations. Lead operation: list reversals. Self-contained Naftiko capability covering one Modern Treasury business surface.' tags: - Modern Treasury - Reversal created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: MODERN_TREASURY_API_KEY: MODERN_TREASURY_API_KEY capability: consumes: - type: http namespace: modern-treasury-reversal baseUri: http://localhost:3000 description: Modern Treasury — Reversal business capability. Self-contained, no shared references. resources: - name: api-payment_orders-payment_order_id-reversals path: /api/payment_orders/{payment_order_id}/reversals operations: - name: listreversals method: GET description: list reversals outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: payment_order_id in: path type: string description: The ID of the relevant Payment Order. required: true - name: after_cursor in: query type: string - name: per_page in: query type: integer - name: createreversal method: POST description: create reversal outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: Idempotency-Key in: header type: string description: This key should be something unique, preferably something like an UUID. - name: payment_order_id in: path type: string description: The ID of the relevant Payment Order. required: true - name: body in: body type: object description: Request body (JSON). required: false - name: api-payment_orders-payment_order_id-reversals-reversal_id path: /api/payment_orders/{payment_order_id}/reversals/{reversal_id} operations: - name: getreversal method: GET description: show reversal outputRawFormat: json outputParameters: - name: result type: object value: $. authentication: type: basic username: '{{env.MODERN_TREASURY_USER}}' password: '{{env.MODERN_TREASURY_PASS}}' exposes: - type: rest namespace: modern-treasury-reversal-rest port: 8080 description: REST adapter for Modern Treasury — Reversal. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/payment-orders/{payment-order-id}/reversals name: api-payment-orders-payment-order-id-reversals description: REST surface for api-payment_orders-payment_order_id-reversals. operations: - method: GET name: listreversals description: list reversals call: modern-treasury-reversal.listreversals with: payment_order_id: rest.payment_order_id after_cursor: rest.after_cursor per_page: rest.per_page outputParameters: - type: object mapping: $. - method: POST name: createreversal description: create reversal call: modern-treasury-reversal.createreversal with: Idempotency-Key: rest.Idempotency-Key payment_order_id: rest.payment_order_id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/payment-orders/{payment-order-id}/reversals/{reversal-id} name: api-payment-orders-payment-order-id-reversals-reversal-id description: REST surface for api-payment_orders-payment_order_id-reversals-reversal_id. operations: - method: GET name: getreversal description: show reversal call: modern-treasury-reversal.getreversal outputParameters: - type: object mapping: $. - type: mcp namespace: modern-treasury-reversal-mcp port: 9090 transport: http description: MCP adapter for Modern Treasury — Reversal. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-reversals description: list reversals hints: readOnly: true destructive: false idempotent: true call: modern-treasury-reversal.listreversals with: payment_order_id: tools.payment_order_id after_cursor: tools.after_cursor per_page: tools.per_page outputParameters: - type: object mapping: $. - name: create-reversal description: create reversal hints: readOnly: false destructive: false idempotent: false call: modern-treasury-reversal.createreversal with: Idempotency-Key: tools.Idempotency-Key payment_order_id: tools.payment_order_id body: tools.body outputParameters: - type: object mapping: $. - name: show-reversal description: show reversal hints: readOnly: true destructive: false idempotent: true call: modern-treasury-reversal.getreversal outputParameters: - type: object mapping: $.