/* Options: Date: 2024-11-21 12:43:10 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //GlobalNamespace: //MakePropertiesOptional: False //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: UpdateRebateCode.* //ExcludeTypes: //DefaultImports: */ export interface IReturn { createResponse(): T; } export interface ICompany { CompanyId?: string; } // @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 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 RebateCodeTransactionQueryResponse { public Id: number; public CompanyId: string; public Note: string; public RebateCodeId: number; public RebateCodeSign: string; public RebateCodeTypeId?: number; public RebateCodeTypeName: string; public Amount: number; public BookingId?: number; public UpdatedDate: string; public CreatedDate: string; public Service: RebateCodeServiceResponse; public Customer: RebateCodeCustomerResponse; public PriceSign: 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 ArticleResponse { public CompanyId: string; public Id: number; public Name: string; public ArticleTypeId: number; public Description: string; public ImageUrl: string; public Active: boolean; public Amount: number; public Price: number; public CurrencyId: string; public UpdatedDate: string; public CreatedDate: string; public Services: ArticleServiceRelation[]; public ServiceIds: number[]; public PriceSign: string; 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 DaysOfWeek: DaysOfWeekResponse[]; public Services: RebateCodeServiceResponse[]; public Article: ArticleResponse; public Transactions: RebateCodeTransactionQueryResponse[]; public RemainingAmount?: number; public RemainingUsage?: number; public Customers: RebateCodeCustomerResponse[]; public ResponseStatus: ResponseStatus; public PaymentReceived: boolean; public RebateCodeCurrencySign: string; public ActiveByStatus: boolean; public PriceSign: string; public RebateCodeTypeName: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @Route("/rebatecodes/{Id}", "PUT") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") export class UpdateRebateCode implements IReturn, ICompany { /** @description Id of the rebate code */ // @ApiMember(Description="Id of the rebate code", IsRequired=true, ParameterType="path") public Id: number; 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 AutoGenerateRebateCodeSign=true - random generate code */ // @ApiMember(Description="AutoGenerateRebateCodeSign=true - random generate code") public AutoGenerateRebateCodeSign: boolean; /** @description 1 - Percent, 2 - Сurrency */ // @ApiMember(Description="1 - Percent, 2 - Сurrency") public RebateCodeTypeId: number; /** @description */ // @ApiMember(Description="") public ValidFrom?: string; /** @description */ // @ApiMember(Description="") 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 RebateCodeValue?: number; /** @description Is empty - random generate code, is not empty - more than four letters, unique among active codes */ // @ApiMember(Description="Is empty - random generate code, is not empty - more than four letters, unique among active codes") public RebateCodeSign: string; /** @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 'UpdateRebateCode'; } public getMethod() { return 'PUT'; } public createResponse() { return new RebateCodeResponse(); } }