diff --git a/apps/dh/api-dh/source/DataHub.WebApi/Clients/Wholesale/V3/WholesaleClient.cs b/apps/dh/api-dh/source/DataHub.WebApi/Clients/Wholesale/V3/WholesaleClient.cs
index 1493379c94..5b037f8c95 100644
--- a/apps/dh/api-dh/source/DataHub.WebApi/Clients/Wholesale/V3/WholesaleClient.cs
+++ b/apps/dh/api-dh/source/DataHub.WebApi/Clients/Wholesale/V3/WholesaleClient.cs
@@ -50,7 +50,7 @@ public partial interface IWholesaleClient_V3
///
/// OK
/// A server side error occurred.
- System.Threading.Tasks.Task> GetApplicableCalculationsAsync(CalculationType? calculationType = null, System.Collections.Generic.IEnumerable gridAreaCodes = null, System.DateTimeOffset? periodStart = null, System.DateTimeOffset? periodEnd = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ System.Threading.Tasks.Task> GetApplicableCalculationsAsync(CalculationType? calculationType = null, System.DateTimeOffset? periodStart = null, System.DateTimeOffset? periodEnd = null, System.Collections.Generic.IEnumerable body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
}
@@ -283,7 +283,7 @@ public string BaseUrl
///
/// OK
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task> GetApplicableCalculationsAsync(CalculationType? calculationType = null, System.Collections.Generic.IEnumerable gridAreaCodes = null, System.DateTimeOffset? periodStart = null, System.DateTimeOffset? periodEnd = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task> GetApplicableCalculationsAsync(CalculationType? calculationType = null, System.DateTimeOffset? periodStart = null, System.DateTimeOffset? periodEnd = null, System.Collections.Generic.IEnumerable body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var client_ = _httpClient;
var disposeClient_ = false;
@@ -291,7 +291,11 @@ public string BaseUrl
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
- request_.Method = new System.Net.Http.HttpMethod("GET");
+ var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
+ var content_ = new System.Net.Http.StringContent(json_);
+ content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ request_.Content = content_;
+ request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
var urlBuilder_ = new System.Text.StringBuilder();
@@ -303,10 +307,6 @@ public string BaseUrl
{
urlBuilder_.Append(System.Uri.EscapeDataString("calculationType")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(calculationType, System.Globalization.CultureInfo.InvariantCulture))).Append('&');
}
- if (gridAreaCodes != null)
- {
- foreach (var item_ in gridAreaCodes) { urlBuilder_.Append(System.Uri.EscapeDataString("gridAreaCodes")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); }
- }
if (periodStart != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("periodStart")).Append('=').Append(System.Uri.EscapeDataString(periodStart.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&');
diff --git a/apps/dh/api-dh/source/DataHub.WebApi/Clients/Wholesale/V3/swagger.json b/apps/dh/api-dh/source/DataHub.WebApi/Clients/Wholesale/V3/swagger.json
index 6c552aa51c..fc051a0c80 100644
--- a/apps/dh/api-dh/source/DataHub.WebApi/Clients/Wholesale/V3/swagger.json
+++ b/apps/dh/api-dh/source/DataHub.WebApi/Clients/Wholesale/V3/swagger.json
@@ -124,7 +124,7 @@
}
},
"/v3/SettlementReport": {
- "get": {
+ "post": {
"tags": [
"SettlementReport"
],
@@ -136,6 +136,14 @@
"in": "query",
"schema": {
"description": "Defines the wholesale calculation type",
+ "x-enumNames": [
+ "BalanceFixing",
+ "Aggregation",
+ "WholesaleFixing",
+ "FirstCorrectionSettlement",
+ "SecondCorrectionSettlement",
+ "ThirdCorrectionSettlement"
+ ],
"allOf": [
{
"$ref": "#/components/schemas/CalculationType"
@@ -143,16 +151,6 @@
]
}
},
- {
- "name": "gridAreaCodes",
- "in": "query",
- "schema": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
{
"name": "periodStart",
"in": "query",
@@ -170,6 +168,34 @@
}
}
],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "text/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "application/*+json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
"responses": {
"200": {
"description": "OK",
@@ -233,6 +259,18 @@
"nullable": true
},
"orchestrationState": {
+ "x-enumNames": [
+ "Scheduled",
+ "Calculating",
+ "Calculated",
+ "CalculationFailed",
+ "ActorMessagesEnqueuing",
+ "ActorMessagesEnqueued",
+ "ActorMessagesEnqueuingFailed",
+ "Completed",
+ "Canceled",
+ "Started"
+ ],
"allOf": [
{
"$ref": "#/components/schemas/CalculationOrchestrationState"
@@ -250,6 +288,14 @@
},
"calculationType": {
"description": "Defines the wholesale calculation type",
+ "x-enumNames": [
+ "BalanceFixing",
+ "Aggregation",
+ "WholesaleFixing",
+ "FirstCorrectionSettlement",
+ "SecondCorrectionSettlement",
+ "ThirdCorrectionSettlement"
+ ],
"allOf": [
{
"$ref": "#/components/schemas/CalculationType"
@@ -272,6 +318,18 @@
},
"CalculationOrchestrationState": {
"type": "string",
+ "x-enumNames": [
+ "Scheduled",
+ "Calculating",
+ "Calculated",
+ "CalculationFailed",
+ "ActorMessagesEnqueuing",
+ "ActorMessagesEnqueued",
+ "ActorMessagesEnqueuingFailed",
+ "Completed",
+ "Canceled",
+ "Started"
+ ],
"enum": [
"Scheduled",
"Calculating",
@@ -287,6 +345,12 @@
},
"CalculationState": {
"type": "string",
+ "x-enumNames": [
+ "Pending",
+ "Executing",
+ "Completed",
+ "Failed"
+ ],
"enum": [
"Pending",
"Executing",
@@ -297,6 +361,14 @@
"CalculationType": {
"type": "string",
"description": "Defines the wholesale calculation type",
+ "x-enumNames": [
+ "BalanceFixing",
+ "Aggregation",
+ "WholesaleFixing",
+ "FirstCorrectionSettlement",
+ "SecondCorrectionSettlement",
+ "ThirdCorrectionSettlement"
+ ],
"enum": [
"BalanceFixing",
"Aggregation",
diff --git a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Query/SettlementReportsQuery.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Query/SettlementReportsQuery.cs
index cd35eef602..954b9b69b1 100644
--- a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Query/SettlementReportsQuery.cs
+++ b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Query/SettlementReportsQuery.cs
@@ -74,9 +74,9 @@ public async Task>();
var calculations = await client.GetApplicableCalculationsAsync(
calculationType,
- gridAreaId,
calculationPeriod.Start.ToDateTimeOffset(),
- calculationPeriod.End.ToDateTimeOffset());
+ calculationPeriod.End.ToDateTimeOffset(),
+ gridAreaId);
foreach (var calculation in calculations)
{