BokaMera.API.Host

<back to all web services

GetPricesAfterRebateCode

Requires Authentication
The following routes are available for this service:
POST/rebatecodes/pricesGet the new pricesGet the new prices after applying RebateCodes
namespace BokaMera.API.ServiceModel.Dtos

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

    [<AllowNullLiteral>]
    type RebateCodeTypeResponse() = 
        member val Id:Int32 = new Int32() with get,set
        member val Name:String = null with get,set
        member val Description:String = null with get,set

    [<AllowNullLiteral>]
    type AppliedRebateCodesResponse() = 
        member val RebateCodeSign:String = null with get,set
        member val RebateCodeValue:Int32 = new Int32() with get,set
        member val RebateCodeType:RebateCodeTypeResponse = null with get,set
        member val RebateCodeId:Int32 = new Int32() with get,set
        member val RebateAmount:Double = new Double() with get,set

    [<AllowNullLiteral>]
    type RebateCodePrice() = 
        ///<summary>
        ///Price Id
        ///</summary>
        [<ApiMember(Description="Price Id")>]
        member val PriceId:Nullable<Int32> = new Nullable<Int32>() with get,set

        member val PriceText:String = null with get,set
        member val PriceBeforeRebate:Nullable<Double> = new Nullable<Double>() with get,set
        member val Price:Nullable<Double> = new Nullable<Double>() with get,set
        member val VAT:Nullable<Decimal> = new Nullable<Decimal>() with get,set
        member val AppliedCodes:ResizeArray<AppliedRebateCodesResponse> = new ResizeArray<AppliedRebateCodesResponse>() with get,set

    [<AllowNullLiteral>]
    type RebateCodePriceResponse() = 
        member val RebateCodePrices:ResizeArray<RebateCodePrice> = new ResizeArray<RebateCodePrice>() with get,set
        member val ResponseStatus:ResponseStatus = null with get,set

    [<ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)>]
    [<ValidateRequest(Validator="IsAuthenticated")>]
    [<AllowNullLiteral>]
    type GetPricesAfterRebateCode() = 
        ///<summary>
        ///
        ///</summary>
        [<ApiMember(Description="", IsRequired=true)>]
        member val CompanyId:Guid = new Guid() with get,set

        ///<summary>
        ///The service you want to get the prices with rebates on
        ///</summary>
        [<ApiMember(Description="The service you want to get the prices with rebates on")>]
        member val ServiceId:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///Provide this if you like to the prices with rebate code ids
        ///</summary>
        [<ApiMember(Description="Provide this if you like to the prices with rebate code ids")>]
        member val RebateCodeIds:ResizeArray<Int32> = new ResizeArray<Int32>() with get,set

        ///<summary>
        ///Provide this if you like to the prices with rebate code signs instead of ids
        ///</summary>
        [<ApiMember(Description="Provide this if you like to the prices with rebate code signs instead of ids")>]
        member val RebateCodeSigns:ResizeArray<String> = new ResizeArray<String>() with get,set

        ///<summary>
        ///Provide this if you like to calculate the prices with the provided datetime
        ///</summary>
        [<ApiMember(Description="Provide this if you like to calculate the prices with the provided datetime", IsRequired=true)>]
        member val DateFrom:DateTime = new DateTime() with get,set

F# GetPricesAfterRebateCode 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 /rebatecodes/prices HTTP/1.1 
Host: api.bokamera.se 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"ServiceId":0,"RebateCodeIds":[0],"RebateCodeSigns":["String"]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"RebateCodePrices":[{"PriceId":0,"PriceText":"String","PriceBeforeRebate":0,"Price":0,"VAT":0,"AppliedCodes":[{"RebateCodeSign":"String","RebateCodeValue":0,"RebateCodeType":{"Id":0,"Name":"String","Description":"String"},"RebateCodeId":0,"RebateAmount":0}]}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}