Revert "DC-51: penetrate invoice cart into invoice template (#129)" (#133)

This reverts commit f1d58765f6.
This commit is contained in:
Evgeny Levenets 2017-10-27 13:34:45 +03:00 committed by GitHub
parent f1d58765f6
commit 2d94bae176
12 changed files with 37 additions and 62 deletions

View File

@ -2,8 +2,9 @@ type: object
required:
- id
- shopID
- product
- lifetime
- details
- cost
properties:
id:
description: Идентификатор шаблона инвойса
@ -12,14 +13,18 @@ properties:
description: Идентификатор магазина
type: string
maxLength: 40
product:
description: Наименование предлагаемых товаров или услуг
type: string
maxLength: 100
description:
description: Описание предлагаемых товаров или услуг
type: string
maxLength: 1000
lifetime:
$ref: '#/definitions/LifetimeInterval'
details:
$ref: '#/definitions/InvoiceTemplateDetails'
cost:
$ref: '#/definitions/InvoiceTemplateCost'
metadata:
description: >
Метаданные, которые будут связаны с инвойсом, созданным по шаблону, в

View File

@ -0,0 +1,10 @@
type: object
discriminator: invoiceTemplateCostType
description: |
Ограничения на стоимость товаров и услуг для инвойсов, генерируемых по
шаблону.
required:
- invoiceTemplateCostType
properties:
invoiceTemplateCostType:
type: string

View File

@ -1,6 +1,6 @@
type: object
allOf:
- $ref: '#/definitions/InvoiceTemplateLineCost'
- $ref: '#/definitions/InvoiceTemplateCost'
- type: object
required:
- currency

View File

@ -1,6 +1,6 @@
type: object
allOf:
- $ref: '#/definitions/InvoiceTemplateLineCost'
- $ref: '#/definitions/InvoiceTemplateCost'
- type: object
required:
- currency

View File

@ -0,0 +1,3 @@
type: object
allOf:
- $ref: '#/definitions/InvoiceTemplateCost'

View File

@ -1,21 +1,26 @@
type: object
required:
- shopID
- product
- lifetime
- details
- cost
properties:
shopID:
description: Идентификатор магазина
type: string
maxLength: 40
product:
description: Наименование предлагаемых товаров или услуг
type: string
maxLength: 100
description:
description: Описание предлагаемых товаров или услуг
type: string
maxLength: 1000
lifetime:
$ref: '#/definitions/LifetimeInterval'
details:
$ref: '#/definitions/InvoiceTemplateDetails'
cost:
$ref: '#/definitions/InvoiceTemplateCost'
metadata:
description: >
Метаданные, которые будут связаны с инвойсом, созданным по шаблону, в

View File

@ -1,7 +0,0 @@
type: object
discriminator: templateType
required:
- templateType
properties:
templateType:
type: string

View File

@ -1,10 +0,0 @@
type: object
discriminator: costType
description: |
Ограничения на стоимость товара и услуги для инвойсов, генерируемых по
шаблону.
required:
- costType
properties:
costType:
type: string

View File

@ -1,3 +0,0 @@
type: object
allOf:
- $ref: '#/definitions/InvoiceTemplateLineCost'

View File

@ -1,16 +0,0 @@
type: object
allOf:
- $ref: '#/definitions/InvoiceTemplateDetails'
- type: object
required:
- cart
- currency
properties:
cart:
$ref: '#/definitions/InvoiceCart'
currency:
description: |
Валюта, символьный код согласно
[ISO 4217](http://www.iso.org/iso/home/standards/currency_codes.htm).
type: string
pattern: '^[A-Z]{3}$'

View File

@ -1,16 +0,0 @@
type: object
allOf:
- $ref: '#/definitions/InvoiceTemplateDetails'
- type: object
required:
- product
- price
properties:
product:
description: Наименование предлагаемых товаров или услуг
type: string
maxLength: 100
price:
$ref: '#/definitions/InvoiceTemplateLineCost'
taxMode:
$ref: '#/definitions/InvoiceLineTaxMode'

View File

@ -1,13 +1,17 @@
type: object
properties:
product:
description: Наименование предлагаемых товаров или услуг
type: string
maxLength: 100
description:
description: Описание предлагаемых товаров или услуг
type: string
maxLength: 1000
lifetime:
$ref: '#/definitions/LifetimeInterval'
details:
$ref: '#/definitions/InvoiceTemplateDetails'
cost:
$ref: '#/definitions/InvoiceTemplateCost'
metadata:
description: >
Метаданные, которые будут связаны с инвойсом, созданным по шаблону, в