blob: ce9c0e0a5fd6b42b113ee1d1d91bfd1558dfaa94 [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
<description>Order Return Services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
<!-- Order Return Services -->
<service name="quickReturnOrder" engine="simple"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="quickReturnFromOrder">
<description>Quick Return Order</description>
<attribute name="orderId" type="String" mode="IN" optional="false"/>
<attribute name="returnReasonId" type="String" mode="IN" optional="true"/>
<attribute name="returnTypeId" type="String" mode="IN" optional="true"/>
<attribute name="returnHeaderTypeId" type="String" mode="IN" optional="false"/>
<attribute name="receiveReturn" type="Boolean" mode="IN" optional="true"/>
<attribute name="returnId" type="String" mode="OUT" optional="false"/>
</service>
<service name="createReturnHeader" default-entity-name="ReturnHeader" engine="simple"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="createReturnHeader">
<description>Create a new ReturnHeader</description>
<auto-attributes include="pk" mode="OUT" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<override name="returnHeaderTypeId" optional="false"/>
</service>
<service name="updateReturnHeader" default-entity-name="ReturnHeader" engine="simple"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="updateReturnHeader">
<description>Update a ReturnHeader</description>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<attribute name="oldStatusId" type="String" mode="OUT" optional="false"/>
</service>
<service name="createReturnItemBilling" engine="simple" default-entity-name="ReturnItemBilling"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="createReturnItemBilling">
<description>Create a new return item billing record</description>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
</service>
<service name="createReturnItem" engine="simple"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="createReturnItem">
<description>Create a new ReturnItem in the RETURN_REQUESTED status, based on returnableQuantity and returnablePrice from the
getReturnableQuantity service. This can be called by the customer to request a return for himself or by a user with
ORDERMGR_CREATE, but, if the former, the returnPrice will be overriden by the returnablePrice from getReturnableQuantity.</description>
<auto-attributes entity-name="ReturnItem" include="all" mode="IN" optional="true">
<exclude field-name="returnItemSeqId"/>
</auto-attributes>
<attribute name="includeAdjustments" type="String" mode="IN" optional="true"/> <!-- The default is "Y": the adjustments associated with the item are included in the return -->
<attribute name="returnItemSeqId" type="String" mode="OUT" optional="false"/>
<override name="returnId" optional="false"/>
<override name="returnTypeId" optional="false"/>
<override name="returnItemTypeId" optional="false"/>
<override name="orderId" optional="false"/>
<override name="returnQuantity" optional="false"/>
</service>
<service name="updateReturnItem" engine="simple" default-entity-name="ReturnItem"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="updateReturnItem">
<description>Update a ReturnItem and related adjustments</description>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<attribute name="oldStatusId" type="String" mode="OUT" optional="false"/>
</service>
<service name="updateReturnItemsStatus" engine="simple"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="updateReturnItemsStatus">
<description>Update ReturnItem(s) Status</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
<attribute name="statusId" type="String" mode="IN" optional="false"/>
</service>
<service name="removeReturnItem" engine="simple"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="removeReturnItem">
<description>Remove a ReturnItem and related adjustments</description>
<auto-attributes entity-name="ReturnItem" include="pk" mode="IN" optional="false"/>
</service>
<service name="createReturnItemResponse" engine="simple"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="createReturnItemResponse">
<description>Creates a ReturnItemResponse record.</description>
<auto-attributes entity-name="ReturnItemResponse" include="nonpk" mode="IN" optional="true"/>
<attribute name="returnItemResponseId" type="String" mode="OUT" optional="false"/>
</service>
<service name="createPaymentApplicationsFromReturnItemResponse" engine="java"
location="org.ofbiz.order.order.OrderReturnServices" invoke="createPaymentApplicationsFromReturnItemResponse">
<description>Creates PaymentApplications for each return item billing related to the return response until
the responseAmount is reached or all items are paid.</description>
<attribute name="returnItemResponseId" type="String" mode="IN" optional="false"/>
</service>
<service name="cancelReturnItems" engine="simple"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="cancelReturnItems">
<description>Cancel ReturnItems and set their status to "RETURN_CANCELLED"</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
</service>
<service name="cancelReplacementOrderItems" engine="simple"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="cancelReplacementOrderItems">
<description>Cancel the associated OrderItems of the replacement order, if any.</description>
<auto-attributes entity-name="ReturnItem" include="pk" mode="IN" optional="false"/>
</service>
<!-- services for return adjustments -->
<service name="returnAdjustmentInterface" engine="interface" location="" invoke="">
<description>Return Adjustment Interface</description>
<auto-attributes mode="IN" include="all" entity-name="ReturnAdjustment" optional="true"/>
</service>
<service name="createReturnAdjustment" engine="java" location="org.ofbiz.order.order.OrderReturnServices"
invoke="createReturnAdjustment">
<description>Simple create service</description>
<implements service="returnAdjustmentInterface"/>
<override name="returnAdjustmentId" mode="OUT" optional="false"/>
</service>
<service name="updateReturnAdjustment" engine="java" location="org.ofbiz.order.order.OrderReturnServices"
invoke="updateReturnAdjustment">
<description></description>
<implements service="returnAdjustmentInterface"/>
<attribute name="originalReturnPrice" type="BigDecimal" mode="IN" optional="true"/>
<attribute name="originalReturnQuantity" type="BigDecimal" mode="IN" optional="true"/>
<override name="returnAdjustmentId" optional="false"/>
</service>
<service name="removeReturnAdjustment" engine="simple" location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml"
invoke="removeReturnAdjustment">
<description>Simple remove service</description>
<auto-attributes entity-name="ReturnAdjustment" include="pk" mode="IN" optional="false"/>
</service>
<service name="createReturnAndItemOrAdjustment" engine="simple" location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml"
invoke="createReturnAndItemOrAdjustment">
<description>If returnId is null, create a return; then create Return Item or Adjustment based on the parameters passed in</description>
<auto-attributes mode="IN" include="nonpk" entity-name="ReturnHeader" optional="true"/>
<auto-attributes mode="IN" include="all" entity-name="ReturnAdjustment" optional="true"/>
<auto-attributes mode="IN" include="all" entity-name="ReturnItem" optional="true"/>
<attribute name="returnAdjustmentId" type="String" mode="OUT" optional="true"/>
<attribute name="returnItemSeqId" type="String" mode="OUT" optional="true"/>
<attribute name="returnId" type="String" mode="OUT" optional="true"/>
</service>
<service name="createReturnItemOrAdjustment" engine="java"
location="org.ofbiz.order.order.OrderReturnServices" invoke="createReturnItemOrAdjustment">
<description>create Return Item or Adjustment based on the parameters passed in</description>
<auto-attributes mode="IN" include="all" entity-name="ReturnAdjustment" optional="true"/>
<auto-attributes mode="IN" include="all" entity-name="ReturnItem" optional="true"/>
<attribute name="returnAdjustmentId" type="String" mode="OUT" optional="true"/>
<attribute name="returnItemSeqId" type="String" mode="OUT" optional="true"/>
</service>
<service name="updateReturnItemOrAdjustment" engine="java"
location="org.ofbiz.order.order.OrderReturnServices" invoke="updateReturnItemOrAdjustment">
<description>update Return Item or Adjustment based on the parameters passed in</description>
<auto-attributes mode="IN" include="all" entity-name="ReturnAdjustment" optional="true"/>
<auto-attributes mode="IN" include="all" entity-name="ReturnItem" optional="true"/>
<attribute name="oldStatusId" type="String" mode="OUT" optional="true"/>
</service>
<!-- services to verify that returns refunds aren't issued more than once -->
<service name="getReturnAmountByOrder" engine="java"
location="org.ofbiz.order.order.OrderReturnServices" invoke="getReturnAmountByOrder">
<description>Finds the refunded or credited payment amounts for each order on a return</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
<attribute name="orderReturnAmountMap" type="Map" mode="OUT"/>
</service>
<service name="checkPaymentAmountForRefund" engine="java"
location="org.ofbiz.order.order.OrderReturnServices" invoke="checkPaymentAmountForRefund">
<description>Makes sure the return is not over-refunding/crediting any order, or return an error</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
</service>
<service name="getReturnItemInitialCost" engine="java"
location="org.ofbiz.order.order.OrderReturnServices" invoke="getReturnItemInitialCost">
<description>Gets the item's initial cost based on the inventory item record associated with the order item or 0.00 if none found.</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
<attribute name="returnItemSeqId" type="String" mode="IN" optional="false"/>
<attribute name="initialItemCost" type="BigDecimal" mode="OUT" optional="false"/>
</service>
<service name="checkReturnComplete" engine="java"
location="org.ofbiz.order.order.OrderReturnServices" invoke="checkReturnComplete">
<description>Checks if all items on a return are complete/cancelled and updates the header status</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
<attribute name="statusId" type="String" mode="OUT" optional="true"/>
</service>
<!-- return notification services -->
<service name="sendReturnAcceptNotification" engine="java" max-retry="3"
location="org.ofbiz.order.order.OrderReturnServices" invoke="sendReturnAcceptNotification">
<description>Send a notification that a return has been accepted</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
<attribute name="communicationEventId" type="String" mode="OUT" optional="true"/>
</service>
<service name="sendReturnCompleteNotification" engine="java" max-retry="3"
location="org.ofbiz.order.order.OrderReturnServices" invoke="sendReturnCompleteNotification">
<description>Send a notification that a return has been completed</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
<attribute name="communicationEventId" type="String" mode="OUT" optional="true"/>
</service>
<service name="sendReturnCancelNotification" engine="java" max-retry="3"
location="org.ofbiz.order.order.OrderReturnServices" invoke="sendReturnCancelNotification">
<description>Send a notification that a return has been cancelled</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
<attribute name="communicationEventId" type="String" mode="OUT" optional="true"/>
</service>
<service name="autoCancelReplacementOrders" engine="java" max-retry="3" transaction-timeout="36000"
location="org.ofbiz.order.order.OrderReturnServices" invoke="autoCancelReplacementOrders">
<description>Automatic cancellation of replacement order if return is not received within 30 days</description>
</service>
<!-- return processing services -->
<service name="processCreditReturn" engine="java" auth="true"
location="org.ofbiz.order.order.OrderReturnServices" invoke="processCreditReturn">
<description>Process the credits in a return</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
</service>
<service name="processRefundReturn" engine="java" auth="true"
location="org.ofbiz.order.order.OrderReturnServices" invoke="processRefundReturn">
<description>Process the refunds in a return</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
<attribute name="returnTypeId" type="String" mode="IN" optional="false"/>
</service>
<service name="processReplacementReturn" engine="java" auth="true"
location="org.ofbiz.order.order.OrderReturnServices" invoke="processReplacementReturn">
<description>Process the replacements in a return</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
<attribute name="returnTypeId" type="String" mode="IN" optional="false"/>
</service>
<service name="processWaitReplacementReturn" engine="simple" auth="true"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="processWaitReplacementReturn">
<description>Process the replacements in a wait return</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
</service>
<service name="processWaitReplacementReservedReturn" engine="simple" auth="true"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="processWaitReplacementReservedReturn">
<description>Process the replacements in a wait reserved return when the return is accepted and then received</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
</service>
<service name="processCrossShipReplacementReturn" engine="simple" auth="true"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="processCrossShipReplacementReturn">
<description>Process the replacements in a cross-ship return</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
</service>
<service name="processRepairReplacementReturn" engine="simple" auth="true"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="processRepairReplacementReturn">
<description>Process the replacements in a repair return</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
</service>
<service name="processReplaceImmediatelyReturn" engine="simple" auth="true"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="processReplaceImmediatelyReturn">
<description>Process the replacements in a Immediate Return</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
</service>
<service name="processRefundOnlyReturn" engine="simple" auth="true"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="processRefundOnlyReturn">
<description>Process the Refund in a return</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
</service>
<service name="processRefundImmediatelyReturn" engine="simple" auth="true"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="processRefundImmediatelyReturn">
<description>Process the Immediate Refund in a return</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
</service>
<service name="processSubscriptionReturn" engine="java" auth="true"
location="org.ofbiz.order.order.OrderReturnServices" invoke="processSubscriptionReturn">
<description>Process subscription changes from a return</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
</service>
<service name="processRefundReturnForReplacement" engine="java" auth="true"
location="org.ofbiz.order.order.OrderReturnServices" invoke="processRefundReturnForReplacement">
<description>Process the refund return for replacement order</description>
<attribute name="orderId" type="String" mode="IN" optional="false"/>
</service>
<!-- other return services -->
<service name="updateReturnStatusFromReceipt" engine="simple"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="updateReturnStatusFromReceipt">
<description>Update return/item status when items have been received</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
<attribute name="returnHeaderStatus" type="String" mode="OUT" optional="false"/>
</service>
<service name="getReturnableQuantity" engine="java"
location="org.ofbiz.order.order.OrderReturnServices" invoke="getReturnableQuantity">
<description>Get the quantity allowed for an item to be returned</description>
<attribute name="orderItem" type="org.ofbiz.entity.GenericValue" mode="IN" optional="false"/>
<attribute name="returnableQuantity" type="BigDecimal" mode="OUT" optional="false"/>
<attribute name="returnablePrice" type="BigDecimal" mode="OUT" optional="false"/>
</service>
<service name="getReturnableItems" engine="java"
location="org.ofbiz.order.order.OrderReturnServices" invoke="getReturnableItems">
<description>Get a map of returnable items orderItem => quantity available to return</description>
<attribute name="orderId" type="String" mode="IN" optional="false"/>
<attribute name="returnableItems" type="Map" mode="OUT" optional="false"/>
</service>
<service name="getOrderAvailableReturnedTotal" engine="java"
location="org.ofbiz.order.order.OrderReturnServices" invoke="getOrderAvailableReturnedTotal">
<description>Get the total amount of all returns for an order: orderTotal, returnTotal - totals so far. availableReturnTotal = orderTotal - returnTotal - adjustment. Used for checking if the return total has gone over the order total. If countNewReturnItems is set to Boolean.TRUE then return items in the CREATED state will be counted. This should only be the case during quickRefundEntireOrder.</description>
<attribute name="orderId" type="String" mode="IN" optional="false"/>
<attribute name="adjustment" type="BigDecimal" mode="IN" optional="true"/>
<attribute name="countNewReturnItems" type="Boolean" mode="IN" optional="true"/>
<attribute name="orderTotal" type="BigDecimal" mode="OUT" optional="false"/>
<attribute name="returnTotal" type="BigDecimal" mode="OUT" optional="false"/>
<attribute name="availableReturnTotal" type="BigDecimal" mode="OUT" optional="false"/>
</service>
<service name="refundBillingAccountPayment" engine="java"
location="org.ofbiz.order.order.OrderReturnServices" invoke="refundBillingAccountPayment" auth="true">
<description>Refunds A Billing Account Payment</description>
<attribute name="orderPaymentPreference" type="org.ofbiz.entity.GenericValue" mode="IN" optional="false"/>
<attribute name="refundAmount" type="BigDecimal" mode="IN" optional="false"/>
<attribute name="paymentId" type="String" mode="OUT" optional="false"/>
</service>
<service name="createReturnItemShipment" engine="simple"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="createReturnItemShipment">
<description>Create a new ReturnItemShipment</description>
<auto-attributes entity-name="ReturnItemShipment" include="all" mode="IN" optional="false"/>
</service>
<service name="getStatusItemsForReturn" engine="simple"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="getStatusItemsForReturn">
<description>Get the return status associated with customer/vendor return</description>
<attribute name="returnHeaderTypeId" type="String" mode="IN" optional="false"/>
<attribute name="statusItems" type="List" mode="OUT" optional="false"/>
</service>
<service name="createExchangeOrderAssoc" engine="simple"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="createExchangeOrderAssoc">
<description>Associate exchange order with original order in OrderItemAssoc entity</description>
<attribute name="orderId" type="String" mode="IN" optional="false"/>
<attribute name="originOrderId" type="String" mode="IN" optional="false"/>
</service>
<service name="addProductsBackToCategory" engine="simple"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="addProductsBackToCategory">
<description>Add product(s) back to category if it has no active category</description>
<attribute name="returnId" type="String" mode="IN" optional="true"/>
<attribute name="inventoryItemId" type="String" mode="IN" optional="true"/>
</service>
<service name="createReturnStatus" engine="simple"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="createReturnStatus">
<description>Create Return Status</description>
<attribute name="returnId" type="String" mode="IN" optional="false"/>
<attribute name="returnItemSeqId" type="String" mode="IN" optional="true"/>
</service>
<!-- Return ContactMech Services -->
<service name="createReturnContactMech" default-entity-name="ReturnContactMech" engine="entity-auto" invoke="create" auth="true">
<description>Create a ReturnContactMech</description>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
</service>
<service name="updateReturnContactMech" engine="simple"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="updateReturnContactMech" auth="true" default-entity-name="ReturnContactMech">
<description>Update Return Contact Mech</description>
<auto-attributes include="pk" mode="IN" optional="false"/>
<attribute name="oldContactMechId" type="String" mode="IN" optional="true"/>
</service>
<service name="deleteReturnContactMech" default-entity-name="ReturnContactMech" engine="entity-auto" invoke="delete" auth="true">
<description>Delete a ReturnContactMech</description>
<auto-attributes include="pk" mode="IN" optional="false"/>
</service>
<!-- Item Return Service -->
<service name="createReturnItemForRental" engine="simple"
location="component://order/script/org/ofbiz/order/order/OrderReturnServices.xml" invoke="createReturnItemForRental">
<description>Create the return item for rental (which items has product type is ASSET_USAGE_OUT_IN)</description>
<attribute name="orderId" type="String" mode="IN" optional="false"/>
<attribute name="returnId" type="String" mode="OUT" optional="false"/>
</service>
</services>