INT-779: Add account_name to DigitalWallet (#70)

* INT-779: Add account_number to DigitalWallet

* Fix naming
This commit is contained in:
ndiezel0 2023-09-07 16:03:40 +05:00 committed by GitHub
parent b8f83e04ad
commit 1cc4d42a08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 10 deletions

View File

@ -188,7 +188,8 @@ marshal(digital_wallet, Wallet = #{id := ID, payment_service := PaymentService})
#'fistful_base_DigitalWallet'{
id = marshal(string, ID),
token = maybe_marshal(string, maps:get(token, Wallet, undefined)),
payment_service = marshal(payment_service, PaymentService)
payment_service = marshal(payment_service, PaymentService),
account_name = maybe_marshal(string, maps:get(account_name, Wallet, undefined))
};
marshal(generic_resource, Generic = #{provider := PaymentService}) ->
#'fistful_base_ResourceGenericData'{
@ -472,11 +473,17 @@ unmarshal(crypto_wallet, #'fistful_base_CryptoWallet'{
currency => unmarshal(crypto_currency, Currency),
tag => maybe_unmarshal(string, Tag)
});
unmarshal(digital_wallet, #'fistful_base_DigitalWallet'{id = ID, payment_service = PaymentService, token = Token}) ->
unmarshal(digital_wallet, #'fistful_base_DigitalWallet'{
id = ID,
payment_service = PaymentService,
token = Token,
account_name = AccountName
}) ->
genlib_map:compact(#{
id => unmarshal(string, ID),
payment_service => unmarshal(payment_service, PaymentService),
token => maybe_unmarshal(string, Token)
token => maybe_unmarshal(string, Token),
account_name => maybe_unmarshal(string, AccountName)
});
unmarshal(generic_resource, #'fistful_base_ResourceGenericData'{provider = PaymentService, data = Data}) ->
genlib_map:compact(#{

View File

@ -118,7 +118,8 @@ create_digital_wallet_destination_ok(C) ->
digital_wallet = #'fistful_base_DigitalWallet'{
id = <<"f195298af836f41d072cb390ee62bee8">>,
token = <<"a30e277c07400c9940628828949efd48">>,
payment_service = #'fistful_base_PaymentServiceRef'{id = <<"webmoney">>}
payment_service = #'fistful_base_PaymentServiceRef'{id = <<"webmoney">>},
account_name = <<"account_name_create_digital_wallet_destination_ok">>
}
}},
create_destination_ok(Resource, C).

View File

@ -236,7 +236,8 @@ marshal(
{digital_wallet, #domain_DigitalWallet{
id = DigitalWalletID,
token = Token,
payment_service = marshal(payment_service, PaymentService)
payment_service = marshal(payment_service, PaymentService),
account_name = maps:get(account_name, Wallet, undefined)
}};
marshal(resource, Resource = {generic, _}) ->
ff_dmsl_codec:marshal(payment_tool, Resource);

View File

@ -1220,7 +1220,8 @@ construct_payment_tool(
{digital_wallet, #domain_DigitalWallet{
id = ID,
payment_service = ff_dmsl_codec:marshal(payment_service, PaymentService),
token = Token
token = Token,
account_name = maps:get(account_name, Wallet, undefined)
}}.
%% Quote helpers

View File

@ -52,7 +52,7 @@ services:
retries: 10
limiter:
image: ghcr.io/valitydev/limiter:sha-6c3bfe3
image: ghcr.io/valitydev/limiter:sha-e9e5e63
command: /opt/limiter/bin/limiter foreground
depends_on:
machinegun:

View File

@ -22,7 +22,7 @@
{<<"cowlib">>,{pkg,<<"cowlib">>,<<"2.11.0">>},2},
{<<"damsel">>,
{git,"https://github.com/valitydev/damsel.git",
{ref,"03bf41075c39b6731c5ed200d5c4b0faaee9d937"}},
{ref,"247b004b1e9c90f50e442a6f69009fd4508308c1"}},
0},
{<<"dmt_client">>,
{git,"https://github.com/valitydev/dmt_client.git",
@ -38,7 +38,7 @@
0},
{<<"fistful_proto">>,
{git,"https://github.com/valitydev/fistful-proto.git",
{ref,"9c78e89eddcef78f189d499258bb5aa7af92116b"}},
{ref,"c9c3aa00f075ecf774c2befc57284aeffbeea1fe"}},
0},
{<<"genlib">>,
{git,"https://github.com/valitydev/genlib.git",
@ -50,7 +50,7 @@
{<<"jsx">>,{pkg,<<"jsx">>,<<"3.1.0">>},1},
{<<"limiter_proto">>,
{git,"https://github.com/valitydev/limiter-proto.git",
{ref,"bbd2c0dce044dd5b4e424fc8e38a0023a1685a22"}},
{ref,"e045813d32e67432e5592d582e59e45df05da647"}},
0},
{<<"machinery">>,
{git,"https://github.com/valitydev/machinery-erlang.git",