mirror of
https://github.com/valitydev/capi-v2.git
synced 2024-11-06 01:55:20 +00:00
TD-933: Adds support for deviation direction for amount randomization (#47)
This commit is contained in:
parent
89759bfd18
commit
85b19cb5f3
@ -18,6 +18,7 @@ encode_amount_randomization_params(Opts) when is_map(Opts) ->
|
||||
{randomization, #domain_RandomizationMutationParams{
|
||||
deviation = maps:get(<<"deviation">>, Opts),
|
||||
precision = maps:get(<<"precision">>, Opts, 2),
|
||||
direction = binary_to_existing_atom(maps:get(<<"direction">>, Opts, <<"both">>)),
|
||||
min_amount_condition = maps:get(<<"minAmountCondition">>, Opts, undefined),
|
||||
max_amount_condition = maps:get(<<"maxAmountCondition">>, Opts, 2),
|
||||
amount_multiplicity_condition = maps:get(<<"amountMultiplicityCondition">>, Opts, undefined)
|
||||
@ -35,6 +36,7 @@ decode_amount_randomization_params(Mutations) when is_list(Mutations) ->
|
||||
{randomization, #domain_RandomizationMutationParams{
|
||||
deviation = Deviation,
|
||||
precision = Precision,
|
||||
direction = Direction,
|
||||
min_amount_condition = MinAmountCondition,
|
||||
max_amount_condition = MaxAmountCondition,
|
||||
amount_multiplicity_condition = AmountMultiplicityCondition
|
||||
@ -44,6 +46,7 @@ decode_amount_randomization_params(Mutations) when is_list(Mutations) ->
|
||||
#{
|
||||
<<"deviation">> => Deviation,
|
||||
<<"precision">> => Precision,
|
||||
<<"direction">> => atom_to_binary(Direction),
|
||||
<<"minAmountCondition">> => MinAmountCondition,
|
||||
<<"maxAmountCondition">> => MaxAmountCondition,
|
||||
<<"amountMultiplicityCondition">> => AmountMultiplicityCondition
|
||||
|
@ -134,11 +134,11 @@
|
||||
{<<"ssl_verify_fun">>,{pkg,<<"ssl_verify_fun">>,<<"1.1.7">>},2},
|
||||
{<<"swag_client">>,
|
||||
{git,"https://github.com/valitydev/swag-payments",
|
||||
{ref,"400015842b1a53a93dd1ea298914510a13a66f5d"}},
|
||||
{ref,"078842bf8c25f7b962103943034544cc93d0459c"}},
|
||||
0},
|
||||
{<<"swag_server">>,
|
||||
{git,"https://github.com/valitydev/swag-payments",
|
||||
{ref,"79a46abf70bbf72394baa5dc14bafcc51d71fbd9"}},
|
||||
{ref,"40e01d346c4902ec2ef5a66f11b88429cbcdcccd"}},
|
||||
0},
|
||||
{<<"thrift">>,
|
||||
{git,"https://github.com/valitydev/thrift_erlang.git",
|
||||
|
Loading…
Reference in New Issue
Block a user