/* Options: Date: 2024-11-21 11:44:40 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: CreateCustomer.* //ExcludeTypes: //DefaultImports: */ export interface IReturn { createResponse(): T; } export class AddCustomField { public Id: number; public Value: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class AddUserAccessKey { public Id?: string; public CompanyId?: string; public AccessKeyTypeId: number; public Value: string; public CustomerId?: string; public Description: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class InvoiceAddress { public CorporateIdentityNumber: string; public InvoiceAddress1: string; public InvoiceAddress2: string; public InvoiceCity: string; public InvoicePostalCode: string; public InvoiceCountryCode: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class BaseModel { public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class UserAccessKeys extends BaseModel { // @Required() public CompanyId: string; // @Required() public AccessKeyTypeId: number; // @Required() public Value: string; // @Required() public CustomerId: string; public Description: string; // @Required() public Id: string; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } export class CustomerQueryResponse { public Id: string; public Firstname: string; public Lastname: string; public Email: string; public Phone: string; public ImageUrl: string; public CustomFields: CustomFieldConfigData[]; public CustomFieldValues: CustomFieldDataResponse[]; public Comments: CustomerCommentsResponse[]; public AccessKeys: UserAccessKeys[]; public Updated: string; public Created: string; public ResponseStatus: Object; public SubscribedToNewsletter: boolean; public InvoiceAddress: InvoiceAddress; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class UpdateCustomerResponse extends CustomerQueryResponse { public FacebookUserName: string; public UserId?: string; public CompanyId?: string; public CreatedDate?: string; public DeletedAccessKeys: UserAccessKeys[]; public CreatedOrUpdatedAccessKeys: UserAccessKeys[]; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } // @Route("/customers", "POST") // @ApiResponse(Description="Returned if there is a validation error on the input parameters", StatusCode=400) // @ApiResponse(Description="Returned if the current user is not allowed to perform the action", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") export class CreateCustomer implements IReturn { /** @description Enter the company and id for the customer, if blank company id and you are an admin, your company id will be used. */ // @ApiMember(Description="Enter the company and id for the customer, if blank company id and you are an admin, your company id will be used.", ParameterType="query") public CompanyId?: string; // @ApiMember(IsRequired=true) public Firstname: string; // @ApiMember(IsRequired=true) public Lastname: string; // @ApiMember(IsRequired=true) public Phone: string; // @ApiMember() public Email: string; /** @description If Custom Fields are added to the customer, here you will send the id and the value for each custom field to be updated */ // @ApiMember(Description="If Custom Fields are added to the customer, here you will send the id and the value for each custom field to be updated") public CustomFields: AddCustomField[]; /** @description List of Access Keys */ // @ApiMember(Description="List of Access Keys") public AccessKeys: AddUserAccessKey[]; /** @description Customer invoice adress */ // @ApiMember(Description="Customer invoice adress") public InvoiceAddress: InvoiceAddress; public constructor(init?: Partial) { (Object as any).assign(this, init); } public getTypeName() { return 'CreateCustomer'; } public getMethod() { return 'POST'; } public createResponse() { return new UpdateCustomerResponse(); } }