TicketUserServices

<back to all web services

GiftCardHoldRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdmin, MobileAppRequired permission:Tickets.Add
The following routes are available for this service:
POST/GiftCard/Hold
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class GiftCardHoldRequest
    {
        public String code = null;
        public Integer amountMinor = null;
        public Integer eventId = null;
        public Integer targetOwnerId = null;
        public String orderPaymentReference = null;
        public String idempotencyKey = null;
        
        public String getCode() { return code; }
        public GiftCardHoldRequest setCode(String value) { this.code = value; return this; }
        public Integer getAmountMinor() { return amountMinor; }
        public GiftCardHoldRequest setAmountMinor(Integer value) { this.amountMinor = value; return this; }
        public Integer getEventId() { return eventId; }
        public GiftCardHoldRequest setEventId(Integer value) { this.eventId = value; return this; }
        public Integer getTargetOwnerId() { return targetOwnerId; }
        public GiftCardHoldRequest setTargetOwnerId(Integer value) { this.targetOwnerId = value; return this; }
        public String getOrderPaymentReference() { return orderPaymentReference; }
        public GiftCardHoldRequest setOrderPaymentReference(String value) { this.orderPaymentReference = value; return this; }
        public String getIdempotencyKey() { return idempotencyKey; }
        public GiftCardHoldRequest setIdempotencyKey(String value) { this.idempotencyKey = value; return this; }
    }

    public static class GiftCardHoldResult
    {
        public Boolean ok = null;
        public String reason = null;
        public LocalizedMessage message = null;
        public Integer holdId = null;
        public Integer heldAmountMinor = null;
        public Integer remainingAvailableMinor = null;
        public Date expiresAt = null;
        public Integer statusCode = null;
        
        public Boolean isOk() { return ok; }
        public GiftCardHoldResult setOk(Boolean value) { this.ok = value; return this; }
        public String getReason() { return reason; }
        public GiftCardHoldResult setReason(String value) { this.reason = value; return this; }
        public LocalizedMessage getMessage() { return message; }
        public GiftCardHoldResult setMessage(LocalizedMessage value) { this.message = value; return this; }
        public Integer getHoldId() { return holdId; }
        public GiftCardHoldResult setHoldId(Integer value) { this.holdId = value; return this; }
        public Integer getHeldAmountMinor() { return heldAmountMinor; }
        public GiftCardHoldResult setHeldAmountMinor(Integer value) { this.heldAmountMinor = value; return this; }
        public Integer getRemainingAvailableMinor() { return remainingAvailableMinor; }
        public GiftCardHoldResult setRemainingAvailableMinor(Integer value) { this.remainingAvailableMinor = value; return this; }
        public Date getExpiresAt() { return expiresAt; }
        public GiftCardHoldResult setExpiresAt(Date value) { this.expiresAt = value; return this; }
        public Integer getStatusCode() { return statusCode; }
        public GiftCardHoldResult 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 GiftCardHoldRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /GiftCard/Hold HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<GiftCardHoldRequest 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>
  <IdempotencyKey>String</IdempotencyKey>
  <OrderPaymentReference>String</OrderPaymentReference>
  <TargetOwnerId>0</TargetOwnerId>
</GiftCardHoldRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GiftCardHoldResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
  <ExpiresAt>0001-01-01T00:00:00</ExpiresAt>
  <HeldAmountMinor>0</HeldAmountMinor>
  <HoldId>0</HoldId>
  <Message>
    <En>String</En>
    <Is>String</Is>
  </Message>
  <Ok>false</Ok>
  <Reason>String</Reason>
  <RemainingAvailableMinor>0</RemainingAvailableMinor>
  <StatusCode>0</StatusCode>
</GiftCardHoldResult>