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}
namespace MyApp.ServiceModel

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type QuoteResponse() = 
        member val SkuId:Int32 = new Int32() with get,set
        member val Code:String = null with get,set
        member val CustomerId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val ModifyingExistingSubscription:Boolean = new Boolean() with get,set
        member val ChangingSubscriptions:Boolean = new Boolean() with get,set
        member val SwitchingLicensingModels:Boolean = new Boolean() with get,set
        member val ReplacesExistingQuantity:Boolean = new Boolean() with get,set
        member val ExistingSubscriptionQuantity:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val NewSubscriptionQuantity:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val UnusedAmount:String = null with get,set
        member val ManualProrating:Boolean = new Boolean() with get,set
        member val UnusedDays:Int32 = new Int32() with get,set
        member val Quantity:Int32 = new Int32() with get,set
        member val MinQuantity:Int32 = new Int32() with get,set
        member val MaxQuantity:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val Subtotal:String = null with get,set
        member val DiscountDescription:String = null with get,set
        member val DiscountReceived:String = null with get,set
        member val Discount:String = null with get,set
        member val Total:String = null with get,set
        member val ExpiryDate:String = null with get,set
        member val RenewalDate:String = null with get,set
        member val IsReferrer:Boolean = new Boolean() with get,set
        member val ResponseStatus:ResponseStatus = null with get,set

    [<AllowNullLiteral>]
    type GetQuote() = 
        interface IGet
        member val Id:Int32 = new Int32() with get,set
        member val Quantity:Int32 = new Int32() with get,set
        member val Coupon:String = null with get,set
        member val RenewalRef:String = null with get,set
        member val UpgradeRef:String = null with get,set

F# GetQuote DTOs

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

HTTP + JSV

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/jsv
Content-Type: text/jsv
Content-Length: length

{
	id: 0,
	quantity: 0,
	coupon: String,
	renewalRef: String,
	upgradeRef: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
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
		}
	}
}