POST | /rebatecodes/prices | Get the new prices | Get the new prices after applying RebateCodes |
---|
export class RebateCodeTypeResponse
{
public Id: number;
public Name: string;
public Description: string;
public constructor(init?: Partial<RebateCodeTypeResponse>) { (Object as any).assign(this, init); }
}
export class AppliedRebateCodesResponse
{
public RebateCodeSign: string;
public RebateCodeValue: number;
public RebateCodeType: RebateCodeTypeResponse;
public RebateCodeId: number;
public RebateAmount: number;
public constructor(init?: Partial<AppliedRebateCodesResponse>) { (Object as any).assign(this, init); }
}
export class RebateCodePrice
{
/** @description Price Id */
// @ApiMember(Description="Price Id")
public PriceId?: number;
public PriceText: string;
public PriceBeforeRebate?: number;
public Price?: number;
public VAT?: number;
public AppliedCodes: AppliedRebateCodesResponse[];
public constructor(init?: Partial<RebateCodePrice>) { (Object as any).assign(this, init); }
}
export class RebateCodePriceResponse
{
public RebateCodePrices: RebateCodePrice[];
public ResponseStatus: ResponseStatus;
public constructor(init?: Partial<RebateCodePriceResponse>) { (Object as any).assign(this, init); }
}
// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
// @ValidateRequest(Validator="IsAuthenticated")
export class GetPricesAfterRebateCode
{
/** @description */
// @ApiMember(Description="", IsRequired=true)
public CompanyId: string;
/** @description The service you want to get the prices with rebates on */
// @ApiMember(Description="The service you want to get the prices with rebates on")
public ServiceId?: number;
/** @description Provide this if you like to the prices with rebate code ids */
// @ApiMember(Description="Provide this if you like to the prices with rebate code ids")
public RebateCodeIds: number[];
/** @description Provide this if you like to the prices with rebate code signs instead of ids */
// @ApiMember(Description="Provide this if you like to the prices with rebate code signs instead of ids")
public RebateCodeSigns: string[];
/** @description Provide this if you like to calculate the prices with the provided datetime */
// @ApiMember(Description="Provide this if you like to calculate the prices with the provided datetime", IsRequired=true)
public DateFrom: string;
public constructor(init?: Partial<GetPricesAfterRebateCode>) { (Object as any).assign(this, init); }
}
TypeScript GetPricesAfterRebateCode 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 /rebatecodes/prices HTTP/1.1
Host: api.bokamera.se
Accept: application/json
Content-Type: application/json
Content-Length: length
{"ServiceId":0,"RebateCodeIds":[0],"RebateCodeSigns":["String"]}
HTTP/1.1 200 OK Content-Type: application/json 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"}}}