Trendsic Platform Service

<back to all web services

GiftCardRequest

Requires Authentication
Requires any of the roles:Agent, Administrator, Agent, Administrator, Agent, Administrator, Agent, Administrator
The following routes are available for this service:
GET,DELETE,OPTIONS/v1/GiftCard/{GiftCardId}
GET,POST,PUT,OPTIONS/v1/GiftCard
GET,OPTIONS/v1/GiftCard/ByGameSet/{GiftCardGameSetId}
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class GiftCardRequest
    {
        public ArrayList<GiftCard> GiftCard = new ArrayList<GiftCard>();
        public Integer GiftCardId = null;
        public Integer GiftCardGameSetId = null;
        
        public ArrayList<GiftCard> getGiftCard() { return GiftCard; }
        public GiftCardRequest setGiftCard(ArrayList<GiftCard> value) { this.GiftCard = value; return this; }
        public Integer getGiftCardId() { return GiftCardId; }
        public GiftCardRequest setGiftCardId(Integer value) { this.GiftCardId = value; return this; }
        public Integer getGiftCardGameSetId() { return GiftCardGameSetId; }
        public GiftCardRequest setGiftCardGameSetId(Integer value) { this.GiftCardGameSetId = value; return this; }
    }

    public static class GiftCard
    {
        public Integer GiftCardId = null;
        public Integer AgentId = null;
        public String CardType = null;
        public String CardNumber = null;
        public Integer ContactId = null;
        public Date DateCreated = null;
        public Date DateModified = null;
        public Date DateDeleted = null;
        public String GiftCardGameSetId = null;
        public Date FirstApptDate = null;
        public Boolean IsReferrerCard = null;
        public String AgentName = null;
        public String ContactName = null;
        
        public Integer getGiftCardId() { return GiftCardId; }
        public GiftCard setGiftCardId(Integer value) { this.GiftCardId = value; return this; }
        public Integer getAgentId() { return AgentId; }
        public GiftCard setAgentId(Integer value) { this.AgentId = value; return this; }
        public String getCardType() { return CardType; }
        public GiftCard setCardType(String value) { this.CardType = value; return this; }
        public String getCardNumber() { return CardNumber; }
        public GiftCard setCardNumber(String value) { this.CardNumber = value; return this; }
        public Integer getContactId() { return ContactId; }
        public GiftCard setContactId(Integer value) { this.ContactId = value; return this; }
        public Date getDateCreated() { return DateCreated; }
        public GiftCard setDateCreated(Date value) { this.DateCreated = value; return this; }
        public Date getDateModified() { return DateModified; }
        public GiftCard setDateModified(Date value) { this.DateModified = value; return this; }
        public Date getDateDeleted() { return DateDeleted; }
        public GiftCard setDateDeleted(Date value) { this.DateDeleted = value; return this; }
        public String getGiftCardGameSetId() { return GiftCardGameSetId; }
        public GiftCard setGiftCardGameSetId(String value) { this.GiftCardGameSetId = value; return this; }
        public Date getFirstApptDate() { return FirstApptDate; }
        public GiftCard setFirstApptDate(Date value) { this.FirstApptDate = value; return this; }
        public Boolean getIsReferrerCard() { return IsReferrerCard; }
        public GiftCard setIsReferrerCard(Boolean value) { this.IsReferrerCard = value; return this; }
        public String getAgentName() { return AgentName; }
        public GiftCard setAgentName(String value) { this.AgentName = value; return this; }
        public String getContactName() { return ContactName; }
        public GiftCard setContactName(String value) { this.ContactName = value; return this; }
    }

    public static class GiftCardResponse
    {
        public ResponseStatus ResponseStatus = null;
        public ArrayList<GiftCard> GiftCard = new ArrayList<GiftCard>();
        
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public GiftCardResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
        public ArrayList<GiftCard> getGiftCard() { return GiftCard; }
        public GiftCardResponse setGiftCard(ArrayList<GiftCard> value) { this.GiftCard = value; return this; }
    }

}

Java GiftCardRequest 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 /v1/GiftCard HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<GiftCardRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <GiftCard>
    <GiftCard>
      <AgentId>0</AgentId>
      <AgentName>String</AgentName>
      <CardNumber>String</CardNumber>
      <CardType>String</CardType>
      <ContactId>0</ContactId>
      <ContactName>String</ContactName>
      <DateCreated>0001-01-01T00:00:00</DateCreated>
      <DateDeleted>0001-01-01T00:00:00</DateDeleted>
      <DateModified>0001-01-01T00:00:00</DateModified>
      <FirstApptDate>0001-01-01T00:00:00</FirstApptDate>
      <GiftCardGameSetId>String</GiftCardGameSetId>
      <GiftCardId>0</GiftCardId>
      <IsReferrerCard>false</IsReferrerCard>
    </GiftCard>
  </GiftCard>
  <GiftCardGameSetId>0</GiftCardGameSetId>
  <GiftCardId>0</GiftCardId>
</GiftCardRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GiftCardResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <GiftCard>
    <GiftCard>
      <AgentId>0</AgentId>
      <AgentName>String</AgentName>
      <CardNumber>String</CardNumber>
      <CardType>String</CardType>
      <ContactId>0</ContactId>
      <ContactName>String</ContactName>
      <DateCreated>0001-01-01T00:00:00</DateCreated>
      <DateDeleted>0001-01-01T00:00:00</DateDeleted>
      <DateModified>0001-01-01T00:00:00</DateModified>
      <FirstApptDate>0001-01-01T00:00:00</FirstApptDate>
      <GiftCardGameSetId>String</GiftCardGameSetId>
      <GiftCardId>0</GiftCardId>
      <IsReferrerCard>false</IsReferrerCard>
    </GiftCard>
  </GiftCard>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</GiftCardResponse>