' Options:
'Date: 2025-04-15 01:46:37
'Version: 8.23
'Tip: To override a DTO option, remove "''" prefix before updating
'BaseUrl: https://testapi.bokamera.se
'
'''GlobalNamespace: 
'''MakePartial: True
'''MakeVirtual: True
'''MakeDataContractsExtensible: False
'''AddReturnMarker: True
'''AddDescriptionAsComments: True
'''AddDataContractAttributes: False
'''AddIndexesToDataMembers: False
'''AddGeneratedCodeAttributes: False
'''AddResponseStatus: False
'''AddImplicitVersion: 
'''InitializeCollections: True
'''ExportValueTypes: False
'IncludeTypes: CreateCustomer.*
'''ExcludeTypes: 
'''AddNamespaces: 
'''AddDefaultXmlNamespace: http://schemas.servicestack.net/types

Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports System.Globalization
Imports ServiceStack.Data
Imports System.IO
Imports System.Net
Imports System.Net.Http.Headers
Imports BokaMera.API.ServiceModel.Dtos
Imports BokaMera.API.ServiceModel.Db

Namespace Global

    Namespace BokaMera.API.ServiceModel.Db

        Public Partial Class BaseModel
        End Class

        Public Partial Class UserAccessKeys
            Inherits BaseModel
            <Required>
            Public Overridable Property CompanyId As Guid

            <Required>
            Public Overridable Property AccessKeyTypeId As Integer

            <Required>
            Public Overridable Property Value As String

            <Required>
            Public Overridable Property CustomerId As Guid

            Public Overridable Property Description As String
            <Required>
            Public Overridable Property Id As Guid
        End Class
    End Namespace

    Namespace BokaMera.API.ServiceModel.Dtos

        Public Partial Class AddCustomField
            Public Overridable Property Id As Integer
            Public Overridable Property Value As String
        End Class

        Public Partial Class AddUserAccessKey
            Public Overridable Property Id As Nullable(Of Guid)
            Public Overridable Property CompanyId As Nullable(Of Guid)
            Public Overridable Property AccessKeyTypeId As Integer
            Public Overridable Property Value As String
            Public Overridable Property CustomerId As Nullable(Of Guid)
            Public Overridable Property Description As String
        End Class

        <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")>
        Public Partial Class CreateCustomer
            Implements IReturn(Of UpdateCustomerResponse)
            Public Sub New()
                CustomFields = New List(Of AddCustomField)
                AccessKeys = New List(Of AddUserAccessKey)
            End Sub

            '''<Summary>
            '''Enter the company and id for the customer, if blank company id and you are an admin, your company id will be used.
            '''</Summary>
            <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 Overridable Property CompanyId As Nullable(Of Guid)

            <ApiMember(IsRequired:=true)>
            Public Overridable Property Firstname As String

            <ApiMember(IsRequired:=true)>
            Public Overridable Property Lastname As String

            <ApiMember(IsRequired:=true)>
            Public Overridable Property Phone As String

            <ApiMember>
            Public Overridable Property Email As String

            '''<Summary>
            '''If Custom Fields are added to the customer, here you will send the id and the value for each custom field to be updated
            '''</Summary>
            <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 Overridable Property CustomFields As List(Of AddCustomField)

            '''<Summary>
            '''List of Access Keys
            '''</Summary>
            <ApiMember(Description:="List of Access Keys")>
            Public Overridable Property AccessKeys As List(Of AddUserAccessKey)

            '''<Summary>
            '''Customer invoice adress
            '''</Summary>
            <ApiMember(Description:="Customer invoice adress")>
            Public Overridable Property InvoiceAddress As InvoiceAddress
        End Class

        Public Partial Class CustomerQueryResponse
            Public Sub New()
                CustomFields = New List(Of CustomFieldConfigData)
                CustomFieldValues = New List(Of CustomFieldDataResponse)
                Comments = New List(Of CustomerCommentsResponse)
                AccessKeys = New List(Of UserAccessKeys)
            End Sub

            Public Overridable Property Id As Guid
            Public Overridable Property Firstname As String
            Public Overridable Property Lastname As String
            Public Overridable Property Email As String
            Public Overridable Property Phone As String
            Public Overridable Property ImageUrl As String
            Public Overridable Property CustomFields As List(Of CustomFieldConfigData)
            Public Overridable Property CustomFieldValues As List(Of CustomFieldDataResponse)
            Public Overridable Property Comments As List(Of CustomerCommentsResponse)
            Public Overridable Property AccessKeys As List(Of UserAccessKeys)
            Public Overridable Property Updated As Date
            Public Overridable Property Created As Date
            Public Overridable Property ResponseStatus As Object
            Public Overridable Property SubscribedToNewsletter As Boolean
            Public Overridable Property InvoiceAddress As InvoiceAddress
        End Class

        Public Partial Class UpdateCustomerResponse
            Inherits CustomerQueryResponse
            Public Sub New()
                DeletedAccessKeys = New List(Of UserAccessKeys)
                CreatedOrUpdatedAccessKeys = New List(Of UserAccessKeys)
            End Sub

            Public Overridable Property FacebookUserName As String
            Public Overridable Property UserId As Nullable(Of Guid)
            Public Overridable Property CompanyId As Nullable(Of Guid)
            Public Overridable Property CreatedDate As Nullable(Of Date)
            Public Overridable Property DeletedAccessKeys As List(Of UserAccessKeys)
            Public Overridable Property CreatedOrUpdatedAccessKeys As List(Of UserAccessKeys)
        End Class
    End Namespace
End Namespace