openapi: 3.0.0
info:
  title: invoice
  version: '1.0'
servers:
  - url: 'http://localhost:8080'
paths:
  /invoice/create:
    parameters: []
    post:
      summary: ''
      operationId: post-invoice-create
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceCreateResponse'
              examples: {}
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceCreateRequest'
            examples:
              example- create_invoice:
                value:
                  invoiceType: 0
                  customer: 0
                  user: 0
                  supplier: 0
                  center: 0
                  variableSymbol: string
                  constantSymbol: string
                  createDate: '2019-08-24T14:15:22Z'
                  deliveryDate: '2019-08-24'
                  taxDate: '2019-08-24'
                  acountingDate: '2019-08-24'
                  DueByDate: '2019-08-24'
                  acounting: 0
                  vatClasification: 0
                  invoiceDiscount: 0
                  deliveryType: 0
                  text: string
                  note: string
                  sumPrice: 0
                  sumPriceVat: 0
                  Address:
                    - id: 0
                      street: string
                      number: string
                      zipCode: string
                      city: string
                      state: string
                  invoiceItems:
                    - name: string
                      stockItemId: 0
                      typeId: 0
                      note: string
                      quantity: 0
                      unit: 0
                      vatRate: 0
                      itemDicount: 0
                      itemCode: string
                      unitPrice: 0
                      unitPriceVat: 0
                      totalPrice: 0
                      totalPriceVat: 0
                  name: string
        description: ''
      tags:
        - invoice
components:
  schemas:
    InvoiceCreateRequest:
      description: ''
      type: object
      x-examples:
        example-1:
          id: 0
          userId: 0
          customerId: 0
          supplierId: 0
          typeId: 0
          invoiceNumber: string
          variableSymbol: string
          constantSymbol: string
          createInvoiceDate: string
          deliveryDate: string
          dueDate: string
          taxLiabilityDate: string
          paymentDueInterval: 0
          priceSumWithOutTax: 0
          operationCompanyId: 0
          centerId: 0
          paymentTypeId: 0
          transportTypeId: 0
          orderNumber: string
          orderDate: string
          accountingId: 0
          classificationDPHId: 0
          classificationKVDPHId: 0
          discountId: 0
          shippingAddressId: 0
          note: string
          InvoiceItems:
            - sotckId: 0
              typeId: string
              name: string
              quantity: 0
              unitMeasureId: 0
              unitPriceWithOutTax: 0
              taxId: 0
              accountingId: 0
              classificationDPHId: 0
              classificationKVDPHId: 0
              numberOfItemsInStock: 0
              serialNumber: string
              discountId: 0
      properties:
        id:
          type: number
        userId:
          type: integer
        customerId:
          type: integer
        supplierId:
          type: integer
        typeId:
          type: integer
        invoiceNumber:
          type: string
          minLength: 1
        variableSymbol:
          type: string
          minLength: 1
        constantSymbol:
          type: string
          minLength: 1
        createInvoiceDate:
          type: string
        deliveryDate:
          type: string
          minLength: 1
        dueDate:
          type: string
          minLength: 1
        taxLiabilityDate:
          type: string
          minLength: 1
        paymentDueInterval:
          type: number
        priceSumWithOutTax:
          type: number
        operationCompanyId:
          type: integer
        centerId:
          type: integer
        paymentTypeId:
          type: integer
        transportTypeId:
          type: integer
        orderNumber:
          type: string
        orderDate:
          type: string
          minLength: 1
        accountingId:
          type: integer
        classificationDPHId:
          type: integer
        classificationKVDPHId:
          type: integer
        discountId:
          type: integer
        shippingAddressId:
          type: integer
        note:
          type: string
        InvoiceItems:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceItems'
      title: ''
    InvoiceItems:
      description: ''
      type: object
      x-examples:
        example-1:
          sotckId: 0
          typeId: string
          name: string
          quantity: 0
          unitMeasureId: 0
          unitPriceWithOutTax: 0
          taxId: 0
          accountingId: 0
          classificationDPHId: 0
          classificationKVDPHId: 0
          numberOfItemsInStock: 0
          serialNumber: string
          discountId: 0
      properties:
        stockId:
          type: integer
        typeId:
          type: string
        name:
          type: string
          minLength: 1
        quantity:
          type: number
        unitMeasureId:
          type: integer
        unitPriceWithOutTax:
          type: number
        taxId:
          type: integer
        accountingId:
          type: number
        classificationDPHId:
          type: integer
        classificationKVDPHId:
          type: integer
        numberOfItemsInStock:
          type: number
        serialNumber:
          type: string
          minLength: 1
        discountId:
          type: integer
        note:
          type: string
    InvoiceCreateResponse:
      description: ''
      type: object
      x-examples:
        example-1:
          id: 0
      properties:
        id:
          type: integer
      required:
        - id
