BA-43: add forgotten party revision marshalling (#171)

This commit is contained in:
Evgeny Levenets 2018-01-22 15:40:57 +03:00 committed by GitHub
parent 1beb993ea3
commit 442c626dc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -960,6 +960,7 @@ marshal(invoice, #domain_Invoice{} = Invoice) ->
<<"id">> => marshal(str, Invoice#domain_Invoice.id),
<<"shop_id">> => marshal(str, Invoice#domain_Invoice.shop_id),
<<"owner_id">> => marshal(str, Invoice#domain_Invoice.owner_id),
<<"party_revision">>=> Invoice#domain_Invoice.party_revision,
<<"created_at">> => marshal(str, Invoice#domain_Invoice.created_at),
<<"cost">> => hg_cash:marshal(Invoice#domain_Invoice.cost),
<<"due">> => marshal(str, Invoice#domain_Invoice.due),
@ -1081,6 +1082,7 @@ unmarshal(invoice, #{
id = unmarshal(str, ID),
shop_id = unmarshal(str, ShopID),
owner_id = unmarshal(str, PartyID),
party_revision = maps:get(<<"party_revision">>, Invoice, undefined),
created_at = unmarshal(str, CreatedAt),
cost = hg_cash:unmarshal(Cash),
due = unmarshal(str, Due),