/* Options: Date: 2024-06-26 13:30:31 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://testapi.bokamera.se //GlobalNamespace: //MakePropertiesOptional: False //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateRebateCode.* //ExcludeTypes: //DefaultImports: */ export interface IReturn { createResponse(): T; } // @DataContract export class ResponseError { // @DataMember(Order=1) public ErrorCode: string; // @DataMember(Order=2) public FieldName: string; // @DataMember(Order=3) public Message: string; // @DataMember(Order=4) public Meta: { [index: string]: string; }; public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @DataContract export class ResponseStatus { // @DataMember(Order=1) public ErrorCode: string; // @DataMember(Order=2) public Message: string; // @DataMember(Order=3) public StackTrace: string; // @DataMember(Order=4) public Errors: ResponseError[]; // @DataMember(Order=5) public Meta: { [index: string]: string; }; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class DaysOfWeekResponse { public Id: number; public DayOfWeek: string; public DayOfWeekTranslation: string; public DayOfWeekActive?: boolean; public DayOfWeekSortOrder?: number; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class RebateCodeServiceResponse { public Id: number; public Name: string; public Description: string; public Active: boolean; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class RebateCodeCustomerResponse { public Id: string; public Firstname: string; public Lastname: string; public Email: string; public Phone: string; public ImageUrl: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class RebateCodeTypeResponse { public ResponseStatus: ResponseStatus; public RebateCodeTypeItems: RebateCodeTypeItem[]; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class RebateCodeStatusResponse { public ResponseStatus: ResponseStatus; public RebateCodeStatusItems: RebateCodeStatusItem[]; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class RebateCodeResponse { public Id: number; public CompanyId?: string; public ValidFrom: string; public ValidTo: string; /** @description If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update. */ // @ApiMember(Description="If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.") public FromTime: string; /** @description If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters. */ // @ApiMember(Description="If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters.") public ToTime: string; public CreatedBy: string; public Created: string; public UpdatedBy: string; public Updated: string; public PersonalNote: string; public RebateCodeSign: string; public RebateCodeValue: number; public RebateCodeTypeId: number; public Name: string; public RebateCodeStatusId: number; public StatusName: string; public MaxNumberOfUses: number; public MaxNumberOfUsesPerCustomer: number; public NumberOfUsesUsed: number; public NumberOfUsesPerCustomerUsed: number; public DaysOfWeek: DaysOfWeekResponse[]; public Services: RebateCodeServiceResponse[]; public Customers: RebateCodeCustomerResponse[]; public RebateCodeTypesOptions: RebateCodeTypeResponse[]; public RebateCodeStatusOptions: RebateCodeStatusResponse[]; public ResponseStatus: ResponseStatus; public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @Route("/rebatecodes", "POST") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") export class CreateRebateCode implements IReturn { /** @description */ // @ApiMember(Description="") public CompanyId?: string; /** @description The default value is 9999 */ // @ApiMember(Description="The default value is 9999") public MaxNumberOfUses?: number; /** @description The default value is 1 */ // @ApiMember(Description="The default value is 1") public MaxNumberOfUsesPerCustomer?: number; /** @description */ // @ApiMember(Description="", IsRequired=true) public ValidFrom: string; /** @description */ // @ApiMember(Description="", IsRequired=true) public ValidTo: string; /** @description If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update. */ // @ApiMember(Description="If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.") public FromTime?: string; /** @description If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters. */ // @ApiMember(Description="If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters.") public ToTime?: string; /** @description 1 - Percent, 2 - Сurrency */ // @ApiMember(Description="1 - Percent, 2 - Сurrency", IsRequired=true) public RebateCodeTypeId: number; /** @description */ // @ApiMember(Description="", IsRequired=true) public RebateCodeValue: number; /** @description If AutoGenerateRebateCodeSign=false - more than four letters, unique among active codes */ // @ApiMember(Description="If AutoGenerateRebateCodeSign=false - more than four letters, unique among active codes") public RebateCodeSign: string; /** @description AutoGenerateRebateCodeSign=true - random generate code */ // @ApiMember(Description="AutoGenerateRebateCodeSign=true - random generate code") public AutoGenerateRebateCodeSign: boolean; /** @description */ // @ApiMember(Description="") public PersonalNote: string; /** @description */ // @ApiMember(Description="") public DaysOfWeek: number[]; /** @description */ // @ApiMember(Description="") public Services: number[]; /** @description */ // @ApiMember(Description="") public Customers: string[]; public constructor(init?: Partial) { (Object as any).assign(this, init); } public getTypeName() { return 'CreateRebateCode'; } public getMethod() { return 'POST'; } public createResponse() { return new RebateCodeResponse(); } }