All Verbs | /quote/{Id}/{Quantity} | ||
---|---|---|---|
All Verbs | /quote/{Id}/{Quantity}/{Coupon} | ||
GET | /GetQuote | ||
GET | /GetQuote/{Id} |
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
open class GetQuote : IGet
{
open var id:Int? = null
open var quantity:Int? = null
open var coupon:String? = null
open var renewalRef:String? = null
open var upgradeRef:String? = null
}
open class QuoteResponse
{
open var skuId:Int? = null
open var code:String? = null
open var customerId:Int? = null
open var modifyingExistingSubscription:Boolean? = null
open var changingSubscriptions:Boolean? = null
open var switchingLicensingModels:Boolean? = null
open var replacesExistingQuantity:Boolean? = null
open var existingSubscriptionQuantity:Int? = null
open var newSubscriptionQuantity:Int? = null
open var unusedAmount:String? = null
open var manualProrating:Boolean? = null
open var unusedDays:Int? = null
open var quantity:Int? = null
open var minQuantity:Int? = null
open var maxQuantity:Int? = null
open var subtotal:String? = null
open var discountDescription:String? = null
open var discountReceived:String? = null
open var discount:String? = null
open var total:String? = null
open var expiryDate:String? = null
open var renewalDate:String? = null
open var isReferrer:Boolean? = null
open var responseStatus:ResponseStatus? = null
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=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 } } }