| Requires any of the roles: | Admin, TeamAdmin, MobileApp | Requires the permission: | ReadData |
| POST | /GiftCard/Validate |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class GiftCardValidateRequest
{
public String code = null;
public Integer eventId = null;
public Integer targetOwnerId = null;
public Integer amountMinor = null;
public String getCode() { return code; }
public GiftCardValidateRequest setCode(String value) { this.code = value; return this; }
public Integer getEventId() { return eventId; }
public GiftCardValidateRequest setEventId(Integer value) { this.eventId = value; return this; }
public Integer getTargetOwnerId() { return targetOwnerId; }
public GiftCardValidateRequest setTargetOwnerId(Integer value) { this.targetOwnerId = value; return this; }
public Integer getAmountMinor() { return amountMinor; }
public GiftCardValidateRequest setAmountMinor(Integer value) { this.amountMinor = value; return this; }
}
public static class GiftCardValidateResult
{
public Boolean ok = null;
public String reason = null;
public LocalizedMessage message = null;
public String status = null;
public Integer availableMinor = null;
public Integer applicableMinor = null;
public String scope = null;
public Integer scopeOwnerId = null;
public Date expiresAt = null;
public Integer statusCode = null;
public Boolean isOk() { return ok; }
public GiftCardValidateResult setOk(Boolean value) { this.ok = value; return this; }
public String getReason() { return reason; }
public GiftCardValidateResult setReason(String value) { this.reason = value; return this; }
public LocalizedMessage getMessage() { return message; }
public GiftCardValidateResult setMessage(LocalizedMessage value) { this.message = value; return this; }
public String getStatus() { return status; }
public GiftCardValidateResult setStatus(String value) { this.status = value; return this; }
public Integer getAvailableMinor() { return availableMinor; }
public GiftCardValidateResult setAvailableMinor(Integer value) { this.availableMinor = value; return this; }
public Integer getApplicableMinor() { return applicableMinor; }
public GiftCardValidateResult setApplicableMinor(Integer value) { this.applicableMinor = value; return this; }
public String getScope() { return scope; }
public GiftCardValidateResult setScope(String value) { this.scope = value; return this; }
public Integer getScopeOwnerId() { return scopeOwnerId; }
public GiftCardValidateResult setScopeOwnerId(Integer value) { this.scopeOwnerId = value; return this; }
public Date getExpiresAt() { return expiresAt; }
public GiftCardValidateResult setExpiresAt(Date value) { this.expiresAt = value; return this; }
public Integer getStatusCode() { return statusCode; }
public GiftCardValidateResult 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 GiftCardValidateRequest 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 /GiftCard/Validate HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GiftCardValidateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<AmountMinor>0</AmountMinor>
<Code>String</Code>
<EventId>0</EventId>
<TargetOwnerId>0</TargetOwnerId>
</GiftCardValidateRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GiftCardValidateResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<ApplicableMinor>0</ApplicableMinor>
<AvailableMinor>0</AvailableMinor>
<ExpiresAt>0001-01-01T00:00:00</ExpiresAt>
<Message>
<En>String</En>
<Is>String</Is>
</Message>
<Ok>false</Ok>
<Reason>String</Reason>
<Scope>String</Scope>
<ScopeOwnerId>0</ScopeOwnerId>
<Status>String</Status>
<StatusCode>0</StatusCode>
</GiftCardValidateResult>