ServiceStack Home (Live)

<back to all web services

GetQuote

The following routes are available for this service:
All Verbs/quote/{Id}/{Quantity}
All Verbs/quote/{Id}/{Quantity}/{Coupon}
GET/GetQuote
GET/GetQuote/{Id}
import Foundation
import ServiceStack

public class GetQuote : IGet, Codable
{
    public var id:Int
    public var quantity:Int
    public var coupon:String
    public var renewalRef:String
    public var upgradeRef:String

    required public init(){}
}

public class QuoteResponse : Codable
{
    public var skuId:Int
    public var code:String
    public var customerId:Int?
    public var modifyingExistingSubscription:Bool
    public var changingSubscriptions:Bool
    public var switchingLicensingModels:Bool
    public var replacesExistingQuantity:Bool
    public var existingSubscriptionQuantity:Int?
    public var newSubscriptionQuantity:Int?
    public var unusedAmount:String
    public var manualProrating:Bool
    public var unusedDays:Int
    public var quantity:Int
    public var minQuantity:Int
    public var maxQuantity:Int?
    public var subtotal:String
    public var discountDescription:String
    public var discountReceived:String
    public var discount:String
    public var total:String
    public var expiryDate:String
    public var renewalDate:String
    public var isReferrer:Bool
    public var responseStatus:ResponseStatus

    required public init(){}
}


Swift GetQuote DTOs

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

HTTP + OTHER

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

POST /quote/{Id}/{Quantity} HTTP/1.1 
Host: account.servicestack.net 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id":0,"quantity":0,"coupon":"String","renewalRef":"String","upgradeRef":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"skuId":0,"code":"String","customerId":0,"modifyingExistingSubscription":false,"changingSubscriptions":false,"switchingLicensingModels":false,"replacesExistingQuantity":false,"existingSubscriptionQuantity":0,"newSubscriptionQuantity":0,"unusedAmount":"String","manualProrating":false,"unusedDays":0,"quantity":0,"minQuantity":0,"maxQuantity":0,"subtotal":"String","discountDescription":"String","discountReceived":"String","discount":"String","total":"String","expiryDate":"String","renewalDate":"String","isReferrer":false,"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}