TD-933: Adds support for deviation direction for amount randomization (#142)

This commit is contained in:
Aleksey Kashapov 2024-07-01 18:25:07 +03:00 committed by GitHub
parent 485612481e
commit e5d3c83a24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -382,11 +382,21 @@ union InvoiceAmountMutationParams {
struct RandomizationMutationParams { struct RandomizationMutationParams {
1: required Amount deviation 1: required Amount deviation
2: required i64 precision 2: required i64 precision
/**
* По умолчанию полагается допустимым отклонение в обе стороны
*/
7: optional DeviationDirection direction
4: optional Amount min_amount_condition 4: optional Amount min_amount_condition
5: optional Amount max_amount_condition 5: optional Amount max_amount_condition
6: optional Amount amount_multiplicity_condition 6: optional Amount amount_multiplicity_condition
} }
enum DeviationDirection {
both = 1
upward = 2
downward = 3
}
union InvoiceTemplateDetails { union InvoiceTemplateDetails {
1: InvoiceCart cart 1: InvoiceCart cart
2: InvoiceTemplateProduct product 2: InvoiceTemplateProduct product