Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send actornumber instead of actorId #3594

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Energinet.DataHub.WebApi.Clients.MarketParticipant.v1;
using Energinet.DataHub.WebApi.Clients.Wholesale.SettlementReports;
using Energinet.DataHub.WebApi.Clients.Wholesale.SettlementReports.Dto;
using Energinet.DataHub.WebApi.GraphQL.Types.SettlementReports;
Expand All @@ -22,8 +23,13 @@ public partial class Mutation
{
public async Task<bool> RequestSettlementReportAsync(
RequestSettlementReportInput requestSettlementReportInput,
[Service] IMarketParticipantClient_V1 marketPartClient,
[Service] ISettlementReportsClient client)
{
var requestAsActor = string.IsNullOrEmpty(requestSettlementReportInput.RequestAsActorId)
FirestarJes marked this conversation as resolved.
Show resolved Hide resolved
? null
: await marketPartClient.ActorGetAsync(Guid.Parse(requestSettlementReportInput.RequestAsActorId));

var requestFilter = new SettlementReportRequestFilterDto(
requestSettlementReportInput.GridAreasWithCalculations.ToDictionary(
x => x.GridAreaCode,
Expand All @@ -42,7 +48,7 @@ await client.RequestAsync(
requestSettlementReportInput.IncludeMonthlySums,
requestSettlementReportInput.UseApi,
requestFilter,
requestSettlementReportInput.RequestAsActorId,
requestAsActor?.ActorNumber.Value,
requestSettlementReportInput.RequestAsMarketRole),
default);

Expand Down
Loading