| GET | /stock/{brand}/{posCode} | Get Paginated Stock |
|---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Richemont.Booster2.PublicApi.Stock.ServiceModel
Namespace Global
Namespace Richemont.Booster2.PublicApi.Stock.ServiceModel
Public Partial Class GetStockPaginated
Implements IPagedRequest
'''<Summary>
'''Brand
'''</Summary>
<ApiMember(Description:="Brand", IsRequired:=true)>
Public Overridable Property brand As String
'''<Summary>
'''POS Legacy
'''</Summary>
<ApiMember(Description:="POS Legacy", IsRequired:=true)>
Public Overridable Property posCode As String
'''<Summary>
'''Search Key (Article or SerialNumber)
'''</Summary>
<ApiMember(Description:="Search Key (Article or SerialNumber)")>
Public Overridable Property searchKey As String
'''<Summary>
'''Index of the result set returned
'''</Summary>
<ApiMember(Description:="Index of the result set returned")>
Public Overridable Property page As Integer
'''<Summary>
'''Size of the result set returned
'''</Summary>
<ApiMember(Description:="Size of the result set returned")>
Public Overridable Property items As Integer
'''<Summary>
'''Omit precise record count - save on performance
'''</Summary>
<ApiMember(Description:="Omit precise record count - save on performance")>
Public Overridable Property noCount As Boolean
'''<Summary>
'''Sorting expression
'''</Summary>
<ApiMember(Description:="Sorting expression")>
Public Overridable Property sortBy As String
'''<Summary>
'''Parameter - Include Chain POSes Stock
'''</Summary>
<ApiMember(Description:="Parameter - Include Chain POSes Stock ")>
Public Overridable Property includeChainPosesStock As Boolean
'''<Summary>
'''Include Retail Sales Price in the Output, by default: false
'''</Summary>
<ApiMember(Description:="Include Retail Sales Price in the Output, by default: false")>
Public Overridable Property includeRSP As Boolean
End Class
Public Partial Class GetStockPaginatedResponse
'''<Summary>
'''Total Pages
'''</Summary>
<ApiMember(Description:="Total Pages", IsRequired:=true)>
Public Overridable Property totalPages As Integer
'''<Summary>
'''Total Results
'''</Summary>
<ApiMember(Description:="Total Results", IsRequired:=true)>
Public Overridable Property totalResults As Integer
'''<Summary>
'''Index of the result set returned
'''</Summary>
<ApiMember(Description:="Index of the result set returned", IsRequired:=true)>
Public Overridable Property page As Integer
'''<Summary>
'''Size of the result set returned
'''</Summary>
<ApiMember(Description:="Size of the result set returned", IsRequired:=true)>
Public Overridable Property items As Integer
'''<Summary>
'''List of movements
'''</Summary>
<ApiMember(Description:="List of movements", IsRequired:=true)>
Public Overridable Property elements As IEnumerable(Of PaginatedStockElement)
End Class
Public Partial Class PaginatedStockElement
'''<Summary>
'''Pos Code
'''</Summary>
<ApiMember(Description:="Pos Code", IsRequired:=true)>
Public Overridable Property posCode As String
'''<Summary>
'''Pos Code To Be Displayed
'''</Summary>
<ApiMember(Description:="Pos Code To Be Displayed", IsRequired:=true)>
Public Overridable Property posCodeToBeDisplayed As String
'''<Summary>
'''Article Code
'''</Summary>
<ApiMember(Description:="Article Code", IsRequired:=true)>
Public Overridable Property articleCode As String
'''<Summary>
'''Serial Number
'''</Summary>
<ApiMember(Description:="Serial Number")>
Public Overridable Property serialNumber As String
'''<Summary>
'''Current Stock Quantity
'''</Summary>
<ApiMember(Description:="Current Stock Quantity", IsRequired:=true)>
Public Overridable Property quantity As Integer
'''<Summary>
'''Type e.g. consignment or standard
'''</Summary>
<ApiMember(Description:="Type e.g. consignment or standard", IsRequired:=true)>
Public Overridable Property type As String
'''<Summary>
'''Is Consignment Sellable
'''</Summary>
<ApiMember(Description:="Is Consignment Sellable ", IsRequired:=true)>
Public Overridable Property isConsignmentSellable As Boolean
'''<Summary>
'''Retail Sales Price
'''</Summary>
<ApiMember(Description:="Retail Sales Price", IsRequired:=true)>
Public Overridable Property retailSalesPrice As RetailSalesPrice
End Class
Public Partial Class RetailSalesPrice
'''<Summary>
'''Currency Iso Code
'''</Summary>
<ApiMember(Description:="Currency Iso Code", IsRequired:=true)>
Public Overridable Property currencyIsoCode As String
'''<Summary>
'''Value
'''</Summary>
<ApiMember(Description:="Value", IsRequired:=true)>
Public Overridable Property value As Nullable(Of Decimal)
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /stock/{brand}/{posCode} HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
totalPages: 0,
totalResults: 0,
page: 0,
items: 0
}