| Requires any of the roles: | Admin, TeamAdmin | Required permission: | Tickets.Add |
| POST | /Webshop/Order/Refund |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class WebshopOrderRefundRequest
{
public Integer orderId = null;
public String orderReference = null;
public ArrayList<Integer> lineIds = null;
public Boolean restockLines = null;
public String idempotencyKey = null;
public Integer ownerId = null;
public Integer getOrderId() { return orderId; }
public WebshopOrderRefundRequest setOrderId(Integer value) { this.orderId = value; return this; }
public String getOrderReference() { return orderReference; }
public WebshopOrderRefundRequest setOrderReference(String value) { this.orderReference = value; return this; }
public ArrayList<Integer> getLineIds() { return lineIds; }
public WebshopOrderRefundRequest setLineIds(ArrayList<Integer> value) { this.lineIds = value; return this; }
public Boolean isRestockLines() { return restockLines; }
public WebshopOrderRefundRequest setRestockLines(Boolean value) { this.restockLines = value; return this; }
public String getIdempotencyKey() { return idempotencyKey; }
public WebshopOrderRefundRequest setIdempotencyKey(String value) { this.idempotencyKey = value; return this; }
public Integer getOwnerId() { return ownerId; }
public WebshopOrderRefundRequest setOwnerId(Integer value) { this.ownerId = value; return this; }
}
public static class WebshopRefundResult
{
public Boolean success = null;
public Boolean partial = null;
public Integer refundedAmountMinor = null;
public String borgunRefundTransactionId = null;
public String status = null;
public LocalizedMessage message = null;
public Integer statusCode = null;
public Boolean isSuccess() { return success; }
public WebshopRefundResult setSuccess(Boolean value) { this.success = value; return this; }
public Boolean isPartial() { return partial; }
public WebshopRefundResult setPartial(Boolean value) { this.partial = value; return this; }
public Integer getRefundedAmountMinor() { return refundedAmountMinor; }
public WebshopRefundResult setRefundedAmountMinor(Integer value) { this.refundedAmountMinor = value; return this; }
public String getBorgunRefundTransactionId() { return borgunRefundTransactionId; }
public WebshopRefundResult setBorgunRefundTransactionId(String value) { this.borgunRefundTransactionId = value; return this; }
public String getStatus() { return status; }
public WebshopRefundResult setStatus(String value) { this.status = value; return this; }
public LocalizedMessage getMessage() { return message; }
public WebshopRefundResult setMessage(LocalizedMessage value) { this.message = value; return this; }
public Integer getStatusCode() { return statusCode; }
public WebshopRefundResult setStatusCode(Integer value) { this.statusCode = value; return this; }
}
public static class LocalizedMessage
{
public String is = null;
public String en = null;
public String getIs() { return is; }
public LocalizedMessage setIs(String value) { this.is = value; return this; }
public String getEn() { return en; }
public LocalizedMessage setEn(String value) { this.en = value; return this; }
}
}
Java WebshopOrderRefundRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Webshop/Order/Refund HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<WebshopOrderRefundRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<IdempotencyKey>String</IdempotencyKey>
<LineIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</LineIds>
<OrderId>0</OrderId>
<OrderReference>String</OrderReference>
<OwnerId>0</OwnerId>
<RestockLines>false</RestockLines>
</WebshopOrderRefundRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<WebshopRefundResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<BorgunRefundTransactionId>String</BorgunRefundTransactionId>
<Message>
<En>String</En>
<Is>String</Is>
</Message>
<Partial>false</Partial>
<RefundedAmountMinor>0</RefundedAmountMinor>
<Status>String</Status>
<StatusCode>0</StatusCode>
<Success>false</Success>
</WebshopRefundResult>