| GET | /GetMarketplaceAdRequest | Either Gsid or PCGS is required, not both. |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
/**
* Get CDN Marketplace ads
*/
@Api(Description="Get CDN Marketplace ads")
public static class GetMarketplaceAdRequest
{
public Long Gsid = null;
public String Pcgs = null;
public Integer NumberOfItems = null;
public Long getGsid() { return Gsid; }
public GetMarketplaceAdRequest setGsid(Long value) { this.Gsid = value; return this; }
public String getPcgs() { return Pcgs; }
public GetMarketplaceAdRequest setPcgs(String value) { this.Pcgs = value; return this; }
public Integer getNumberOfItems() { return NumberOfItems; }
public GetMarketplaceAdRequest setNumberOfItems(Integer value) { this.NumberOfItems = value; return this; }
}
public static class MarketplaceAdResponse extends BaseResponse
{
public ArrayList<MarketplaceAdItemDto> Data = null;
public ArrayList<MarketplaceAdItemDto> getData() { return Data; }
public MarketplaceAdResponse setData(ArrayList<MarketplaceAdItemDto> value) { this.Data = value; return this; }
}
public static class BaseResponse
{
public Integer Total = null;
public Integer OpCode = null;
public String ErrorText = null;
public String RequestTime = null;
public String ResponseTime = null;
public String TotalExecutionTime = null;
public Boolean CachedResponse = null;
public Boolean PermitAccess = null;
public String AccessDeniedMessage = null;
public Integer getTotal() { return Total; }
public BaseResponse setTotal(Integer value) { this.Total = value; return this; }
public Integer getOpCode() { return OpCode; }
public BaseResponse setOpCode(Integer value) { this.OpCode = value; return this; }
public String getErrorText() { return ErrorText; }
public BaseResponse setErrorText(String value) { this.ErrorText = value; return this; }
public String getRequestTime() { return RequestTime; }
public BaseResponse setRequestTime(String value) { this.RequestTime = value; return this; }
public String getResponseTime() { return ResponseTime; }
public BaseResponse setResponseTime(String value) { this.ResponseTime = value; return this; }
public String getTotalExecutionTime() { return TotalExecutionTime; }
public BaseResponse setTotalExecutionTime(String value) { this.TotalExecutionTime = value; return this; }
public Boolean isCachedResponse() { return CachedResponse; }
public BaseResponse setCachedResponse(Boolean value) { this.CachedResponse = value; return this; }
public Boolean isPermitAccess() { return PermitAccess; }
public BaseResponse setPermitAccess(Boolean value) { this.PermitAccess = value; return this; }
public String getAccessDeniedMessage() { return AccessDeniedMessage; }
public BaseResponse setAccessDeniedMessage(String value) { this.AccessDeniedMessage = value; return this; }
}
public static class MarketplaceAdItemDto
{
public String Title = null;
public Boolean IsAuction = null;
public Date AuctionEnds = null;
public BigDecimal BuyNowPrice = null;
public String ViewItemUrl = null;
public String ImageUrl = null;
public String getTitle() { return Title; }
public MarketplaceAdItemDto setTitle(String value) { this.Title = value; return this; }
public Boolean getIsAuction() { return IsAuction; }
public MarketplaceAdItemDto setIsAuction(Boolean value) { this.IsAuction = value; return this; }
public Date getAuctionEnds() { return AuctionEnds; }
public MarketplaceAdItemDto setAuctionEnds(Date value) { this.AuctionEnds = value; return this; }
public BigDecimal getBuyNowPrice() { return BuyNowPrice; }
public MarketplaceAdItemDto setBuyNowPrice(BigDecimal value) { this.BuyNowPrice = value; return this; }
public String getViewItemUrl() { return ViewItemUrl; }
public MarketplaceAdItemDto setViewItemUrl(String value) { this.ViewItemUrl = value; return this; }
public String getImageUrl() { return ImageUrl; }
public MarketplaceAdItemDto setImageUrl(String value) { this.ImageUrl = value; return this; }
}
}
Java GetMarketplaceAdRequest 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.
GET /GetMarketplaceAdRequest HTTP/1.1 Host: marketingapidev.greysheet.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<MarketplaceAdResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Cdn.MarketingApi.ResponseObjects">
<AccessDeniedMessage>String</AccessDeniedMessage>
<CachedResponse>false</CachedResponse>
<ErrorText>String</ErrorText>
<OpCode>0</OpCode>
<PermitAccess>false</PermitAccess>
<RequestTime>String</RequestTime>
<ResponseTime>String</ResponseTime>
<Total>0</Total>
<TotalExecutionTime>String</TotalExecutionTime>
<Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/Cdn.MarketingApi.Dto">
<d2p1:MarketplaceAdItemDto>
<d2p1:AuctionEnds>0001-01-01T00:00:00</d2p1:AuctionEnds>
<d2p1:BuyNowPrice>0</d2p1:BuyNowPrice>
<d2p1:ImageUrl>String</d2p1:ImageUrl>
<d2p1:IsAuction>false</d2p1:IsAuction>
<d2p1:Title>String</d2p1:Title>
<d2p1:ViewItemUrl>String</d2p1:ViewItemUrl>
</d2p1:MarketplaceAdItemDto>
</Data>
</MarketplaceAdResponse>