| GET | /buyin/{brand} | Get list of buyin | Get list of paginated buyin based on the search parameters submitted |
|---|
import Foundation
import ServiceStack
public class GetBuyInPaginated : Codable
{
/**
* Richemont Brand ID
*/
// @ApiMember(Description="Richemont Brand ID")
public var brand:String
/**
* Richemont POS code
*/
// @ApiMember(Description="Richemont POS code", IsRequired=true)
public var posCode:String
/**
* Richemont Reference Code of the item
*/
// @ApiMember(Description="Richemont Reference Code of the item")
public var articleCode:String
/**
* Serial Number of the item
*/
// @ApiMember(Description="Serial Number of the item")
public var serialNumber:String
/**
* Buy-in order status code
*/
// @ApiMember(Description="Buy-in order status code")
public var buyInStatusId:String
/**
* True is the buy-in’s piece is in stock, False otherwise
*/
// @ApiMember(Description="True is the buy-in’s piece is in stock, False otherwise")
public var isInStock:Bool?
/**
* Index of the result set returned
*/
// @ApiMember(Description="Index of the result set returned", IsRequired=true)
public var page:Int
/**
* Size of the result set returned
*/
// @ApiMember(Description="Size of the result set returned", IsRequired=true)
public var items:Int
/**
* Omit precise record count - save on performance
*/
// @ApiMember(Description="Omit precise record count - save on performance")
public var noCount:Bool
/**
* Sort Expression, Possible values: 'SaleDetailIdDESC', 'DocumentDate'.
*/
// @ApiMember(Description="Sort Expression, Possible values: 'SaleDetailIdDESC', 'DocumentDate'.")
public var sortBy:String
required public init(){}
}
public class GetBuyInPaginatedResponse : Codable
{
/**
* Index of the result set returnedr
*/
// @ApiMember(Description="Index of the result set returnedr", IsRequired=true)
public var page:Int
/**
* Size of the result set returned
*/
// @ApiMember(Description="Size of the result set returned", IsRequired=true)
public var items:Int
/**
* Total amount of pages / result sets
*/
// @ApiMember(Description="Total amount of pages / result sets", IsRequired=true)
public var totalPages:Int
/**
* Total amount of results
*/
// @ApiMember(Description="Total amount of results", IsRequired=true)
public var totalResults:Int
/**
* List of Sale Details
*/
// @ApiMember(Description="List of Sale Details", IsRequired=true)
public var elements:[BuyIn]
required public init(){}
}
public class BuyIn : Codable
{
/**
* Brand Trigram, e.g. CAR, IWC; compulsory only if articleCode is not provided
*/
// @ApiMember(Description="Brand Trigram, e.g. CAR, IWC; compulsory only if articleCode is not provided", IsRequired=true)
public var brand:String
/**
* Code of BuyIn
*/
// @ApiMember(Description="Code of BuyIn", IsRequired=true)
public var buyInOrderId:Int
/**
* Richemont POS code
*/
// @ApiMember(Description="Richemont POS code", IsRequired=true)
public var posCode:String
/**
* Richemont Reference Code of the item
*/
// @ApiMember(Description="Richemont Reference Code of the item", IsRequired=true)
public var articleCode:String
/**
* Serial Number of the item
*/
// @ApiMember(Description="Serial Number of the item")
public var serialNumber:String
/**
* Buy-in order status code
*/
// @ApiMember(Description="Buy-in order status code")
public var buyInStatusId:String
/**
* Buy-in creation date
*/
// @ApiMember(Description="Buy-in creation date")
public var buyInDate:Date
/**
* Emails of Sale Representatives
*/
// @ApiMember(Description="Emails of Sale Representatives")
public var saleRepresentativeEmails:[String] = []
/**
* True is the buy-in’s piece is in stock, False otherwise
*/
// @ApiMember(Description="True is the buy-in’s piece is in stock, False otherwise")
public var isInStock:Bool
required public init(){}
}
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 /buyin/{brand} HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <GetBuyInPaginatedResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.CPO.ServiceModel"> <elements i:nil="true" /> <items>0</items> <page>0</page> <totalPages>0</totalPages> <totalResults>0</totalResults> </GetBuyInPaginatedResponse>