mirror of
https://github.com/valitydev/hellgate.git
synced 2024-11-06 02:45:20 +00:00
ED-135: removed global_ref param from pm_party_client:compute_globals (#562)
* updated damsel * removed global_ref param from pm_party_client:compute_globals * fixed review issue
This commit is contained in:
parent
32893dd684
commit
82a6bc5074
@ -152,9 +152,9 @@ handle_function_('ComputeProviderTerminalTerms', Args, _Opts) ->
|
|||||||
%% Globals
|
%% Globals
|
||||||
|
|
||||||
handle_function_('ComputeGlobals', Args, _Opts) ->
|
handle_function_('ComputeGlobals', Args, _Opts) ->
|
||||||
{UserInfo, GlobalsRef, DomainRevision, Varset} = Args,
|
{UserInfo, DomainRevision, Varset} = Args,
|
||||||
ok = assume_user_identity(UserInfo),
|
ok = assume_user_identity(UserInfo),
|
||||||
Globals = get_globals(GlobalsRef, DomainRevision),
|
Globals = get_globals(DomainRevision),
|
||||||
VS = prepare_varset(Varset),
|
VS = prepare_varset(Varset),
|
||||||
pm_globals:reduce_globals(Globals, VS, DomainRevision);
|
pm_globals:reduce_globals(Globals, VS, DomainRevision);
|
||||||
%% RuleSets
|
%% RuleSets
|
||||||
@ -323,11 +323,12 @@ get_terminal(TerminalRef, DomainRevision) ->
|
|||||||
throw(#payproc_TerminalNotFound{})
|
throw(#payproc_TerminalNotFound{})
|
||||||
end.
|
end.
|
||||||
|
|
||||||
get_globals(GlobalsRef, DomainRevision) ->
|
get_globals(DomainRevision) ->
|
||||||
|
Globals = {globals, #domain_GlobalsRef{}},
|
||||||
try
|
try
|
||||||
pm_domain:get(DomainRevision, {globals, GlobalsRef})
|
pm_domain:get(DomainRevision, Globals)
|
||||||
catch
|
catch
|
||||||
error:{object_not_found, {DomainRevision, {globals, GlobalsRef}}} ->
|
error:{object_not_found, {DomainRevision, Globals}} ->
|
||||||
throw(#payproc_GlobalsNotFound{})
|
throw(#payproc_GlobalsNotFound{})
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -1719,7 +1719,7 @@ compute_globals_ok(C) ->
|
|||||||
Varset = #payproc_Varset{},
|
Varset = #payproc_Varset{},
|
||||||
#domain_Globals{
|
#domain_Globals{
|
||||||
external_account_set = {value, ?eas(1)}
|
external_account_set = {value, ?eas(1)}
|
||||||
} = pm_client_party:compute_globals(#domain_GlobalsRef{}, DomainRevision, Varset, Client).
|
} = pm_client_party:compute_globals(DomainRevision, Varset, Client).
|
||||||
|
|
||||||
compute_payment_routing_ruleset_ok(C) ->
|
compute_payment_routing_ruleset_ok(C) ->
|
||||||
Client = cfg(client, C),
|
Client = cfg(client, C),
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
-export([compute_provider/4]).
|
-export([compute_provider/4]).
|
||||||
-export([compute_provider_terminal_terms/5]).
|
-export([compute_provider_terminal_terms/5]).
|
||||||
-export([compute_globals/4]).
|
-export([compute_globals/3]).
|
||||||
-export([compute_routing_ruleset/4]).
|
-export([compute_routing_ruleset/4]).
|
||||||
|
|
||||||
%% GenServer
|
%% GenServer
|
||||||
@ -87,7 +87,6 @@
|
|||||||
|
|
||||||
-type provider_ref() :: dmsl_domain_thrift:'ProviderRef'().
|
-type provider_ref() :: dmsl_domain_thrift:'ProviderRef'().
|
||||||
-type terminal_ref() :: dmsl_domain_thrift:'TerminalRef'().
|
-type terminal_ref() :: dmsl_domain_thrift:'TerminalRef'().
|
||||||
-type globals_ref() :: dmsl_domain_thrift:'GlobalsRef'().
|
|
||||||
-type routing_ruleset_ref() :: dmsl_domain_thrift:'RoutingRulesetRef'().
|
-type routing_ruleset_ref() :: dmsl_domain_thrift:'RoutingRulesetRef'().
|
||||||
|
|
||||||
-spec start(party_id(), pm_client_api:t()) -> pid().
|
-spec start(party_id(), pm_client_api:t()) -> pid().
|
||||||
@ -267,10 +266,10 @@ compute_provider_terminal_terms(ProviderRef, TerminalRef, Revision, Varset, Clie
|
|||||||
)
|
)
|
||||||
).
|
).
|
||||||
|
|
||||||
-spec compute_globals(globals_ref(), domain_revision(), varset(), pid()) ->
|
-spec compute_globals(domain_revision(), varset(), pid()) ->
|
||||||
dmsl_domain_thrift:'Globals'() | woody_error:business_error().
|
dmsl_domain_thrift:'Globals'() | woody_error:business_error().
|
||||||
compute_globals(GlobalsRef, Revision, Varset, Client) ->
|
compute_globals(Revision, Varset, Client) ->
|
||||||
map_result_error(gen_server:call(Client, {call_without_party, 'ComputeGlobals', [GlobalsRef, Revision, Varset]})).
|
map_result_error(gen_server:call(Client, {call_without_party, 'ComputeGlobals', [Revision, Varset]})).
|
||||||
|
|
||||||
-spec compute_routing_ruleset(routing_ruleset_ref(), domain_revision(), varset(), pid()) ->
|
-spec compute_routing_ruleset(routing_ruleset_ref(), domain_revision(), varset(), pid()) ->
|
||||||
dmsl_domain_thrift:'RoutingRuleset'() | woody_error:business_error().
|
dmsl_domain_thrift:'RoutingRuleset'() | woody_error:business_error().
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 56606f5cacec1c30ca11088c575e9c285f1f2f40
|
Subproject commit 24aa772730be966667adb285a09fcb494d4f218e
|
@ -11,7 +11,7 @@
|
|||||||
{<<"cowlib">>,{pkg,<<"cowlib">>,<<"2.9.1">>},2},
|
{<<"cowlib">>,{pkg,<<"cowlib">>,<<"2.9.1">>},2},
|
||||||
{<<"damsel">>,
|
{<<"damsel">>,
|
||||||
{git,"https://github.com/rbkmoney/damsel.git",
|
{git,"https://github.com/rbkmoney/damsel.git",
|
||||||
{ref,"90dcee85d6dc72779d3fcde62d464b6321ff21e9"}},
|
{ref,"1c9a1c7b92626598a442e15ce6942a3b44173aa1"}},
|
||||||
0},
|
0},
|
||||||
{<<"dmt_client">>,
|
{<<"dmt_client">>,
|
||||||
{git,"https://github.com/rbkmoney/dmt_client.git",
|
{git,"https://github.com/rbkmoney/dmt_client.git",
|
||||||
|
Loading…
Reference in New Issue
Block a user