mirror of
https://github.com/valitydev/capi-v2.git
synced 2024-11-06 01:55:20 +00:00
CAPI299: fix report validation (#255)
This commit is contained in:
parent
07dff8c702
commit
3e3efc1d1b
@ -3322,10 +3322,13 @@ decode_report(Report) ->
|
||||
<<"createdAt">> => Report#reports_Report.created_at,
|
||||
<<"fromTime" >> => FromTime,
|
||||
<<"toTime" >> => ToTime,
|
||||
<<"type" >> => genlib:to_binary(Report#reports_Report.report_type),
|
||||
<<"type" >> => decode_report_type(Report#reports_Report.report_type),
|
||||
<<"files" >> => [decode_report_file(F) || F <- Report#reports_Report.files]
|
||||
}.
|
||||
|
||||
decode_report_type(provision_of_service) -> <<"provisionOfService">>;
|
||||
decode_report_type(payment_registry) -> <<"paymentRegistry">>.
|
||||
|
||||
decode_report_file(#reports_FileMeta{file_id = ID, filename = Filename, signature = Signature}) ->
|
||||
#{
|
||||
<<"id" >> => ID,
|
||||
|
@ -7,6 +7,8 @@
|
||||
-define(INTEGER, 10000).
|
||||
-define(INTEGER_BINARY, <<"10000">>).
|
||||
-define(TIMESTAMP, <<"2016-03-22T06:12:27Z">>).
|
||||
-define(MD5, <<"033BD94B1168D7E4F0D644C3C95E35BF">>).
|
||||
-define(SHA256, <<"94EE059335E587E501CC4BF90613E0814F00A7B08BC7C648FD865A2AF6A22CC2">>).
|
||||
|
||||
-define(DETAILS, #domain_InvoiceDetails{
|
||||
product = ?STRING,
|
||||
@ -630,8 +632,8 @@
|
||||
file_id = ?STRING,
|
||||
filename = ?STRING,
|
||||
signature = #reports_Signature{
|
||||
md5 = ?STRING,
|
||||
sha256 = ?STRING
|
||||
md5 = ?MD5,
|
||||
sha256 = ?SHA256
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit f4598eba73ccab471361f907ecc93d6f679a75e3
|
||||
Subproject commit 15d26df8aff07989fb04950442cbbd2363f63be2
|
Loading…
Reference in New Issue
Block a user