Booster.Microservices

<back to all web services

GetBrandPrivacyPolicy

Requires Authentication
The following routes are available for this service:
POST/warranty/v1/GetBrandPrivacyPolicy
import Foundation
import ServiceStack

public class GetBrandPrivacyPolicy : BaseRequest<String>
{
    public var countryId:String
    public var languageId:String
    public var brandTrigram:String
    public var posId:Int?

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case countryId
        case languageId
        case brandTrigram
        case posId
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        countryId = try container.decodeIfPresent(String.self, forKey: .countryId)
        languageId = try container.decodeIfPresent(String.self, forKey: .languageId)
        brandTrigram = try container.decodeIfPresent(String.self, forKey: .brandTrigram)
        posId = try container.decodeIfPresent(Int.self, forKey: .posId)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if countryId != nil { try container.encode(countryId, forKey: .countryId) }
        if languageId != nil { try container.encode(languageId, forKey: .languageId) }
        if brandTrigram != nil { try container.encode(brandTrigram, forKey: .brandTrigram) }
        if posId != nil { try container.encode(posId, forKey: .posId) }
    }
}

public class BaseRequest<TResponse : Codable> : IRequest, Codable
{
    public var sid:String
    public var app:String
    public var _os:String
    public var _appVersion:String
    public var _searchMethod:String

    required public init(){}
}


Swift GetBrandPrivacyPolicy DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /warranty/v1/GetBrandPrivacyPolicy HTTP/1.1 
Host: qp-microservices-booster.richemont.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<GetBrandPrivacyPolicy xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Sale">
  <_appVersion xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_appVersion>
  <_os xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_os>
  <_searchMethod xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_searchMethod>
  <app xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</app>
  <sid xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</sid>
  <brandTrigram>String</brandTrigram>
  <countryId>String</countryId>
  <languageId>String</languageId>
  <posId>0</posId>
</GetBrandPrivacyPolicy>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

(string)