POST | /v1/motability/pricing | Gets the motability pricing information for the current user role | Gets the motability pricing information for the current user role |
---|
import Foundation
import ServiceStack
public class GetMotabilityPricingRequest : Codable
{
required public init(){}
}
public class GetMotabilityPricingResponse : Codable
{
public var motabilityPricing:[MotabilityPricing] = []
required public init(){}
}
public class MotabilityPricing : MotabilityPricingCsv
{
public var motabilityPricingStatus:MotabilityPricingStatus
required public init(){ super.init() }
private enum CodingKeys : String, CodingKey {
case motabilityPricingStatus
}
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
let container = try decoder.container(keyedBy: CodingKeys.self)
motabilityPricingStatus = try container.decodeIfPresent(MotabilityPricingStatus.self, forKey: .motabilityPricingStatus)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
if motabilityPricingStatus != nil { try container.encode(motabilityPricingStatus, forKey: .motabilityPricingStatus) }
}
}
public class MotabilityPricingCsv : Codable
{
// @DataMember(Order=0)
public var id:Int
// @DataMember(Order=1)
public var criteriaBM7NST:String
// @DataMember(Order=2)
public var vtn:String
// @DataMember(Order=3)
public var backOrderDropDown:String
// @DataMember(Order=4)
public var criteriaFullModelYearCode:String
// @DataMember(Order=5)
public var criteriaValidOptionCodes:String
// @DataMember(Order=6)
public var criteriaInvalidOptionCodes:String
// @DataMember(Order=7)
public var pipNet:Double
// @DataMember(Order=8)
public var pipVat:Double
// @DataMember(Order=9)
public var pipGross:Double
// @DataMember(Order=10)
public var wpmsNet:Double
// @DataMember(Order=11)
public var wpmsVat:Double
// @DataMember(Order=12)
public var wpmsGross:Double
// @DataMember(Order=13)
public var discountNet:Double
// @DataMember(Order=14)
public var discountVat:Double
// @DataMember(Order=15)
public var discountGross:Double
// @DataMember(Order=16)
public var listPriceNet:Double
// @DataMember(Order=17)
public var listPriceVat:Double
// @DataMember(Order=18)
public var listPriceGross:Double
// @DataMember(Order=19)
public var deliveryChargeNet:Double
// @DataMember(Order=20)
public var deliveryChargeVat:Double
// @DataMember(Order=21)
public var deliveryChargeGross:Double
// @DataMember(Order=22)
public var fuelChargeNet:Double
// @DataMember(Order=23)
public var fuelChargeVat:Double
// @DataMember(Order=24)
public var fuelChargeGross:Double
// @DataMember(Order=25)
public var numberPlateFeeNet:Double
// @DataMember(Order=26)
public var numberPlateFeeVat:Double
// @DataMember(Order=27)
public var numberPlateFeeGross:Double
// @DataMember(Order=28)
public var firstRegistrationFeeNet:Double
// @DataMember(Order=29)
public var firstRegistrationFeeVat:Double
// @DataMember(Order=30)
public var firstRegistrationFeeGross:Double
// @DataMember(Order=31)
public var roadFundLicenceNet:Double
// @DataMember(Order=32)
public var roadFundLicenceVat:Double
// @DataMember(Order=33)
public var roadFundLicenceGross:Double
// @DataMember(Order=34)
public var validFrom:Date
// @DataMember(Order=35)
public var validTo:Date
required public init(){}
}
public enum MotabilityPricingStatus : String, Codable
{
case Pending
case Current
case RecentlyExpired
case Expired
}
Swift GetMotabilityPricingRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/motability/pricing HTTP/1.1
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk
Accept: application/json
Content-Type: application/json
Content-Length: length
{}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"MotabilityPricing":[{"MotabilityPricingStatus":"Pending","Id":0,"CriteriaBM7NST":"String","VTN":"String","BackOrderDropDown":"String","CriteriaFullModelYearCode":"String","CriteriaValidOptionCodes":"String","CriteriaInvalidOptionCodes":"String","PIPNet":0,"PIPVat":0,"PIPGross":0,"WPMSNet":0,"WPMSVat":0,"WPMSGross":0,"DiscountNet":0,"DiscountVat":0,"DiscountGross":0,"ListPriceNet":0,"ListPriceVat":0,"ListPriceGross":0,"DeliveryChargeNet":0,"DeliveryChargeVat":0,"DeliveryChargeGross":0,"FuelChargeNet":0,"FuelChargeVat":0,"FuelChargeGross":0,"NumberPlateFeeNet":0,"NumberPlateFeeVat":0,"NumberPlateFeeGross":0,"FirstRegistrationFeeNet":0,"FirstRegistrationFeeVat":0,"FirstRegistrationFeeGross":0,"RoadFundLicenceNet":0,"RoadFundLicenceVat":0,"RoadFundLicenceGross":0,"ValidFrom":"\/Date(-62135596800000-0000)\/","ValidTo":"\/Date(-62135596800000-0000)\/"}]}