Ed 262/feat/named invoice templates (#573)

* ED-262/feat: Add name and createdAt for InvoiceTemplate

* ED-262/deps: Update damsel and swag
This commit is contained in:
Yaroslav Rogov 2021-09-10 14:50:13 +03:00 committed by GitHub
parent 6b81bbc8e9
commit c5df0aa49c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -290,6 +290,7 @@ encode_invoice_tpl_create_params(InvoiceTemplateID, PartyID, Params) ->
shop_id = genlib_map:get(<<"shopID">>, Params),
invoice_lifetime = encode_lifetime(Params),
product = Product,
name = genlib_map:get(<<"name">>, Params),
description = genlib_map:get(<<"description">>, Params),
details = Details,
context = capi_handler_encoder:encode_invoice_context(Params)
@ -301,6 +302,7 @@ encode_invoice_tpl_update_params(Params) ->
#payproc_InvoiceTemplateUpdateParams{
invoice_lifetime = encode_lifetime(Params),
product = Product,
name = genlib_map:get(<<"name">>, Params),
description = genlib_map:get(<<"description">>, Params),
details = Details,
context = encode_optional_context(Params)
@ -409,7 +411,9 @@ decode_invoice_tpl(InvoiceTpl) ->
genlib_map:compact(#{
<<"id">> => InvoiceTpl#domain_InvoiceTemplate.id,
<<"shopID">> => InvoiceTpl#domain_InvoiceTemplate.shop_id,
<<"name">> => InvoiceTpl#domain_InvoiceTemplate.name,
<<"description">> => InvoiceTpl#domain_InvoiceTemplate.description,
<<"createdAt">> => InvoiceTpl#domain_InvoiceTemplate.created_at,
<<"lifetime">> => #{
<<"days">> => undef_to_zero(DD),
<<"months">> => undef_to_zero(MM),

View File

@ -39,7 +39,7 @@
{<<"cowlib">>,{pkg,<<"cowlib">>,<<"2.11.0">>},1},
{<<"damsel">>,
{git,"https://github.com/rbkmoney/damsel.git",
{ref,"824c05e003783c2d8f1f797b1f2243147ba8be9c"}},
{ref,"3e05d79ff90fa4ba5afc4db76d915bcd777d540a"}},
0},
{<<"dmt_client">>,
{git,"https://github.com/rbkmoney/dmt_client.git",

@ -1 +1 @@
Subproject commit ef491945e826a1595d73d3ec0c209c42ee6e9b42
Subproject commit 46ff8bb2bfeadff5c9244840f1982c7e4c2be80e