| GET | /GetMarketplaceAdRequest | Either Gsid or PCGS is required, not both. |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BaseResponse:
total: int = 0
op_code: int = 0
error_text: Optional[str] = None
request_time: Optional[str] = None
response_time: Optional[str] = None
total_execution_time: Optional[str] = None
cached_response: bool = False
permit_access: bool = False
access_denied_message: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class MarketplaceAdItemDto:
title: Optional[str] = None
is_auction: bool = False
auction_ends: Optional[datetime.datetime] = None
buy_now_price: Decimal = decimal.Decimal(0)
view_item_url: Optional[str] = None
image_url: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class MarketplaceAdResponse(BaseResponse):
data: Optional[List[MarketplaceAdItemDto]] = None
# @Api(Description="Get CDN Marketplace ads")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetMarketplaceAdRequest:
"""
Get CDN Marketplace ads
"""
gsid: int = 0
pcgs: Optional[str] = None
number_of_items: int = 0
Python 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>