| GET | /purchase/pos | Get a list of authorized pos that can place orders |
|---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Richemont.Booster2.PublicApi.Purchase.ServiceModel;
namespace Richemont.Booster2.PublicApi.Purchase.ServiceModel
{
public partial class GetPurchasablePos
: IPagedRequest
{
///<summary>
///Index of the result set returned
///</summary>
[ApiMember(Description="Index of the result set returned", IsRequired=true)]
public virtual int page { get; set; }
///<summary>
///Size of the result set returned
///</summary>
[ApiMember(Description="Size of the result set returned", IsRequired=true)]
public virtual int items { get; set; }
///<summary>
///Omit precise record count - save on performance
///</summary>
[ApiMember(Description="Omit precise record count - save on performance")]
public virtual bool noCount { get; set; }
///<summary>
///Sorting expression
///</summary>
[ApiMember(Description="Sorting expression")]
public virtual string sortBy { get; set; }
///<summary>
///Brand Trigram
///</summary>
[ApiMember(Description="Brand Trigram", IsRequired=true)]
public virtual string brand { get; set; }
///<summary>
///Brand Context ID
///</summary>
[ApiMember(Description="Brand Context ID")]
public virtual string boosterContextId { get; set; }
}
public partial class GetPurchasablePosResponse
{
///<summary>
///Index of the result set returnedr
///</summary>
[ApiMember(Description="Index of the result set returnedr", IsRequired=true)]
public virtual int page { get; set; }
///<summary>
///Size of the result set returned
///</summary>
[ApiMember(Description="Size of the result set returned", IsRequired=true)]
public virtual int items { get; set; }
///<summary>
///Total amount of pages / result sets
///</summary>
[ApiMember(Description="Total amount of pages / result sets", IsRequired=true)]
public virtual int totalPages { get; set; }
///<summary>
///Total amount of results
///</summary>
[ApiMember(Description="Total amount of results", IsRequired=true)]
public virtual int totalResults { get; set; }
///<summary>
///List of Pos
///</summary>
[ApiMember(Description="List of Pos", IsRequired=true)]
public virtual IEnumerable<Pos> elements { get; set; }
}
public partial class Pos
{
///<summary>
///POS Code
///</summary>
[ApiMember(Description="POS Code", IsRequired=true)]
public virtual string posCode { get; set; }
///<summary>
///Name of the POS
///</summary>
[ApiMember(Description="Name of the POS", IsRequired=true)]
public virtual string name { get; set; }
///<summary>
///City of the POS
///</summary>
[ApiMember(Description="City of the POS", IsRequired=true)]
public virtual string city { get; set; }
///<summary>
///Address of the POS
///</summary>
[ApiMember(Description="Address of the POS", IsRequired=true)]
public virtual string address { get; set; }
///<summary>
///Country of the POS
///</summary>
[ApiMember(Description="Country of the POS", IsRequired=true)]
public virtual string country { get; set; }
///<summary>
///Brand of the POS
///</summary>
[ApiMember(Description="Brand of the POS", IsRequired=true)]
public virtual string brand { get; set; }
}
}
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 /purchase/pos HTTP/1.1 Host: dev-api-booster.richemont.com Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <GetPurchasablePosResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Purchase.ServiceModel"> <elements i:nil="true" /> <items>0</items> <page>0</page> <totalPages>0</totalPages> <totalResults>0</totalResults> </GetPurchasablePosResponse>