mirror of
https://github.com/valitydev/damsel.git
synced 2024-11-06 01:35:19 +00:00
OPS-474: Defines protocol for invoice amount randomization (#134)
* OPS-474: Defines protocol for invoice amount randomization * Updates fields names and types, updates rounding methods enum * Fixes missing renaming for invoice template params * Simplifies changes w/ typedef from domain ns * Makes 'precision' and 'rounding' params required * Retires 'rounding' option in amount randomization
This commit is contained in:
parent
b869c09c7a
commit
c170117e5f
@ -153,6 +153,16 @@ struct Invoice {
|
||||
14: optional string external_id
|
||||
15: optional InvoiceClientInfo client_info
|
||||
16: optional Allocation allocation
|
||||
17: optional list<InvoiceMutation> mutations
|
||||
}
|
||||
|
||||
union InvoiceMutation {
|
||||
1: InvoiceAmountMutation amount
|
||||
}
|
||||
|
||||
struct InvoiceAmountMutation {
|
||||
1: required Amount original
|
||||
2: required Amount mutated
|
||||
}
|
||||
|
||||
struct InvoiceDetails {
|
||||
@ -358,6 +368,23 @@ struct InvoiceTemplate {
|
||||
12: optional base.Timestamp created_at
|
||||
8: required InvoiceTemplateDetails details
|
||||
7: optional InvoiceContext context
|
||||
13: optional list<InvoiceMutationParams> mutations
|
||||
}
|
||||
|
||||
union InvoiceMutationParams {
|
||||
1: InvoiceAmountMutationParams amount
|
||||
}
|
||||
|
||||
union InvoiceAmountMutationParams {
|
||||
1: RandomizationMutationParams randomization
|
||||
}
|
||||
|
||||
struct RandomizationMutationParams {
|
||||
1: required Amount deviation
|
||||
2: required i64 precision
|
||||
4: optional Amount min_amount_condition
|
||||
5: optional Amount max_amount_condition
|
||||
6: optional Amount amount_multiplicity_condition
|
||||
}
|
||||
|
||||
union InvoiceTemplateDetails {
|
||||
|
@ -509,6 +509,8 @@ struct EventRange {
|
||||
|
||||
/* Invoicing service definitions */
|
||||
|
||||
typedef domain.InvoiceMutationParams InvoiceMutationParams
|
||||
|
||||
struct InvoiceParams {
|
||||
1: required PartyID party_id
|
||||
2: required ShopID shop_id
|
||||
@ -520,6 +522,7 @@ struct InvoiceParams {
|
||||
8: optional string external_id
|
||||
9: optional domain.InvoiceClientInfo client_info
|
||||
10: optional domain.AllocationPrototype allocation
|
||||
11: optional list<InvoiceMutationParams> mutations
|
||||
}
|
||||
|
||||
struct InvoiceWithTemplateParams {
|
||||
@ -540,6 +543,7 @@ struct InvoiceTemplateCreateParams {
|
||||
8: optional string description
|
||||
9: required domain.InvoiceTemplateDetails details
|
||||
6: required domain.InvoiceContext context
|
||||
12: optional list<InvoiceMutationParams> mutations
|
||||
}
|
||||
|
||||
struct InvoiceTemplateUpdateParams {
|
||||
@ -549,6 +553,7 @@ struct InvoiceTemplateUpdateParams {
|
||||
6: optional string description
|
||||
7: optional domain.InvoiceTemplateDetails details
|
||||
4: optional domain.InvoiceContext context
|
||||
9: optional list<InvoiceMutationParams> mutations
|
||||
}
|
||||
|
||||
struct InvoicePaymentParams {
|
||||
|
Loading…
Reference in New Issue
Block a user