mirror of
https://github.com/valitydev/capi-v2.git
synced 2024-11-06 01:55:20 +00:00
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:
parent
6b81bbc8e9
commit
c5df0aa49c
@ -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),
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user