| Requires any of the roles: | Admin, TeamAdmin | Requires the permission: | ReadData |
| POST | /DiscountCodeReport |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class DiscountCodeReportRequest
{
public Integer ownerId = null;
public ArrayList<Integer> eventIds = null;
public Integer getOwnerId() { return ownerId; }
public DiscountCodeReportRequest setOwnerId(Integer value) { this.ownerId = value; return this; }
public ArrayList<Integer> getEventIds() { return eventIds; }
public DiscountCodeReportRequest setEventIds(ArrayList<Integer> value) { this.eventIds = value; return this; }
}
public static class DiscountCodeReportResult
{
public ArrayList<DiscountCodeReportRow> items = null;
public Integer ticketCountTotal = null;
public BigDecimal amountDiscountedTotal = null;
public Integer statusCode = null;
public String message = null;
public ArrayList<DiscountCodeReportRow> getItems() { return items; }
public DiscountCodeReportResult setItems(ArrayList<DiscountCodeReportRow> value) { this.items = value; return this; }
public Integer getTicketCountTotal() { return ticketCountTotal; }
public DiscountCodeReportResult setTicketCountTotal(Integer value) { this.ticketCountTotal = value; return this; }
public BigDecimal getAmountDiscountedTotal() { return amountDiscountedTotal; }
public DiscountCodeReportResult setAmountDiscountedTotal(BigDecimal value) { this.amountDiscountedTotal = value; return this; }
public Integer getStatusCode() { return statusCode; }
public DiscountCodeReportResult setStatusCode(Integer value) { this.statusCode = value; return this; }
public String getMessage() { return message; }
public DiscountCodeReportResult setMessage(String value) { this.message = value; return this; }
}
public static class DiscountCodeReportRow
{
public String code = null;
public Integer discountCodeTypeId = null;
public String typeName = null;
public Boolean isPercent = null;
public BigDecimal percent = null;
public BigDecimal fixedAmount = null;
public Integer redemptions = null;
public Integer ticketCount = null;
public BigDecimal amountDiscounted = null;
public Integer reversedRedemptions = null;
public BigDecimal reversedAmount = null;
public Date firstUsedAt = null;
public Date lastUsedAt = null;
public String getCode() { return code; }
public DiscountCodeReportRow setCode(String value) { this.code = value; return this; }
public Integer getDiscountCodeTypeId() { return discountCodeTypeId; }
public DiscountCodeReportRow setDiscountCodeTypeId(Integer value) { this.discountCodeTypeId = value; return this; }
public String getTypeName() { return typeName; }
public DiscountCodeReportRow setTypeName(String value) { this.typeName = value; return this; }
public Boolean getIsPercent() { return isPercent; }
public DiscountCodeReportRow setIsPercent(Boolean value) { this.isPercent = value; return this; }
public BigDecimal getPercent() { return percent; }
public DiscountCodeReportRow setPercent(BigDecimal value) { this.percent = value; return this; }
public BigDecimal getFixedAmount() { return fixedAmount; }
public DiscountCodeReportRow setFixedAmount(BigDecimal value) { this.fixedAmount = value; return this; }
public Integer getRedemptions() { return redemptions; }
public DiscountCodeReportRow setRedemptions(Integer value) { this.redemptions = value; return this; }
public Integer getTicketCount() { return ticketCount; }
public DiscountCodeReportRow setTicketCount(Integer value) { this.ticketCount = value; return this; }
public BigDecimal getAmountDiscounted() { return amountDiscounted; }
public DiscountCodeReportRow setAmountDiscounted(BigDecimal value) { this.amountDiscounted = value; return this; }
public Integer getReversedRedemptions() { return reversedRedemptions; }
public DiscountCodeReportRow setReversedRedemptions(Integer value) { this.reversedRedemptions = value; return this; }
public BigDecimal getReversedAmount() { return reversedAmount; }
public DiscountCodeReportRow setReversedAmount(BigDecimal value) { this.reversedAmount = value; return this; }
public Date getFirstUsedAt() { return firstUsedAt; }
public DiscountCodeReportRow setFirstUsedAt(Date value) { this.firstUsedAt = value; return this; }
public Date getLastUsedAt() { return lastUsedAt; }
public DiscountCodeReportRow setLastUsedAt(Date value) { this.lastUsedAt = value; return this; }
}
}
Java DiscountCodeReportRequest 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 /DiscountCodeReport HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<DiscountCodeReportRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<EventIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</EventIds>
<OwnerId>0</OwnerId>
</DiscountCodeReportRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<DiscountCodeReportResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<AmountDiscountedTotal>0</AmountDiscountedTotal>
<Items>
<DiscountCodeReportRow>
<AmountDiscounted>0</AmountDiscounted>
<Code>String</Code>
<DiscountCodeTypeId>0</DiscountCodeTypeId>
<FirstUsedAt>0001-01-01T00:00:00</FirstUsedAt>
<FixedAmount>0</FixedAmount>
<IsPercent>false</IsPercent>
<LastUsedAt>0001-01-01T00:00:00</LastUsedAt>
<Percent>0</Percent>
<Redemptions>0</Redemptions>
<ReversedAmount>0</ReversedAmount>
<ReversedRedemptions>0</ReversedRedemptions>
<TicketCount>0</TicketCount>
<TypeName>String</TypeName>
</DiscountCodeReportRow>
</Items>
<Message>String</Message>
<StatusCode>0</StatusCode>
<TicketCountTotal>0</TicketCountTotal>
</DiscountCodeReportResult>