/* Options: Date: 2024-11-21 16:57:18 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //GlobalNamespace: //MakePartial: True //MakeVirtual: True //MakeInternal: False //MakeDataContractsExtensible: False //AddNullableAnnotations: False //AddReturnMarker: True //AddDescriptionAsComments: True //AddDataContractAttributes: False //AddIndexesToDataMembers: False //AddGeneratedCodeAttributes: False //AddResponseStatus: False //AddImplicitVersion: //InitializeCollections: True //ExportValueTypes: False IncludeTypes: CustomerQuery.* //ExcludeTypes: //AddNamespaces: //AddDefaultXmlNamespace: http://schemas.servicestack.net/types */ using System; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using ServiceStack; using ServiceStack.DataAnnotations; using System.Globalization; using ServiceStack.Data; using System.IO; using BokaMera.API.ServiceModel.Db; using BokaMera.API.ServiceModel.Dtos; using PaysonIntegrationCO2.Models; namespace BokaMera.API.ServiceModel.Db { public partial class BaseModel { } public partial class Customer : BaseModel, IUser, ICustomFieldTable { public virtual int IdentityId { get; set; } public virtual Guid Id { get; set; } [Ignore] public virtual Guid CustomerId { get; set; } [Ignore] public virtual IList AccessKeys { get; set; } public virtual string Email { get; set; } [Ignore] public virtual IList ExternalReferences { get; set; } [Ignore] public virtual Company Company { get; set; } [Ignore] public virtual IList CustomFieldsConfig { get; set; } [Ignore] public virtual IList CustomFieldsData { get; set; } [Ignore] public virtual IList Comments { get; set; } [Ignore] public virtual IList RebateCodes { get; set; } public virtual string Firstname { get; set; } [Ignore] public virtual string ImageUrl { get; set; } [Required] public virtual bool Active { get; set; } public virtual string FacebookUsername { get; set; } [Required] public virtual DateTime Updated { get; set; } [Required] public virtual DateTime Created { get; set; } public virtual string IpAddress { get; set; } public virtual DateTimeOffset? ModifiedDate { get; set; } public virtual string TextField1 { get; set; } public virtual string TextField2 { get; set; } public virtual string TextField3 { get; set; } public virtual string TextField4 { get; set; } public virtual string TextField5 { get; set; } public virtual string TextField6 { get; set; } public virtual string TextField7 { get; set; } public virtual string TextField8 { get; set; } public virtual string TextField9 { get; set; } public virtual string TextField10 { get; set; } public virtual string TextField11 { get; set; } public virtual string TextField12 { get; set; } public virtual string TextField13 { get; set; } public virtual string TextField14 { get; set; } public virtual string TextField15 { get; set; } public virtual string TextField16 { get; set; } public virtual string TextField17 { get; set; } public virtual string TextField18 { get; set; } public virtual string TextField19 { get; set; } public virtual string TextField20 { get; set; } public virtual Guid UserId { get; set; } public virtual string Lastname { get; set; } public virtual string Phone { get; set; } public virtual string CorporateIdentityNumber { get; set; } public virtual string InvoiceAddress1 { get; set; } public virtual string InvoiceAddress2 { get; set; } public virtual string InvoiceCity { get; set; } public virtual string InvoicePostalCode { get; set; } public virtual string InvoiceCountryCode { get; set; } [Required] public virtual Guid CompanyId { get; set; } public virtual bool SubscribedToNewsletter { get; set; } } public partial class UserAccessKeys : BaseModel { [Required] public virtual Guid CompanyId { get; set; } [Required] public virtual int AccessKeyTypeId { get; set; } [Required] public virtual string Value { get; set; } [Required] public virtual Guid CustomerId { get; set; } public virtual string Description { get; set; } [Required] public virtual Guid Id { get; set; } } } namespace BokaMera.API.ServiceModel.Dtos { public partial class CustomerCommentsResponse { public virtual int Id { get; set; } public virtual Guid CustomerId { get; set; } public virtual string Comments { get; set; } public virtual DateTime Updated { get; set; } public virtual DateTime Created { get; set; } public virtual Uri ImageUrl { get; set; } } [Route("/customers", "GET")] [ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)] [ValidateRequest("IsAuthenticated")] public partial class CustomerQuery : QueryDb, IReturn> { /// ///Enter the company and id you want to see the information for a customer, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown /// [ApiMember(Description="Enter the company and id you want to see the information for a customer, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown ", IsRequired=true, ParameterType="query")] public virtual Guid? CompanyId { get; set; } /// ///Enter the customer id you want to see the information for a customer. Only admins are allowed to see all customers on their company, users can only see their own customer info. /// [ApiMember(Description="Enter the customer id you want to see the information for a customer. Only admins are allowed to see all customers on their company, users can only see their own customer info.", ParameterType="query")] public virtual Guid? CustomerId { get; set; } /// ///Enter the user id you want to see the information for a customer. Only admins are allowed to see all customers on their company, users can only see their own customer info. User Id is the userprofile /// [ApiMember(Description="Enter the user id you want to see the information for a customer. Only admins are allowed to see all customers on their company, users can only see their own customer info. User Id is the userprofile", ParameterType="query")] public virtual Guid? UserId { get; set; } /// ///Will search by any customer name,phone or email that contains the searchstring provided. /// [ApiMember(Description="Will search by any customer name,phone or email that contains the searchstring provided.", ParameterType="query")] public virtual string Search { get; set; } /// ///If you want to filter on visible customers. /// [ApiMember(Description="If you want to filter on visible customers.", ParameterType="query")] public virtual bool? Visible { get; set; } /// ///If you want to include the connected custom fields /// [ApiMember(DataType="boolean", Description="If you want to include the connected custom fields", ParameterType="query")] public virtual bool IncludeCustomFieldValues { get; set; } /// ///If you want to include the connected custom fields /// [ApiMember(DataType="boolean", Description="If you want to include the connected custom fields", ParameterType="query")] public virtual bool IncludeCustomFields { get; set; } /// ///If you want to include the comments on the customer /// [ApiMember(DataType="boolean", Description="If you want to include the comments on the customer", ParameterType="query")] public virtual bool IncludeComments { get; set; } /// ///If you want to include the accesskeys /// [ApiMember(Description="If you want to include the accesskeys")] public virtual bool IncludeAccessKeys { get; set; } /// ///If you want to include invoice address /// [ApiMember(Description="If you want to include invoice address")] public virtual bool IncludeInvoiceAddress { get; set; } } public partial class CustomerQueryResponse { public CustomerQueryResponse() { CustomFields = new List{}; CustomFieldValues = new List{}; Comments = new List{}; AccessKeys = new List{}; } public virtual Guid Id { get; set; } public virtual string Firstname { get; set; } public virtual string Lastname { get; set; } public virtual string Email { get; set; } public virtual string Phone { get; set; } public virtual string ImageUrl { get; set; } public virtual List CustomFields { get; set; } public virtual List CustomFieldValues { get; set; } public virtual List Comments { get; set; } public virtual List AccessKeys { get; set; } public virtual DateTime Updated { get; set; } public virtual DateTime Created { get; set; } public virtual Object ResponseStatus { get; set; } public virtual bool SubscribedToNewsletter { get; set; } public virtual InvoiceAddress InvoiceAddress { get; set; } } public partial class CustomFieldConfigData { public CustomFieldConfigData() { Values = new List{}; } /// ///Custom field id /// [ApiMember(Description="Custom field id")] public virtual int Id { get; set; } /// ///Configuration name. Example: 'Number of persons'. /// [ApiMember(Description="Configuration name. Example: 'Number of persons'.")] public virtual string Name { get; set; } /// ///Custom field description. Example: 'For how many persons is this booking?' /// [ApiMember(Description="Custom field description. Example: 'For how many persons is this booking?'")] public virtual string Description { get; set; } /// ///Field width. Example: 20 for 20px /// [ApiMember(Description="Field width. Example: 20 for 20px")] public virtual int? Width { get; set; } /// ///Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' /// [ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'")] public virtual string DataType { get; set; } /// ///Default value of the field. Example: '3' /// [ApiMember(Description="Default value of the field. Example: '3'")] public virtual string DefaultValue { get; set; } /// ///Determines if the field is required to have a value or not /// [ApiMember(Description="Determines if the field is required to have a value or not")] public virtual bool IsMandatory { get; set; } /// ///Error message shown to the user if the field data is required but not entered /// [ApiMember(Description="Error message shown to the user if the field data is required but not entered")] public virtual string MandatoryErrorMessage { get; set; } /// ///Max lenght of the field /// [ApiMember(Description="Max lenght of the field")] public virtual int MaxLength { get; set; } /// ///If the field should have multiple lines /// [ApiMember(Description="If the field should have multiple lines")] public virtual bool MultipleLineText { get; set; } /// ///Regular expression used for validation of the field /// [ApiMember(Description="Regular expression used for validation of the field")] public virtual string RegEx { get; set; } /// ///Error message shown if the regular expression validation failed /// [ApiMember(Description="Error message shown if the regular expression validation failed")] public virtual string RegExErrorMessage { get; set; } /// ///The values to select from if Datatype is DropDown for this custom field /// [ApiMember(Description="The values to select from if Datatype is DropDown for this custom field")] public virtual List Values { get; set; } } public partial class CustomFieldDataResponse { public virtual int Id { get; set; } public virtual string Column { get; set; } public virtual string Name { get; set; } public virtual string Description { get; set; } public virtual string Value { get; set; } /// ///Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' /// [ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'")] public virtual string DataType { get; set; } } public partial class CustomFieldValueResponse { public virtual string Value { get; set; } } } namespace PaysonIntegrationCO2.Models { public partial class Customer { public virtual string City { get; set; } public virtual string CountryCode { get; set; } public virtual string IdentityNumber { get; set; } public virtual string Email { get; set; } public virtual string FirstName { get; set; } public virtual string LastName { get; set; } public virtual string Phone { get; set; } public virtual string PostalCode { get; set; } public virtual string Street { get; set; } public virtual string Reference { get; set; } public virtual CustomerType Type { get; set; } } }