diff --git a/apps/party_management/src/pm_party_handler.erl b/apps/party_management/src/pm_party_handler.erl index bf6ee46..76bb8be 100644 --- a/apps/party_management/src/pm_party_handler.erl +++ b/apps/party_management/src/pm_party_handler.erl @@ -152,9 +152,9 @@ handle_function_('ComputeProviderTerminalTerms', Args, _Opts) -> %% Globals handle_function_('ComputeGlobals', Args, _Opts) -> - {UserInfo, GlobalsRef, DomainRevision, Varset} = Args, + {UserInfo, DomainRevision, Varset} = Args, ok = assume_user_identity(UserInfo), - Globals = get_globals(GlobalsRef, DomainRevision), + Globals = get_globals(DomainRevision), VS = prepare_varset(Varset), pm_globals:reduce_globals(Globals, VS, DomainRevision); %% RuleSets @@ -323,11 +323,12 @@ get_terminal(TerminalRef, DomainRevision) -> throw(#payproc_TerminalNotFound{}) end. -get_globals(GlobalsRef, DomainRevision) -> +get_globals(DomainRevision) -> + Globals = {globals, #domain_GlobalsRef{}}, try - pm_domain:get(DomainRevision, {globals, GlobalsRef}) + pm_domain:get(DomainRevision, Globals) catch - error:{object_not_found, {DomainRevision, {globals, GlobalsRef}}} -> + error:{object_not_found, {DomainRevision, Globals}} -> throw(#payproc_GlobalsNotFound{}) end. diff --git a/apps/party_management/test/pm_party_tests_SUITE.erl b/apps/party_management/test/pm_party_tests_SUITE.erl index 0a5c6c6..2f55abe 100644 --- a/apps/party_management/test/pm_party_tests_SUITE.erl +++ b/apps/party_management/test/pm_party_tests_SUITE.erl @@ -1719,7 +1719,7 @@ compute_globals_ok(C) -> Varset = #payproc_Varset{}, #domain_Globals{ 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) -> Client = cfg(client, C), diff --git a/apps/pm_client/src/pm_client_party.erl b/apps/pm_client/src/pm_client_party.erl index f39151e..5766370 100644 --- a/apps/pm_client/src/pm_client_party.erl +++ b/apps/pm_client/src/pm_client_party.erl @@ -49,7 +49,7 @@ -export([compute_provider/4]). -export([compute_provider_terminal_terms/5]). --export([compute_globals/4]). +-export([compute_globals/3]). -export([compute_routing_ruleset/4]). %% GenServer @@ -87,7 +87,6 @@ -type provider_ref() :: dmsl_domain_thrift:'ProviderRef'(). -type terminal_ref() :: dmsl_domain_thrift:'TerminalRef'(). --type globals_ref() :: dmsl_domain_thrift:'GlobalsRef'(). -type routing_ruleset_ref() :: dmsl_domain_thrift:'RoutingRulesetRef'(). -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(). -compute_globals(GlobalsRef, Revision, Varset, Client) -> - map_result_error(gen_server:call(Client, {call_without_party, 'ComputeGlobals', [GlobalsRef, Revision, Varset]})). +compute_globals(Revision, Varset, Client) -> + map_result_error(gen_server:call(Client, {call_without_party, 'ComputeGlobals', [Revision, Varset]})). -spec compute_routing_ruleset(routing_ruleset_ref(), domain_revision(), varset(), pid()) -> dmsl_domain_thrift:'RoutingRuleset'() | woody_error:business_error(). diff --git a/build_utils b/build_utils index 56606f5..24aa772 160000 --- a/build_utils +++ b/build_utils @@ -1 +1 @@ -Subproject commit 56606f5cacec1c30ca11088c575e9c285f1f2f40 +Subproject commit 24aa772730be966667adb285a09fcb494d4f218e diff --git a/rebar.lock b/rebar.lock index 3c2bcc0..de9bf8f 100644 --- a/rebar.lock +++ b/rebar.lock @@ -11,7 +11,7 @@ {<<"cowlib">>,{pkg,<<"cowlib">>,<<"2.9.1">>},2}, {<<"damsel">>, {git,"https://github.com/rbkmoney/damsel.git", - {ref,"90dcee85d6dc72779d3fcde62d464b6321ff21e9"}}, + {ref,"1c9a1c7b92626598a442e15ce6942a3b44173aa1"}}, 0}, {<<"dmt_client">>, {git,"https://github.com/rbkmoney/dmt_client.git",