| 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 .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"page":0,"items":0,"totalPages":0,"totalResults":0}