diff --git a/src/Atc.Rest.ApiGenerator.Framework/Factories/Parameters/Client/ContentGeneratorClientParameterParametersFactory.cs b/src/Atc.Rest.ApiGenerator.Framework/Factories/Parameters/Client/ContentGeneratorClientParameterParametersFactory.cs index 043c7342..e13227c0 100644 --- a/src/Atc.Rest.ApiGenerator.Framework/Factories/Parameters/Client/ContentGeneratorClientParameterParametersFactory.cs +++ b/src/Atc.Rest.ApiGenerator.Framework/Factories/Parameters/Client/ContentGeneratorClientParameterParametersFactory.cs @@ -37,6 +37,8 @@ private static void AppendParameters( { var useListForDataType = openApiParameter.Schema.IsTypeArray(); + var parameterName = openApiParameter.Name.EnsureValidFormattedPropertyName(); + var dataType = useListForDataType ? openApiParameter.Schema.Items.GetDataType() : openApiParameter.Schema.GetDataType(); @@ -47,9 +49,19 @@ private static void AppendParameters( if (parameters.FirstOrDefault(x => x.Name == openApiParameter.Name) is null) { + var defaultValueInitializer = openApiParameter.Schema.GetDefaultValueAsString(); + + if (!string.IsNullOrEmpty(defaultValueInitializer) && + openApiParameter.ContainsEnumInSchemaOrProperties()) + { + defaultValueInitializer = dataType.Equals(parameterName, StringComparison.Ordinal) + ? $"{ContentGeneratorConstants.Contracts}.{dataType}.{defaultValueInitializer.PascalCase(ApiOperationExtractor.ModelNameSeparators, removeSeparators: true)}" + : $"{dataType}.{defaultValueInitializer.PascalCase(ApiOperationExtractor.ModelNameSeparators, removeSeparators: true)}"; + } + parameters.Add(new ContentGeneratorClientParameterParametersProperty( openApiParameter.Name, - openApiParameter.Name.EnsureValidFormattedPropertyName(), + parameterName, openApiParameter.ExtractDocumentationTags(), dataType, isSimpleType, @@ -57,7 +69,7 @@ private static void AppendParameters( GetIsNullable(openApiParameter, useListForDataType), openApiParameter.Required, GetAdditionalValidationAttributes(openApiParameter), - openApiParameter.Schema.GetDefaultValueAsString())); + defaultValueInitializer)); } } } @@ -94,7 +106,7 @@ private static void AppendParametersFromBody( var requestBodyType = "string?"; if (requestSchema.Reference is not null) { - requestBodyType = requestSchema.Reference.Id.EnsureFirstCharacterToUpper(); + requestBodyType = requestSchema.Reference.Id.PascalCase(ApiOperationExtractor.ModelNameSeparators, removeSeparators: true); } else if (isFormatTypeOfBinary) { @@ -106,7 +118,7 @@ private static void AppendParametersFromBody( } else if (requestSchema.Items is not null) { - requestBodyType = requestSchema.Items.Reference.Id.EnsureFirstCharacterToUpper(); + requestBodyType = requestSchema.Items.Reference.Id.PascalCase(ApiOperationExtractor.ModelNameSeparators, removeSeparators: true); } parameters.Add(new ContentGeneratorClientParameterParametersProperty( diff --git a/src/Atc.Rest.ApiGenerator.OpenApi/Extensions/OpenApiDocumentExtensions.cs b/src/Atc.Rest.ApiGenerator.OpenApi/Extensions/OpenApiDocumentExtensions.cs index 1e07398d..91be6b2b 100644 --- a/src/Atc.Rest.ApiGenerator.OpenApi/Extensions/OpenApiDocumentExtensions.cs +++ b/src/Atc.Rest.ApiGenerator.OpenApi/Extensions/OpenApiDocumentExtensions.cs @@ -262,7 +262,7 @@ public static bool IsUsingRequiredForSystemTextJsonSerializationAndSystemRuntime foreach (var apiParameter in apiPathPair.Value.Parameters) { - if (apiParameter.IsSchemaEnumAndUseJsonString()) + if (apiParameter.IsSchemaEnumAndUsesJsonString()) { return true; } @@ -270,7 +270,7 @@ public static bool IsUsingRequiredForSystemTextJsonSerializationAndSystemRuntime foreach (var apiParameter in apiOperationPair.Value.Parameters) { - if (apiParameter.IsSchemaEnumAndUseJsonString()) + if (apiParameter.IsSchemaEnumAndUsesJsonString()) { return true; } diff --git a/src/Atc.Rest.ApiGenerator.OpenApi/Extensions/OpenApiParameterExtensions.cs b/src/Atc.Rest.ApiGenerator.OpenApi/Extensions/OpenApiParameterExtensions.cs index f4304def..0543afc8 100644 --- a/src/Atc.Rest.ApiGenerator.OpenApi/Extensions/OpenApiParameterExtensions.cs +++ b/src/Atc.Rest.ApiGenerator.OpenApi/Extensions/OpenApiParameterExtensions.cs @@ -2,7 +2,8 @@ namespace Atc.Rest.ApiGenerator.OpenApi.Extensions; public static class OpenApiParameterExtensions { - public static bool IsSchemaEnumAndUseJsonString(this OpenApiParameter apiParameter) + public static bool IsSchemaEnumAndUsesJsonString( + this OpenApiParameter apiParameter) { if (apiParameter.Schema.IsSchemaEnum()) { @@ -24,6 +25,13 @@ public static bool IsSchemaEnumAndUseJsonString(this OpenApiParameter apiParamet return false; } + public static bool ContainsEnumInSchemaOrProperties( + this OpenApiParameter apiParameter) + => apiParameter.Schema.IsSchemaEnumOrPropertyEnum() || + apiParameter.Schema.AllOf.Any(allOfSchema => allOfSchema.IsSchemaEnumOrPropertyEnum()) || + apiParameter.Schema.OneOf.Any(oneOfSchema => oneOfSchema.IsSchemaEnumOrPropertyEnum()) || + apiParameter.Schema.AnyOf.Any(anyOfSchema => anyOfSchema.IsSchemaEnumOrPropertyEnum()); + public static CodeDocumentationTags ExtractDocumentationTags( this OpenApiParameter apiParameter) { diff --git a/src/Atc.Rest.ApiGenerator.OpenApi/Extractors/ApiOperationExtractor.cs b/src/Atc.Rest.ApiGenerator.OpenApi/Extractors/ApiOperationExtractor.cs index e78e7735..438f5518 100644 --- a/src/Atc.Rest.ApiGenerator.OpenApi/Extractors/ApiOperationExtractor.cs +++ b/src/Atc.Rest.ApiGenerator.OpenApi/Extractors/ApiOperationExtractor.cs @@ -5,7 +5,7 @@ namespace Atc.Rest.ApiGenerator.OpenApi.Extractors; public sealed class ApiOperationExtractor : IApiOperationExtractor { - public static readonly char[] ModelNameSeparators = { ' ', '-', '_', '.' }; + public static readonly char[] ModelNameSeparators = [' ', '-', '_', '.']; public IList Extract( OpenApiDocument apiDocument) diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/Monta.yaml b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/Monta.yaml index 2169418b..d427426b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/Monta.yaml +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/Monta.yaml @@ -1,7 +1,8 @@ openapi: 3.0.1 info: title: MONTA Partner API - description: "\n see https://docs.partner-api.monta.com\n " + description: "\n see https://docs.partner-api.monta.com\n \ + \ " contact: name: Partner API Support url: https://www.monta.com/uk/contact @@ -10,6 +11,7 @@ info: servers: - url: https://partner-api.monta.com description: Production +security: [] paths: /api/v1/auth/me: get: @@ -25,7 +27,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Consumer' + $ref: "#/components/schemas/Consumer" "401": description: Unauthorized access content: @@ -73,7 +75,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Token' + $ref: "#/components/schemas/Token" "401": description: Unauthorized access content: @@ -120,7 +122,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Token' + $ref: "#/components/schemas/Token" "401": description: Consumer with provided credentials was not found content: @@ -168,7 +170,7 @@ paths: type: integer format: int32 default: 0 - example: "1" + example: 1 - name: perPage in: query description: "number of items per page (between 1 and 100, default 10)" @@ -176,24 +178,46 @@ paths: type: integer format: int32 default: 10 - example: "10" + example: 10 responses: "200": description: List of charge auth tokens that match the criteria content: application/json: schema: - $ref: '#/components/schemas/MontaPage_ChargeAuthTokenDto_' + $ref: "#/components/schemas/MontaPage_ChargeAuthTokenDto_" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -216,7 +240,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateChargeAuthToken' + $ref: "#/components/schemas/CreateChargeAuthToken" required: true responses: "201": @@ -224,7 +248,29 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ChargeAuthToken' + $ref: "#/components/schemas/ChargeAuthToken" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -245,16 +291,6 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] /api/v1/charge-auth-tokens/{chargeAuthTokenId}: @@ -277,17 +313,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ChargeAuthToken' - "403": - description: Operator doesn't have access to resource - content: - application/json: - schema: - type: object - example: - status: FORBIDDEN - message: Operator doesn't have access to resource - errorCode: ACCESS_FORBIDDEN + $ref: "#/components/schemas/ChargeAuthToken" "404": description: Entity with the provided id was not found content: @@ -300,26 +326,36 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context - "400": - description: The request is invalid + "401": + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST - "401": - description: Unauthorized access + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: type: object example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] delete: @@ -338,16 +374,6 @@ paths: responses: "200": description: Deleted charge auth token successfully - "403": - description: Operator doesn't have access to resource - content: - application/json: - schema: - type: object - example: - status: FORBIDDEN - message: Operator doesn't have access to resource - errorCode: ACCESS_FORBIDDEN "404": description: Entity with the provided id was not found content: @@ -360,26 +386,36 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context - "400": - description: The request is invalid + "401": + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST - "401": - description: Unauthorized access + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: type: object example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] patch: @@ -399,7 +435,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PatchChargeAuthToken' + $ref: "#/components/schemas/PatchChargeAuthToken" required: true responses: "200": @@ -407,7 +443,29 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ChargeAuthToken' + $ref: "#/components/schemas/ChargeAuthToken" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -428,16 +486,6 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] /api/v1/charge-auth-tokens/{chargeAuthTokenId}/block: @@ -460,7 +508,29 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ChargeAuthToken' + $ref: "#/components/schemas/ChargeAuthToken" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -481,16 +551,6 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] /api/v1/charge-auth-tokens/{chargeAuthTokenId}/unblock: @@ -513,7 +573,29 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ChargeAuthToken' + $ref: "#/components/schemas/ChargeAuthToken" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -534,16 +616,6 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] /api/v1/charge-point-brands: @@ -565,7 +637,7 @@ paths: type: integer format: int32 default: 0 - example: "1" + example: 1 - name: perPage in: query description: "number of items per page (between 1 and 100, default 10)" @@ -573,35 +645,57 @@ paths: type: integer format: int32 default: 10 - example: "10" + example: 10 responses: "200": description: List of charge point brands that match the criteria content: application/json: schema: - $ref: '#/components/schemas/MontaPage_ChargePointBrandDto_' - "401": - description: Unauthorized access + $ref: "#/components/schemas/MontaPage_ChargePointBrandDto_" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - "400": - description: The request is invalid + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST - security: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: - BearerAccessToken: [] /api/v1/charge-point-brands/{chargePointBrandId}: get: @@ -622,17 +716,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ChargePointBrand' - "403": - description: Operator doesn't have access to resource - content: - application/json: - schema: - type: object - example: - status: FORBIDDEN - message: Operator doesn't have access to resource - errorCode: ACCESS_FORBIDDEN + $ref: "#/components/schemas/ChargePointBrand" "404": description: Entity with the provided id was not found content: @@ -645,26 +729,36 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context - "400": - description: The request is invalid + "401": + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST - "401": - description: Unauthorized access + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: type: object example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] /api/v1/charge-point-connectors: @@ -679,27 +773,49 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/MontaPage_ChargePointConnectorDto_' - "400": - description: The request is invalid + $ref: "#/components/schemas/MontaPage_ChargePointConnectorDto_" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] /api/v1/charge-point-connectors/{connectorId}: @@ -721,17 +837,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ChargePointConnector' - "403": - description: Operator doesn't have access to resource - content: - application/json: - schema: - type: object - example: - status: FORBIDDEN - message: Operator doesn't have access to resource - errorCode: ACCESS_FORBIDDEN + $ref: "#/components/schemas/ChargePointConnector" "404": description: Entity with the provided id was not found content: @@ -744,26 +850,36 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context - "400": - description: The request is invalid + "401": + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST - "401": - description: Unauthorized access + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: type: object example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] /api/v1/charge-point-integrations: @@ -781,7 +897,7 @@ paths: type: integer format: int32 default: 0 - example: "1" + example: 1 - name: perPage in: query description: "number of items per page (between 1 and 100, default 10)" @@ -789,7 +905,7 @@ paths: type: integer format: int32 default: 10 - example: "10" + example: 10 - name: chargePointId in: query required: true @@ -818,27 +934,49 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/MontaPage_ChargePointIntegrationDto_' - "400": - description: The request is invalid + $ref: "#/components/schemas/MontaPage_ChargePointIntegrationDto_" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] put: @@ -853,7 +991,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateOrUpdateChargePointIntegration' + $ref: "#/components/schemas/CreateOrUpdateChargePointIntegration" required: true responses: "200": @@ -861,7 +999,29 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ChargePointIntegration' + $ref: "#/components/schemas/ChargePointIntegration" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -882,16 +1042,6 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] /api/v1/charge-point-integrations/{chargePointIntegrationId}: @@ -914,17 +1064,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ChargePointIntegration' - "403": - description: Operator doesn't have access to resource - content: - application/json: - schema: - type: object - example: - status: FORBIDDEN - message: Operator doesn't have access to resource - errorCode: ACCESS_FORBIDDEN + $ref: "#/components/schemas/ChargePointIntegration" "404": description: Entity with the provided id was not found content: @@ -937,26 +1077,36 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context - "400": - description: The request is invalid + "401": + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST - "401": - description: Unauthorized access + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: type: object example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] delete: @@ -975,18 +1125,8 @@ paths: responses: "204": description: Charge point integration deleted - "403": - description: Operator doesn't have access to resource - content: - application/json: - schema: - type: object - example: - status: FORBIDDEN - message: Operator doesn't have access to resource - errorCode: ACCESS_FORBIDDEN - "404": - description: Entity with the provided id was not found + "404": + description: Entity with the provided id was not found content: application/json: schema: @@ -997,26 +1137,36 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context - "400": - description: The request is invalid + "401": + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST - "401": - description: Unauthorized access + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: type: object example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] /api/v1/charge-point-models: @@ -1044,7 +1194,7 @@ paths: type: integer format: int32 default: 0 - example: "1" + example: 1 - name: perPage in: query description: "number of items per page (between 1 and 100, default 10)" @@ -1052,24 +1202,46 @@ paths: type: integer format: int32 default: 10 - example: "10" + example: 10 responses: "200": description: List of charge point models that match the criteria content: application/json: schema: - $ref: '#/components/schemas/MontaPage_ChargePointModelDto_' + $ref: "#/components/schemas/MontaPage_ChargePointModelDto_" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -1101,7 +1273,29 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ChargePointModel' + $ref: "#/components/schemas/ChargePointModel" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -1112,6 +1306,67 @@ paths: status: FORBIDDEN message: Operator doesn't have access to resource errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/charge-point-statistics/by-charge-point: + get: + tags: + - Charge Point Statistics + summary: Retrieve statistics related to a charge point + description: "Required scope: `charge-points:read`" + operationId: get-charge-point-statistics + parameters: + - name: chargePointId + in: query + required: true + schema: + minimum: 0 + exclusiveMinimum: true + required: + - "true" + type: integer + description: Filter to retrieve statistics for a given charge point by `chargePointId` + format: int64 + example: 123 + - name: fromDate + in: query + required: true + schema: + pattern: "\\d{4}-\\d{2}-\\d{2}" + type: string + description: "Filter to retrieve charge point statistics created from date\ + \ (YYYY-MM-DD), we expect a date in UTC
The maximum gap between from\ + \ and to data cannot be longer than 365 days" + format: date + example: 2022-05-01 + - name: toDate + in: query + required: true + schema: + pattern: "\\d{4}-\\d{2}-\\d{2}" + type: string + description: "Filter to retrieve charge point statistics created to date\ + \ (YYYY-MM-DD), we expect a date in UTC
The maximum gap between from\ + \ and to data cannot be longer than 365 days" + format: date + example: 2022-05-30 + responses: + "200": + description: Statistics that match the provided criteria + content: + application/json: + schema: + $ref: "#/components/schemas/ChargePointStatisticsDto" "404": description: Entity with the provided id was not found content: @@ -1124,6 +1379,26 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -1134,24 +1409,108 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/charge-point-statistics/by-site: + get: + tags: + - Charge Point Statistics + summary: Retrieve statistics related to a site + description: "Required scope: `charge-points:read`" + operationId: get-site-statistics + parameters: + - name: siteId + in: query + required: true + schema: + minimum: 0 + exclusiveMinimum: true + required: + - "true" + type: integer + description: Filter to retrieve statistics for a given site by `siteId` + format: int64 + example: 45 + - name: fromDate + in: query + required: true + schema: + pattern: "\\d{4}-\\d{2}-\\d{2}" + type: string + description: "Filter to retrieve charge point statistics created from date\ + \ (YYYY-MM-DD), we expect a date in UTC
The maximum gap between from\ + \ and to data cannot be longer than 365 days" + format: date + example: 2022-05-01 + - name: toDate + in: query + required: true + schema: + pattern: "\\d{4}-\\d{2}-\\d{2}" + type: string + description: "Filter to retrieve charge point statistics created to date\ + \ (YYYY-MM-DD), we expect a date in UTC
The maximum gap between from\ + \ and to data cannot be longer than 365 days" + format: date + example: 2022-05-30 + responses: + "200": + description: Statistics that match the provided criteria + content: + application/json: + schema: + $ref: "#/components/schemas/ChargePointStatisticsDto" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] /api/v1/charge-points: get: tags: - Charge Points - summary: Retrieve a list of charge points. - description: "Required scope: `charge-points:read`" + summary: Retrieve a list of charge points + description: "Required scope: `charge-points:read`
Organization authorization:\ + \ `supported`" operationId: get-charge-points parameters: - name: page @@ -1161,7 +1520,7 @@ paths: type: integer format: int32 default: 0 - example: "1" + example: 1 - name: perPage in: query description: "number of items per page (between 1 and 100, default 10)" @@ -1169,7 +1528,7 @@ paths: type: integer format: int32 default: 10 - example: "10" + example: 10 - name: siteId in: query schema: @@ -1186,7 +1545,7 @@ paths: required: - "false" type: integer - description: Allows to filter list of charge points by a team id. + description: Allows to filter list of charge points by a team id format: int64 nullable: true example: 19 @@ -1212,6 +1571,26 @@ paths: \ -8.050000, -34.900002)" nullable: true example: "55.7096,12.5856" + - name: boundingBox + in: query + schema: + required: + - "false" + type: string + description: "Bounding box coordinates for filtering. The format should\ + \ be 'minLat,minLon,maxLat,maxLon'" + nullable: true + example: "55.0,12.0,56.0,13.0" + - name: operatorId + in: query + schema: + required: + - "false" + type: integer + description: Allows filtering charge point by `operatorId` + format: int64 + nullable: true + example: 1 - name: includeDeleted in: query schema: @@ -1219,56 +1598,90 @@ paths: - "false" type: boolean description: Includes deleted resources in the response - nullable: true example: false + default: false + - name: includePublic + in: query + schema: + required: + - "false" + type: boolean + description: "Includes public charge points from other operators in the\ + \ response**Note: Only supported from Version `2024-07-01`**" + example: false + default: false - name: state in: query schema: + description: Allows filtering charge points by their state nullable: true + example: busy allOf: - - $ref: '#/components/schemas/ChargePointState' - - description: Allows filtering charge points by their state - example: busy + - $ref: "#/components/schemas/ChargePointState" + - {} responses: "200": description: List of charges points that match the criteria content: application/json: schema: - $ref: '#/components/schemas/MontaPage_ChargePointDto_' - "400": - description: The request is invalid + $ref: "#/components/schemas/MontaPage_ChargePointDto_" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] post: tags: - Charge Points summary: Create a charge point - description: "Required scope: `charge-points:write`" + description: "Required scope: `charge-points:write`
Organization authorization:\ + \ `supported`" operationId: post-charge-point requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateChargePoint' + $ref: "#/components/schemas/CreateChargePoint" required: true responses: "201": @@ -1276,7 +1689,29 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ChargePoint' + $ref: "#/components/schemas/ChargePoint" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -1297,24 +1732,14 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] /api/v1/charge-points/map: get: tags: - Charge Points - summary: Retrieve charge points / sites for map. - description: "Required scope: `map:read`" + summary: Retrieve charge points / sites for map + description: "Required scope: `map:read`. **RateLimit-Policy: `Fair-Use`**" operationId: get-charge-point-map parameters: - name: topLatitude @@ -1434,35 +1859,58 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/MapResult' - "400": - description: The request is invalid + $ref: "#/components/schemas/MapResult" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] /api/v1/charge-points/{chargePointId}: get: tags: - Charge Points - summary: Retrieve a single charge point. - description: "Required scope: `charge-points:read`" + summary: Retrieve a single charge point + description: "Required scope: `charge-points:read`
Organization authorization:\ + \ `supported`" operationId: get-charge-point parameters: - name: chargePointId @@ -1477,17 +1925,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ChargePoint' - "403": - description: Operator doesn't have access to resource - content: - application/json: - schema: - type: object - example: - status: FORBIDDEN - message: Operator doesn't have access to resource - errorCode: ACCESS_FORBIDDEN + $ref: "#/components/schemas/ChargePoint" "404": description: Entity with the provided id was not found content: @@ -1500,33 +1938,44 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context - "400": - description: The request is invalid + "401": + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST - "401": - description: Unauthorized access + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: type: object example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] delete: tags: - Charge Points summary: Delete an existing charge point - description: "Required scope: `charge-points:delete`" + description: "Required scope: `charge-points:delete`
Organization authorization:\ + \ `supported`" operationId: delete-charge-point parameters: - name: chargePointId @@ -1538,6 +1987,28 @@ paths: responses: "204": description: Charge point deleted + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -1558,23 +2029,14 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] patch: tags: - Charge Points summary: Patch an existing charge point - description: "Required scope: `charge-points:write`" + description: "Required scope: `charge-points:write`
Organization authorization:\ + \ `supported`" operationId: patch-charge-point parameters: - name: chargePointId @@ -1587,7 +2049,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PatchChargePoint' + $ref: "#/components/schemas/PatchChargePoint" required: true responses: "200": @@ -1595,7 +2057,29 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ChargePoint' + $ref: "#/components/schemas/ChargePoint" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -1616,25 +2100,15 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/charges: + /api/v1/charge-points/{chargePointId}/logs: get: tags: - - Charges - summary: Retrieve a list of charges. - description: "Required scope: `charge-transactions:read`" - operationId: get-charges + - Charge Points + summary: Retrieve charge point OCPP logs + description: "Required scope: `charge-points:read`" + operationId: get-charge-point-ocpp-logs parameters: - name: page in: query @@ -1643,7 +2117,7 @@ paths: type: integer format: int32 default: 0 - example: "1" + example: 1 - name: perPage in: query description: "number of items per page (between 1 and 100, default 10)" @@ -1651,119 +2125,75 @@ paths: type: integer format: int32 default: 10 - example: "10" - - name: teamId - in: query - schema: - type: integer - description: Filter to retrieve charges with specified `teamId` - format: int64 - nullable: true - example: 13 + example: 10 - name: chargePointId - in: query + in: path + required: true schema: type: integer - description: Filter to retrieve charges with specified `chargePointId` format: int64 - nullable: true - example: 10 - - name: siteId + - name: fromDate in: query schema: - type: integer - description: Filter to retrieve charges with specified `siteId` - format: int64 + required: + - "false" + type: string + description: "Filter to retrieve charge point logs created from date, a\ + \ date in UTC and ISO8601 (YYYY-MM-DD'T'HH:MM:SS'Z')" + format: date-time nullable: true - example: 5 - - name: state + example: 2024-05-22T09:30:03Z + - name: toDate in: query schema: + required: + - "false" type: string - description: Filter to retrieve charges by `state` + description: "Filter to retrieve charge point logs to date, a date in UTC\ + \ and ISO8601 (YYYY-MM-DD'T'HH:MM:SS'Z')" + format: date-time nullable: true - example: charging - enum: - - reserved - - starting - - charging - - stopping - - paused - - scheduled - - stopped - - completed - - name: fromDate - in: query - schema: - type: string - description: "Filter to retrieve charges where `createdAt` >= `fromDate`\ - \ (ISO8601: yyyy-MM-ddTHH:mm:ssZ)" - format: date-time - nullable: true - example: 2022-05-22T09:30:03Z - - name: toDate - in: query - schema: - type: string - description: "Filter to retrieve charges where `createdAt` <= `toDate` (ISO8601:\ - \ yyyy-MM-ddTHH:mm:ssZ)" - format: date-time - nullable: true - example: 2022-05-22T09:30:03Z - - name: chargeAuthType - in: query - schema: - nullable: true - allOf: - - $ref: '#/components/schemas/ChargeAuthenticationType' - - description: "Filter to retrieve charges by the charge authentication\ - \ type, must be combined with `chargeAuthId`" - example: vehicleId - - name: chargeAuthId - in: query - schema: - type: string - description: "Filter to retrieve charges by the charge authentication id,\ - \ must be combined with `chargeAuthType`
*Note*: for type vehicleId\ - \ `chargeAuthId` must not include the VID: prefix" - nullable: true - example: 38C58DB85XXX - - name: partnerExternalId - in: query - schema: - type: string - description: "Filter charges by `partnerExternalId`, to filter only resources\ - \ without `partnerExternalId` *use* `partnerExternalId=\"\"`" - nullable: true - example: "10001" - - name: operatorRole - in: query - schema: - nullable: true - allOf: - - $ref: '#/components/schemas/OperatorRole' - - description: Filter to indicate the desired role to list charges
e.g - owner will always deliver charges from the operator charge points
payer - will deliver charges paid by the operator - example: owner - default: owner + example: 2024-05-23T09:30:03Z responses: "200": - description: List of charges that match the criteria + description: "Charge point OCPP logs with provided id. Note: Response from\ + \ this endpoint is not considered type-safe and might change over time" + content: + application/json: + schema: + $ref: "#/components/schemas/MontaPage_ChargePointOcppLogDto_" + "404": + description: Entity with the provided id was not found content: application/json: schema: - $ref: '#/components/schemas/MontaPage_ChargeDto_' + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -1776,25 +2206,24 @@ paths: errorCode: BAD_REQUEST security: - BearerAccessToken: [] + /api/v1/charge-points/{chargePointId}/reboot: post: tags: - - Charges - summary: Start a charge. - description: "Required scope: `control-charging:write`" - operationId: start-charge - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StartChargeRequest' + - Charge Points + summary: Reboot an existing charge point + description: "Required scope: `charge-points:write`
Organization authorization:\ + \ `supported`" + operationId: reboot-charge-point + parameters: + - name: chargePointId + in: path required: true + schema: + type: integer + format: int64 responses: - "200": - description: Charge successfully started - content: - application/json: - schema: - $ref: '#/components/schemas/Charge' + "204": + description: Charge point rebooted "404": description: Entity with the provided id was not found content: @@ -1807,109 +2236,26 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context - "400": - description: The request is invalid - content: - application/json: - schema: - type: object - example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - /api/v1/charges/insights: - get: - tags: - - Charges Insights - summary: Retrieve insights about charges. - description: |- - Required scope: `charge-transactions:read`. - **Deprecated, use `/insights/charges/driver-report` and `/insights/charges/charger-report` instead.** - operationId: get-charges-insights - parameters: - - name: fromDate - in: query - required: true - schema: - pattern: "^(\\d{4}-\\d{2}-\\d{2})$" - type: string - description: "Filter to retrieve charge insights created from date (YYYY-MM-DD),\ - \ we expect a date in UTC
The maximum gap between from and to data\ - \ cannot be longer than 31 days" - format: date - example: 2022-05-01 - - name: toDate - in: query - required: true - schema: - pattern: "^(\\d{4}-\\d{2}-\\d{2})$" - type: string - description: "Filter to retrieve charge insights created to date (YYYY-MM-DD),\ - \ we expect a date in UTC
The maximum gap between from and to data\ - \ cannot be longer than 31 days" - format: date - example: 2022-05-30 - - name: teamId - in: query - schema: - type: integer - description: Filter to retrieve charges insights by the specified `teamId` - format: int64 - nullable: true - example: 13 - - name: chargePointId - in: query - schema: - type: integer - description: Filter to retrieve charges insights by the specified `chargePointId` - format: int64 - nullable: true - example: 13 - - name: siteId - in: query - schema: - type: integer - description: Filter to retrieve charges insights by the specified `siteId` - format: int64 - nullable: true - example: 13 - - name: teamMemberId - in: query - schema: - type: integer - description: Filter to retrieve charges insights by the specified `teamMemberId` - format: int64 - nullable: true - example: 13 - responses: - "200": - description: Charge insights for the given filter - content: - application/json: - schema: - $ref: '#/components/schemas/ChargesInsight' - "401": - description: Unauthorized access + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: type: object example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -1920,53 +2266,58 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - deprecated: true security: - BearerAccessToken: [] - x-sunset: 2024-04-01 - /api/v1/charges/{chargeId}: - get: + /api/v1/charge-points/{chargePointId}/unlock: + post: tags: - - Charges - summary: Retrieve a single charge. - description: "Required scope: `charge-transactions:read`" - operationId: get-charge + - Charge Points + summary: Unlock an existing charge point + description: "Required scope: `charge-points:write`
Organization authorization:\ + \ `supported`" + operationId: unlock-charge-point parameters: - - name: chargeId + - name: chargePointId in: path required: true schema: type: integer format: int64 responses: - "200": - description: Charge with provided id + "204": + description: Charge point unlocked + "404": + description: Entity with the provided id was not found content: application/json: schema: - $ref: '#/components/schemas/Charge' - "403": - description: Operator doesn't have access to resource + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: - status: FORBIDDEN - message: Operator doesn't have access to resource - errorCode: ACCESS_FORBIDDEN - "404": - description: Entity with the provided id was not found + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: type: object example: - status: NOT_FOUND - message: Requested entity/entity provided in body was not found - readableMessage: user friendly message - errorCode: RESOURCE_NOT_FOUND - context: context + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -1977,99 +2328,170 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - patch: + /api/v1/charges: + get: tags: - Charges - summary: Patch an existing charge - description: "Required scope: `charges:write`" - operationId: patch-charge + summary: Retrieve a list of charges + description: "Required scope: `charge-transactions:read`
Organization authorization:\ + \ `supported`" + operationId: get-charges parameters: - - name: chargeId - in: path - required: true - schema: + - name: page + in: query + description: page number to retrieve (starts with 0) + schema: + type: integer + format: int32 + default: 0 + example: 1 + - name: perPage + in: query + description: "number of items per page (between 1 and 100, default 10)" + schema: + type: integer + format: int32 + default: 10 + example: 10 + - name: teamId + in: query + schema: type: integer + description: Filter to retrieve charges with specified `teamId` format: int64 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchCharge' - required: true + nullable: true + example: 13 + - name: operatorId + in: query + schema: + type: integer + description: "Filter to retrieve charges with specified `operatorId`
*Note*:\ + \ When not provided and `operatorRole = payer` the default operator will\ + \ be used for the given consumer, if the default operator cannot be assigned\ + \ the request will be rejected" + format: int64 + nullable: true + example: 96 + - name: chargePointId + in: query + schema: + type: integer + description: Filter to retrieve charges with specified `chargePointId` + format: int64 + nullable: true + example: 10 + - name: siteId + in: query + schema: + type: integer + description: Filter to retrieve charges with specified `siteId` + format: int64 + nullable: true + example: 5 + - name: state + in: query + schema: + type: string + description: Filter to retrieve charges by `state` + nullable: true + example: charging + enum: + - reserved + - starting + - charging + - stopping + - paused + - scheduled + - stopped + - completed + - name: fromDate + in: query + schema: + type: string + description: "Filter to retrieve charges where `createdAt` >= `fromDate`\ + \ (ISO8601: yyyy-MM-ddTHH:mm:ssZ)" + format: date-time + nullable: true + example: 2022-05-22T09:30:03Z + - name: toDate + in: query + schema: + type: string + description: "Filter to retrieve charges where `createdAt` <= `toDate` (ISO8601:\ + \ yyyy-MM-ddTHH:mm:ssZ)" + format: date-time + nullable: true + example: 2022-05-22T09:30:03Z + - name: chargeAuthType + in: query + schema: + description: "Filter to retrieve charges by the charge authentication type,\ + \ must be combined with `chargeAuthId`" + nullable: true + example: vehicleId + allOf: + - $ref: "#/components/schemas/ChargeAuthenticationType" + - {} + - name: chargeAuthId + in: query + schema: + type: string + description: "Filter to retrieve charges by the charge authentication id,\ + \ must be combined with `chargeAuthType`
*Note*: for type vehicleId\ + \ `chargeAuthId` must not include the VID: prefix" + nullable: true + example: 38C58DB85XXX + - name: partnerExternalId + in: query + schema: + type: string + description: "Filter charges by `partnerExternalId`, to filter only resources\ + \ without `partnerExternalId` *use* `partnerExternalId=\"\"`" + nullable: true + example: "10001" + - name: operatorRole + in: query + schema: + description: Filter to indicate the desired role to list charges
e.g + owner will always deliver charges from the operator charge points
payer + will deliver charges paid by the operator + nullable: true + example: owner + allOf: + - $ref: "#/components/schemas/OperatorRole" + - {} + default: owner responses: "200": - description: Charge updated - content: - application/json: - schema: - $ref: '#/components/schemas/Charge' - "403": - description: Operator doesn't have access to resource + description: List of charges that match the criteria content: application/json: schema: - type: object - example: - status: FORBIDDEN - message: Operator doesn't have access to resource - errorCode: ACCESS_FORBIDDEN - "400": - description: The request is invalid + $ref: "#/components/schemas/MontaPage_ChargeDto_" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - /api/v1/charges/{chargeId}/breakdown: - get: - tags: - - Charges - summary: Retrieve a charge price and cost breakdown - description: "Required scope: `charges:read`*Note*: Please be aware that this\ - \ endpoint is currently in the BETA phase,calculations may return slightly\ - \ varying results, and the payload can change." - operationId: get-charge-breakdown - parameters: - - name: chargeId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "200": - description: Charge Breakdown for the given id - content: - application/json: - schema: - $ref: '#/components/schemas/ChargeBreakdown' + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -2090,39 +2512,28 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/charges/{chargeId}/restart: - get: + post: tags: - Charges - summary: Restart or start a reserved charge. - description: "Required scope: `control-charging:write`" - operationId: restart-charge - parameters: - - name: chargeId - in: path + summary: Start a charge + description: "Required scope: `control-charging:write`
Organization authorization:\ + \ `supported`" + operationId: start-charge + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/StartChargeRequest" required: true - schema: - type: integer - format: int64 responses: "200": - description: Successfully restarted charge/started reserved charge + description: Charge successfully started content: application/json: schema: - $ref: '#/components/schemas/Charge' + $ref: "#/components/schemas/Charge" "404": description: Entity with the provided id was not found content: @@ -2135,6 +2546,16 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -2155,43 +2576,83 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/charges/{chargeId}/stop: + /api/v1/charges/insights: get: tags: - - Charges - summary: Stop a charge. - description: "Required scope: `control-charging:write`" - operationId: stop-charge + - Charges Insights + summary: Retrieve insights about charges. + description: |- + Required scope: `charge-transactions:read`. + **Deprecated, use `/insights/charges/driver-report` and `/insights/charges/charger-report` instead.** + operationId: get-charges-insights parameters: - - name: chargeId - in: path + - name: fromDate + in: query required: true + schema: + pattern: "^(\\d{4}-\\d{2}-\\d{2})$" + type: string + description: "Filter to retrieve charge insights created from date (YYYY-MM-DD),\ + \ we expect a date in UTC
The maximum gap between from and to data\ + \ cannot be longer than 31 days" + format: date + example: 2022-05-01 + - name: toDate + in: query + required: true + schema: + pattern: "^(\\d{4}-\\d{2}-\\d{2})$" + type: string + description: "Filter to retrieve charge insights created to date (YYYY-MM-DD),\ + \ we expect a date in UTC
The maximum gap between from and to data\ + \ cannot be longer than 31 days" + format: date + example: 2022-05-30 + - name: teamId + in: query schema: type: integer + description: Filter to retrieve charges insights by the specified `teamId` format: int64 - responses: - "200": - description: Successfully stopped a charge - content: - application/json: - schema: - $ref: '#/components/schemas/Charge' - "404": - description: Entity with the provided id was not found - content: - application/json: + nullable: true + example: 13 + - name: chargePointId + in: query + schema: + type: integer + description: Filter to retrieve charges insights by the specified `chargePointId` + format: int64 + nullable: true + example: 13 + - name: siteId + in: query + schema: + type: integer + description: Filter to retrieve charges insights by the specified `siteId` + format: int64 + nullable: true + example: 13 + - name: teamMemberId + in: query + schema: + type: integer + description: Filter to retrieve charges insights by the specified `teamMemberId` + format: int64 + nullable: true + example: 13 + responses: + "200": + description: Charge insights for the given filter + content: + application/json: + schema: + $ref: "#/components/schemas/ChargesInsight" + "404": + description: Entity with the provided id was not found + content: + application/json: schema: type: object example: @@ -2200,6 +2661,16 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -2220,41 +2691,64 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + deprecated: true security: - BearerAccessToken: [] - /api/v1/consumers/me: + x-sunset: 2024-04-01 + /api/v1/charges/{chargeId}: get: tags: - - Consumer - summary: Obtain information about current API Consumer - operationId: get-current-consumer + - Charges + summary: Retrieve a single charge + description: "Required scope: `charge-transactions:read`
Organization authorization:\ + \ `supported`" + operationId: get-charge + parameters: + - name: chargeId + in: path + required: true + schema: + type: integer + format: int64 responses: "200": - description: Successfully retrieved current consumer + description: Charge with provided id + content: + application/json: + schema: + $ref: "#/components/schemas/Charge" + "404": + description: Entity with the provided id was not found content: application/json: schema: - $ref: '#/components/schemas/Consumer' + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -2267,63 +2761,65 @@ paths: errorCode: BAD_REQUEST security: - BearerAccessToken: [] - /api/v1/countries: - get: + patch: tags: - - Countries - summary: 'Retrieve a countries. ' - description: "Note: no pagination support" - operationId: getCountries - parameters: [] + - Charges + summary: Patch an existing charge + description: "Required scope: `charges:write`
Organization authorization:\ + \ `supported`" + operationId: patch-charge + parameters: + - name: chargeId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchCharge" + required: true responses: "200": - description: List of countries + description: Charge updated content: application/json: schema: - $ref: '#/components/schemas/MontaPage_CountryDto_' - "400": - description: The request is invalid + $ref: "#/components/schemas/Charge" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - /api/v1/countries/{id}: - get: - tags: - - Countries - summary: Retrieve a country. - operationId: getCountry - parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int64 - responses: - "200": - description: Country with provided id + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: - $ref: '#/components/schemas/Country' + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -2334,87 +2830,85 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/country-areas: + /api/v1/charges/{chargeId}/breakdown: get: tags: - - Country Areas - summary: Retrieve a country areas. - description: "Note: no pagination support" - operationId: getCountriesAreas + - Charges + summary: Retrieve a charge price and cost breakdown + description: "Required scope: `charges:read`*Note*: Please be aware that this\ + \ endpoint is currently in the BETA phase,calculations may return slightly\ + \ varying results, and the payload can change." + operationId: get-charge-breakdown parameters: - - name: countryId - in: query + - name: chargeId + in: path required: true schema: - minimum: 0 - exclusiveMinimum: true - required: - - "true" type: integer - description: Allows to filter country areas by country Id format: int64 - example: 13 responses: "200": - description: List of country areas + description: Charge Breakdown for the given id content: application/json: schema: - $ref: '#/components/schemas/MontaPage_CountryAreaDto_' - "400": - description: The request is invalid + $ref: "#/components/schemas/ChargeBreakdown" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - "404": - description: Entity with the provided id was not found + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: type: object example: - status: NOT_FOUND - message: Requested entity/entity provided in body was not found - readableMessage: user friendly message - errorCode: RESOURCE_NOT_FOUND - context: context + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] - /api/v1/country-areas/{id}: + /api/v1/charges/{chargeId}/restart: get: tags: - - Country Areas - summary: Retrieve a country area. - operationId: getCountryArea + - Charges + summary: Restart or start a reserved charge + description: "Required scope: `control-charging:write`
Organization authorization:\ + \ `supported`" + operationId: restart-charge parameters: - - name: id + - name: chargeId in: path required: true schema: @@ -2422,84 +2916,43 @@ paths: format: int64 responses: "200": - description: Country area with provided id + description: Successfully restarted charge/started reserved charge content: application/json: schema: - $ref: '#/components/schemas/CountryArea' - "400": - description: The request is invalid + $ref: "#/components/schemas/Charge" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - "404": - description: Entity with the provided id was not found + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: type: object example: - status: NOT_FOUND - message: Requested entity/entity provided in body was not found - readableMessage: user friendly message - errorCode: RESOURCE_NOT_FOUND - context: context - security: - - BearerAccessToken: [] - /api/v1/currencies: - get: - tags: - - Currencies - summary: Retrieve a list of currencies - operationId: get-currencies - parameters: - - name: page - in: query - description: page number to retrieve (starts with 0) - schema: - type: integer - format: int32 - default: 0 - example: "1" - - name: perPage - in: query - description: "number of items per page (between 1 and 100, default 10)" - schema: - type: integer - format: int32 - default: 10 - example: "10" - - name: identifier - in: query - schema: - required: - - "false" - type: string - description: Allows to filter by ISO Alpha-3 currency code - nullable: true - example: eur - responses: - "200": - description: List of currencies that match the criteria - content: - application/json: - schema: - $ref: '#/components/schemas/MontaPage_CurrencyDto_' + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -2510,26 +2963,18 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/currencies/{currencyId}: + /api/v1/charges/{chargeId}/stop: get: tags: - - Currencies - summary: Retrieve a single currency - operationId: get-currency + - Charges + summary: Stop a charge + description: "Required scope: `control-charging:write`
Organization authorization:\ + \ `supported`" + operationId: stop-charge parameters: - - name: currencyId + - name: chargeId in: path required: true schema: @@ -2537,11 +2982,33 @@ paths: format: int64 responses: "200": - description: Currency with provided id + description: Successfully stopped a charge + content: + application/json: + schema: + $ref: "#/components/schemas/Charge" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found content: application/json: schema: - $ref: '#/components/schemas/CurrencyDto_4' + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -2552,6 +3019,31 @@ paths: status: FORBIDDEN message: Operator doesn't have access to resource errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/consumers/me: + get: + tags: + - Consumer + summary: Obtain information about current API Consumer + operationId: get-current-consumer + responses: + "200": + description: Successfully retrieved current consumer + content: + application/json: + schema: + $ref: "#/components/schemas/Consumer" "404": description: Entity with the provided id was not found content: @@ -2564,94 +3056,85 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context - "400": - description: The request is invalid + "401": + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST - "401": - description: Unauthorized access + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: type: object example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] - /api/v1/insights/charges/charger-report: + /api/v1/countries: get: tags: - - Insights - summary: Retrieve insights about charge points. - description: |- - Required scope: `insights:read` - - Returns a list of charge points (owned by that `teamId`) with the number of charging sessions and the total Kwh consumed. - operationId: get-insights-charges-charger-report - parameters: - - name: teamId - in: query - required: true - schema: - required: - - "true" - type: integer - description: Filter to retrieve charge point insights by the specified `teamId` - format: int64 - example: 13 - - name: chargePointIds - in: query - schema: - required: - - "false" - type: string - description: Filter to retrieve charges insights by the specified (comma-separated) - list of `chargePointId` - nullable: true - example: "13,14,15" - - name: fromDate - in: query - required: true - schema: - type: string - description: "Filter to retrieve charge insights created from date, we expecta\ - \ date in UTC and ISO8601 (YYYY-MM-DD'T'HH:MM:SS'Z')
The maximum gap\ - \ between from and to data cannot be longer than 31 days" - format: date - - name: toDate - in: query - required: true - schema: - type: string - description: "Filter to retrieve charge insights created to date, we expecta\ - \ date in UTC and ISO8601 (YYYY-MM-DD'T'HH:MM:SS'Z')
The maximum gap\ - \ between from and to data cannot be longer than 31 days" - format: date + - Countries + summary: 'Retrieve a countries. ' + description: "Note: no pagination support" + operationId: getCountries + parameters: [] responses: "200": - description: Charger report for the given filter + description: List of countries + content: + application/json: + schema: + $ref: "#/components/schemas/MontaPage_CountryDto_" + "404": + description: Entity with the provided id was not found content: application/json: schema: - $ref: '#/components/schemas/MontaPage_ChargesInsightChargerReportDto_' + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -2664,90 +3147,58 @@ paths: errorCode: BAD_REQUEST security: - BearerAccessToken: [] - /api/v1/insights/charges/driver-report: + /api/v1/countries/{id}: get: tags: - - Insights - summary: Retrieve insights about charges broken down by team members of a team. - description: |- - Required scope: `insights:read` - - Returns charge insights for the given teamId (and optionally `teamMemberIds`) broken down by team member. - Takes only charges into consideration that were paid for by the provided `teamId`. - - Note: Any values related to money are in the teams' currency. You can fetch them from `GET /api/v1/teams/{teamId}` - operationId: get-insights-charges-driver-report + - Countries + summary: Retrieve a country. + operationId: getCountry parameters: - - name: teamId - in: query + - name: id + in: path required: true schema: - required: - - "true" type: integer - description: Filter to retrieve charges insights by the specified `teamId` format: int64 - example: 13 - - name: teamMemberIds - in: query - schema: - required: - - "false" - type: string - description: Filter to retrieve charges insights by the specified (comma-separated) - list of `teamMemberId` - nullable: true - example: "13,14,15" - - name: fromDate - in: query - required: true - schema: - type: string - description: "Filter to retrieve charge insights created from date, we expecta\ - \ date in UTC and ISO8601 (YYYY-MM-DD'T'HH:MM:SS'Z')
The maximum gap\ - \ between from and to data cannot be longer than 31 days" - format: date - - name: toDate - in: query - required: true - schema: - type: string - description: "Filter to retrieve charge insights created to date, we expecta\ - \ date in UTC and ISO8601 (YYYY-MM-DD'T'HH:MM:SS'Z')
The maximum gap\ - \ between from and to data cannot be longer than 31 days" - format: date - - name: datesFilteredBy - in: query - schema: - nullable: true - allOf: - - $ref: '#/components/schemas/DriverReportDatesFilteredBy' - - type: string - description: "Use this to determine if the report should be filtered based\ - \ on completion dates of charges or wallet transactions.

Accepted\ - \ values:
- `charge-transaction`: Generates report based on charges'\ - \ `completedAt`. Default.- `wallet-transaction`: Generates report based\ - \ on wallet transactions' `completedAt`. Will not include any charges\ - \ without wallet transactions." - example: charge-transaction - default: charge-transaction responses: "200": - description: Driver report for the given filter + description: Country with provided id + content: + application/json: + schema: + $ref: "#/components/schemas/Country" + "404": + description: Entity with the provided id was not found content: application/json: schema: - $ref: '#/components/schemas/MontaPage_ChargesInsightDriverReportDto_' + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -2760,108 +3211,55 @@ paths: errorCode: BAD_REQUEST security: - BearerAccessToken: [] - /api/v1/installer-jobs: + /api/v1/country-areas: get: tags: - - Installer Jobs - summary: Retrieve a list of installer jobs - description: "Required scope: `installer-jobs:read`" - operationId: get-installer-jobs + - Country Areas + summary: Retrieve a country areas. + description: "Note: no pagination support" + operationId: getCountriesAreas parameters: - - name: page - in: query - description: page number to retrieve (starts with 0) - schema: - type: integer - format: int32 - default: 0 - example: "1" - - name: perPage - in: query - description: "number of items per page (between 1 and 100, default 10)" - schema: - type: integer - format: int32 - default: 10 - example: "10" - - name: siteId + - name: countryId in: query + required: true schema: + minimum: 0 + exclusiveMinimum: true required: - - "false" + - "true" type: integer - description: Allows to filter list of installer jobs by a site id + description: Allows to filter country areas by country Id format: int64 - nullable: true example: 13 - - name: teamId - in: query - schema: - required: - - "false" - type: integer - description: Allows to filter list of installer jobs by a team id. - format: int64 - nullable: true - example: 19 - - name: includeDeleted - in: query - schema: - required: - - "false" - type: boolean - description: "If true, deleted installer jobs will be included in the response." - nullable: true - example: true responses: "200": - description: List of installer jobs that match the criteria + description: List of country areas content: application/json: schema: - $ref: '#/components/schemas/MontaPage_InstallerJobDto_' - "400": - description: The request is invalid + $ref: "#/components/schemas/MontaPage_CountryAreaDto_" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - post: - tags: - - Installer Jobs - summary: Create an installer job - description: "Create an installer job for a charge point site.
Required scope:\ - \ `installer-jobs:write`" - operationId: post-installer-job - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateInstallerJobDto' - required: true - responses: - "201": - description: Installer job created - content: - application/json: - schema: - $ref: '#/components/schemas/InstallerJob' + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -2882,27 +3280,16 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/installer-jobs/{installerJobId}: + /api/v1/country-areas/{id}: get: tags: - - Installer Jobs - summary: Retrieve a single installer job - description: "Required scope: `installer-jobs:read`" - operationId: get-installer-job + - Country Areas + summary: Retrieve a country area. + operationId: getCountryArea parameters: - - name: installerJobId + - name: id in: path required: true schema: @@ -2910,21 +3297,11 @@ paths: format: int64 responses: "200": - description: Installer job with provided id - content: - application/json: - schema: - $ref: '#/components/schemas/InstallerJob' - "403": - description: Operator doesn't have access to resource + description: Country area with provided id content: application/json: schema: - type: object - example: - status: FORBIDDEN - message: Operator doesn't have access to resource - errorCode: ACCESS_FORBIDDEN + $ref: "#/components/schemas/CountryArea" "404": description: Entity with the provided id was not found content: @@ -2937,44 +3314,16 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context - "400": - description: The request is invalid - content: - application/json: - schema: - type: object - example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - delete: - tags: - - Installer Jobs - summary: Delete an existing installer job - description: "Required scope: `installer-jobs:delete`" - operationId: delete-installer-job - parameters: - - name: installerJobId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "204": - description: Installer Job deleted + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -2995,79 +3344,99 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/operators: + /api/v1/currencies: get: tags: - - Operators - summary: Retrieve operators - description: "Required scope: `operators`" - operationId: get-operators - parameters: - - name: page + - Currencies + summary: Retrieve a list of currencies + operationId: get-currencies + parameters: + - name: page in: query + description: page number to retrieve (starts with 0) schema: type: integer - description: page number to retrieve (starts with 0) format: int32 - nullable: true - example: 1 default: 0 + example: 1 - name: perPage in: query + description: "number of items per page (between 1 and 100, default 10)" schema: type: integer format: int32 + default: 10 + example: 10 + - name: identifier + in: query + schema: + required: + - "false" + type: string + description: Allows to filter by ISO Alpha-3 currency code nullable: true + example: eur responses: "200": - description: List of operators that match the criteria + description: List of currencies that match the criteria content: application/json: schema: - $ref: '#/components/schemas/MontaPage_OperatorDto_' - "400": - description: The request is invalid + $ref: "#/components/schemas/MontaPage_CurrencyDto_" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] - /api/v1/operators/{id}: + /api/v1/currencies/{currencyId}: get: tags: - - Operators - summary: Retrieve an operator - description: "Required scope: `operators`" - operationId: get-operator + - Currencies + summary: Retrieve a single currency + operationId: get-currency parameters: - - name: id + - name: currencyId in: path required: true schema: @@ -3075,11 +3444,33 @@ paths: format: int64 responses: "200": - description: operator with provided id + description: Currency with provided id + content: + application/json: + schema: + $ref: "#/components/schemas/CurrencyDto" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found content: application/json: schema: - $ref: '#/components/schemas/Operator' + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -3100,25 +3491,22 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/payment-terminals: + /api/v1/insights/charges/charge-auth-token-report: get: tags: - - Payment Terminals - summary: Retrieve a list of payment terminals - description: "Required scope: `payment-terminals:read`" - operationId: get-payment-terminals + - Insights + summary: Retrieve insights about charges broken down by charge auth token and + member cost groups of a team. + description: |- + Required scope: `insights:read` + + Returns charge insights for the given teamId (and optionally `chargeAuthTokenIds`) broken down by charge auth token and the member cost groups. + Takes only charges into consideration that were paid for by the provided `teamId`. + + Note: Any values related to money are in the teams' currency. You can fetch them from `GET /api/v1/teams/{teamId}` + operationId: get-insights-charges-charge-auth-token-report parameters: - name: page in: query @@ -3127,7 +3515,7 @@ paths: type: integer format: int32 default: 0 - example: "1" + example: 1 - name: perPage in: query description: "number of items per page (between 1 and 100, default 10)" @@ -3135,52 +3523,59 @@ paths: type: integer format: int32 default: 10 - example: "10" - - name: serial - in: query - schema: - required: - - "false" - type: string - description: Allows to filter list of terminals by a serial - nullable: true - example: XYZ123-DF-123 + example: 10 - name: teamId in: query + required: true schema: + minimum: 0 + exclusiveMinimum: true required: - - "false" + - "true" type: integer - description: Allows to filter list of terminals by a team id. + description: Filter to retrieve charges insights by the specified `teamId` format: int64 - nullable: true - example: 19 - - name: includeDeleted + example: 13 + - name: fromDate in: query + required: true schema: - required: - - "false" - type: boolean - description: "If true, deleted entities will be included in the response." - nullable: true - example: true + type: string + description: "Filter to retrieve charge insights created from date, we expecta\ + \ date in UTC and ISO8601 (YYYY-MM-DD'T'HH:MM:SS'Z')
The maximum gap\ + \ between from and to data cannot be longer than 31 days" + format: date + - name: toDate + in: query + required: true + schema: + type: string + description: "Filter to retrieve charge insights created to date, we expecta\ + \ date in UTC and ISO8601 (YYYY-MM-DD'T'HH:MM:SS'Z')
The maximum gap\ + \ between from and to data cannot be longer than 31 days" + format: date + - name: datesFilteredBy + in: query + schema: + description: "Use this to determine if the report should be filtered based\ + \ on completion dates of charges or wallet transactions.

Accepted\ + \ values:
- `charge-transaction`: Generates report based on charges'\ + \ `completedAt`. Default.- `wallet-transaction`: Generates report based\ + \ on wallet transactions' `completedAt`. Will not include any charges\ + \ without wallet transactions." + nullable: true + example: charge-transaction + allOf: + - $ref: "#/components/schemas/DriverReportDatesFilteredBy" + - type: string + default: charge-transaction responses: "200": - description: List of payment terminals that match the criteria - content: - application/json: - schema: - $ref: '#/components/schemas/MontaPage_PaymentTerminalDto_' - "400": - description: The request is invalid + description: Charge Auth Token report for the given filter content: application/json: schema: - type: object - example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + $ref: "#/components/schemas/MontaPage_ChargesInsightByChargeAuthTokenReportDto_" "401": description: Unauthorized access content: @@ -3191,28 +3586,18 @@ paths: status: UNAUTHORIZED message: Invalid or expired `accessToken`. errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - /api/v1/payment-terminals/{paymentTerminalId}: - get: - tags: - - Payment Terminals - summary: Retrieve a single payment terminal - description: "Required scope: `payment-terminals:read`" - operationId: get-payment-terminal - parameters: - - name: paymentTerminalId - in: path - required: true - schema: - type: string - responses: - "200": - description: Payment Terminal with provided id + "404": + description: Entity with the provided id was not found content: application/json: schema: - $ref: '#/components/schemas/PaymentTerminal' + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "403": description: Operator doesn't have access to resource content: @@ -3223,18 +3608,6 @@ paths: status: FORBIDDEN message: Operator doesn't have access to resource errorCode: ACCESS_FORBIDDEN - "404": - description: Entity with the provided id was not found - content: - application/json: - schema: - type: object - example: - status: NOT_FOUND - message: Requested entity/entity provided in body was not found - readableMessage: user friendly message - errorCode: RESOURCE_NOT_FOUND - context: context "400": description: The request is invalid content: @@ -3245,25 +3618,18 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/plans: + /api/v1/insights/charges/charger-report: get: tags: - - Plans - summary: Retrieve plans - description: "Required scope: `plans:read`" - operationId: get-plans + - Insights + summary: Retrieve insights about charge points. + description: |- + Required scope: `insights:read` + + Returns a list of charge points (owned by that `teamId`) with the number of charging sessions and the total Kwh consumed. + operationId: get-insights-charges-charger-report parameters: - name: page in: query @@ -3272,7 +3638,7 @@ paths: type: integer format: int32 default: 0 - example: "1" + example: 1 - name: perPage in: query description: "number of items per page (between 1 and 100, default 10)" @@ -3280,152 +3646,76 @@ paths: type: integer format: int32 default: 10 - example: "10" - responses: - "200": - description: List of plans that match the criteria - content: - application/json: - schema: - $ref: '#/components/schemas/MontaPage_PlanDto_' - "400": - description: The request is invalid - content: - application/json: - schema: - type: object - example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - /api/v1/plans/{id}: - get: - tags: - - Plans - summary: Retrieve a plan - description: "Required scope: `plans:read`" - operationId: get-plan - parameters: - - name: id - in: path + example: 10 + - name: teamId + in: query required: true schema: + minimum: 0 + exclusiveMinimum: true + required: + - "true" type: integer + description: Filter to retrieve charge point insights by the specified `teamId` format: int64 - responses: - "200": - description: Plan with provided id - content: - application/json: - schema: - $ref: '#/components/schemas/Plan' - "400": - description: The request is invalid - content: - application/json: - schema: - type: object - example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - /api/v1/price-group-tags: - get: - tags: - - Price Groups Tags - summary: Retrieve price group tags. - description: "Required scope: `price-groups:read`" - operationId: get-price-group-tags - parameters: - - name: name + example: 13 + - name: chargePointIds in: query schema: + required: + - "false" type: string - description: Filter to retrieve resources by the specified `name`. + description: Filter to retrieve charges insights by the specified (comma-separated) + list of `chargePointId` nullable: true - example: Energy - - name: partnerExternalId + example: "13,14,15" + - name: fromDate in: query + required: true schema: - required: - - "false" type: string - description: "Filter resources by partnerExternalId, to filter only resources\ - \ without `partnerExternalId` *use* `partnerExternalId=\"\"`" - nullable: true - example: 1A2B + description: "Filter to retrieve charge insights created from date, we expecta\ + \ date in UTC and ISO8601 (YYYY-MM-DD'T'HH:MM:SS'Z')
The maximum gap\ + \ between from and to data cannot be longer than 31 days" + format: date + - name: toDate + in: query + required: true + schema: + type: string + description: "Filter to retrieve charge insights created to date, we expecta\ + \ date in UTC and ISO8601 (YYYY-MM-DD'T'HH:MM:SS'Z')
The maximum gap\ + \ between from and to data cannot be longer than 31 days" + format: date responses: "200": - description: Price group tags for a given filter + description: Charger report for the given filter content: application/json: schema: - $ref: '#/components/schemas/MontaPage_PriceGroupTagDto_' - "401": - description: Unauthorized access + $ref: "#/components/schemas/MontaPage_ChargesInsightChargerReportDto_" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - "400": - description: The request is invalid + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST - security: - - BearerAccessToken: [] - post: - tags: - - Price Groups Tags - summary: Create a price group tag - description: "Required scope: `price-groups:write`" - operationId: post-price-group-tag - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreatePriceGroupTag' - required: true - responses: - "201": - description: Price group tag created - content: - application/json: - schema: - $ref: '#/components/schemas/PriceGroupTag' + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -3436,18 +3726,6 @@ paths: status: FORBIDDEN message: Operator doesn't have access to resource errorCode: ACCESS_FORBIDDEN - "404": - description: Entity with the provided id was not found - content: - application/json: - schema: - type: object - example: - status: NOT_FOUND - message: Requested entity/entity provided in body was not found - readableMessage: user friendly message - errorCode: RESOURCE_NOT_FOUND - context: context "400": description: The request is invalid content: @@ -3458,49 +3736,111 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/price-group-tags/{id}: + /api/v1/insights/charges/driver-member-costs-report: get: tags: - - Price Groups Tags - summary: Retrieve a single price group tag - description: "Required scope: `price-groups:read`" - operationId: get-price-group-tag + - Insights + summary: Retrieve insights about charges broken down by team members and member + cost groups of a team. + description: |- + Required scope: `insights:read` + + Returns charge insights for the given teamId (and optionally `teamMemberIds`) broken down by team member and the member cost groups. + Takes only charges into consideration that were paid for by the provided `teamId`. + + Note: Any values related to money are in the teams' currency. You can fetch them from `GET /api/v1/teams/{teamId}` + operationId: get-insights-charges-driver-member-costs-report parameters: - - name: id - in: path + - name: page + in: query + description: page number to retrieve (starts with 0) + schema: + type: integer + format: int32 + default: 0 + example: 1 + - name: perPage + in: query + description: "number of items per page (between 1 and 100, default 10)" + schema: + type: integer + format: int32 + default: 10 + example: 10 + - name: teamId + in: query required: true schema: + minimum: 0 + exclusiveMinimum: true + required: + - "true" type: integer + description: Filter to retrieve charges insights by the specified `teamId` format: int64 + example: 13 + - name: teamMemberIds + in: query + schema: + required: + - "false" + type: string + description: Filter to retrieve charges insights by the specified (comma-separated) + list of `teamMemberId` + nullable: true + example: "13,14,15" + - name: fromDate + in: query + required: true + schema: + type: string + description: "Filter to retrieve charge insights created from date, we expect\ + \ a date in UTC and ISO8601 (YYYY-MM-DD'T'HH:MM:SS'Z')
The maximum\ + \ gap between from and to data cannot be longer than 31 days" + format: date + - name: toDate + in: query + required: true + schema: + type: string + description: "Filter to retrieve charge insights created to date, we expect\ + \ a date in UTC and ISO8601 (YYYY-MM-DD'T'HH:MM:SS'Z')
The maximum\ + \ gap between from and to data cannot be longer than 31 days" + format: date + - name: datesFilteredBy + in: query + schema: + description: "Use this to determine if the report should be filtered based\ + \ on completion dates of charges or wallet transactions.

Accepted\ + \ values:
- `charge-transaction`: Generates report based on charges'\ + \ `completedAt`. Default.- `wallet-transaction`: Generates report based\ + \ on wallet transactions' `completedAt`. Will not include any charges\ + \ without wallet transactions." + nullable: true + example: charge-transaction + allOf: + - $ref: "#/components/schemas/DriverReportDatesFilteredBy" + - type: string + default: charge-transaction responses: "200": - description: Price group tag with provided id + description: Driver report for the given filter content: application/json: schema: - $ref: '#/components/schemas/PriceGroupTag' - "403": - description: Operator doesn't have access to resource + $ref: "#/components/schemas/MontaPage_ChargesInsightDriverMemberCostsReportDto_" + "401": + description: Unauthorized access content: application/json: schema: type: object example: - status: FORBIDDEN - message: Operator doesn't have access to resource - errorCode: ACCESS_FORBIDDEN + status: UNAUTHORIZED + message: Invalid or expired `accessToken`. + errorCode: INVALID_ACCESS_TOKEN "404": description: Entity with the provided id was not found content: @@ -3513,54 +3853,120 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context - "400": - description: The request is invalid + "403": + description: Operator doesn't have access to resource content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST - "401": - description: Unauthorized access + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid content: application/json: schema: type: object example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] - delete: + /api/v1/insights/charges/driver-report: + get: tags: - - Price Groups Tags - summary: Delete an existing price group tag - description: "Required scope: `price-groups:delete`" - operationId: delete-price-group-tag + - Insights + summary: Retrieve insights about charges broken down by team members of a team. + description: |- + Required scope: `insights:read` + + Returns charge insights for the given teamId (and optionally `teamMemberIds`) broken down by team member. + Takes only charges into consideration that were paid for by the provided `teamId`. + + Note: Any values related to money are in the teams' currency. You can fetch them from `GET /api/v1/teams/{teamId}` + operationId: get-insights-charges-driver-report parameters: - - name: id - in: path + - name: page + in: query + description: page number to retrieve (starts with 0) + schema: + type: integer + format: int32 + default: 0 + example: 1 + - name: perPage + in: query + description: "number of items per page (between 1 and 100, default 10)" + schema: + type: integer + format: int32 + default: 10 + example: 10 + - name: teamId + in: query required: true schema: + minimum: 0 + exclusiveMinimum: true + required: + - "true" type: integer + description: Filter to retrieve charges insights by the specified `teamId` format: int64 + example: 13 + - name: teamMemberIds + in: query + schema: + required: + - "false" + type: string + description: Filter to retrieve charges insights by the specified (comma-separated) + list of `teamMemberId` + nullable: true + example: "13,14,15" + - name: fromDate + in: query + required: true + schema: + type: string + description: "Filter to retrieve charge insights created from date, we expect\ + \ a date in UTC and ISO8601 (YYYY-MM-DD'T'HH:MM:SS'Z')
The maximum\ + \ gap between from and to data cannot be longer than 31 days" + format: date + - name: toDate + in: query + required: true + schema: + type: string + description: "Filter to retrieve charge insights created to date, we expect\ + \ a date in UTC and ISO8601 (YYYY-MM-DD'T'HH:MM:SS'Z')
The maximum\ + \ gap between from and to data cannot be longer than 31 days" + format: date + - name: datesFilteredBy + in: query + schema: + description: "Use this to determine if the report should be filtered based\ + \ on completion dates of charges or wallet transactions.

Accepted\ + \ values:
- `charge-transaction`: Generates report based on charges'\ + \ `completedAt`. Default.- `wallet-transaction`: Generates report based\ + \ on wallet transactions' `completedAt`. Will not include any charges\ + \ without wallet transactions." + nullable: true + example: charge-transaction + allOf: + - $ref: "#/components/schemas/DriverReportDatesFilteredBy" + - type: string + default: charge-transaction responses: "200": - description: Price group tag deleted - "403": - description: Operator doesn't have access to resource + description: Driver report for the given filter content: application/json: schema: - type: object - example: - status: FORBIDDEN - message: Operator doesn't have access to resource - errorCode: ACCESS_FORBIDDEN + $ref: "#/components/schemas/MontaPage_ChargesInsightDriverReportDto_" "404": description: Entity with the provided id was not found content: @@ -3573,54 +3979,16 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context - "400": - description: The request is invalid - content: - application/json: - schema: - type: object - example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - patch: - tags: - - Price Groups Tags - summary: Update a price group tag - description: "Required scope: `price-groups:write`" - operationId: patch-price-group-tag - parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchPriceGroupTag' - required: true - responses: - "200": - description: Price group tag updated - content: - application/json: - schema: - $ref: '#/components/schemas/PriceGroupTag' + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -3631,18 +3999,6 @@ paths: status: FORBIDDEN message: Operator doesn't have access to resource errorCode: ACCESS_FORBIDDEN - "404": - description: Entity with the provided id was not found - content: - application/json: - schema: - type: object - example: - status: NOT_FOUND - message: Requested entity/entity provided in body was not found - readableMessage: user friendly message - errorCode: RESOURCE_NOT_FOUND - context: context "400": description: The request is invalid content: @@ -3653,126 +4009,164 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/price-groups: + /api/v1/installer-jobs: get: tags: - - Price Groups - summary: Retrieve a list of price groups. - description: "Required scope: `price-groups:read`" - operationId: getPriceGroups + - Installer Jobs + summary: Retrieve a list of installer jobs + description: "Required scope: `installer-jobs:read`" + operationId: get-installer-jobs parameters: + - name: page + in: query + description: page number to retrieve (starts with 0) + schema: + type: integer + format: int32 + default: 0 + example: 1 + - name: perPage + in: query + description: "number of items per page (between 1 and 100, default 10)" + schema: + type: integer + format: int32 + default: 10 + example: 10 + - name: siteId + in: query + schema: + required: + - "false" + type: integer + description: Allows to filter list of installer jobs by a site id + format: int64 + nullable: true + example: 13 - name: teamId in: query - description: Filter to retrieve price groups with specified team id - required: true schema: + required: + - "false" type: integer + description: Allows to filter list of installer jobs by a team id. format: int64 + nullable: true + example: 19 + - name: includeDeleted + in: query + schema: + required: + - "false" + type: boolean + description: "If true, deleted installer jobs will be included in the response." + nullable: true + example: true responses: "200": - description: List of price groups that match the criteria + description: List of installer jobs that match the criteria content: application/json: schema: - $ref: '#/components/schemas/MontaPage_PriceGroupDto_' - "400": - description: The request is invalid + $ref: "#/components/schemas/MontaPage_InstallerJobDto_" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] post: tags: - - Price Groups - summary: Creates a price group - description: "Required scope: `price-groups:write`" - operationId: create-price-group + - Installer Jobs + summary: Create an installer job + description: "Create an installer job for a charge point site.
Required scope:\ + \ `installer-jobs:write`" + operationId: post-installer-job requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateOrUpdatePriceGroupDto' + $ref: "#/components/schemas/CreateInstallerJobDto" required: true responses: - "404": - description: Team not found + "201": + description: Installer job created content: application/json: schema: - $ref: '#/components/schemas/MontaAppResponse' - "201": - description: Price group successfully created - "400": - description: The request is invalid + $ref: "#/components/schemas/InstallerJob" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - /api/v1/price-groups/{id}: - get: - tags: - - Price Groups - summary: Retrieve a price group. - description: "Required scope: `price-groups:read`" - operationId: getPriceGroup - parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int64 - responses: - "200": - description: Price group with provided id + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: - $ref: '#/components/schemas/PriceGroup' + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -3783,94 +4177,61 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - put: + /api/v1/installer-jobs/{installerJobId}: + get: tags: - - Price Groups - summary: Updates a price group - description: "Required scope: `price-groups:write`" - operationId: update-price-group + - Installer Jobs + summary: Retrieve a single installer job + description: "Required scope: `installer-jobs:read`" + operationId: get-installer-job parameters: - - name: id + - name: installerJobId in: path required: true schema: type: integer format: int64 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateOrUpdatePriceGroupDto' - required: true responses: - "404": - description: Price group not found - content: - application/json: - schema: - $ref: '#/components/schemas/MontaAppResponse' "200": - description: Price group successfully updated + description: Installer job with provided id content: application/json: schema: - $ref: '#/components/schemas/PriceGroup' - "400": - description: The request is invalid + $ref: "#/components/schemas/InstallerJob" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - delete: - tags: - - Price Groups - summary: Deletes a price group - description: "Required scope: `price-groups:delete`" - operationId: delete-price-group - parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int64 - responses: - "404": - description: Price group not found + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: - $ref: '#/components/schemas/MontaAppResponse' - "204": - description: Price group successfully deleted + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -3881,102 +4242,56 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/price-groups/{id}/apply: - put: + delete: tags: - - Price Groups - summary: "Apply price group to charge points, sites or team members" - description: "Required scope: `price-groups:write`" - operationId: apply-price-group + - Installer Jobs + summary: Delete an existing installer job + description: "Required scope: `installer-jobs:delete`" + operationId: delete-installer-job parameters: - - name: id + - name: installerJobId in: path required: true schema: - minimum: 0 - exclusiveMinimum: true type: integer format: int64 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ApplyPriceGroup' - required: true responses: + "204": + description: Installer Job deleted "404": - description: Price group not found - content: - application/json: - schema: - $ref: '#/components/schemas/MontaAppResponse' - "200": - description: Price group successfully applied to the selected entities - content: - application/json: - schema: - $ref: '#/components/schemas/PriceGroup' - "400": - description: The request is invalid + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - /api/v1/price-groups/{id}/default: - put: - tags: - - Price Groups - summary: Sets a price group as default - description: "Required scope: `price-groups:write`" - operationId: set-default-price-group - parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int64 - responses: - "404": - description: Price group not found - content: - application/json: - schema: - $ref: '#/components/schemas/MontaAppResponse' - "200": - description: Price group successfully set as default + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: - $ref: '#/components/schemas/PriceGroup' + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -3987,74 +4302,83 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/prices/forecast: + /api/v1/invoices: get: tags: - - Prices Forecast - summary: Retrieve prices forecast. - description: "Prices can be forecasted for a charge point and optionally a price\ - \ group, when `priceGroupId` is not provided the charge point price group\ - \ will be used.
*Note*: This endpoint is in BETA phase and is subject\ - \ to changes in a near future release

Required scope: `prices-forecast:read`" - operationId: get-prices-forecast + - Invoices + summary: Retrieves a list of invoices by walletId + description: "Required scope: `invoices:read`" + operationId: get-invoice parameters: - - name: chargePointId + - name: page in: query + description: page number to retrieve (starts with 0) schema: - minimum: 0 - exclusiveMinimum: true type: integer - description: Filter to retrieve prices forecast for the specified `chargePointId` - format: int64 - example: 13 - - name: priceGroupId + format: int32 + default: 0 + example: 1 + - name: perPage in: query + description: "number of items per page (between 1 and 100, default 10)" schema: - minimum: 0 - exclusiveMinimum: true type: integer - description: Filter to retrieve prices forecast for the specified `priceGroupId` - format: int64 - nullable: true - example: 130 - - name: teamMemberId + format: int32 + default: 10 + example: 10 + - name: walletId in: query + required: true schema: type: integer - description: Filter to retrieve prices forecast for the specified `teamMemberId` format: int64 - nullable: true - example: 13 + - name: pageable + in: query + required: true + schema: + $ref: "#/components/schemas/Pageable" responses: "200": - description: Prices Forecast for the given filter + description: Invoices successfully retrieved content: application/json: schema: - $ref: '#/components/schemas/PricesForecast' - "401": - description: Unauthorized access + $ref: "#/components/schemas/MontaPage_InvoiceDto_" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - "400": + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": description: The request is invalid content: application/json: @@ -4066,13 +4390,78 @@ paths: errorCode: BAD_REQUEST security: - BearerAccessToken: [] - /api/v1/sites: + /api/v1/invoices/{invoiceId}: get: tags: - - Sites - summary: Retrieve your (charge) sites. - description: "Required scope: `charge-points:read`" - operationId: get-sites + - Invoices + summary: Retrieves an invoice by its id + description: "Required scope: `invoices:read`" + operationId: get-invoice_1 + parameters: + - name: invoiceId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: Invoice successfully retrieved + content: + application/json: + schema: + $ref: "#/components/schemas/InvoiceDto" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/nested-teams: + get: + tags: + - Nested teams + summary: Retrieve a list of nested team relations + description: "Required scope: `team-members:read`" + operationId: getNestedTeams parameters: - name: page in: query @@ -4081,7 +4470,7 @@ paths: type: integer format: int32 default: 0 - example: "1" + example: 1 - name: perPage in: query description: "number of items per page (between 1 and 100, default 10)" @@ -4089,83 +4478,117 @@ paths: type: integer format: int32 default: 10 - example: "10" - - name: teamId - in: query - description: The team id from which sites will be filtered by - schema: - type: integer - format: int64 - example: "13" - - name: partnerExternalId - in: query - description: "Filter sites by partnerExternalId, to filter only resources\ - \ without `partnerExternalId` *use* `partnerExternalId=\"\"`" - schema: - type: string - - name: sortByLocation + example: 10 + - name: state in: query - description: |- - lat,long coordinates. If supplied, the Charge Points will be sorted in nearest first order relative - to this point. (Format: 55.7096,12.5856) schema: - type: string - example: "55.7096,12.5856" + description: State of the nested team invitation + nullable: true + example: accepted + allOf: + - $ref: "#/components/schemas/TeamMemberState" + - {} - name: includeDeleted in: query - description: Includes deleted resources in the response - required: false schema: type: boolean + description: Includes deleted resources in the response + nullable: true + example: false default: false responses: "200": - description: List of sites that match the criteria + description: List of nested team relations that match the criteria content: application/json: schema: - $ref: '#/components/schemas/MontaPage_SiteDto_' - "400": - description: The request is invalid + $ref: "#/components/schemas/MontaPage_NestedTeamDto_" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] + /api/v1/nested-teams/invite: post: tags: - - Sites - summary: Create a (charge) site - description: "Required scope: `charge-points:write`" - operationId: post-site + - Nested teams + summary: Nested team invite + description: "Required scope: `team-members:write`" + operationId: invite requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateSite' + $ref: "#/components/schemas/NestedTeamInvite" required: true responses: - "201": - description: Site created + "200": + description: Nested team invite sent + content: + application/json: + schema: + $ref: "#/components/schemas/NestedTeam" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found content: application/json: schema: - $ref: '#/components/schemas/Site' + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -4186,49 +4609,31 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/sites/{siteId}: + /api/v1/nested-teams/{relationId}: get: tags: - - Sites - summary: Retrieve a single (charge) site. - description: "Required scope: `charge-points:read`" - operationId: get-site + - Nested teams + summary: Get a nested team by nested team relation id + description: "Required scope: `team-members:read`" + operationId: getNestedTeam parameters: - - name: siteId + - name: relationId in: path required: true schema: + minimum: 0 + exclusiveMinimum: true type: integer format: int64 responses: "200": - description: Site with provided id + description: Nested team relation content: application/json: schema: - $ref: '#/components/schemas/Site' - "403": - description: Operator doesn't have access to resource - content: - application/json: - schema: - type: object - example: - status: FORBIDDEN - message: Operator doesn't have access to resource - errorCode: ACCESS_FORBIDDEN + $ref: "#/components/schemas/NestedTeam" "404": description: Entity with the provided id was not found content: @@ -4241,45 +4646,16 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context - "400": - description: The request is invalid - content: - application/json: - schema: - type: object - example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - delete: - tags: - - Sites - summary: Delete an existing (charge) site - description: "*Note:* This action will also remove `Charge Points` from the\ - \ `Site`.

Required scope: `charge-points:delete`" - operationId: delete-site - parameters: - - name: siteId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "204": - description: Site deleted + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -4300,44 +4676,48 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - patch: + delete: tags: - - Sites - summary: Patch an existing (charge) site - description: "Required scope: `charge-points:write`" - operationId: patch-site + - Nested teams + summary: Delete a nested team relation + description: "Required scope: `team-members:delete`" + operationId: deleteNestedTeam parameters: - - name: siteId + - name: relationId in: path required: true schema: + minimum: 0 + exclusiveMinimum: true type: integer format: int64 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchSite' - required: true responses: - "200": - description: Site updated + "204": + description: Nested team relation deleted + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found content: application/json: schema: - $ref: '#/components/schemas/Site' + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -4358,120 +4738,58 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/sponsored-charge-points: - get: + patch: tags: - - Sponsored Charge Points - summary: Retrieve a list of sponsored charge points - description: "Required scope: `sponsored-charge-points:read`" - operationId: get-sponsored-charge-points + - Nested teams + summary: Update a nested team relation + description: "Required scope: `team-members:write`" + operationId: updateNestedTeam parameters: - - name: page - in: query - description: page number to retrieve (starts with 0) - schema: - type: integer - format: int32 - default: 0 - example: "1" - - name: perPage - in: query - description: "number of items per page (between 1 and 100, default 10)" - schema: - type: integer - format: int32 - default: 10 - example: "10" - - name: chargePointId - in: query - schema: - required: - - "false" - type: integer - description: Allows to filter list of sponsored charge points by a charge - point id - format: int64 - nullable: true - example: 13 - - name: teamId - in: query + - name: relationId + in: path + required: true schema: - required: - - "false" + minimum: 0 + exclusiveMinimum: true type: integer - description: Allows to filter list of sponsored charge points by a team - id. format: int64 - nullable: true - example: 19 - - name: includeDeleted - in: query - schema: - type: boolean - description: Filter to include deleted entities in the response - example: false + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchNestedTeam" + required: true responses: "200": - description: List of sponsored charges points that match the criteria + description: Nested team invite sent content: application/json: schema: - $ref: '#/components/schemas/MontaPage_SponsoredChargePointDto_' - "400": - description: The request is invalid + $ref: "#/components/schemas/NestedTeam" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - post: - tags: - - Sponsored Charge Points - summary: Create a sponsored charge point - description: "Creates a sponsored charge point for a given user, the sponsorship\ - \ is automatically approved.

*Note:* a charge point can only be sponsored\ - \ to one user_id
Required scope: `sponsored-charge-points:write`" - operationId: post-sponsored-charge-point - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateSponsoredChargePointDto' - required: true - responses: - "201": - description: Sponsored charge point created - content: - application/json: - schema: - $ref: '#/components/schemas/SponsoredChargePoint' + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -4492,49 +4810,31 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/sponsored-charge-points/{sponsoredChargePointId}: - get: + /api/v1/nested-teams/{relationId}/accept-invite: + post: tags: - - Sponsored Charge Points - summary: Retrieve a single sponsored charge point - description: "Required scope: `sponsored-charge-points:read`" - operationId: get-sponsored-charge-point + - Nested teams + summary: Accept a nested team invitation + description: "Required scope: `team-members:write`" + operationId: acceptInvite parameters: - - name: sponsoredChargePointId + - name: relationId in: path required: true schema: + minimum: 0 + exclusiveMinimum: true type: integer format: int64 responses: "200": - description: Sponsored charge point with provided id - content: - application/json: - schema: - $ref: '#/components/schemas/SponsoredChargePoint' - "403": - description: Operator doesn't have access to resource + description: Nested team relation content: application/json: schema: - type: object - example: - status: FORBIDDEN - message: Operator doesn't have access to resource - errorCode: ACCESS_FORBIDDEN + $ref: "#/components/schemas/NestedTeam" "404": description: Entity with the provided id was not found content: @@ -4547,44 +4847,16 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context - "400": - description: The request is invalid - content: - application/json: - schema: - type: object - example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - delete: - tags: - - Sponsored Charge Points - summary: Delete an existing sponsored charge point - description: "Required scope: `sponsored-charge-points:delete`" - operationId: delete-sponsored-charge-point - parameters: - - name: sponsoredChargePointId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "204": - description: Sponsored Charge Point deleted + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -4605,82 +4877,91 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - patch: + /api/v1/nested-teams/{relationId}/reject-invite: + post: tags: - - Sponsored Charge Points - summary: Update a sponsored charge point - description: "Required scope: `sponsored-charge-points:write`" - operationId: patch-sponsored-charge-point + - Nested teams + summary: Reject a nested team invitation + description: "Required scope: `team-members:write`" + operationId: rejectInvite parameters: - - name: sponsoredChargePointId + - name: relationId in: path required: true schema: + minimum: 0 + exclusiveMinimum: true type: integer format: int64 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchSponsoredChargePoint' - required: true responses: "200": - description: Updated sponsored charge point with provided id + description: Nested team relation content: application/json: schema: - $ref: '#/components/schemas/SponsoredChargePoint' - "400": - description: The request is invalid + $ref: "#/components/schemas/NestedTeam" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - /api/v1/subscription-purchases: - get: - tags: - - Subscription Purchases - summary: Retrieve a list of subscription purchases - description: "Required scope: `subscriptions:read`" - operationId: get-subscription-purchases - parameters: - - name: page - in: query - description: page number to retrieve (starts with 0) - schema: - type: integer - format: int32 + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/operators: + get: + tags: + - Operators + summary: Retrieve operators + description: "Required scope: `operators`" + operationId: get-operators + parameters: + - name: page + in: query + description: page number to retrieve (starts with 0) + schema: + type: integer + format: int32 default: 0 - example: "1" + example: 1 - name: perPage in: query description: "number of items per page (between 1 and 100, default 10)" @@ -4688,64 +4969,67 @@ paths: type: integer format: int32 default: 10 - example: "10" - - name: subscriptionId - in: query - schema: - required: - - "false" - type: integer - description: Filter subscription purchases by subscription id - format: int64 - nullable: true - example: 1 - - name: includeDeleted - in: query - schema: - required: - - "false" - type: boolean - description: Includes deleted resources in the response - nullable: true - example: true + example: 10 responses: "200": - description: List of subscription purchases that match the criteria + description: List of operators that match the criteria content: application/json: schema: - $ref: '#/components/schemas/MontaPage_SubscriptionPurchaseDto_' - "400": - description: The request is invalid + $ref: "#/components/schemas/MontaPage_OperatorDto_" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] - /api/v1/subscription-purchases/{subscriptionPurchaseId}: + /api/v1/operators/{id}: get: tags: - - Subscription Purchases - summary: Retrieve a subscription purchase - description: "Required scope: `subscriptions:read`" - operationId: get-subscription-purchase + - Operators + summary: Retrieve an operator + description: "Required scope: `operators`" + operationId: get-operator parameters: - - name: subscriptionPurchaseId + - name: id in: path required: true schema: @@ -4753,40 +5037,62 @@ paths: format: int64 responses: "200": - description: Subscription purchase with provided id + description: operator with provided id content: application/json: schema: - $ref: '#/components/schemas/SubscriptionPurchase' - "400": - description: The request is invalid + $ref: "#/components/schemas/Operator" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] - /api/v1/subscriptions: + /api/v1/payment-terminals: get: tags: - - Subscriptions - summary: Retrieve a list of subscriptions - description: "Required scope: `subscriptions:read`" - operationId: get-subscriptions + - Payment Terminals + summary: Retrieve a list of payment terminals + description: "Required scope: `payment-terminals:read`" + operationId: get-payment-terminals parameters: - name: page in: query @@ -4795,7 +5101,7 @@ paths: type: integer format: int32 default: 0 - example: "1" + example: 1 - name: perPage in: query description: "number of items per page (between 1 and 100, default 10)" @@ -4803,86 +5109,74 @@ paths: type: integer format: int32 default: 10 - example: "10" - - name: planId + example: 10 + - name: serial in: query schema: required: - "false" - type: integer - description: Filter subscription by plan - format: int64 + type: string + description: Allows to filter list of terminals by a serial nullable: true - example: 1 - - name: chargePointId + example: XYZ123-DF-123 + - name: teamId in: query schema: required: - "false" type: integer - description: Filter subscriptions by charge point + description: Allows to filter list of terminals by a team id. format: int64 nullable: true - example: 1 - - name: subscriptionPurchaseId + example: 19 + - name: includeDeleted in: query schema: required: - "false" - type: integer - description: Filter subscriptions by subscription purchase id. Should return - max. 1 subscription. - format: int64 + type: boolean + description: "If true, deleted entities will be included in the response." nullable: true - example: 42 + example: true responses: "200": - description: List of Charge Point subscriptions that match the criteria + description: List of payment terminals that match the criteria content: application/json: schema: - $ref: '#/components/schemas/MontaPage_SubscriptionDto_' - "400": - description: The request is invalid + $ref: "#/components/schemas/MontaPage_PaymentTerminalDto_" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - post: - tags: - - Subscriptions - summary: Create subscription - description: "Required scope: `subscriptions:write`" - operationId: create-subscription - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateSubscription' - required: true - responses: - "201": - description: The created subscription + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: - $ref: '#/components/schemas/Subscription' + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -4893,81 +5187,60 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/subscriptions/{subscriptionId}: + /api/v1/payment-terminals/{paymentTerminalId}: get: tags: - - Subscriptions - summary: Retrieve a subscription - description: "Required scope: `subscriptions:read`" - operationId: get-subscription + - Payment Terminals + summary: Retrieve a single payment terminal + description: "Required scope: `payment-terminals:read`" + operationId: get-payment-terminal parameters: - - name: subscriptionId + - name: paymentTerminalId in: path required: true schema: - type: integer - format: int64 + type: string responses: "200": - description: Subscription with provided ID + description: Payment Terminal with provided id content: application/json: schema: - $ref: '#/components/schemas/Subscription' - "400": - description: The request is invalid + $ref: "#/components/schemas/PaymentTerminal" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - delete: - tags: - - Subscriptions - summary: Cancel subscription - description: "Required scope: `subscriptions:delete`" - operationId: delete-subscription - parameters: - - name: subscriptionId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "204": - description: Subscription successfully canceled + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: - $ref: '#/components/schemas/Unit' + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -4978,100 +5251,104 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/subscriptions/{subscriptionId}/approve: - post: + /api/v1/plans: + get: tags: - - Subscriptions - summary: Approve subscription - description: "Required scope: `subscriptions:write`" - operationId: approve-subscription + - Plans + summary: Retrieve plans + description: "Required scope: `plans:read`" + operationId: get-plans parameters: - - name: subscriptionId - in: path - required: true + - name: page + in: query + description: page number to retrieve (starts with 0) schema: type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ApproveSubscription' - required: true + format: int32 + default: 0 + example: 1 + - name: perPage + in: query + description: "number of items per page (between 1 and 100, default 10)" + schema: + type: integer + format: int32 + default: 10 + example: 10 responses: "200": - description: The updated subscription + description: List of plans that match the criteria content: application/json: schema: - $ref: '#/components/schemas/Subscription' - "400": - description: The request is invalid + $ref: "#/components/schemas/MontaPage_PlanDto_" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] - /api/v1/tariff-period-groups: + /api/v1/plans/{id}: get: tags: - - Tariff Period Groups - summary: Retrieve Tariff Period Groups by tariff id - description: "Required scope: `tariff:read`" - operationId: get-period-groups + - Plans + summary: Retrieve a plan + description: "Required scope: `plans:read`" + operationId: get-plan parameters: - - name: tariffId - in: query - description: Filter to retrieve tariff period groups by tariff id + - name: id + in: path + required: true schema: type: integer format: int64 responses: "200": - description: Tariff period group with provided tariff id - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/TariffPeriodGroup' - "403": - description: Operator doesn't have access to resource + description: Plan with provided id content: application/json: schema: - type: object - example: - status: FORBIDDEN - message: Operator doesn't have access to resource - errorCode: ACCESS_FORBIDDEN + $ref: "#/components/schemas/Plan" "404": description: Entity with the provided id was not found content: @@ -5084,47 +5361,26 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context - "400": - description: The request is invalid - content: - application/json: - schema: - type: object - example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - post: - tags: - - Tariff Period Groups - summary: Create a new Tariff Period Group. - description: "Required scope: `tariffs:write`" - operationId: create-tariff-period-group - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TariffPeriodGroup' - required: true - responses: - "201": - description: New Tariff Period Group + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: - $ref: '#/components/schemas/TariffPeriodGroup' + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -5135,50 +5391,40 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/tariff-period-groups/{id}: + /api/v1/price-group-tags: get: tags: - - Tariff Period Groups - summary: Retrieve Tariff Period Groups by id - description: "Required scope: `tariff:read`" - operationId: get-period-group + - Price Groups Tags + summary: Retrieve price group tags. + description: "Required scope: `price-groups:read`" + operationId: get-price-group-tags parameters: - - name: id - in: path - description: Filter to retrieve tariff period groups by id - required: true + - name: name + in: query schema: - type: integer - format: int64 + type: string + description: Filter to retrieve resources by the specified `name`. + nullable: true + example: Energy + - name: partnerExternalId + in: query + schema: + required: + - "false" + type: string + description: "Filter resources by partnerExternalId, to filter only resources\ + \ without `partnerExternalId` *use* `partnerExternalId=\"\"`" + nullable: true + example: 1A2B responses: "200": - description: Tariff period group with provided group id - content: - application/json: - schema: - $ref: '#/components/schemas/TariffPeriodGroup' - "403": - description: Operator doesn't have access to resource + description: Price group tags for a given filter content: application/json: schema: - type: object - example: - status: FORBIDDEN - message: Operator doesn't have access to resource - errorCode: ACCESS_FORBIDDEN + $ref: "#/components/schemas/MontaPage_PriceGroupTagDto_" "404": description: Entity with the provided id was not found content: @@ -5191,45 +5437,26 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context - "400": - description: The request is invalid + "401": + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST - "401": - description: Unauthorized access + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: type: object example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - delete: - tags: - - Tariff Period Groups - summary: "Delete an existing Tariff Period Group, and all contained recurring\ - \ periods and prices." - description: "Required scope: `tariffs:delete`" - operationId: delete-tariff-period-group - parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int64 - responses: - "204": - description: Tariff Period Group deleted + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -5240,151 +5467,124 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - patch: + post: tags: - - Tariff Period Groups - summary: Update existing Tariff Period Group. - description: "Required scope: `tariffs:write`" - operationId: update-tariff-period-group - parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int64 + - Price Groups Tags + summary: Create a price group tag + description: "Required scope: `price-groups:write`" + operationId: post-price-group-tag requestBody: content: application/json: schema: - $ref: '#/components/schemas/TariffPeriodGroup' + $ref: "#/components/schemas/CreatePriceGroupTag" required: true responses: - "200": - description: Updated Tariff Period Group + "201": + description: Price group tag created content: application/json: schema: - $ref: '#/components/schemas/TariffPeriodGroup' - "400": - description: The request is invalid + $ref: "#/components/schemas/PriceGroupTag" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] - /api/v1/tariff-recurring-periods: + /api/v1/price-group-tags/{id}: get: tags: - - Tariff Recurring Periods - summary: Retrieve recurring periods. - description: "Required scope: `tariffs:read`" - operationId: get-tariff-recurring-periods + - Price Groups Tags + summary: Retrieve a single price group tag + description: "Required scope: `price-groups:read`" + operationId: get-price-group-tag parameters: - - name: page - in: query - description: page number to retrieve (starts with 0) - schema: - type: integer - format: int32 - default: 0 - example: "1" - - name: perPage - in: query - description: "number of items per page (between 1 and 100, default 10)" - schema: - type: integer - format: int32 - default: 10 - example: "10" - - name: tariffId - in: query - required: true - schema: - type: integer - format: int64 - - name: tariffPeriodGroupId - in: query + - name: id + in: path required: true schema: type: integer format: int64 responses: "200": - description: Tariff recurring periods with provided tariffId & tariffPeriodGroupId + description: Price group tag with provided id content: application/json: schema: - $ref: '#/components/schemas/Page_TariffRecurringPeriodDto_' - "400": - description: The request is invalid + $ref: "#/components/schemas/PriceGroupTag" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - post: - tags: - - Tariff Recurring Periods - summary: Create new recurring period. - description: "Required scope: `tariffs:write`" - operationId: create-tariff-recurring-periods - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TariffRecurringPeriodCreateRequestDto' - required: true - responses: - "201": - description: Tariff recurring period that was created + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: - $ref: '#/components/schemas/TariffRecurringPeriod' + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -5395,25 +5595,14 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/tariff-recurring-periods/{id}: delete: tags: - - Tariff Recurring Periods - summary: "Delete an existing Tariff Recurring Period , and all contained prices." - description: "Required scope: `tariffs:delete`" - operationId: delete-tariff-recurring-period + - Price Groups Tags + summary: Delete an existing price group tag + description: "Required scope: `price-groups:delete`" + operationId: delete-price-group-tag parameters: - name: id in: path @@ -5422,51 +5611,78 @@ paths: type: integer format: int64 responses: - "204": - description: Tariff Recurring Period deleted - "400": - description: The request is invalid + "200": + description: Price group tag deleted + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] - /api/v1/tariff-recurring-periods/{periodId}: - get: + patch: tags: - - Tariff Recurring Periods - summary: Retrieve a tariff recurring period. - description: "Required scope: `tariffs:read`" - operationId: get-tariff-recurring-period + - Price Groups Tags + summary: Update a price group tag + description: "Required scope: `price-groups:write`" + operationId: patch-price-group-tag parameters: - - name: periodId + - name: id in: path required: true schema: type: integer format: int64 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchPriceGroupTag" + required: true responses: "200": - description: Tariff recurring period with provided id + description: Price group tag updated content: application/json: schema: - $ref: '#/components/schemas/TariffRecurringPeriod' + $ref: "#/components/schemas/PriceGroupTag" "404": description: Entity with the provided id was not found content: @@ -5479,54 +5695,26 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context - "400": - description: The request is invalid + "401": + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST - "401": - description: Unauthorized access + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: type: object example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - patch: - tags: - - Tariff Recurring Periods - summary: Update existing recurring period. - description: "Required scope: `tariffs:write`" - operationId: update-tariff-recurring-periods - parameters: - - name: periodId - in: path - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TariffRecurringPeriodUpdateRequestDto' - required: true - responses: - "200": - description: Tariff recurring period that was updated - content: - application/json: - schema: - $ref: '#/components/schemas/TariffRecurringPeriod' + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -5537,79 +5725,30 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/tariffs: + /api/v1/price-groups: get: tags: - - Tariff - summary: Retrieve all tariffs. - description: "Required scope: `tariffs:read`" - operationId: get-all-tariffs + - Price Groups + summary: Retrieve a list of price groups. + description: "Required scope: `price-groups:read`" + operationId: getPriceGroups parameters: - - name: countryId - in: query - description: Country id of the tariff - schema: - type: integer - format: int64 - - name: countryAreaId - in: query - description: Country area id of the tariff - schema: - type: integer - format: int64 - - name: externalId - in: query - description: External id of the tariff - schema: - type: string - - name: operatorId - in: query - description: Operator id of the tariff (taken from the consumer) - schema: - type: integer - format: int64 - name: teamId in: query - description: Team id of the tariff + description: Filter to retrieve price groups with specified team id + required: true schema: type: integer format: int64 - - name: zip - in: query - description: Zip code of the tariff - schema: - type: string responses: "200": - description: All tariffs - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/TariffDto' - "403": - description: Operator doesn't have access to resource + description: List of price groups that match the criteria content: application/json: schema: - type: object - example: - status: FORBIDDEN - message: Operator doesn't have access to resource - errorCode: ACCESS_FORBIDDEN + $ref: "#/components/schemas/MontaPage_PriceGroupDto_" "404": description: Entity with the provided id was not found content: @@ -5622,94 +5761,100 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context - "400": - description: The request is invalid + "401": + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST - "401": - description: Unauthorized access + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: type: object example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] post: tags: - - Tariff - summary: Create a new Tariff. - description: "Required scope: `tariffs:write`" - operationId: create-tariff + - Price Groups + summary: Creates a price group + description: "Required scope: `price-groups:write`" + operationId: create-price-group requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateTariffRequest' + $ref: "#/components/schemas/CreateOrUpdatePriceGroupDto" required: true responses: + "404": + description: Team not found + content: + application/json: + schema: + $ref: "#/components/schemas/MontaAppResponse" "201": - description: New Tariff + description: Price group successfully created + "401": + description: Consumer with provided credentials was not found content: application/json: schema: - $ref: '#/components/schemas/TariffDto' - "400": - description: The request is invalid + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST - "401": - description: Unauthorized access + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid content: application/json: schema: type: object example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] - /api/v1/tariffs/{tariffId}: + /api/v1/price-groups/{id}: get: tags: - - Tariff - summary: Retrieve your tariff and prices. - description: "Required scope: `tariffs:read`" - operationId: get-tariff + - Price Groups + summary: Retrieve a price group. + description: "Required scope: `price-groups:read`" + operationId: getPriceGroup parameters: - - name: start - in: query - description: "Filter to retrieve tariffs where `createdAt` >= `start` (ISO8601:\ - \ yyyy-MM-ddTHH:mm:ssZ)" - schema: - type: string - format: date-time - example: 2022-05-22T09:30:03Z - - name: end - in: query - description: "Filter to retrieve charges where `createdAt` <= `end` (ISO8601:\ - \ yyyy-MM-ddTHH:mm:ssZ)" - schema: - type: string - format: date-time - example: 2022-05-22T09:30:03Z - - name: tariffId + - name: id in: path required: true schema: @@ -5717,21 +5862,11 @@ paths: format: int64 responses: "200": - description: Tariff with provided id - content: - application/json: - schema: - $ref: '#/components/schemas/FullTariff' - "403": - description: Operator doesn't have access to resource + description: Price group with provided id content: application/json: schema: - type: object - example: - status: FORBIDDEN - message: Operator doesn't have access to resource - errorCode: ACCESS_FORBIDDEN + $ref: "#/components/schemas/PriceGroup" "404": description: Entity with the provided id was not found content: @@ -5744,36 +5879,46 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context - "400": - description: The request is invalid + "401": + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST - "401": - description: Unauthorized access + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: type: object example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] put: tags: - - Tariff - summary: Update an existing Tariff. - description: "Required scope: `tariffs:write`" - operationId: update-tariff + - Price Groups + summary: Updates a price group + description: "Required scope: `price-groups:write`" + operationId: update-price-group parameters: - - name: tariffId + - name: id in: path required: true schema: @@ -5783,64 +5928,31 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateTariffRequest' + $ref: "#/components/schemas/CreateOrUpdatePriceGroupDto" required: true responses: - "200": - description: Updated Tariff + "404": + description: Price group not found content: application/json: schema: - $ref: '#/components/schemas/TariffDto' - "400": - description: The request is invalid + $ref: "#/components/schemas/MontaAppResponse" + "200": + description: Price group successfully updated content: application/json: schema: - type: object - example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + $ref: "#/components/schemas/PriceGroup" "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - /api/v1/tariffs/{tariffId}/create-prices: - post: - tags: - - Tariff - summary: Create the prices for a given tariff within a given period of time. - description: "Required scope: `tariffs:write`" - operationId: create-tariff-prices - parameters: - - name: tariffId - in: path - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateTariffPricesRequest' - required: true - responses: - "201": - description: Tariff prices created - content: - application/json: - schema: - $ref: '#/components/schemas/FullTariff' + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -5851,18 +5963,6 @@ paths: status: FORBIDDEN message: Operator doesn't have access to resource errorCode: ACCESS_FORBIDDEN - "404": - description: Entity with the provided id was not found - content: - application/json: - schema: - type: object - example: - status: NOT_FOUND - message: Requested entity/entity provided in body was not found - readableMessage: user friendly message - errorCode: RESOURCE_NOT_FOUND - context: context "400": description: The request is invalid content: @@ -5873,178 +5973,40 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/team-members: - get: + delete: tags: - - Team Members - summary: Retrieve a list of team members. - description: "Required scope: `team-members:read`" - operationId: getTeamMembers + - Price Groups + summary: Deletes a price group + description: "Required scope: `price-groups:delete`" + operationId: delete-price-group parameters: - - name: page - in: query - description: page number to retrieve (starts with 0) - schema: - type: integer - format: int32 - default: 0 - example: "1" - - name: perPage - in: query - description: "number of items per page (between 1 and 100, default 10)" - schema: - type: integer - format: int32 - default: 10 - example: "10" - - name: teamId - in: query - schema: - required: - - "false" - type: integer - description: Filter team members by `teamId` - format: int64 - nullable: true - example: 1 - - name: includeDeleted - in: query - schema: - required: - - "false" - type: boolean - description: Includes deleted resources in the response - example: true - default: false - - name: role - in: query - schema: - nullable: true - allOf: - - $ref: '#/components/schemas/TeamMemberRole' - - description: Filter team members by the specified `role` - example: admin - - name: state - in: query - schema: - nullable: true - allOf: - - $ref: '#/components/schemas/TeamMemberState' - - description: Filter team members by the specified `state` - example: expired - - name: userId - in: query + - name: id + in: path + required: true schema: - minimum: 0 - exclusiveMinimum: true - required: - - "false" type: integer - description: Filter team members with specified `userId` format: int64 - nullable: true - example: 42 - - name: email - in: query - schema: - required: - - "false" - type: string - description: Filter team members with specified `email` - format: email - nullable: true - example: user@acme.com - - name: phone - in: query - schema: - pattern: "^\\+[1-9]\\d{1,14}$" - required: - - "false" - type: string - description: Filter team members with specified `phone` number - nullable: true - example: "+451234567" - - name: partnerExternalTeamId - in: query - schema: - required: - - "false" - type: string - description: "Filter team members by the specified `partnerExternalTeamId`Note:\ - \ partnerExternalTeamId refers to external id on the team level" - nullable: true - example: 1A2B3C4D5E - - name: partnerExternalId - in: query - schema: - required: - - "false" - type: string - description: Filter team members with specified `partnerExternalId` - nullable: true - example: 1A2B3C4D5E responses: - "200": - description: List of team members that match the criteria - content: - application/json: - schema: - $ref: '#/components/schemas/MontaPage_TeamMemberDto_' - "400": - description: The request is invalid + "404": + description: Price group not found content: application/json: schema: - type: object - example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + $ref: "#/components/schemas/MontaAppResponse" + "204": + description: Price group successfully deleted "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - post: - tags: - - Team Members - summary: Create (invite) a team member - description: "Create (invite) a user to join a team, invitation can be done\ - \ via `userId`, `email` and/or `phone`. A user that does not exist in yet\ - \ will have a null `userId`.

Required scope: `team-members:write`" - operationId: post-team-member - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateTeamMember' - required: true - responses: - "201": - description: Team member created - content: - application/json: - schema: - $ref: '#/components/schemas/TeamMemberDto' + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -6065,87 +6027,63 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/team-members/{id}: - get: + /api/v1/price-groups/{id}/apply: + put: tags: - - Team Members - summary: Retrieve a team member. - description: "Required scope: `team-members:read`" - operationId: getTeamMember + - Price Groups + summary: "Apply price group to charge points, sites or team members" + description: "Required scope: `price-groups:write`" + operationId: apply-price-group parameters: - name: id in: path required: true schema: + minimum: 0 + exclusiveMinimum: true type: integer format: int64 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ApplyPriceGroup" + required: true responses: - "200": - description: Team member with provided id + "404": + description: Price group not found content: application/json: schema: - $ref: '#/components/schemas/TeamMemberDto' - "400": - description: The request is invalid + $ref: "#/components/schemas/MontaAppResponse" + "200": + description: Price group successfully applied to the selected entities content: application/json: schema: - type: object - example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + $ref: "#/components/schemas/PriceGroup" "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - patch: - tags: - - Team Members - summary: Patch a team member. - description: "Required scope: `team-members:write`" - operationId: patchTeamMember - parameters: - - name: id - in: path - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchTeamMember' - required: true - responses: - "200": - description: Updated Team member with provided id + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource content: application/json: schema: - $ref: '#/components/schemas/TeamMemberDto' + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -6156,25 +6094,15 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/team-members/{id}/resend-invite: - post: + /api/v1/price-groups/{id}/default: + put: tags: - - Team Members - summary: Resend an invite to a team member and reset expiry date. - description: "Required scope: `team-members:write`" - operationId: resendTeamMemberInvite + - Price Groups + summary: Sets a price group as default + description: "Required scope: `price-groups:write`" + operationId: set-default-price-group parameters: - name: id in: path @@ -6183,51 +6111,28 @@ paths: type: integer format: int64 responses: - "200": - description: Team member with provided id + "404": + description: Price group not found content: application/json: schema: - $ref: '#/components/schemas/TeamMemberDto' - "400": - description: The request is invalid + $ref: "#/components/schemas/MontaAppResponse" + "200": + description: Price group successfully set as default content: application/json: schema: - type: object - example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + $ref: "#/components/schemas/PriceGroup" "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - /api/v1/team-members/{teamMemberId}: - delete: - tags: - - Team Members - summary: Delete an existing team member - description: "Required scope: `team-members:delete`" - operationId: delete-team-member - parameters: - - name: teamMemberId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "204": - description: Team member deleted + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -6248,104 +6153,75 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/teams: + /api/v1/prices/forecast: get: tags: - - Teams - summary: Retrieve a list of teams - description: "Required scope: `teams:read`" - operationId: get-teams + - Prices Forecast + summary: Retrieve prices forecast. + description: "Prices can be forecasted for a charge point and optionally a price\ + \ group, when `priceGroupId` is not provided the charge point price group\ + \ will be used.
*Note*: This endpoint is in BETA phase and is subject\ + \ to changes in a near future release

Required scope: `prices-forecast:read`" + operationId: get-prices-forecast parameters: - - name: partnerExternalId - in: query - description: "Filter teams by partnerExternalId, to filter only resources\ - \ without `partnerExternalId` *use* `partnerExternalId=\"\"`" - schema: - type: string - - name: includeDeleted + - name: chargePointId in: query - description: Filter to include delete teams in the response - required: false schema: - type: boolean - default: false - example: "true" - - name: page + minimum: 0 + exclusiveMinimum: true + type: integer + description: Filter to retrieve prices forecast for the specified `chargePointId` + format: int64 + example: 13 + - name: priceGroupId in: query - description: page number to retrieve (starts with 0) schema: + minimum: 0 + exclusiveMinimum: true type: integer - format: int32 - default: 0 - example: "1" - - name: perPage + description: Filter to retrieve prices forecast for the specified `priceGroupId` + format: int64 + nullable: true + example: 130 + - name: teamMemberId in: query - description: "number of items per page (between 1 and 100, default 10)" schema: type: integer - format: int32 - default: 10 - example: "10" + description: Filter to retrieve prices forecast for the specified `teamMemberId` + format: int64 + nullable: true + example: 13 responses: "200": - description: List of teams that match the criteria + description: Prices Forecast for the given filter content: application/json: schema: - $ref: '#/components/schemas/MontaPage_TeamDto_' - "400": - description: The request is invalid + $ref: "#/components/schemas/PricesForecast" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - post: - tags: - - Teams - summary: Create a team - description: "Required scope: `teams:write`" - operationId: post-team - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateTeamDto' - required: true - responses: - "201": - description: Team created - content: - application/json: - schema: - $ref: '#/components/schemas/Team' + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -6366,79 +6242,122 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/teams/{id}: + /api/v1/reports: get: tags: - - Teams - summary: Retrieve a team - description: "Required scope: `teams:read`" - operationId: get-team + - Reports + summary: Retrieve a list of reports for charge point(s). + description: "Required scope: `reports:read`" + operationId: get-reports parameters: - - name: id - in: path - required: true + - name: page + in: query + description: page number to retrieve (starts with 0) schema: type: integer - format: int64 - responses: - "200": - description: Team with provided id - content: - application/json: - schema: - $ref: '#/components/schemas/Team' - "400": - description: The request is invalid - content: - application/json: - schema: - type: object - example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - /api/v1/teams/{teamId}: - delete: - tags: - - Teams - summary: Delete an existing team - description: "Required scope: `teams:delete`" - operationId: delete-team - parameters: - - name: teamId - in: path - required: true + format: int32 + default: 0 + example: 1 + - name: perPage + in: query + description: "number of items per page (between 1 and 100, default 10)" schema: type: integer - format: int64 - responses: - "204": - description: Team deleted - "403": + format: int32 + default: 10 + example: 10 + - name: chargePointId + in: query + schema: + required: + - "false" + type: integer + description: Filter to retrieve reports with specified `chargePointId` + format: int64 + nullable: true + example: 10 + - name: state + in: query + schema: + required: + - "false" + type: string + description: Filter to retrieve reports by `state` + nullable: true + example: new + enum: + - new + - action + - assigned-owner + - assigned-monta + - assigned-operator + - resolved + - name: fromDate + in: query + schema: + required: + - "false" + type: string + description: "Filter to retrieve reports where `createdAt` >= `fromDate`\ + \ (ISO8601: yyyy-MM-ddTHH:mm:ssZ)" + format: date-time + nullable: true + example: 2022-05-22T09:30:03Z + - name: toDate + in: query + schema: + required: + - "false" + type: string + description: "Filter to retrieve reports where `createdAt` <= `toDate` (ISO8601:\ + \ yyyy-MM-ddTHH:mm:ssZ)" + format: date-time + nullable: true + example: 2022-05-22T09:30:03Z + - name: priority + in: query + schema: + required: + - "false" + type: string + description: Priority of the report + nullable: true + enum: + - low + - medium + - high + responses: + "200": + description: List of reports that match the criteria + content: + application/json: + schema: + $ref: "#/components/schemas/MontaPage_ReportDto_" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": description: Operator doesn't have access to resource content: application/json: @@ -6458,44 +6377,29 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - patch: + /api/v1/reports/{reportId}: + get: tags: - - Teams - summary: Patch an existing team - description: "Required scope: `teams:write`" - operationId: patch-team + - Reports + summary: Retrieve a report related to a charge point. + description: "Required scope: `reports:read`" + operationId: get-report parameters: - - name: teamId + - name: reportId in: path required: true schema: type: integer format: int64 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchTeam' - required: true responses: "200": - description: Team updated + description: report with provided id content: application/json: schema: - $ref: '#/components/schemas/Team' + $ref: "#/components/schemas/ReportDto" "403": description: Operator doesn't have access to resource content: @@ -6506,35 +6410,48 @@ paths: status: FORBIDDEN message: Operator doesn't have access to resource errorCode: ACCESS_FORBIDDEN - "400": - description: The request is invalid + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST security: - BearerAccessToken: [] - /api/v1/wallet-transactions: + /api/v1/sites: get: tags: - - Wallet Transactions - summary: Retrieve your wallet transactions. - description: "Required scope: `wallet-transactions:read`" - operationId: get-wallet-transactions + - Sites + summary: Retrieve your (charge) sites + description: "Required scope: `charge-points:read`
Organization authorization:\ + \ `supported`" + operationId: get-sites parameters: - name: page in: query @@ -6543,7 +6460,7 @@ paths: type: integer format: int32 default: 0 - example: "1" + example: 1 - name: perPage in: query description: "number of items per page (between 1 and 100, default 10)" @@ -6551,131 +6468,85 @@ paths: type: integer format: int32 default: 10 - example: "10" + example: 10 - name: teamId in: query schema: type: integer - description: "Filter to retrieve transactions for a given team. *Note*:\ - \ When not provided the transactions for the operator will be returned\ - \ instead" - format: int32 - nullable: true - example: 1 - - name: fromDate - in: query - schema: - pattern: "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2})Z$" - type: string - description: "Filter to retrieve transactions where `createdAt` >= `fromDate`\ - \ (ISO8601: yyyy-MM-ddTHH:mm:ssZ)" - format: date-time - nullable: true - example: 2022-05-22T09:30:03Z - - name: toDate - in: query - schema: - pattern: "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2})Z$" - type: string - description: "Filter to retrieve transactions where `createdAt` <= `toDate`\ - \ (ISO8601: yyyy-MM-ddTHH:mm:ssZ)" - format: date-time + description: Allows to filter by a team id. + format: int64 nullable: true - example: 2022-05-22T09:30:03Z - - name: referenceId + example: 19 + - name: partnerExternalId in: query schema: type: string - description: Filter to retrieve transactions by the matching referenceId + description: "Filter by partnerExternalId, to filter only resources without\ + \ `partnerExternalId` *use* `partnerExternalId=\"\"`" nullable: true example: "1" - - name: referenceType + - name: sortByLocation in: query schema: + pattern: "^(-?\\d*\\.\\d+|\\d+\\.\\d*)(,)(-?\\d*\\.\\d+|\\d+\\.\\d*)$" + type: string + description: "lat,long coordinates. If supplied, the Charge Points will\ + \ be sorted in nearest first order relativeto this point. (Format: 55.7096,12.5856,\ + \ -8.050000, -34.900002)" nullable: true - allOf: - - $ref: '#/components/schemas/WalletTransactionReferenceType' - - type: string - description: Filter to retrieve transactions by the matching referenceType - example: CHARGE - - name: state + example: "55.7096,12.5856" + - name: operatorId in: query schema: + type: integer + description: Allows to filter by `operatorId` + format: int64 nullable: true - allOf: - - $ref: '#/components/schemas/WalletTransactionState' - - type: string - description: Filter to retrieve transactions by the matching state - example: complete - - name: group + example: 1 + - name: includePublic in: query schema: - nullable: true - allOf: - - $ref: '#/components/schemas/WalletTransactionGroup' - - type: string - description: Filter to retrieve transactions by the matching group - example: deposit - - name: partnerExternalId + type: boolean + description: "Includes public sites from other operators in the response
**Note:\ + \ Only supported from Version `2024-07-01`**" + example: false + default: false + - name: includeDeleted in: query schema: - required: - - "false" - type: string - description: "Filter transactions by partnerExternalId, to filter only resources\ - \ without `partnerExternalId` *use* `partnerExternalId=\"\"`" - nullable: true - example: "1" + type: boolean + description: Includes deleted resources in the response + example: true + default: false responses: "200": - description: List of wallet transactions that match the criteria + description: List of sites that match the criteria content: application/json: schema: - $ref: '#/components/schemas/MontaPage_WalletTransactionDto_' - "400": - description: The request is invalid + $ref: "#/components/schemas/MontaPage_SiteDto_" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - /api/v1/wallet-transactions/operator-adjustment-transaction: - post: - tags: - - Wallet Transactions - summary: Post an operator adjustment transaction - description: "This API endpoint is for operator to create an adjustment transaction\ - \ to their teams. Required scope: `wallet-transaction:write`" - operationId: post-operator-adjustment-transaction - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OperatorAdjustmentTransaction' - required: true - responses: - "201": - description: Transaction created - content: - application/json: - schema: - $ref: '#/components/schemas/WalletTransaction' + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -6696,49 +6567,28 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/wallet-transactions/{transactionId}: - get: + post: tags: - - Wallet Transactions - summary: Retrieve a single wallet transaction. - description: "Required scope: `wallet-transactions:read`" - operationId: get-wallet-transaction - parameters: - - name: transactionId - in: path + - Sites + summary: Create a (charge) site + description: "Required scope: `charge-points:write`
Organization authorization:\ + \ `supported`" + operationId: post-site + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateSite" required: true - schema: - type: integer - format: int64 responses: - "200": - description: Wallet transaction with provided id - content: - application/json: - schema: - $ref: '#/components/schemas/WalletTransaction' - "403": - description: Operator doesn't have access to resource + "201": + description: Site created content: application/json: schema: - type: object - example: - status: FORBIDDEN - message: Operator doesn't have access to resource - errorCode: ACCESS_FORBIDDEN + $ref: "#/components/schemas/Site" "404": description: Entity with the provided id was not found content: @@ -6751,54 +6601,16 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context - "400": - description: The request is invalid - content: - application/json: - schema: - type: object - example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - patch: - tags: - - Wallet Transactions - summary: Patch an existing transaction - description: "Required scope: `transaction:write`" - operationId: patch-transaction - parameters: - - name: transactionId - in: path - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchWalletTransaction' - required: true - responses: - "200": - description: Transaction updated - content: - application/json: - schema: - $ref: '#/components/schemas/WalletTransaction' + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -6819,110 +6631,52 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/wallets: + /api/v1/sites/{siteId}: get: tags: - - Wallets - summary: Retrieve your wallets. - description: "Required scope: `wallet-transactions:read`" - operationId: get-wallets + - Sites + summary: Retrieve a single (charge) site + description: "Required scope: `charge-points:read`
Organization authorization:\ + \ `supported`" + operationId: get-site parameters: - - name: page - in: query - description: page number to retrieve (starts with 0) - schema: - type: integer - format: int32 - default: 0 - example: "1" - - name: perPage - in: query - description: "number of items per page (between 1 and 100, default 10)" - schema: - type: integer - format: int32 - default: 10 - example: "10" - - name: teamId - in: query - schema: - type: integer - description: "Filter to retrieve wallet for a given team. *Note*: You need\ - \ to either provide `teamId` or `operatorId`" - format: int32 - nullable: true - example: 1 - - name: operatorId - in: query + - name: siteId + in: path + required: true schema: type: integer - description: "Filter to retrieve wallet for a given operator. *Note*: You\ - \ need to either provide `teamId` or `operatorId`" - format: int32 - nullable: true - example: 1 + format: int64 responses: "200": - description: List of wallets that match the criteria + description: Site with provided id content: application/json: schema: - $ref: '#/components/schemas/MontaPage_WalletDto_' - "400": - description: The request is invalid + $ref: "#/components/schemas/Site" + "404": + description: Entity with the provided id was not found content: application/json: schema: type: object example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": - description: Unauthorized access + description: Consumer with provided credentials was not found content: application/json: schema: type: object example: status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN - security: - - BearerAccessToken: [] - /api/v1/wallets/{walletId}: - get: - tags: - - Wallets - summary: Retrieve a single wallet. - description: "Required scope: `wallet-transactions:read`" - operationId: get-wallet - parameters: - - name: walletId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "200": - description: Wallet with provided id - content: - application/json: - schema: - $ref: '#/components/schemas/Wallet' + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND "403": description: Operator doesn't have access to resource content: @@ -6933,18 +6687,6 @@ paths: status: FORBIDDEN message: Operator doesn't have access to resource errorCode: ACCESS_FORBIDDEN - "404": - description: Entity with the provided id was not found - content: - application/json: - schema: - type: object - example: - status: NOT_FOUND - message: Requested entity/entity provided in body was not found - readableMessage: user friendly message - errorCode: RESOURCE_NOT_FOUND - context: context "400": description: The request is invalid content: @@ -6955,34 +6697,38 @@ paths: status: BAD_REQUEST message: Invalid request errorCode: BAD_REQUEST - "401": - description: Unauthorized access - content: - application/json: - schema: - type: object - example: - status: UNAUTHORIZED - message: Invalid or expired `accessToken`. - errorCode: INVALID_ACCESS_TOKEN security: - BearerAccessToken: [] - /api/v1/webhooks/config: - get: + delete: tags: - - Webhooks - summary: Get your webhook config - description: "Required scope: `manage-webhooks:read`" - operationId: get-webhook-config + - Sites + summary: Delete an existing (charge) site + description: "*Note:* This action will also remove `Charge Points` from the\ + \ `Site`.

Required scope: `charge-points:delete`
Organization\ + \ authorization: `supported`" + operationId: delete-site + parameters: + - name: siteId + in: path + required: true + schema: + type: integer + format: int64 responses: - "200": - description: Your Webhook config. + "204": + description: Site deleted + "404": + description: Entity with the provided id was not found content: application/json: schema: - $ref: '#/components/schemas/WebhookConfig' - "404": - description: Webhook config not found. + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": description: Consumer with provided credentials was not found content: @@ -6993,6 +6739,16 @@ paths: status: UNAUTHORIZED message: Consumer with given `clientId` and `clientSecret` not found errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -7005,25 +6761,45 @@ paths: errorCode: BAD_REQUEST security: - BearerAccessToken: [] - put: + patch: tags: - - Webhooks - summary: Update your webhook config - description: "Required scope: `manage-webhooks:write`" - operationId: update-webhook-config + - Sites + summary: Patch an existing (charge) site + description: "Required scope: `charge-points:write`
Organization authorization:\ + \ `supported`" + operationId: patch-site + parameters: + - name: siteId + in: path + required: true + schema: + type: integer + format: int64 requestBody: content: application/json: schema: - $ref: '#/components/schemas/WebhookConfig' + $ref: "#/components/schemas/PatchSite" required: true responses: "200": - description: Webhook config successfully updated. + description: Site updated + content: + application/json: + schema: + $ref: "#/components/schemas/Site" + "404": + description: Entity with the provided id was not found content: application/json: schema: - $ref: '#/components/schemas/WebhookConfig' + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": description: Consumer with provided credentials was not found content: @@ -7034,37 +6810,16 @@ paths: status: UNAUTHORIZED message: Consumer with given `clientId` and `clientSecret` not found errorCode: CONSUMER_NOT_FOUND - "400": - description: The request is invalid - content: - application/json: - schema: - type: object - example: - status: BAD_REQUEST - message: Invalid request - errorCode: BAD_REQUEST - security: - - BearerAccessToken: [] - delete: - tags: - - Webhooks - summary: Delete webhook config - description: "Required scope: `manage-webhooks:delete`" - operationId: delete-webhook-config - responses: - "204": - description: Successfully deleted webhook configuration - "401": - description: Consumer with provided credentials was not found + "403": + description: Operator doesn't have access to resource content: application/json: schema: type: object example: - status: UNAUTHORIZED - message: Consumer with given `clientId` and `clientSecret` not found - errorCode: CONSUMER_NOT_FOUND + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -7077,14 +6832,13 @@ paths: errorCode: BAD_REQUEST security: - BearerAccessToken: [] - /api/v1/webhooks/entries: + /api/v1/sponsored-charge-points: get: tags: - - Webhooks - summary: Retrieve webhook entries - description: "This endpoint can help you debug pending/failed webhook entries.\ - \ Required scope: `webhooks:read`" - operationId: get-webhook-entries + - Sponsored Charge Points + summary: Retrieve a list of sponsored charge points + description: "Required scope: `sponsored-charge-points:read`" + operationId: get-sponsored-charge-points parameters: - name: page in: query @@ -7093,7 +6847,7 @@ paths: type: integer format: int32 default: 0 - example: "1" + example: 1 - name: perPage in: query description: "number of items per page (between 1 and 100, default 10)" @@ -7101,21 +6855,54 @@ paths: type: integer format: int32 default: 10 - example: "10" - - name: status + example: 10 + - name: chargePointId + in: query + schema: + required: + - "false" + type: integer + description: Allows to filter list of sponsored charge points by a charge + point id + format: int64 + nullable: true + example: 13 + - name: teamId in: query - description: The status from which webhook entries will be filtered by schema: + required: + - "false" type: integer + description: Allows to filter list of sponsored charge points by a team + id. format: int64 - example: failed + nullable: true + example: 19 + - name: includeDeleted + in: query + schema: + type: boolean + description: Filter to include deleted entities in the response + example: false responses: "200": - description: List of webhook entries for your consumer in the past 24 hours + description: List of sponsored charges points that match the criteria + content: + application/json: + schema: + $ref: "#/components/schemas/MontaPage_SponsoredChargePointDto_" + "404": + description: Entity with the provided id was not found content: application/json: schema: - $ref: '#/components/schemas/MontaPage_WebhookEntryDto_' + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": description: Consumer with provided credentials was not found content: @@ -7126,6 +6913,16 @@ paths: status: UNAUTHORIZED message: Consumer with given `clientId` and `clientSecret` not found errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -7138,18 +6935,80 @@ paths: errorCode: BAD_REQUEST security: - BearerAccessToken: [] - /api/v1/webhooks/entries/{entryId}: + post: + tags: + - Sponsored Charge Points + summary: Create a sponsored charge point + description: "Creates a sponsored charge point for a given user, the sponsorship\ + \ is automatically approved.

*Note:* a charge point can only be sponsored\ + \ to one user_id
Required scope: `sponsored-charge-points:write`" + operationId: post-sponsored-charge-point + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateSponsoredChargePointDto" + required: true + responses: + "201": + description: Sponsored charge point created + content: + application/json: + schema: + $ref: "#/components/schemas/SponsoredChargePoint" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/sponsored-charge-points/{sponsoredChargePointId}: get: tags: - - Webhooks - summary: Retrieve a single webhook entry by id - description: |- - This endpoint returns a single entry by id. - *Note that we only persist entries for past 24 hours.* - Required scope: `webhooks:read` - operationId: get-webhook-entries_1 + - Sponsored Charge Points + summary: Retrieve a single sponsored charge point + description: "Required scope: `sponsored-charge-points:read`" + operationId: get-sponsored-charge-point parameters: - - name: entryId + - name: sponsoredChargePointId in: path required: true schema: @@ -7157,11 +7016,23 @@ paths: format: int64 responses: "200": - description: Webhook entry with given id + description: Sponsored charge point with provided id + content: + application/json: + schema: + $ref: "#/components/schemas/SponsoredChargePoint" + "404": + description: Entity with the provided id was not found content: application/json: schema: - $ref: '#/components/schemas/WebhookEntry' + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context "401": description: Consumer with provided credentials was not found content: @@ -7172,6 +7043,44 @@ paths: status: UNAUTHORIZED message: Consumer with given `clientId` and `clientSecret` not found errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + delete: + tags: + - Sponsored Charge Points + summary: Delete an existing sponsored charge point + description: "Required scope: `sponsored-charge-points:delete`" + operationId: delete-sponsored-charge-point + parameters: + - name: sponsoredChargePointId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "204": + description: Sponsored Charge Point deleted "404": description: Entity with the provided id was not found content: @@ -7184,6 +7093,26 @@ paths: readableMessage: user friendly message errorCode: RESOURCE_NOT_FOUND context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN "400": description: The request is invalid content: @@ -7196,30 +7125,4187 @@ paths: errorCode: BAD_REQUEST security: - BearerAccessToken: [] -components: - schemas: - AdditionalPricing: - required: - - type - - value - type: object - properties: - type: - allOf: - - $ref: '#/components/schemas/AdditionalPricingType' - - description: Type of the additional pricing. `absolute` means the value - is a price. - example: percentage - value: - allOf: - - $ref: '#/components/schemas/Money' - - description: The value of this additional pricing. Both `absolute` and - `percentage` values here are represented as a money object. - AdditionalPricingType: - type: string - enum: - - absolute - - percentage + patch: + tags: + - Sponsored Charge Points + summary: Update a sponsored charge point + description: "Required scope: `sponsored-charge-points:write`" + operationId: patch-sponsored-charge-point + parameters: + - name: sponsoredChargePointId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchSponsoredChargePoint" + required: true + responses: + "200": + description: Updated sponsored charge point with provided id + content: + application/json: + schema: + $ref: "#/components/schemas/SponsoredChargePoint" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/subscription-purchases: + get: + tags: + - Subscription Purchases + summary: Retrieve a list of subscription purchases + description: "Required scope: `subscriptions:read`" + operationId: get-subscription-purchases + parameters: + - name: page + in: query + description: page number to retrieve (starts with 0) + schema: + type: integer + format: int32 + default: 0 + example: 1 + - name: perPage + in: query + description: "number of items per page (between 1 and 100, default 10)" + schema: + type: integer + format: int32 + default: 10 + example: 10 + - name: subscriptionId + in: query + schema: + required: + - "false" + type: integer + description: Filter subscription purchases by subscription id + format: int64 + nullable: true + example: 1 + - name: includeDeleted + in: query + schema: + required: + - "false" + type: boolean + description: Includes deleted resources in the response + nullable: true + example: true + responses: + "200": + description: List of subscription purchases that match the criteria + content: + application/json: + schema: + $ref: "#/components/schemas/MontaPage_SubscriptionPurchaseDto_" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/subscription-purchases/{subscriptionPurchaseId}: + get: + tags: + - Subscription Purchases + summary: Retrieve a subscription purchase + description: "Required scope: `subscriptions:read`" + operationId: get-subscription-purchase + parameters: + - name: subscriptionPurchaseId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: Subscription purchase with provided id + content: + application/json: + schema: + $ref: "#/components/schemas/SubscriptionPurchase" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/subscriptions: + get: + tags: + - Subscriptions + summary: Retrieve a list of subscriptions + description: "Required scope: `subscriptions:read`" + operationId: get-subscriptions + parameters: + - name: page + in: query + description: page number to retrieve (starts with 0) + schema: + type: integer + format: int32 + default: 0 + example: 1 + - name: perPage + in: query + description: "number of items per page (between 1 and 100, default 10)" + schema: + type: integer + format: int32 + default: 10 + example: 10 + - name: planId + in: query + schema: + required: + - "false" + type: integer + description: Filter subscription by plan + format: int64 + nullable: true + example: 1 + - name: chargePointId + in: query + schema: + required: + - "false" + type: integer + description: "Filter subscriptions by charge point.
*Note*: This field\ + \ is deprecated, use `customerId` instead." + format: int64 + nullable: true + example: 1 + deprecated: true + - name: customerId + in: query + schema: + required: + - "false" + type: integer + description: "Filter subscriptions by customer id (charge point or team\ + \ id).
*Note*: The `customerType` must also be provided when filtering\ + \ by `customerId`." + format: int64 + nullable: true + example: 1 + - name: customerType + in: query + schema: + description: Filter subscriptions by customer type (charge-point or team). + nullable: true + example: team + allOf: + - $ref: "#/components/schemas/SubscriptionCustomerType" + - {} + - name: subscriptionPurchaseId + in: query + schema: + required: + - "false" + type: integer + description: Filter subscriptions by subscription purchase id. + format: int64 + nullable: true + example: 42 + responses: + "200": + description: List of subscriptions that match the criteria + content: + application/json: + schema: + $ref: "#/components/schemas/MontaPage_SubscriptionDto_" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + post: + tags: + - Subscriptions + summary: Create subscription + description: "Required scope: `subscriptions:write`" + operationId: create-subscription + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateSubscription" + required: true + responses: + "201": + description: The created subscription + content: + application/json: + schema: + $ref: "#/components/schemas/Subscription" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/subscriptions/{subscriptionId}: + get: + tags: + - Subscriptions + summary: Retrieve a subscription + description: "Required scope: `subscriptions:read`" + operationId: get-subscription + parameters: + - name: subscriptionId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: Subscription with provided ID + content: + application/json: + schema: + $ref: "#/components/schemas/Subscription" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + delete: + tags: + - Subscriptions + summary: Cancel subscription + description: "Required scope: `subscriptions:delete`" + operationId: delete-subscription + parameters: + - name: subscriptionId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "204": + description: Subscription successfully canceled + content: + application/json: + schema: + $ref: "#/components/schemas/Unit" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/subscriptions/{subscriptionId}/approve: + post: + tags: + - Subscriptions + summary: Approve subscription + description: "Required scope: `subscriptions:write`" + operationId: approve-subscription + parameters: + - name: subscriptionId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ApproveSubscription" + required: true + responses: + "200": + description: The approved subscription + content: + application/json: + schema: + $ref: "#/components/schemas/Subscription" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/tariff-period-groups: + get: + tags: + - Tariff Period Groups + summary: Retrieve Tariff Period Groups by tariff id + description: "Required scope: `tariff:read`" + operationId: get-period-groups + parameters: + - name: tariffId + in: query + description: Filter to retrieve tariff period groups by tariff id + schema: + type: integer + format: int64 + responses: + "200": + description: Tariff period group with provided tariff id + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/TariffPeriodGroup" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + post: + tags: + - Tariff Period Groups + summary: Create a new Tariff Period Group. + description: "Required scope: `tariffs:write`
**Note: Once you are done\ + \ with creating/updating tariffs and its components you have to call the `create-prices`\ + \ endpoint to create the prices for the tariff.**" + operationId: create-tariff-period-group + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TariffPeriodGroup_1" + required: true + responses: + "201": + description: New Tariff Period Group + content: + application/json: + schema: + $ref: "#/components/schemas/TariffPeriodGroup" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/tariff-period-groups/{id}: + get: + tags: + - Tariff Period Groups + summary: Retrieve Tariff Period Groups by id + description: "Required scope: `tariff:read`" + operationId: get-period-group + parameters: + - name: id + in: path + description: Filter to retrieve tariff period groups by id + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: Tariff period group with provided group id + content: + application/json: + schema: + $ref: "#/components/schemas/TariffPeriodGroup" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + delete: + tags: + - Tariff Period Groups + summary: "Delete an existing Tariff Period Group, and all contained recurring\ + \ periods and prices." + description: "Required scope: `tariffs:delete`
**Note: Once you are done\ + \ with creating/updating tariffs and its components you have to call the `create-prices`\ + \ endpoint to create the prices for the tariff.**" + operationId: delete-tariff-period-group + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "204": + description: Tariff Period Group deleted + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + patch: + tags: + - Tariff Period Groups + summary: Update existing Tariff Period Group. + description: "Required scope: `tariffs:write`
**Note: Once you are done\ + \ with creating/updating tariffs and its components you have to call the `create-prices`\ + \ endpoint to create the prices for the tariff.**" + operationId: update-tariff-period-group + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TariffPeriodGroup_2" + required: true + responses: + "200": + description: Updated Tariff Period Group + content: + application/json: + schema: + $ref: "#/components/schemas/TariffPeriodGroup" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/tariff-recurring-periods: + get: + tags: + - Tariff Recurring Periods + summary: Retrieve recurring periods. + description: "Required scope: `tariffs:read`" + operationId: get-tariff-recurring-periods + parameters: + - name: page + in: query + description: page number to retrieve (starts with 0) + schema: + type: integer + format: int32 + default: 0 + example: 1 + - name: perPage + in: query + description: "number of items per page (between 1 and 100, default 10)" + schema: + type: integer + format: int32 + default: 10 + example: 10 + - name: tariffId + in: query + required: true + schema: + type: integer + format: int64 + - name: tariffPeriodGroupId + in: query + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: Tariff recurring periods with provided tariffId & tariffPeriodGroupId + content: + application/json: + schema: + $ref: "#/components/schemas/Page_TariffRecurringPeriodDto_" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + post: + tags: + - Tariff Recurring Periods + summary: Create new recurring period. + description: "Required scope: `tariffs:write`
**Note: Once you are done\ + \ with creating/updating tariffs and its components you have to call the `create-prices`\ + \ endpoint to create the prices for the tariff.**" + operationId: create-tariff-recurring-periods + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TariffRecurringPeriodCreateRequestDto" + required: true + responses: + "201": + description: Tariff recurring period that was created + content: + application/json: + schema: + $ref: "#/components/schemas/TariffRecurringPeriod" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/tariff-recurring-periods/{id}: + delete: + tags: + - Tariff Recurring Periods + summary: "Delete an existing Tariff Recurring Period , and all contained prices." + description: "Required scope: `tariffs:delete`
**Note: Once you are done\ + \ with creating/updating tariffs and its components you have to call the `create-prices`\ + \ endpoint to create the prices for the tariff.**" + operationId: delete-tariff-recurring-period + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "204": + description: Tariff Recurring Period deleted + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/tariff-recurring-periods/{periodId}: + get: + tags: + - Tariff Recurring Periods + summary: Retrieve a tariff recurring period. + description: "Required scope: `tariffs:read`" + operationId: get-tariff-recurring-period + parameters: + - name: periodId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: Tariff recurring period with provided id + content: + application/json: + schema: + $ref: "#/components/schemas/TariffRecurringPeriod" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + patch: + tags: + - Tariff Recurring Periods + summary: Update existing recurring period. + description: "Required scope: `tariffs:write`
**Note: Once you are done\ + \ with creating/updating tariffs and its components you have to call the `create-prices`\ + \ endpoint to create the prices for the tariff.**" + operationId: update-tariff-recurring-periods + parameters: + - name: periodId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TariffRecurringPeriodUpdateRequestDto" + required: true + responses: + "200": + description: Tariff recurring period that was updated + content: + application/json: + schema: + $ref: "#/components/schemas/TariffRecurringPeriod" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/tariffs: + get: + tags: + - Tariff + summary: Retrieve all tariffs. + description: "Required scope: `tariffs:read`" + operationId: get-all-tariffs + parameters: + - name: countryId + in: query + description: Country id of the tariff + schema: + type: integer + format: int64 + - name: countryAreaId + in: query + description: Country area id of the tariff + schema: + type: integer + format: int64 + - name: externalId + in: query + description: External id of the tariff + schema: + type: string + - name: operatorId + in: query + description: Operator id of the tariff (taken from the consumer) + schema: + type: integer + format: int64 + - name: teamId + in: query + description: Team id of the tariff + schema: + type: integer + format: int64 + - name: zip + in: query + description: Zip code of the tariff + schema: + type: string + responses: + "200": + description: All tariffs + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/TariffDto" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + post: + tags: + - Tariff + summary: Create a new Tariff. + description: "Required scope: `tariffs:write`
**Note: Once you are done\ + \ with creating/updating tariffs and its components you have to call the `create-prices`\ + \ endpoint to create the prices for the tariff.**" + operationId: create-tariff + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateTariffRequest" + required: true + responses: + "201": + description: New Tariff + content: + application/json: + schema: + $ref: "#/components/schemas/TariffDto" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/tariffs/{tariffId}: + get: + tags: + - Tariff + summary: Retrieve your tariff and prices. + description: "Required scope: `tariffs:read`" + operationId: get-tariff + parameters: + - name: start + in: query + description: "Filter to retrieve tariffs where `createdAt` >= `start` (ISO8601:\ + \ yyyy-MM-ddTHH:mm:ssZ)" + schema: + type: string + format: date-time + example: 2022-05-22T09:30:03Z + - name: end + in: query + description: "Filter to retrieve charges where `createdAt` <= `end` (ISO8601:\ + \ yyyy-MM-ddTHH:mm:ssZ)" + schema: + type: string + format: date-time + example: 2022-05-22T09:30:03Z + - name: tariffId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: Tariff with provided id + content: + application/json: + schema: + $ref: "#/components/schemas/FullTariff" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + put: + tags: + - Tariff + summary: Update an existing Tariff. + description: "Required scope: `tariffs:write`

**Note: Once you are\ + \ done with creating/updating tariffs and its components you have to call\ + \ the `create-prices` endpoint to create the prices for the tariff.**" + operationId: update-tariff + parameters: + - name: tariffId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateTariffRequest" + required: true + responses: + "200": + description: Updated Tariff + content: + application/json: + schema: + $ref: "#/components/schemas/TariffDto" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/tariffs/{tariffId}/create-prices: + post: + tags: + - Tariff + summary: Create the prices for a given tariff within a given period of time. + description: "Required scope: `tariffs:write`
**Note: Once you are done\ + \ with creating/updating tariffs and its components you have to call this\ + \ endpoint to create the prices for the tariff.**" + operationId: create-tariff-prices + parameters: + - name: tariffId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateTariffPricesRequest" + required: true + responses: + "201": + description: Tariff prices created + content: + application/json: + schema: + $ref: "#/components/schemas/FullTariff" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/team-member-profiles: + get: + tags: + - Team Member Profiles + summary: Retrieve a list of team member profiles + description: "Required scope: `team-members:read`" + operationId: getTeamMemberProfiles + parameters: + - name: page + in: query + description: page number to retrieve (starts with 0) + schema: + type: integer + format: int32 + default: 0 + example: 1 + - name: perPage + in: query + description: "number of items per page (between 1 and 100, default 10)" + schema: + type: integer + format: int32 + default: 10 + example: 10 + - name: teamId + in: query + schema: + required: + - "false" + type: integer + description: Filter team member profiles by `teamId` + format: int64 + nullable: true + example: 1 + - name: name + in: query + schema: + required: + - "false" + type: string + description: Filter team member profiles by the specified `name` + nullable: true + example: expired + responses: + "200": + description: List of team member profiles that match the criteria + content: + application/json: + schema: + $ref: "#/components/schemas/MontaPage_TeamMemberProfileDto_" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + post: + tags: + - Team Member Profiles + summary: Create a team member profile + description: "Create a team member profile so that it can be applied on a team

Required\ + \ scope: `team-members:write`" + operationId: post-team-member-profile + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateTeamMemberProfile" + required: true + responses: + "201": + description: Team member profile created + content: + application/json: + schema: + $ref: "#/components/schemas/TeamMemberProfile" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/team-member-profiles/{id}: + get: + tags: + - Team Member Profiles + summary: Retrieve a team member profile by id + description: "Required scope: `team-members:read`" + operationId: getTeamMemberProfile + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: Team member profile with provided id + content: + application/json: + schema: + $ref: "#/components/schemas/TeamMemberProfile" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + delete: + tags: + - Team Member Profiles + summary: Delete an existing team member profile + description: "Required scope: `team-members:delete`" + operationId: delete-team-member-profile + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "204": + description: Team member profile deleted + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + patch: + tags: + - Team Member Profiles + summary: Patch a team member profile + description: "Required scope: `team-members:write`" + operationId: updateTeamMemberProfile + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchTeamMemberProfile" + required: true + responses: + "200": + description: Updated Team member profile with provided id + content: + application/json: + schema: + $ref: "#/components/schemas/TeamMemberProfile" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/team-members: + get: + tags: + - Team Members + summary: Retrieve a list of team members. + description: "Required scope: `team-members:read`" + operationId: getTeamMembers + parameters: + - name: page + in: query + description: page number to retrieve (starts with 0) + schema: + type: integer + format: int32 + default: 0 + example: 1 + - name: perPage + in: query + description: "number of items per page (between 1 and 100, default 10)" + schema: + type: integer + format: int32 + default: 10 + example: 10 + - name: teamId + in: query + schema: + required: + - "false" + type: integer + description: Filter team members by `teamId` + format: int64 + nullable: true + example: 1 + - name: includeDeleted + in: query + schema: + required: + - "false" + type: boolean + description: Includes deleted resources in the response + example: true + default: false + - name: role + in: query + schema: + description: Filter team members by the specified `role` + nullable: true + example: admin + allOf: + - $ref: "#/components/schemas/TeamMemberRole" + - {} + - name: state + in: query + schema: + description: Filter team members by the specified `state` + nullable: true + example: expired + allOf: + - $ref: "#/components/schemas/TeamMemberState_3" + - {} + - name: userId + in: query + schema: + minimum: 0 + exclusiveMinimum: true + required: + - "false" + type: integer + description: Filter team members with specified `userId` + format: int64 + nullable: true + example: 42 + - name: email + in: query + schema: + required: + - "false" + type: string + description: Filter team members with specified `email` + format: email + nullable: true + example: user@acme.com + - name: phone + in: query + schema: + pattern: "^\\+[1-9]\\d{1,14}$" + required: + - "false" + type: string + description: Filter team members with specified `phone` number + nullable: true + example: "+451234567" + - name: partnerExternalTeamId + in: query + schema: + required: + - "false" + type: string + description: "Filter team members by the specified `partnerExternalTeamId`Note:\ + \ partnerExternalTeamId refers to external id on the team level" + nullable: true + example: 1A2B3C4D5E + - name: partnerExternalId + in: query + schema: + required: + - "false" + type: string + description: Filter team members with specified `partnerExternalId` + nullable: true + example: 1A2B3C4D5E + responses: + "200": + description: List of team members that match the criteria + content: + application/json: + schema: + $ref: "#/components/schemas/MontaPage_TeamMemberDto_" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + post: + tags: + - Team Members + summary: Create (invite) a team member + description: "Create (invite) a user to join a team, invitation can be done\ + \ via `userId`, `email` and/or `phone`. A user that does not exist in yet\ + \ will have a null `userId`.

Required scope: `team-members:write`" + operationId: post-team-member + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateTeamMember" + required: true + responses: + "201": + description: Team member created + content: + application/json: + schema: + $ref: "#/components/schemas/TeamMember" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/team-members/{id}: + get: + tags: + - Team Members + summary: Retrieve a team member. + description: "Required scope: `team-members:read`" + operationId: getTeamMember + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: Team member with provided id + content: + application/json: + schema: + $ref: "#/components/schemas/TeamMember" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + patch: + tags: + - Team Members + summary: Patch a team member. + description: "Required scope: `team-members:write`" + operationId: patchTeamMember + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchTeamMember" + required: true + responses: + "200": + description: Updated Team member with provided id + content: + application/json: + schema: + $ref: "#/components/schemas/TeamMember" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/team-members/{id}/accept: + post: + tags: + - Team Members + summary: Approve a team member who requested to join a team + description: "Required scope: `team-members:write`" + operationId: acceptTeamMemberJoinRequest + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: Team member with provided id + content: + application/json: + schema: + $ref: "#/components/schemas/TeamMember" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/team-members/{id}/resend-invite: + post: + tags: + - Team Members + summary: Resend an invite to a team member and reset expiry date. + description: "Required scope: `team-members:write`" + operationId: resendTeamMemberInvite + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: Team member with provided id + content: + application/json: + schema: + $ref: "#/components/schemas/TeamMember" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/team-members/{teamMemberId}: + delete: + tags: + - Team Members + summary: Delete an existing team member + description: "Required scope: `team-members:delete`" + operationId: delete-team-member + parameters: + - name: teamMemberId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "204": + description: Team member deleted + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/teams: + get: + tags: + - Teams + summary: Retrieve a list of teams + description: "Required scope: `teams:read`
Organization authorization:\ + \ `supported`" + operationId: get-teams + parameters: + - name: page + in: query + description: page number to retrieve (starts with 0) + schema: + type: integer + format: int32 + default: 0 + example: 1 + - name: perPage + in: query + description: "number of items per page (between 1 and 100, default 10)" + schema: + type: integer + format: int32 + default: 10 + example: 10 + responses: + "200": + description: List of teams that match the criteria + content: + application/json: + schema: + $ref: "#/components/schemas/MontaPage_TeamDto_" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + post: + tags: + - Teams + summary: Create a team + description: "Required scope: `teams:write`
Organization authorization:\ + \ `supported`" + operationId: post-team + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateTeamDto" + required: true + responses: + "201": + description: Team created + content: + application/json: + schema: + $ref: "#/components/schemas/Team" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/teams/{id}: + get: + tags: + - Teams + summary: Retrieve a team + description: "Required scope: `teams:read`
Organization authorization:\ + \ `supported`" + operationId: get-team + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: Team with provided id + content: + application/json: + schema: + $ref: "#/components/schemas/Team" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/teams/{id}/freeze: + post: + tags: + - Teams + summary: Freeze a team + description: "Required scope: `teams:write`
Organization authorization:\ + \ `supported`" + operationId: freeze-team + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateTeamStateDto" + required: true + responses: + "200": + description: Team with provided id + content: + application/json: + schema: + $ref: "#/components/schemas/Team" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/teams/{id}/unfreeze: + post: + tags: + - Teams + summary: Unfreeze a team + description: "Required scope: `teams:write`
Organization authorization:\ + \ `supported`" + operationId: unfreeze-team + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: Team with provided id + content: + application/json: + schema: + $ref: "#/components/schemas/Team" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/teams/{teamId}: + delete: + tags: + - Teams + summary: Delete an existing team + description: "Required scope: `teams:delete`
Organization authorization:\ + \ `supported`" + operationId: delete-team + parameters: + - name: teamId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "204": + description: Team deleted + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + patch: + tags: + - Teams + summary: Patch an existing team + description: "Required scope: `teams:write`
Organization authorization:\ + \ `supported`" + operationId: patch-team + parameters: + - name: teamId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchTeam" + required: true + responses: + "200": + description: Team updated + content: + application/json: + schema: + $ref: "#/components/schemas/Team" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/users: + get: + tags: + - Users + summary: Retrieve users + description: "Required scope: `users:read`" + operationId: get-users + parameters: + - name: page + in: query + description: page number to retrieve (starts with 0) + schema: + type: integer + format: int32 + default: 0 + example: 1 + - name: perPage + in: query + description: "number of items per page (between 1 and 100, default 10)" + schema: + type: integer + format: int32 + default: 10 + example: 10 + - name: email + in: query + description: filter user by email + schema: + type: string + format: email + example: user@example.com + - name: phone + in: query + description: filter user by phone + schema: + type: string + format: phone + example: "+4529930022" + - name: includeDeleted + in: query + description: "Set to 'true' to include deleted users, 'false' otherwise" + schema: + type: boolean + default: false + example: false + responses: + "200": + description: List of users that match the criteria + content: + application/json: + schema: + $ref: "#/components/schemas/MontaPage_UserDto_" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/users/{userId}: + get: + tags: + - Users + summary: Retrieve a user + description: "Required scope: `users:read`" + operationId: get-user + parameters: + - name: userId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: user with provided id + content: + application/json: + schema: + $ref: "#/components/schemas/User" + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/wallet-transactions: + get: + tags: + - Wallet Transactions + summary: Retrieve your wallet transactions + description: "Required scope: `wallet-transactions:read`
Organization authorization:\ + \ `supported`" + operationId: get-wallet-transactions + parameters: + - name: page + in: query + description: page number to retrieve (starts with 0) + schema: + type: integer + format: int32 + default: 0 + example: 1 + - name: perPage + in: query + description: "number of items per page (between 1 and 100, default 10)" + schema: + type: integer + format: int32 + default: 10 + example: 10 + - name: operatorId + in: query + schema: + type: integer + description: "Filter to retrieve transactions for a given operator.
*Note*:\ + \ When not provided the default operator will be used for the given consumer,\ + \ if the default operator cannot be assigned the request will be rejected" + format: int32 + nullable: true + example: 1 + - name: teamId + in: query + schema: + type: integer + description: "Filter to retrieve transactions for a given team.
*Note*:\ + \ When not provided the transactions for the operator will be returned\ + \ instead" + format: int32 + nullable: true + example: 1 + - name: fromDate + in: query + schema: + pattern: "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2})Z$" + type: string + description: "Filter to retrieve transactions where `createdAt` >= `fromDate`\ + \ (ISO8601: yyyy-MM-ddTHH:mm:ssZ)" + format: date-time + nullable: true + example: 2022-05-22T09:30:03Z + - name: toDate + in: query + schema: + pattern: "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2})Z$" + type: string + description: "Filter to retrieve transactions where `createdAt` <= `toDate`\ + \ (ISO8601: yyyy-MM-ddTHH:mm:ssZ)" + format: date-time + nullable: true + example: 2022-05-22T09:30:03Z + - name: referenceId + in: query + schema: + type: string + description: Filter to retrieve transactions by the matching referenceId + nullable: true + example: "1" + - name: referenceType + in: query + schema: + description: Filter to retrieve transactions by the matching referenceType + nullable: true + example: CHARGE + allOf: + - $ref: "#/components/schemas/WalletTransactionReferenceType" + - type: string + - name: state + in: query + schema: + description: Filter to retrieve transactions by the matching state + nullable: true + example: complete + allOf: + - $ref: "#/components/schemas/WalletTransactionState" + - type: string + - name: group + in: query + schema: + description: Filter to retrieve transactions by the matching group + nullable: true + example: deposit + allOf: + - $ref: "#/components/schemas/WalletTransactionGroup" + - type: string + - name: partnerExternalId + in: query + schema: + required: + - "false" + type: string + description: "**Note: This has been deprecated and won't do anything moving\ + \ forward.**Filter transactions by partnerExternalId, to filter only resources\ + \ without `partnerExternalId` *use* `partnerExternalId=\"\"`" + nullable: true + example: "1" + responses: + "200": + description: List of wallet transactions that match the criteria + content: + application/json: + schema: + $ref: "#/components/schemas/MontaPage_WalletTransactionDto_" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/wallet-transactions/invoices/{invoiceId}: + get: + tags: + - Wallet Transactions + summary: Retrieves wallet transactions for an invoice + description: "Required scope: `wallet-transactions:read
Organization authorization:\ + \ `supported`" + operationId: get-wallet-transactions_1 + parameters: + - name: invoiceId + in: path + required: true + schema: + type: integer + format: int64 + - name: pageable + in: query + required: true + schema: + $ref: "#/components/schemas/Pageable" + responses: + "200": + description: Transactions by invoice successfully retrieved + content: + application/json: + schema: + $ref: "#/components/schemas/MontaPage_WalletTransactionDto_" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/wallet-transactions/operator-adjustment-transaction: + post: + tags: + - Wallet Transactions + summary: Post an operator adjustment transaction + description: "This API endpoint is for operator to create an adjustment transaction\ + \ to their teams. Required scope: `wallet-transaction:write`" + operationId: post-operator-adjustment-transaction + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/OperatorAdjustmentTransaction" + required: true + responses: + "201": + description: Transaction created + content: + application/json: + schema: + $ref: "#/components/schemas/WalletTransaction" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/wallet-transactions/{transactionId}: + get: + tags: + - Wallet Transactions + summary: Retrieve a single wallet transaction + description: "Required scope: `wallet-transactions:read`
Organization authorization:\ + \ `supported`" + operationId: get-wallet-transaction + parameters: + - name: transactionId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: Wallet transaction with provided id + content: + application/json: + schema: + $ref: "#/components/schemas/WalletTransaction" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + patch: + tags: + - Wallet Transactions + summary: Patch an existing transaction + description: "**Note: This has been deprecated and won't do anything.** Required\ + \ scope: `transaction:write`" + operationId: patch-transaction + parameters: + - name: transactionId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchWalletTransaction" + required: true + responses: + "200": + description: Transaction updated + content: + application/json: + schema: + $ref: "#/components/schemas/WalletTransaction" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + deprecated: true + security: + - BearerAccessToken: [] + /api/v1/wallets: + get: + tags: + - Wallets + summary: Retrieve your wallets. + description: "Required scope: `wallet-transactions:read`" + operationId: get-wallets + parameters: + - name: page + in: query + description: page number to retrieve (starts with 0) + schema: + type: integer + format: int32 + default: 0 + example: 1 + - name: perPage + in: query + description: "number of items per page (between 1 and 100, default 10)" + schema: + type: integer + format: int32 + default: 10 + example: 10 + - name: teamId + in: query + schema: + type: integer + description: "Filter to retrieve wallet for a given team. *Note*: You need\ + \ to either provide `teamId` or `operatorId`" + format: int32 + nullable: true + example: 1 + - name: operatorId + in: query + schema: + type: integer + description: "Filter to retrieve wallet for a given operator. *Note*: You\ + \ need to either provide `teamId` or `operatorId`" + format: int32 + nullable: true + example: 1 + responses: + "200": + description: List of wallets that match the criteria + content: + application/json: + schema: + $ref: "#/components/schemas/MontaPage_WalletDto_" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/wallets/{walletId}: + get: + tags: + - Wallets + summary: Retrieve a single wallet. + description: "Required scope: `wallet-transactions:read`" + operationId: get-wallet + parameters: + - name: walletId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: Wallet with provided id + content: + application/json: + schema: + $ref: "#/components/schemas/Wallet" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/webhooks/config: + get: + tags: + - Webhooks + summary: Get your webhook config + description: "Required scope: `manage-webhooks:read`" + operationId: get-webhook-config + responses: + "200": + description: Your Webhook config. + content: + application/json: + schema: + $ref: "#/components/schemas/WebhookConfig" + "404": + description: Webhook config not found. + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + put: + tags: + - Webhooks + summary: Update your webhook config + description: "Required scope: `manage-webhooks:write`" + operationId: update-webhook-config + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/WebhookConfig" + required: true + responses: + "200": + description: Webhook config successfully updated. + content: + application/json: + schema: + $ref: "#/components/schemas/WebhookConfig" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + delete: + tags: + - Webhooks + summary: Delete webhook config + description: "Required scope: `manage-webhooks:delete`" + operationId: delete-webhook-config + responses: + "204": + description: Successfully deleted webhook configuration + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/webhooks/entries: + get: + tags: + - Webhooks + summary: Retrieve webhook entries + description: "This endpoint can help you debug pending/failed webhook entries.\ + \ Required scope: `webhooks:read`" + operationId: get-webhook-entries + parameters: + - name: page + in: query + description: page number to retrieve (starts with 0) + schema: + type: integer + format: int32 + default: 0 + example: 1 + - name: perPage + in: query + description: "number of items per page (between 1 and 100, default 10)" + schema: + type: integer + format: int32 + default: 10 + example: 10 + - name: status + in: query + schema: + type: string + description: Filter to retrieve entries by `status` + nullable: true + example: failed + enum: + - pending + - completed + - failed + responses: + "200": + description: List of webhook entries for your consumer in the past 24 hours + content: + application/json: + schema: + $ref: "#/components/schemas/MontaPage_WebhookEntryDto_" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] + /api/v1/webhooks/entries/{entryId}: + get: + tags: + - Webhooks + summary: Retrieve a single webhook entry by id + description: |- + This endpoint returns a single entry by id. + *Note that we only persist entries for past 24 hours.* + Required scope: `webhooks:read` + operationId: get-webhook-entries_1 + parameters: + - name: entryId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "200": + description: Webhook entry with given id + content: + application/json: + schema: + $ref: "#/components/schemas/WebhookEntry" + "404": + description: Entity with the provided id was not found + content: + application/json: + schema: + type: object + example: + status: NOT_FOUND + message: Requested entity/entity provided in body was not found + readableMessage: user friendly message + errorCode: RESOURCE_NOT_FOUND + context: context + "401": + description: Consumer with provided credentials was not found + content: + application/json: + schema: + type: object + example: + status: UNAUTHORIZED + message: Consumer with given `clientId` and `clientSecret` not found + errorCode: CONSUMER_NOT_FOUND + "403": + description: Operator doesn't have access to resource + content: + application/json: + schema: + type: object + example: + status: FORBIDDEN + message: Operator doesn't have access to resource + errorCode: ACCESS_FORBIDDEN + "400": + description: The request is invalid + content: + application/json: + schema: + type: object + example: + status: BAD_REQUEST + message: Invalid request + errorCode: BAD_REQUEST + security: + - BearerAccessToken: [] +components: + schemas: + AdditionalPricing: + required: + - type + - value + type: object + properties: + type: + description: Type of the additional pricing. `absolute` means the value + is a price. + example: percentage + allOf: + - $ref: "#/components/schemas/AdditionalPricingType" + - {} + value: + description: The value of this additional pricing. Both `absolute` and `percentage` + values here are represented as a money object. + allOf: + - $ref: "#/components/schemas/Money" + - {} + title: + required: + - "false" + type: string + description: A title for this additional pricing. + nullable: true + AdditionalPricingType: + type: string + enum: + - absolute + - percentage Address: required: - address1 @@ -7236,7 +11322,7 @@ components: type: string description: Second line of address nullable: true - example: København + example: København address3: type: string description: Third line of address @@ -7354,7 +11440,7 @@ components: description: The list of prices and tariffs relevant for this breakdown entry items: - $ref: '#/components/schemas/Component' + $ref: "#/components/schemas/Component" BreakdownSummary: required: - totalAdjustments @@ -7401,6 +11487,14 @@ components: description: Total price for the given charge format: int64 example: 2220 + totalDiscount: + required: + - "false" + type: integer + description: Total discount applied for the given charge + format: int64 + nullable: true + example: 2220 Charge: required: - costBreakdown @@ -7420,30 +11514,34 @@ components: format: int64 example: 1 user: + description: User that performed the charge allOf: - - $ref: '#/components/schemas/PublicUser' - - description: User that performed the charge + - $ref: "#/components/schemas/PublicUser_3" + - {} teamMember: + description: "Team that performed the charge, if part of the charge points'\ + \ team" nullable: true allOf: - - $ref: '#/components/schemas/SimpleTeamMemberDto' - - description: "Team that performed the charge, if part of the charge points'\ - \ team" + - $ref: "#/components/schemas/SimpleTeamMemberDto" + - {} type: + description: Type of the charge + example: "1" allOf: - - $ref: '#/components/schemas/ChargeType' - - description: Type of the charge - example: "1" + - $ref: "#/components/schemas/ChargeType" + - {} chargePointId: type: integer description: Id of the charge point related to this charge format: int64 example: 21 publicChargePoint: + description: The public information about the charge point related to this + charge allOf: - - $ref: '#/components/schemas/PublicChargePoint' - - description: The public information about the charge point related to - this charge + - $ref: "#/components/schemas/PublicChargePoint" + - {} sponsoredChargePointId: required: - "false" @@ -7532,11 +11630,11 @@ components: nullable: true example: 2022-05-12T16:56:45.99Z state: + description: State of the charge + example: charging allOf: - - $ref: '#/components/schemas/ChargeStateDto' + - $ref: "#/components/schemas/ChargeStateDto" - type: string - description: State of the charge - example: charging startSource: type: string description: "Indicates the starting source for this charge, e.g app-ios,\ @@ -7560,7 +11658,7 @@ components: type: array description: List of consumed Kwh split by hour items: - $ref: '#/components/schemas/KwhPerHour' + $ref: "#/components/schemas/KwhPerHour" costBreakdown: type: array description: "Detailed breakdown of the costs by hour

**Note**:\ @@ -7568,7 +11666,7 @@ components: \ endpoint instead" deprecated: true items: - $ref: '#/components/schemas/ChargeCost' + $ref: "#/components/schemas/ChargeCost" x-sunset: 2024-04-01 priceBreakdown: type: array @@ -7577,7 +11675,7 @@ components: \ endpoint instead" deprecated: true items: - $ref: '#/components/schemas/ChargePrice' + $ref: "#/components/schemas/ChargePrice" x-sunset: 2024-04-01 startMeterKwh: type: number @@ -7648,36 +11746,42 @@ components: nullable: true example: Lorem Ipsum currency: + description: Currency used for payment. nullable: true allOf: - - $ref: '#/components/schemas/Currency' - - description: Currency used for payment. + - $ref: "#/components/schemas/Currency_11" + - {} payingTeam: + description: Team who paid for this charge nullable: true allOf: - - $ref: '#/components/schemas/PayingTeam' - - description: Team who paid for this charge + - $ref: "#/components/schemas/PayingTeam" + - {} sponsorTeam: + description: Team who sponsored this charge nullable: true allOf: - - $ref: '#/components/schemas/SponsorTeam' - - description: Team who sponsored this charge + - $ref: "#/components/schemas/SponsorTeam" + - {} operator: + description: Operator this of this charge nullable: true allOf: - - $ref: '#/components/schemas/Operator' - - description: Operator this of this charge + - $ref: "#/components/schemas/Operator" + - {} chargeAuth: + description: The object used to authenticate a charge nullable: true allOf: - - $ref: '#/components/schemas/ChargeAuthentication' - - description: The object used to authenticate a charge + - $ref: "#/components/schemas/ChargeAuthentication" + - {} soc: + description: Information about the state of charge if available nullable: true + example: "42" allOf: - - $ref: '#/components/schemas/StateOfCharge' - - description: Information about the state of charge if available - example: "42" + - $ref: "#/components/schemas/StateOfCharge" + - {} socLimit: type: number description: Configured SoC limit for this charge @@ -7685,11 +11789,12 @@ components: nullable: true example: 80 genericPaymentSession: + description: "Generic payment session for this charge. If provided, the\ + \ charge was paid with this payment session." nullable: true allOf: - - $ref: '#/components/schemas/GenericPaymentSession' - - description: "Generic payment session for this charge. If provided, the\ - \ charge was paid with this payment session." + - $ref: "#/components/schemas/GenericPaymentSession" + - {} partnerExternalId: type: string description: "External Id of this entity, managed by you. **We recommend\ @@ -7762,10 +11867,11 @@ components: nullable: true example: Monta Team Key operator: + description: Operator of this charge auth token nullable: true allOf: - - $ref: '#/components/schemas/Operator' - - description: Operator of this charge auth token + - $ref: "#/components/schemas/Operator" + - {} montaNetwork: type: boolean description: If the charge auth token is active in the Monta network @@ -7848,15 +11954,17 @@ components: format: int64 example: 10001 priceBreakdown: + description: "The price breakdown, Includes information necessary to understand\ + \ the composition of the final charge price" allOf: - - $ref: '#/components/schemas/DetailedBreakdown' - - description: "The price breakdown, Includes information necessary to understand\ - \ the composition of the final charge price" + - $ref: "#/components/schemas/DetailedBreakdown" + - {} costBreakdown: + description: The cost breakdown is similar to the price breakdown but focuses + on the costs incurred for the given charge allOf: - - $ref: '#/components/schemas/DetailedBreakdown' - - description: The cost breakdown is similar to the price breakdown but - focuses on the costs incurred for the given charge + - $ref: "#/components/schemas/DetailedBreakdown" + - {} ChargeCost: required: - time @@ -7888,9 +11996,10 @@ components: format: double example: 13.77 type: + description: The type of this metadata allOf: - - $ref: '#/components/schemas/MetadataTypeDto' - - description: The type of this metadata + - $ref: "#/components/schemas/MetadataTypeDto" + - {} ChargePoint: required: - connectors @@ -7930,10 +12039,11 @@ components: nullable: true example: 42 operator: + description: Operator of this charge point nullable: true allOf: - - $ref: '#/components/schemas/Operator' - - description: Operator of this charge point + - $ref: "#/components/schemas/Operator" + - {} createdAt: type: string description: Creation date of this charge point @@ -8009,26 +12119,28 @@ components: nullable: true example: "Installer note: XYZ" state: + description: State of the charge point nullable: true + example: available allOf: - - $ref: '#/components/schemas/ChargePointState' + - $ref: "#/components/schemas/ChargePointState" - type: string - description: State of the charge point - example: available location: + description: Location information for this charge point allOf: - - $ref: '#/components/schemas/Location' - - description: Location information for this charge point + - $ref: "#/components/schemas/Location" + - {} connectors: type: array description: "List of supported connector types at this charge point (e.g.\ \ type-2, ccs, ...)" items: - $ref: '#/components/schemas/ChargePointConnector' + $ref: "#/components/schemas/ChargePointConnector" deeplinks: + description: Deeplinks to open charge screen in Monta app or web. allOf: - - $ref: '#/components/schemas/ChargePointDeeplinks' - - description: Deeplinks to open charge screen in Monta app or web. + - $ref: "#/components/schemas/ChargePointDeeplinks" + - {} lastMeterReadingKwh: type: number description: Last meter reading (KWH) for this charge point @@ -8061,12 +12173,13 @@ components: nullable: true example: v1 integrationType: + description: "Indicates what kind of integration this charge point is using\ + \ (e.g oicp, ocpi, Note: null meaning not integrated)" nullable: true + example: oicp allOf: - - $ref: '#/components/schemas/ChargePointIntegrationType' - - description: "Indicates what kind of integration this charge point is\ - \ using (e.g oicp, ocpi, Note: null meaning not integrated)" - example: oicp + - $ref: "#/components/schemas/ChargePointIntegrationType" + - {} evseId: type: string description: The EVSE id for this charge point @@ -8110,6 +12223,29 @@ components: reserved for
`null` indicates that reservation is not supported. format: int32 nullable: true + example: null + simCard: + description: SIM card data for the given charge point + nullable: true + allOf: + - $ref: "#/components/schemas/SimCard" + - {} + roaming: + type: boolean + description: Indicates whether roaming is enabled for this charge point + example: true + lastConnectedAt: + type: string + description: The last date/time this charge point was reported as connected + format: date-time + nullable: true + example: 2023-01-18T00:00:00Z + disconnectedAt: + type: string + description: The date/time this charge point was reported as disconnected + format: date-time + nullable: true + example: 2023-01-01T00:00:00Z ChargePointBrand: required: - identifier @@ -8190,10 +12326,11 @@ components: format: int64 example: 1 state: + description: The current state of the charge point integration + example: connected allOf: - - $ref: '#/components/schemas/ChargePointIntegrationStateDto' - - description: The current state of the charge point integration - example: connected + - $ref: "#/components/schemas/ChargePointIntegrationStateDto" + - {} serialNumber: type: string description: The serial number of this charge point integration @@ -8209,9 +12346,10 @@ components: nullable: true example: 1 chargePoint: + description: The charge point associated to this integration allOf: - - $ref: '#/components/schemas/ChargePoint' - - description: The charge point associated to this integration + - $ref: "#/components/schemas/ChargePoint" + - {} activeAt: type: string description: The Date this charge point integration was set to active @@ -8246,6 +12384,11 @@ components: - unknown ChargePointIntegrationType: type: string + description: "definitions: \n* `oicp` - Indicates the current integration is\ + \ OICP. \n* `ocpi` - Indicates the current integration is OCPI. \n* `ocpp`\ + \ - Indicates the current integration is OCPP. \n* `other` - Fallback value,\ + \ Indicates a new type was added but is not mapped/unknown on this API yet.\ + \ \n" enum: - oicp - ocpi @@ -8274,15 +12417,16 @@ components: \ name - Model name)" example: SecuriCharge Dual brand: + description: The brand of the charge point model allOf: - - $ref: '#/components/schemas/ChargePointModelDto.ChargePointBrandDto' - - description: The brand of the charge point model + - $ref: "#/components/schemas/ChargePointModelDto.ChargePointBrandDto" + - {} features: type: array description: "The supported features by this charge point model, only supported\ \ features will be included" items: - $ref: '#/components/schemas/ChargePointModelFeature' + $ref: "#/components/schemas/ChargePointModelFeature" createdAt: type: string description: Creation date of this charge point model @@ -8332,6 +12476,22 @@ components: type: boolean description: The current status of the feature example: true + ChargePointOcppLog: + required: + - message + - timestamp + type: object + properties: + timestamp: + type: string + description: Timestamp of the OCPP log + format: date-time + example: 2022-05-12T15:56:45.99Z + message: + type: string + description: "Message content of the OCPP log, can be a string or an array\ + \ of mixed types" + example: Charge point connected ChargePointState: type: string description: "Various types of Charge Point states. Definitions: \n\n* `available`\ @@ -8345,9 +12505,7 @@ components: \ in use and scheduled. \n* `error` - The charge point is in an error state.\ \ \n* `disconnected` - The charge point is disconnected from Monta. \n* `passive`\ \ - The charge point is in a passive state, charging can only be controlled\ - \ locally. \n* `maintenance` - The charge point is in maintenance mode. \n\ - * `other` - Fallback value, Indicates a new type was added but is not mapped/unknown\ - \ on this API yet. \n" + \ locally. \n* `maintenance` - The charge point is in maintenance mode. \n" enum: - available - busy @@ -8362,6 +12520,78 @@ components: - passive - maintenance - other + ChargePointStatisticsDto: + required: + - fromDate + - sessionSuccessRate + - toDate + - totalEnergyConsumed + - totalSessions + type: object + properties: + fromDate: + required: + - "true" + type: string + description: Start date of the statistics period + format: date-time + example: 2024-03-20T00:00:00Z + toDate: + required: + - "true" + type: string + description: End date of the statistics period + format: date-time + example: 2024-03-30T00:00:00Z + totalEnergyConsumed: + required: + - "true" + type: number + description: Total energy consumed during the period (in kWh) + example: 500.5 + totalSessions: + required: + - "true" + type: integer + description: Total number of charging sessions during the period + format: int32 + example: 150 + sessionSuccessRate: + required: + - "true" + type: number + description: Success rate of charging sessions during the period (as a percentage) + format: double + example: 95 + systemUptimePercentage: + required: + - "false" + type: number + description: Percentage of uptime for the system during the period + format: double + nullable: true + example: 99.9 + states: + required: + - "false" + type: array + description: Detailed state for the period + items: + $ref: "#/components/schemas/States" + days: + required: + - "false" + type: array + description: Daily statistics for the period + items: + $ref: "#/components/schemas/TimePeriod" + months: + required: + - "false" + type: array + description: Monthly statistics for the period + items: + $ref: "#/components/schemas/TimePeriod" ChargePrice: required: - time @@ -8411,10 +12641,11 @@ components: type: object properties: type: + description: The type of charge insight + example: completed-charges-insights allOf: - - $ref: '#/components/schemas/ChargesInsightTypeDto' - - description: The type of charge insight - example: completed-charges-insights + - $ref: "#/components/schemas/ChargesInsightTypeDto" + - {} fromDate: type: string description: "Indicates the starting period (`fromDate`) used calculate\ @@ -8434,20 +12665,127 @@ components: description: The title for for this charge insight example: Completed charge sessions insights operator: + description: The operator to which this charge insight belongs to allOf: - - $ref: '#/components/schemas/Operator' - - description: The operator to which this charge insight belongs to + - $ref: "#/components/schemas/Operator" + - {} currency: + description: The currency applicable for this charge insight allOf: - - $ref: '#/components/schemas/Currency' - - description: The currency applicable for this charge insight + - $ref: "#/components/schemas/Currency_5" + - {} insights: required: - "true" type: array - description: The compilation of insights entries composing this charge insight + description: The compilation of insights entries composing this charge insight + items: + $ref: "#/components/schemas/ChargesInsightEntry" + ChargesInsightByChargeAuthTokenReportDto: + required: + - consumptions + - identifier + - type + type: object + properties: + id: + type: integer + description: The id of the charge auth token + format: int64 + example: 1 + identifier: + type: string + description: "The identifier of the charge auth token, Note: without prefix\ + \ e.g `VID:`" + example: 38C58DB85F4 + type: + type: string + description: The method type used for this charge auth token + example: vehicleId + enum: + - vehicleId + - rfid + consumptions: + required: + - "true" + type: array + description: Charge consumptions grouped by `chargeType` items: - $ref: '#/components/schemas/ChargesInsightEntry' + $ref: "#/components/schemas/ChargesInsightByChargeAuthTokenReportDto.Consumption" + ChargesInsightByChargeAuthTokenReportDto.Consumption: + required: + - chargeType + - totalGrossPrice + - totalKwh + - totalNetPrice + - totalSessions + - totalVat + type: object + properties: + chargeType: + required: + - "true" + type: string + description: "Defines the type of charge, ie. if it was a sponsored or public\ + \ charge. \n\ndefinitions: \n* `sponsored` - Charges that have been sponsored.\ + \ \n* `team-operator` - Charges that belong to Charge Points of the same\ + \ operator as paying team operator. \n* `public` - Any charge that was\ + \ paid for by this team that does not match the other cases. \n\nNote\ + \ that more chargeTypes might be added in the future. Make sure to handle\ + \ this gracefully." + totalSessions: + required: + - "true" + type: integer + description: Number of charging sessions + format: int64 + totalKwh: + required: + - "true" + type: number + description: Sum of all Kwh consumed + format: double + totalNetPrice: + required: + - "true" + type: number + description: Sum of all charge net prices + format: double + totalVat: + required: + - "true" + type: number + description: Sum of all charge vat amounts + format: double + totalGrossPrice: + required: + - "true" + type: number + description: Sum of all charge gross prices + format: double + memberCostGroupId: + required: + - "false" + type: integer + description: "The ID of the Member Cost Group applied to this charges, or\ + \ Null if none" + format: int64 + nullable: true + memberCostGroupName: + required: + - "false" + type: string + description: "The name of the Member Cost Group applied to this charges,\ + \ or Null if none" + nullable: true + memberCostGroupPrice: + required: + - "false" + type: number + description: "Sum of all charge costs in the Member Cost Group currency,\ + \ or Null if none" + format: double + nullable: true ChargesInsightChargerReport: required: - chargePointId @@ -8481,7 +12819,7 @@ components: type: array description: Charge consumptions items: - $ref: '#/components/schemas/ChargesInsightChargerReportDto.Consumption' + $ref: "#/components/schemas/ChargesInsightChargerReportDto.Consumption" ChargesInsightChargerReportDto.Consumption: required: - totalKwh @@ -8500,6 +12838,174 @@ components: type: number description: Sum of all Kwh consumed format: double + ChargesInsightDriverMemberCostsReport: + required: + - consumptions + - teamId + - teamMemberId + - userId + type: object + properties: + teamId: + required: + - "true" + type: integer + description: Team ID used for this report + format: int64 + teamMemberId: + required: + - "true" + type: integer + description: Team Member ID of the Driver + format: int64 + userId: + required: + - "true" + type: integer + description: User ID of the Driver + format: int64 + consumptions: + required: + - "true" + type: array + description: Charge consumptions grouped by `chargeType` + items: + $ref: "#/components/schemas/ChargesInsightDriverMemberCostsReportDto.Consumption" + ChargesInsightDriverMemberCostsReportDto.Consumption: + required: + - chargeType + - countryBreakdown + - totalGrossPrice + - totalKwh + - totalNetPrice + - totalSessions + - totalVat + type: object + properties: + chargeType: + required: + - "true" + type: string + description: "Defines the type of charge, ie. if it was a sponsored or public\ + \ charge. \n\ndefinitions: \n* `sponsored` - Charges that have been sponsored.\ + \ \n* `team-operator` - Charges that belong to Charge Points of the same\ + \ operator as paying team operator. \n* `public` - Any charge that was\ + \ paid for by this team that does not match the other cases. \n\nNote\ + \ that more chargeTypes might be added in the future. Make sure to handle\ + \ this gracefully." + totalSessions: + required: + - "true" + type: integer + description: Number of charging sessions + format: int64 + totalKwh: + required: + - "true" + type: number + description: Sum of all Kwh consumed + format: double + totalNetPrice: + required: + - "true" + type: number + description: Sum of all charge net prices + format: double + totalVat: + required: + - "true" + type: number + description: Sum of all charge vat amounts + format: double + totalGrossPrice: + required: + - "true" + type: number + description: Sum of all charge gross prices + format: double + memberCostGroupId: + required: + - "false" + type: integer + description: "The ID of the Member Cost Group applied to this charges, or\ + \ Null if none" + format: int64 + nullable: true + memberCostGroupName: + required: + - "false" + type: string + description: "The name of the Member Cost Group applied to this charges,\ + \ or Null if none" + nullable: true + memberCostGroupPrice: + required: + - "false" + type: number + description: "Sum of all charge costs in the Member Cost Group currency,\ + \ or Null if none" + format: double + nullable: true + countryBreakdown: + required: + - "true" + type: array + description: Breakdown of the charges by country + items: + $ref: "#/components/schemas/ChargesInsightDriverMemberCostsReportDto.Consumption.CountryBreakdown" + ChargesInsightDriverMemberCostsReportDto.Consumption.CountryBreakdown: + required: + - countryCode + - totalGrossPrice + - totalKwh + - totalNetPrice + - totalSessions + - totalVat + type: object + properties: + countryCode: + required: + - "true" + type: string + description: Two letter Country Code + totalSessions: + required: + - "true" + type: integer + description: Number of charging sessions + format: int64 + totalKwh: + required: + - "true" + type: number + description: Sum of all Kwh consumed + format: double + totalNetPrice: + required: + - "true" + type: number + description: Sum of all charge net prices + format: double + totalVat: + required: + - "true" + type: number + description: Sum of all charge vat amounts + format: double + totalGrossPrice: + required: + - "true" + type: number + description: Sum of all charge gross prices + format: double + memberCostGroupPrice: + required: + - "false" + type: number + description: "Sum of all charge costs in the Member Cost Group currency,\ + \ or Null if none" + format: double + nullable: true ChargesInsightDriverReport: required: - consumptions @@ -8532,7 +13038,7 @@ components: type: array description: Charge consumptions grouped by `chargeType` items: - $ref: '#/components/schemas/ChargesInsightDriverReportDto.Consumption' + $ref: "#/components/schemas/ChargesInsightDriverReportDto.Consumption" ChargesInsightDriverReportDto.Consumption: required: - chargeType @@ -8591,15 +13097,17 @@ components: type: object properties: type: + description: The type for this insight entry + example: completed-sponsored-charges-insights allOf: - - $ref: '#/components/schemas/ChargesInsightEntryTypeDto' - - description: The type for this insight entry - example: completed-sponsored-charges-insights + - $ref: "#/components/schemas/ChargesInsightEntryTypeDto" + - {} summary: + description: "The summary for this insight entry, The summary contains the\ + \ compiled statistics for the entry" allOf: - - $ref: '#/components/schemas/ChargesInsightSummary' - - description: "The summary for this insight entry, The summary contains\ - \ the compiled statistics for the entry" + - $ref: "#/components/schemas/ChargesInsightSummary" + - {} ChargesInsightEntryTypeDto: type: string description: Enumerate the various types of charge insights @@ -8659,10 +13167,11 @@ components: type: object properties: type: + description: The type of price/fee for this component + example: tariff allOf: - - $ref: '#/components/schemas/ComponentTypeDto' - - description: The type of price/fee for this component - example: tariff + - $ref: "#/components/schemas/ComponentTypeDto" + - {} price: required: - "true" @@ -8683,40 +13192,42 @@ components: description: Indicates this component is master a master pricing example: true tag: + description: The tag for this component nullable: true allOf: - - $ref: '#/components/schemas/PriceGroupTag' - - description: The tag for this component + - $ref: "#/components/schemas/PriceGroupTag" + - {} metadata: + description: "Additional information (metadata) for this component, e.g\ + \ tariffId, kwh and others" nullable: true allOf: - - $ref: '#/components/schemas/ComponentMetadataDto' - - description: "Additional information (metadata) for this component, e.g\ - \ tariffId, kwh and others" + - $ref: "#/components/schemas/ComponentMetadataDto" + - {} ComponentMetadataDto: required: - type type: object properties: type: - $ref: '#/components/schemas/ComponentMetadataTypeDto' + $ref: "#/components/schemas/ComponentMetadataTypeDto" discriminator: propertyName: type mapping: - spot-price-additional-price-metadata: '#/components/schemas/SpotPriceAdditionalPercentageComponentMetadata' - spot-price-metadata: '#/components/schemas/SpotPriceComponentMetadata' - tariff-metadata: '#/components/schemas/TariffComponentMetadata' - default-metadata: '#/components/schemas/DefaultComponentMetadata' - duration-fee-metadata: '#/components/schemas/DurationFeeComponentMetadata' - idle-fee-metadata: '#/components/schemas/IdleFeeComponentMetadata' + spot-price-additional-price-metadata: "#/components/schemas/SpotPriceAdditionalPercentageComponentMetadata" + spot-price-metadata: "#/components/schemas/SpotPriceComponentMetadata" + tariff-metadata: "#/components/schemas/TariffComponentMetadata" + default-metadata: "#/components/schemas/DefaultComponentMetadata" + duration-fee-metadata: "#/components/schemas/DurationFeeComponentMetadata" + idle-fee-metadata: "#/components/schemas/IdleFeeComponentMetadata" oneOf: - - $ref: '#/components/schemas/SpotPriceComponentMetadata' - - $ref: '#/components/schemas/SpotPriceAdditionalPriceComponentMetadata' - - $ref: '#/components/schemas/SpotPriceAdditionalPercentageComponentMetadata' - - $ref: '#/components/schemas/DurationFeeComponentMetadata' - - $ref: '#/components/schemas/IdleFeeComponentMetadata' - - $ref: '#/components/schemas/TariffComponentMetadata' - - $ref: '#/components/schemas/DefaultComponentMetadata' + - $ref: "#/components/schemas/SpotPriceComponentMetadata" + - $ref: "#/components/schemas/SpotPriceAdditionalPriceComponentMetadata" + - $ref: "#/components/schemas/SpotPriceAdditionalPercentageComponentMetadata" + - $ref: "#/components/schemas/DurationFeeComponentMetadata" + - $ref: "#/components/schemas/IdleFeeComponentMetadata" + - $ref: "#/components/schemas/TariffComponentMetadata" + - $ref: "#/components/schemas/DefaultComponentMetadata" ComponentMetadataTypeDto: type: string description: "Enumerate the various types of metadata.The content of metadata\ @@ -8747,12 +13258,14 @@ components: - fixed-charging-fee - idle-fee - adjustment + - bilateral-agreement - other Consumer: required: - clientId - createdAt - name + - operatorIds - scopes - teamIds type: object @@ -8766,10 +13279,18 @@ components: description: Your operator id format: int64 example: 42 + operatorIds: + type: array + description: "List of operator ids that are authorized for API operations.\ + \ If empty, all child operators of this operator are authorized." + items: + type: integer + format: int64 + example: 42 teamIds: type: array - description: "List of team ids that are unlocked for API operations. If\ - \ empty, all teams of this operator are unlocked." + description: "List of team ids that are authorized for API operations. If\ + \ empty, all teams of this operator are authorized." items: type: integer format: int64 @@ -8885,10 +13406,11 @@ components: nullable: true example: GB level: + description: The level of depth for this country area + example: bidding-area allOf: - - $ref: '#/components/schemas/CountryAreaLevel' - - description: The level of depth for this country area - example: bidding-area + - $ref: "#/components/schemas/CountryAreaLevel" + - {} CountryAreaLevel: type: string enum: @@ -8903,16 +13425,25 @@ components: type: object properties: type: + description: Type of the additional pricing. `absolute` means the value + is a price. + example: percentage allOf: - - $ref: '#/components/schemas/AdditionalPricingType' - - description: Type of the additional pricing. `absolute` means the value - is a price. - example: percentage + - $ref: "#/components/schemas/AdditionalPricingType" + - {} value: + minimum: 0 + exclusiveMinimum: true required: - "true" type: number description: The value of this additional pricing. + title: + required: + - "false" + type: string + description: A title for this additional pricing. + nullable: true CreateChargeAuthToken: required: - identifier @@ -8947,10 +13478,11 @@ components: \ e.g `VID:`" example: 38C58DB85F4 type: + description: Type of the charge auth token + example: vehicleId allOf: - - $ref: '#/components/schemas/ChargeAuthenticationType' - - description: Type of the charge auth token - example: vehicleId + - $ref: "#/components/schemas/ChargeAuthenticationType" + - {} name: type: string description: Name of the charge auth token @@ -9055,15 +13587,17 @@ components: format: double example: 22 visibility: + description: Visibility type of the charge point + example: private allOf: - - $ref: '#/components/schemas/VisibilityType' - - description: Visibility type of the charge point - example: private + - $ref: "#/components/schemas/VisibilityType" + - {} type: + description: Electric current type the charge point support + example: ac allOf: - - $ref: '#/components/schemas/ElectricCurrentType' - - description: Electric current type the charge point support - example: ac + - $ref: "#/components/schemas/ElectricCurrentType" + - {} active: type: boolean description: Indicates the charge point is active @@ -9085,7 +13619,11 @@ components: \ \n When not present the provide charge point model connectors\ \ will be used instead. \n " nullable: true - example: "[1,2,3,4]" + example: + - 1 + - 2 + - 3 + - 4 items: type: integer format: int64 @@ -9209,14 +13747,16 @@ components: description: Name of the price group example: Public Price Group type: + description: Type of the price group + example: public allOf: - - $ref: '#/components/schemas/PriceGroupType' - - description: Type of the price group - example: public + - $ref: "#/components/schemas/PriceGroupType" + - {} masterPrice: + description: The master price allOf: - - $ref: '#/components/schemas/CreateOrUpdatePricingDto' - - description: The master price + - $ref: "#/components/schemas/CreateOrUpdatePricingDto" + - {} fees: required: - "false" @@ -9224,7 +13764,7 @@ components: description: All the fees for the price group nullable: true items: - $ref: '#/components/schemas/CreateOrUpdatePricingDto' + $ref: "#/components/schemas/CreateOrUpdatePricingDto" CreateOrUpdatePricingDto: required: - endAtFullyCharged @@ -9241,11 +13781,12 @@ components: nullable: true example: Starting Fee type: + description: Type of the pricing. `minute` is used for Minute fee. `min` + is used for the master price. + example: kwh allOf: - - $ref: '#/components/schemas/PricingType' - - description: Type of the pricing. `minute` is used for Minute fee. `min` - is used for the master price. - example: kwh + - $ref: "#/components/schemas/PricingType" + - {} endAtFullyCharged: required: - "true" @@ -9334,7 +13875,7 @@ components: values to be added on top of the previous calculations nullable: true items: - $ref: '#/components/schemas/CreateAdditionalPricingDto' + $ref: "#/components/schemas/CreateAdditionalPricingDto" from: required: - "false" @@ -9400,15 +13941,17 @@ components: description: Name of the site example: Monta CPH Site address: + description: "Address of the site, Note: please ensure to always provide\ + \ a valid address" allOf: - - $ref: '#/components/schemas/CreatedOrUpdateAddress' - - description: "Address of the site, Note: please ensure to always provide\ - \ a valid address" + - $ref: "#/components/schemas/CreatedOrUpdateAddress" + - {} visibility: + description: Visibility type of the site + example: private allOf: - - $ref: '#/components/schemas/VisibilityType_1' - - description: Visibility type of the site - example: private + - $ref: "#/components/schemas/VisibilityType_1" + - {} partnerExternalId: type: string description: "External Id of this entity, managed by you." @@ -9460,10 +14003,11 @@ components: nullable: true example: 1 payoutSchedule: + description: The payout schedule for this sponsored charge point + example: realtime allOf: - - $ref: '#/components/schemas/SponsoredChargePointPayoutType' - - description: The payout schedule for this sponsored charge point - example: realtime + - $ref: "#/components/schemas/SponsoredChargePointPayoutType" + - {} payForSubscriptions: type: boolean description: Indicates that company pay for subscriptions @@ -9480,33 +14024,32 @@ components: type: integer description: Id of the plan to subscribe to format: int64 - customerType: - allOf: - - $ref: '#/components/schemas/SubscriptionCustomerType' - - description: Type of customer the subscription is created for.Currently - you can create subscriptions for charge-points only. customerId: minimum: 0 exclusiveMinimum: true type: integer - description: "Id of the customer the subscription is created for, e.g. a\ - \ chargePointId" + description: "Id of the customer the subscription is created for, e.g. team\ + \ or charge-point id" format: int64 + customerType: + description: Type of the customer that the subscription is created for. + e.g. team or charge-point + allOf: + - $ref: "#/components/schemas/SubscriptionCustomerType" + - {} discountAbsolute: minimum: 0 - exclusiveMinimum: true required: - "false" type: number description: "Allows to modify the absolute discount on a subscription if\ - \ provided.\n If not provided, the discount of the plan is\ + \ provided. \n If not provided, the discount of the plan is\ \ used.\n Note: If you want to set it on an existing subscription,\ \ you have to cancel the subscription first.\n " format: double nullable: true discountPercentage: minimum: 0 - exclusiveMinimum: true required: - "false" type: number @@ -9517,11 +14060,23 @@ components: format: double nullable: true serviceConfig: + description: "Configure the subscription, based on the plans serviceType.Currently\ + \ you can configure tax-refund subscriptions only." nullable: true allOf: - - $ref: '#/components/schemas/SubscriptionServiceConfig' - - description: "Configure the subscription, based on the plans serviceType.Currently\ - \ you can configure tax-refund subscriptions only." + - $ref: "#/components/schemas/SubscriptionServiceConfig" + - {} + userId: + minimum: 0 + exclusiveMinimum: true + required: + - "false" + type: integer + description: "The user that should be assigned as the purchaser of the subscription.\ + \ If not provided, the subscription will be assigned to the default user\ + \ for this consumer." + format: int64 + nullable: true CreateTariffPricesRequest: required: - end @@ -9616,14 +14171,17 @@ components: - "true" type: array description: Zip codes where this tariff is applicable - example: "[\"2200\", \"2100\"]" + example: + - "2200" + - "2100" items: type: string tariffType: + description: Dynamic or weekly + example: WEEKLY allOf: - - $ref: '#/components/schemas/TariffType' - - description: Dynamic or weekly - example: WEEKLY + - $ref: "#/components/schemas/TariffType" + - {} active: required: - "false" @@ -9643,11 +14201,12 @@ components: description: Human description of the area the tariff is active in example: Fyn customerType: + description: What kind of customer types are the tariff for? nullable: true + example: C_CUSTOMER allOf: - - $ref: '#/components/schemas/TariffCustomerType' - - description: What kind of customer types are the tariff for? - example: c_customer + - $ref: "#/components/schemas/TariffCustomerType" + - {} CreateTeamDto: required: - address @@ -9664,11 +14223,22 @@ components: example: 42 userEmail: type: string - description: "email of the user that owns the team, useful when the userId\ + description: "Email of the user that owns the team, useful when the userId\ \ is not known" format: email nullable: true - example: user@monta.com + example: user@monta.com + operatorId: + minimum: 0 + exclusiveMinimum: true + type: integer + description: "Id of the operator this team should be assigned to
*Note*:\ + \ if not provided the team will be assigned to the default operator for\ + \ the given consumer, if the default operator cannot be assigned the request\ + \ will be rejected." + format: int64 + nullable: true + example: 1 name: minLength: 1 type: string @@ -9680,15 +14250,16 @@ components: format: email example: contact@monta.com type: + description: type of the team + example: private allOf: - - $ref: '#/components/schemas/TeamType.Creatable' - - description: type of the team - example: private + - $ref: "#/components/schemas/TeamType.Creatable" + - {} address: + description: "Address of the team, Note: be sure to add always a valid address" allOf: - - $ref: '#/components/schemas/CreatedOrUpdateAddress' - - description: "Address of the team, Note: be sure to add always a valid\ - \ address" + - $ref: "#/components/schemas/CreatedOrUpdateAddress" + - {} companyName: type: string description: The company name for the team @@ -9752,10 +14323,11 @@ components: nullable: true example: "+45123456789" role: + description: Role for this member within the team + example: admin allOf: - - $ref: '#/components/schemas/TeamMemberRole' - - description: Role for this member within the team - example: admin + - $ref: "#/components/schemas/TeamMemberRole" + - {} priceGroupId: type: integer description: "The price group for this team member, when not provided the\ @@ -9763,6 +14335,24 @@ components: format: int64 nullable: true example: 1 + costGroupId: + type: integer + description: The cost group for this team member + format: int64 + nullable: true + example: 1 + teamMemberProfileId: + type: integer + description: The team member profile id to apply to this team member + format: int64 + nullable: true + example: 1 + canConfigureChargePoints: + type: boolean + description: Indicates if the team member access to pay with team wallet + when charging + example: false + default: false canPayWithTeamWallet: type: boolean description: Gives the team member access to pay with team wallet when charging @@ -9782,13 +14372,24 @@ components: teamWalletChargePaymentType: nullable: true allOf: - - $ref: '#/components/schemas/TeamWalletChargePaymentType' + - $ref: "#/components/schemas/TeamWalletChargePaymentType" canManageTeamWallet: type: boolean description: Gives the team member access to withdraw and deposit from your team wallet to your bank account example: false default: false + canPayForChargesCountryIds: + type: array + description: List of country ids for which the team member can pay for charges + nullable: true + example: + - 1 + - 2 + - 3 + items: + type: integer + format: int32 note: type: string description: A note for the team member @@ -9800,7 +14401,11 @@ components: type: array description: Ids of the charge point this team member with will have access nullable: true - example: "[1,2,3,4]" + example: + - 1 + - 2 + - 3 + - 4 items: type: integer format: int64 @@ -9815,59 +14420,331 @@ components: nullable: true items: type: object + CreateTeamMemberProfile: + required: + - canPayForChargesCountryIds + - description + - name + - role + - teamWalletChargePaymentType + type: object + properties: + teamId: + minimum: 0 + exclusiveMinimum: true + type: integer + description: Id of the team + format: int64 + example: 1 + name: + type: string + description: The team member profile name + example: Example profile 1 + description: + type: string + description: The team member profile description + example: Example profile 1 + role: + description: Role for team member profile + example: admin + allOf: + - $ref: "#/components/schemas/TeamMemberRole" + - {} + priceGroupId: + type: integer + description: "The price group, when not provided the default team price\ + \ group will be applied" + format: int64 + nullable: true + example: 1 + costGroupId: + type: integer + description: The cost group + format: int64 + nullable: true + example: 1 + canConfigureChargePoints: + type: boolean + description: Allows the team applying member profile to configure charge + points + example: false + default: false + canPayWithTeamWallet: + type: boolean + description: Gives the team applying member profile access to pay with team + wallet when charging + example: false + default: false + canRequestSponsoring: + type: boolean + description: Allows the team applying member profile to request sponsoring + from this team for their charge point + example: false + default: false + canManageTeamMembers: + type: boolean + description: Allows the team applying member profile to view and manage + other members settings + example: false + default: false + teamWalletChargePaymentType: + $ref: "#/components/schemas/TeamWalletChargePaymentType" + canManageTeamWallet: + type: boolean + description: Gives the team member access to withdraw and deposit from your + team wallet to your bank account + example: false + default: false + canPayForChargesCountryIds: + type: array + description: List of country ids for which the team member can pay for charges + example: + - 1 + - 2 + - 3 + items: + type: integer + format: int32 CreatedOrUpdateAddress: required: - - address1 - - city - - countryId - - zipCode + - address1 + - city + - countryId + - zipCode + type: object + properties: + address1: + minLength: 1 + required: + - "true" + type: string + description: First line of address + example: Strandboulevarden 122 + address2: + minimum: 1 + required: + - "false" + type: string + description: Second line of address + nullable: true + example: København + address3: + minimum: 1 + required: + - "false" + type: string + description: Third line of address + nullable: true + example: 5. sal + city: + minLength: 1 + type: string + description: The city name + example: Berlin + zipCode: + minLength: 1 + required: + - "true" + type: string + description: The address zip code + example: "10011" + countryId: + minimum: 0 + exclusiveMinimum: true + required: + - "true" + type: integer + description: "The country id, Note" + format: int64 + example: 194 + Currency: + required: + - decimals + - identifier + type: object + properties: + id: + minimum: 0 + exclusiveMinimum: true + required: + - "false" + type: integer + description: id of the currency + format: int64 + nullable: true + example: 1 + master: + required: + - "false" + type: boolean + description: "Whether the currency is master or not, master meaning the\ + \ default currency" + example: true + identifier: + maxLength: 3 + minLength: 3 + required: + - "true" + type: string + description: 3 characters identifier + example: DKK + name: + required: + - "false" + type: string + description: Name of the currency + example: Danish krone + decimals: + minimum: 0 + required: + - "true" + type: integer + description: How many decimals the currency has + format: int32 + example: 2 + CurrencyDto: + type: object + properties: + id: + minimum: 0 + exclusiveMinimum: true + required: + - "false" + type: integer + description: id of the currency + format: int64 + nullable: true + example: 1 + identifier: + type: string + description: Currency identifier + nullable: true + example: DKK + name: + type: string + description: Readable name of currency + nullable: true + example: Danish krone + decimals: + type: integer + description: Number of decimals for this currency + format: int32 + example: 2 + Currency_1: + required: + - identifier + - name + type: object + properties: + identifier: + type: string + description: "Currency identifier, e.g. dkk" + example: dkk + name: + type: string + description: Readable name of currency + example: Danish krone + decimals: + type: integer + description: Number of decimals for this currency + format: int32 + example: 2 + Currency_11: + required: + - identifier + - name + type: object + properties: + identifier: + type: string + description: "Currency identifier, e.g. dkk" + example: dkk + name: + type: string + description: Readable name of currency + example: Danish krone + decimals: + type: integer + description: Number of decimals for this currency + format: int32 + example: 2 + Currency_13: + required: + - identifier + - name + type: object + properties: + identifier: + type: string + description: "Currency identifier, e.g. dkk" + example: dkk + name: + type: string + description: Readable name of currency + example: Danish krone + decimals: + type: integer + description: Number of decimals for this currency + format: int32 + example: 2 + Currency_14: + required: + - identifier + - name + type: object + properties: + identifier: + type: string + description: "Currency identifier, e.g. dkk" + example: dkk + name: + type: string + description: Readable name of currency + example: Danish krone + decimals: + type: integer + description: Number of decimals for this currency + format: int32 + example: 2 + Currency_17: + required: + - identifier + - name type: object properties: - address1: - minLength: 1 - required: - - "true" - type: string - description: First line of address - example: Strandboulevarden 122 - address2: - minLength: 1 - required: - - "false" + identifier: type: string - description: Second line of address - nullable: true - example: København - address3: - minLength: 1 - required: - - "false" + description: "Currency identifier, e.g. dkk" + example: dkk + name: type: string - description: Third line of address - nullable: true - example: 5. sal - city: - minLength: 1 + description: Readable name of currency + example: Danish krone + decimals: + type: integer + description: Number of decimals for this currency + format: int32 + example: 2 + Currency_3: + required: + - identifier + - name + type: object + properties: + identifier: type: string - description: The city name - example: Berlin - zipCode: - minLength: 1 - required: - - "true" + description: "Currency identifier, e.g. dkk" + example: dkk + name: type: string - description: The address zip code - example: "10011" - countryId: - minimum: 0 - exclusiveMinimum: true - required: - - "true" + description: Readable name of currency + example: Danish krone + decimals: type: integer - description: "The country id, Note" - format: int64 - example: 194 - Currency: + description: Number of decimals for this currency + format: int32 + example: 2 + Currency_5: required: - identifier - name @@ -9886,56 +14763,38 @@ components: description: Number of decimals for this currency format: int32 example: 2 - CurrencyDto_3: + Currency_7: + required: + - identifier + - name type: object properties: - id: - minimum: 0 - exclusiveMinimum: true - required: - - "false" - type: integer - description: id of the currency - format: int64 - nullable: true - example: 1 identifier: type: string - description: "Currency identifier, e.g. DKK" - nullable: true - example: DKK + description: "Currency identifier, e.g. dkk" + example: dkk name: type: string description: Readable name of currency - nullable: true example: Danish krone decimals: type: integer description: Number of decimals for this currency format: int32 example: 2 - CurrencyDto_4: + Currency_9: + required: + - identifier + - name type: object properties: - id: - minimum: 0 - exclusiveMinimum: true - required: - - "false" - type: integer - description: id of the currency - format: int64 - nullable: true - example: 1 identifier: type: string - description: "Currency identifier, e.g. DKK" - nullable: true - example: DKK + description: "Currency identifier, e.g. dkk" + example: dkk name: type: string description: Readable name of currency - nullable: true example: Danish krone decimals: type: integer @@ -9958,10 +14817,11 @@ components: type: object properties: type: + description: The type of this metadata entry + example: default allOf: - - $ref: '#/components/schemas/ComponentMetadataTypeDto' - - description: The type of this metadata entry - example: default + - $ref: "#/components/schemas/ComponentMetadataTypeDto" + - {} kwh: type: number description: The kwh for this metadata entry @@ -9984,14 +14844,16 @@ components: type: object properties: summary: + description: The summary of the total prices for this breakdown allOf: - - $ref: '#/components/schemas/BreakdownSummary' - - description: The summary of the total prices for this breakdown + - $ref: "#/components/schemas/BreakdownSummary" + - {} currency: + description: "The currency applicable for this breakdown (for all the components:\ + \ prices, fees, adjustments)" allOf: - - $ref: '#/components/schemas/Currency' - - description: "The currency applicable for this breakdown (for all the\ - \ components: prices, fees, adjustments)" + - $ref: "#/components/schemas/Currency_9" + - {} breakdown: required: - "true" @@ -9999,21 +14861,21 @@ components: description: "The breakdown entries for this breakdown, currently organized\ \ on an hourly basis" items: - $ref: '#/components/schemas/Breakdown' + $ref: "#/components/schemas/Breakdown" fees: required: - "true" type: array description: The fees that compose this breakdown items: - $ref: '#/components/schemas/Component' + $ref: "#/components/schemas/Component" adjustments: required: - "true" type: array description: The adjustments applied for this breakdown items: - $ref: '#/components/schemas/Component' + $ref: "#/components/schemas/Component" DriverReportDatesFilteredBy: type: string enum: @@ -10025,10 +14887,11 @@ components: type: object properties: type: + description: The type of this metadata entry + example: default-metadata allOf: - - $ref: '#/components/schemas/ComponentMetadataTypeDto' - - description: The type of this metadata entry - example: default-metadata + - $ref: "#/components/schemas/ComponentMetadataTypeDto" + - {} totalMinutes: type: number description: The total duration in minutes for this metadata entry @@ -10041,9 +14904,14 @@ components: example: 10 ElectricCurrentType: type: string + description: "definitions: \n* `ac` - Indicates the charge point use `ac` (alternating\ + \ current) as electric current. \n* `dc` - Indicates the charge point use\ + \ `ac` (direct current) as electric current. \n* `other` - Indicates the team\ + \ member has only access to the selected charge points. \n" enum: - ac - dc + - other FullTariff: required: - prices @@ -10051,19 +14919,21 @@ components: type: object properties: tariff: + description: tariff allOf: - - $ref: '#/components/schemas/TariffDto' - - description: tariff + - $ref: "#/components/schemas/TariffDto" + - {} prices: type: array description: list of the tariff prices items: - $ref: '#/components/schemas/Price' + $ref: "#/components/schemas/Price" priceSpecification: + description: Price specification nullable: true allOf: - - $ref: '#/components/schemas/PriceSpecification' - - description: Price specification + - $ref: "#/components/schemas/PriceSpecification" + - {} GenericPaymentSession: required: - externalId @@ -10097,6 +14967,12 @@ components: or `cardLast4`. nullable: true example: "1234" + amount: + type: number + description: The amount of the payment session. Negative amounts will be + rejected by the API + nullable: true + example: 1234 IdleFeeComponentMetadata: required: - from @@ -10105,14 +14981,16 @@ components: type: object properties: type: + description: The type of this metadata entry + example: default-metadata allOf: - - $ref: '#/components/schemas/ComponentMetadataTypeDto' - - description: The type of this metadata entry - example: default-metadata + - $ref: "#/components/schemas/ComponentMetadataTypeDto" + - {} amountPerMinute: type: integer description: The idle fee per minute for this metadata entry format: int64 + example: null minutes: type: number description: For how long the the charge stayed idle after fully charged @@ -10147,9 +15025,10 @@ components: format: int64 example: 22 operator: + description: The operator of this installer job allOf: - - $ref: '#/components/schemas/Operator' - - description: The operator of this installer job + - $ref: "#/components/schemas/Operator" + - {} teamId: type: integer description: Id of the team of this installer job @@ -10185,7 +15064,7 @@ components: type: array description: List of tasks of this installer job items: - $ref: '#/components/schemas/InstallerJobTask' + $ref: "#/components/schemas/InstallerJobTask" completedAt: type: string description: Date this installer job was completed @@ -10272,6 +15151,99 @@ components: format: date-time nullable: true example: 2022-05-12T15:56:45.99Z + InvoiceDto: + required: + - createdAt + - currency + - dueAt + - from + - id + - status + - to + - totalPayableBalance + - walletId + type: object + properties: + id: + required: + - "true" + type: integer + description: Id of the invoice + format: int64 + example: 123 + walletId: + required: + - "true" + type: integer + description: Id of the wallet + format: int64 + example: 123 + from: + required: + - "true" + type: string + description: Invoice from date + format: date-time + example: 2024-03-01T00:00:00Z + to: + required: + - "true" + type: string + description: Invoice to date + format: date-time + example: 2024-03-30T00:00:00Z + approvedAt: + required: + - "false" + type: string + description: The date it was approved + format: date-time + nullable: true + example: 2024-03-30T00:00:00Z + totalStatement: + type: number + description: Total statement + nullable: true + example: 12.22 + totalPayableBalance: + type: number + description: Total payable balance + example: 12.22 + currency: + description: Currency + allOf: + - $ref: "#/components/schemas/CurrencyDto" + - {} + status: + type: string + description: status of the invoice + example: paid + enum: + - paid + - unpaid + - settled + createdAt: + required: + - "true" + type: string + description: Invoice creation date + format: date-time + example: 2024-03-30T00:00:00Z + dueAt: + required: + - "true" + type: string + description: Invoice due date + format: date-time + nullable: true + example: 2024-03-30T00:00:00Z + pdfUrl: + required: + - "false" + type: string + description: URL to the invoice PDF + nullable: true + example: https://monta.imgix.net/production/wallet/invoices/xyxy.pdf KafkaEventType: type: string enum: @@ -10297,15 +15269,17 @@ components: type: object properties: coordinates: + description: "Coordinates (lat, lng)" nullable: true allOf: - - $ref: '#/components/schemas/Coordinates' - - description: "Coordinates (lat, lng)" + - $ref: "#/components/schemas/Coordinates" + - {} address: + description: Address nullable: true allOf: - - $ref: '#/components/schemas/Address' - - description: Address + - $ref: "#/components/schemas/Address" + - {} MapResult: required: - chargePoints @@ -10315,16 +15289,20 @@ components: properties: chargePoints: type: array + description: list of all charge points found in that area items: - $ref: '#/components/schemas/MapResultChargePoint' + $ref: "#/components/schemas/MapResultChargePoint" sites: type: array + description: list of all sites found in that area items: - $ref: '#/components/schemas/MapResultSite' + $ref: "#/components/schemas/MapResultSite" cluster: type: array + description: list of all clusters (of charge points and sites) found in + that area items: - $ref: '#/components/schemas/MapResultCluster' + $ref: "#/components/schemas/MapResultCluster" MapResultChargePoint: required: - connectors @@ -10399,19 +15377,21 @@ components: - passive - other location: + description: Location information for this charge point allOf: - - $ref: '#/components/schemas/Location' - - description: Location information for this charge point + - $ref: "#/components/schemas/Location" + - {} connectors: type: array description: "List of supported connector types at this charge point (e.g.\ \ type-2, ccs, ...)" items: - $ref: '#/components/schemas/ChargePointConnector' + $ref: "#/components/schemas/ChargePointConnector" deeplinks: + description: Deeplinks to open charge screen in Monta app or web. allOf: - - $ref: '#/components/schemas/ChargePointDeeplinks' - - description: Deeplinks to open charge screen in Monta app or web. + - $ref: "#/components/schemas/ChargePointDeeplinks" + - {} description: Reduced model of Charge Point MapResultCluster: required: @@ -10419,9 +15399,10 @@ components: type: object properties: coordinates: + description: Coordinates of the cluster allOf: - - $ref: '#/components/schemas/Coordinates' - - description: Coordinates of the cluster + - $ref: "#/components/schemas/Coordinates" + - {} count: type: integer description: Number of entities (Charge points and sites) clustered. @@ -10485,26 +15466,27 @@ components: nullable: true example: In order to access this site enter 0000 as code at the gate. location: + description: Location information for this site allOf: - - $ref: '#/components/schemas/Location' - - description: Location information for this site + - $ref: "#/components/schemas/Location" + - {} connectors: type: array description: "List of supported connector types at this site (e.g. type-2,\ \ ccs, ...)" items: - $ref: '#/components/schemas/ChargePointConnector' + $ref: "#/components/schemas/ChargePointConnector" description: Reduced model of Site MetadataDto: type: object discriminator: propertyName: type mapping: - tax-refund-metadata: '#/components/schemas/TaxRefundMetadata' - charge-metadata: '#/components/schemas/ChargeMetadata' + tax-refund-metadata: "#/components/schemas/TaxRefundMetadata" + charge-metadata: "#/components/schemas/ChargeMetadata" oneOf: - - $ref: '#/components/schemas/TaxRefundMetadata' - - $ref: '#/components/schemas/ChargeMetadata' + - $ref: "#/components/schemas/TaxRefundMetadata" + - $ref: "#/components/schemas/ChargeMetadata" MetadataTypeDto: type: string enum: @@ -10526,9 +15508,10 @@ components: format: int64 example: 12312 currency: + description: Currency allOf: - - $ref: '#/components/schemas/Currency' - - description: Currency + - $ref: "#/components/schemas/Currency" + - {} locale: minLength: 1 required: @@ -10544,7 +15527,7 @@ components: type: object properties: status: - $ref: '#/components/schemas/MontaHttpStatus' + $ref: "#/components/schemas/MontaHttpStatus" message: type: string nullable: true @@ -10566,7 +15549,7 @@ components: type: array nullable: true items: - $ref: '#/components/schemas/MontaAppResponse.ErrorDetail' + $ref: "#/components/schemas/MontaAppResponse.ErrorDetail" statusCode: type: integer format: int32 @@ -10589,7 +15572,7 @@ components: type: array nullable: true items: - $ref: '#/components/schemas/MontaAppResponse.ErrorDetail.Body' + $ref: "#/components/schemas/MontaAppResponse.ErrorDetail.Body" MontaAppResponse.ErrorDetail.Body: required: - message @@ -10701,9 +15684,9 @@ components: data: type: array items: - $ref: '#/components/schemas/ChargeAuthToken' + $ref: "#/components/schemas/ChargeAuthToken" meta: - $ref: '#/components/schemas/MontaPage.Meta' + $ref: "#/components/schemas/MontaPage.Meta" MontaPage_ChargeDto_: required: - data @@ -10713,10 +15696,106 @@ components: data: type: array items: - $ref: '#/components/schemas/Charge' + $ref: "#/components/schemas/Charge" + meta: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_ChargePointBrandDto_: + required: + - data + - meta + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/ChargePointBrand" + meta: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_ChargePointConnectorDto_: + required: + - data + - meta + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/ChargePointConnector" + meta: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_ChargePointDto_: + required: + - data + - meta + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/ChargePoint" + meta: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_ChargePointIntegrationDto_: + required: + - data + - meta + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/ChargePointIntegration" + meta: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_ChargePointModelDto_: + required: + - data + - meta + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/ChargePointModel" + meta: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_ChargePointOcppLogDto_: + required: + - data + - meta + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/ChargePointOcppLog" + meta: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_ChargesInsightByChargeAuthTokenReportDto_: + required: + - data + - meta + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/ChargesInsightByChargeAuthTokenReportDto" + meta: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_ChargesInsightChargerReportDto_: + required: + - data + - meta + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/ChargesInsightChargerReport" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_ChargePointBrandDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_ChargesInsightDriverMemberCostsReportDto_: required: - data - meta @@ -10725,10 +15804,10 @@ components: data: type: array items: - $ref: '#/components/schemas/ChargePointBrand' + $ref: "#/components/schemas/ChargesInsightDriverMemberCostsReport" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_ChargePointConnectorDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_ChargesInsightDriverReportDto_: required: - data - meta @@ -10737,10 +15816,10 @@ components: data: type: array items: - $ref: '#/components/schemas/ChargePointConnector' + $ref: "#/components/schemas/ChargesInsightDriverReport" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_ChargePointDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_CountryAreaDto_: required: - data - meta @@ -10749,10 +15828,10 @@ components: data: type: array items: - $ref: '#/components/schemas/ChargePoint' + $ref: "#/components/schemas/CountryArea" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_ChargePointIntegrationDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_CountryDto_: required: - data - meta @@ -10761,10 +15840,10 @@ components: data: type: array items: - $ref: '#/components/schemas/ChargePointIntegration' + $ref: "#/components/schemas/Country" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_ChargePointModelDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_CurrencyDto_: required: - data - meta @@ -10773,10 +15852,10 @@ components: data: type: array items: - $ref: '#/components/schemas/ChargePointModel' + $ref: "#/components/schemas/CurrencyDto" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_ChargesInsightChargerReportDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_InstallerJobDto_: required: - data - meta @@ -10785,10 +15864,10 @@ components: data: type: array items: - $ref: '#/components/schemas/ChargesInsightChargerReport' + $ref: "#/components/schemas/InstallerJob" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_ChargesInsightDriverReportDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_InvoiceDto_: required: - data - meta @@ -10797,10 +15876,10 @@ components: data: type: array items: - $ref: '#/components/schemas/ChargesInsightDriverReport' + $ref: "#/components/schemas/InvoiceDto" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_CountryAreaDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_NestedTeamDto_: required: - data - meta @@ -10809,10 +15888,10 @@ components: data: type: array items: - $ref: '#/components/schemas/CountryArea' + $ref: "#/components/schemas/NestedTeam" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_CountryDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_OperatorDto_: required: - data - meta @@ -10821,10 +15900,10 @@ components: data: type: array items: - $ref: '#/components/schemas/Country' + $ref: "#/components/schemas/Operator" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_CurrencyDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_PaymentTerminalDto_: required: - data - meta @@ -10833,10 +15912,10 @@ components: data: type: array items: - $ref: '#/components/schemas/CurrencyDto_3' + $ref: "#/components/schemas/PaymentTerminal" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_InstallerJobDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_PlanDto_: required: - data - meta @@ -10845,10 +15924,10 @@ components: data: type: array items: - $ref: '#/components/schemas/InstallerJob' + $ref: "#/components/schemas/Plan" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_OperatorDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_PriceGroupDto_: required: - data - meta @@ -10857,10 +15936,10 @@ components: data: type: array items: - $ref: '#/components/schemas/Operator' + $ref: "#/components/schemas/PriceGroup" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_PaymentTerminalDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_PriceGroupTagDto_: required: - data - meta @@ -10869,10 +15948,10 @@ components: data: type: array items: - $ref: '#/components/schemas/PaymentTerminal' + $ref: "#/components/schemas/PriceGroupTag" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_PlanDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_ReportDto_: required: - data - meta @@ -10881,10 +15960,10 @@ components: data: type: array items: - $ref: '#/components/schemas/Plan' + $ref: "#/components/schemas/ReportDto" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_PriceGroupDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_SiteDto_: required: - data - meta @@ -10893,10 +15972,10 @@ components: data: type: array items: - $ref: '#/components/schemas/PriceGroup' + $ref: "#/components/schemas/Site" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_PriceGroupTagDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_SponsoredChargePointDto_: required: - data - meta @@ -10905,10 +15984,10 @@ components: data: type: array items: - $ref: '#/components/schemas/PriceGroupTag' + $ref: "#/components/schemas/SponsoredChargePoint" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_SiteDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_SubscriptionDto_: required: - data - meta @@ -10917,10 +15996,10 @@ components: data: type: array items: - $ref: '#/components/schemas/Site' + $ref: "#/components/schemas/Subscription" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_SponsoredChargePointDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_SubscriptionPurchaseDto_: required: - data - meta @@ -10929,10 +16008,10 @@ components: data: type: array items: - $ref: '#/components/schemas/SponsoredChargePoint' + $ref: "#/components/schemas/SubscriptionPurchase" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_SubscriptionDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_TeamDto_: required: - data - meta @@ -10941,10 +16020,10 @@ components: data: type: array items: - $ref: '#/components/schemas/Subscription' + $ref: "#/components/schemas/Team" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_SubscriptionPurchaseDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_TeamMemberDto_: required: - data - meta @@ -10953,10 +16032,10 @@ components: data: type: array items: - $ref: '#/components/schemas/SubscriptionPurchase' + $ref: "#/components/schemas/TeamMember" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_TeamDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_TeamMemberProfileDto_: required: - data - meta @@ -10965,10 +16044,10 @@ components: data: type: array items: - $ref: '#/components/schemas/Team' + $ref: "#/components/schemas/TeamMemberProfile" meta: - $ref: '#/components/schemas/MontaPage.Meta' - MontaPage_TeamMemberDto_: + $ref: "#/components/schemas/MontaPage.Meta" + MontaPage_UserDto_: required: - data - meta @@ -10977,9 +16056,9 @@ components: data: type: array items: - $ref: '#/components/schemas/TeamMemberDto' + $ref: "#/components/schemas/User" meta: - $ref: '#/components/schemas/MontaPage.Meta' + $ref: "#/components/schemas/MontaPage.Meta" MontaPage_WalletDto_: required: - data @@ -10989,9 +16068,9 @@ components: data: type: array items: - $ref: '#/components/schemas/Wallet' + $ref: "#/components/schemas/Wallet" meta: - $ref: '#/components/schemas/MontaPage.Meta' + $ref: "#/components/schemas/MontaPage.Meta" MontaPage_WalletTransactionDto_: required: - data @@ -11001,9 +16080,9 @@ components: data: type: array items: - $ref: '#/components/schemas/WalletTransaction' + $ref: "#/components/schemas/WalletTransaction" meta: - $ref: '#/components/schemas/MontaPage.Meta' + $ref: "#/components/schemas/MontaPage.Meta" MontaPage_WebhookEntryDto_: required: - data @@ -11013,9 +16092,142 @@ components: data: type: array items: - $ref: '#/components/schemas/WebhookEntry' + $ref: "#/components/schemas/WebhookEntry" meta: - $ref: '#/components/schemas/MontaPage.Meta' + $ref: "#/components/schemas/MontaPage.Meta" + NestedTeam: + required: + - access + - createdAt + - parentTeam + - state + - userRole + type: object + properties: + id: + type: integer + description: Id of the nested team relation + format: int64 + example: 1 + parentTeam: + description: "Parent team, the one who sends the invite" + allOf: + - $ref: "#/components/schemas/PublicTeam" + - {} + nestedTeam: + description: "Parent team, the one who receives the invite" + nullable: true + allOf: + - $ref: "#/components/schemas/PublicTeam" + - {} + priceGroup: + description: Price group applied to the nested team + nullable: true + allOf: + - $ref: "#/components/schemas/PriceGroup_1" + - {} + invitedByUser: + description: User who requested the invitation + nullable: true + allOf: + - $ref: "#/components/schemas/PublicUser" + - {} + userRole: + type: string + description: The role assigned to the nested team + example: user + enum: + - user + access: + description: "Access to parent team CPs / sites: to all or selected charge\ + \ points and/or sites" + example: all + allOf: + - $ref: "#/components/schemas/TeamMemberAccess" + - {} + state: + description: State of the nested team invitation + example: accepted + allOf: + - $ref: "#/components/schemas/TeamMemberState" + - {} + selectedChargePointIds: + type: array + description: Selected charge points nested team has access to + nullable: true + example: + - 41 + - 72 + - 93 + items: + type: integer + format: int64 + note: + type: string + description: Internal note for this nested team + nullable: true + example: Internal note placeholder + createdAt: + type: string + description: Datetime of the creation of nested team invite + format: date-time + example: 2022-07-27T18:11:41Z + updatedAt: + type: string + description: Datetime of the update of nested team invite + format: date-time + nullable: true + example: 2022-07-28T18:11:41Z + invitedAt: + type: string + description: Datetime nested team was invited + format: date-time + nullable: true + example: 2022-07-28T18:11:41Z + NestedTeamInvite: + required: + - access + - nestedTeamId + - parentTeamId + - priceGroupId + type: object + properties: + parentTeamId: + type: integer + description: "Id of the parent team, the one who sends the invite" + format: int64 + example: 1 + nestedTeamId: + type: integer + description: "Id of the nested team, the one who receives the invite" + format: int64 + example: 2 + priceGroupId: + type: integer + description: Price group applied to the nested team + format: int64 + example: 3 + access: + description: Is access granted to all or selected charge points and sites + example: all + allOf: + - $ref: "#/components/schemas/TeamMemberAccess" + - {} + selectedChargePointIds: + type: array + description: List of charge point ids nested team access will be assigned + to + nullable: true + items: + type: integer + format: int64 + selectedSiteIds: + type: array + description: List of site ids nested team access will be assigned to + nullable: true + items: + type: integer + format: int64 Operator: required: - identifier @@ -11040,6 +16252,7 @@ components: description: Partner id (owner of this operator) format: int64 nullable: true + example: null vatNumber: type: string description: VAT number @@ -11074,6 +16287,7 @@ components: type: integer description: Currency identifier format: int64 + example: null amount: type: number description: Amount to transfer @@ -11081,13 +16295,17 @@ components: example: 13.77 partnerExternalId: type: string - description: "External Id of this entity, managed by you." + description: "**Note: This has been deprecated and will be null always.**External\ + \ Id of this entity, managed by you." nullable: true example: ACME-12345 + deprecated: true partnerCustomPayload: type: array - description: "Custom JSON payload for this entity, managed by you." + description: "**Note: This has been deprecated and will be null always.**Custom\ + \ JSON payload for this entity, managed by you." nullable: true + deprecated: true items: type: object OperatorRole: @@ -11099,10 +16317,8 @@ components: Page_TariffRecurringPeriodDto_: type: object allOf: - - $ref: '#/components/schemas/Slice_TariffRecurringPeriodDto_' - - required: - - totalSize - properties: + - $ref: "#/components/schemas/Slice_TariffRecurringPeriodDto_" + - properties: totalSize: type: integer format: int64 @@ -11110,21 +16326,29 @@ components: type: integer format: int32 Pageable: + required: + - size + - sort type: object allOf: - - $ref: '#/components/schemas/Sort' - - required: - - size - - sort - properties: + - $ref: "#/components/schemas/Sort" + - properties: number: type: integer format: int32 size: type: integer format: int32 + mode: + $ref: "#/components/schemas/Pageable.Mode" sort: - $ref: '#/components/schemas/Sort' + $ref: "#/components/schemas/Sort" + Pageable.Mode: + type: string + enum: + - CURSOR_NEXT + - CURSOR_PREVIOUS + - OFFSET Pair_String.BigDecimal_: required: - first @@ -11139,15 +16363,16 @@ components: type: object properties: genericPaymentSession: + description: "For Partners who want to start charging from payment terminals,\ + \ kiosks etc. Used to link charge transaction against your billing and\ + \ to allow users retrieving receipts via receipt.monta.com by using date\ + \ and `genericPaymentSession.externalId`or `genericPaymentSession.cardLast4`.

**Note:\ + \ This field is optional, but if provided, you need to provide the full\ + \ data, since it will be overwritten with values from this object.**" nullable: true allOf: - - $ref: '#/components/schemas/GenericPaymentSession' - - description: "For Partners who want to start charging from payment terminals,\ - \ kiosks etc. Used to link charge transaction against your billing and\ - \ to allow users retrieving receipts via receipt.monta.com by using\ - \ date and `genericPaymentSession.externalId`or `genericPaymentSession.cardLast4`.

**Note:\ - \ This field is optional, but if provided, you need to provide the full\ - \ data, since it will be overwritten with values from this object.**" + - $ref: "#/components/schemas/PatchGenericPaymentSession" + - {} partnerExternalId: type: string description: "External Id of this entity, managed by you." @@ -11251,17 +16476,19 @@ components: nullable: true example: 22 visibility: + description: Visibility type of the charge point nullable: true + example: private allOf: - - $ref: '#/components/schemas/VisibilityType' - - description: Visibility type of the charge point - example: private + - $ref: "#/components/schemas/VisibilityType" + - {} type: + description: Electric current type the charge point support nullable: true + example: ac allOf: - - $ref: '#/components/schemas/ElectricCurrentType' - - description: Electric current type the charge point support - example: ac + - $ref: "#/components/schemas/ElectricCurrentType" + - {} active: type: boolean description: Indicates the charge point is active @@ -11281,7 +16508,11 @@ components: type: array description: Ids of the connectors this charge point support nullable: true - example: "[1,2,3,4]" + example: + - 1 + - 2 + - 3 + - 4 items: type: integer format: int64 @@ -11299,10 +16530,85 @@ components: example: ACME-12345 partnerCustomPayload: type: array - description: "Custom JSON payload for this entity, managed by you." + description: "\n Custom JSON payload managed by you.\n
To\ + \ override default values or provide additional metadata.\n Can\ + \ include keys like `custom_roaming_name` and `custom_roaming_evse_id`\ + \ for roaming charge points,\n if so the fields must follow the\ + \ correct format.\n The payload is limited to 1000 characters overall.\ + \ \n " nullable: true + example: |- + { + "custom_property": "additional_value", + "custom_roaming_name": "Roaming_CP", + "custom_roaming_evse_id": "DE*123*E12345", + } items: type: object + PatchGenericPaymentSession: + required: + - externalId + - provider + type: object + properties: + provider: + type: string + description: The provider of the payment session + example: logos + externalId: + type: string + description: The external id of the payment session. Allows retrieving receipts + via receipt.monta.com by using date and `externalId` or `cardLast4`. + example: | + 76BB1FCF-946D-4040-A8F7-8FD6ECDEE5B1 + partnerExternalId: + type: string + description: "External Id of this entity, managed by you." + nullable: true + example: ACME-12345 + cardBrand: + type: string + description: The brand of the card used for the payment session + nullable: true + example: VISA + cardLast4: + type: string + description: The last 4 digits of the card used for the payment session. + Allows retrieving receipts via receipt.monta.com by using date and `externalId` + or `cardLast4`. + nullable: true + example: "1234" + amount: + type: number + description: The amount of the payment session. Negative amounts will be + rejected by the API + format: double + nullable: true + example: 10.1 + PatchNestedTeam: + type: object + properties: + priceGroupId: + type: integer + description: Price group applied to the nested team + format: int64 + nullable: true + example: 1 + note: + maxLength: 255 + type: string + description: "A note (instructions, warning, information) you have entered\ + \ for this nested team member" + nullable: true + example: A note for nested team member + selectedChargePointIds: + type: array + description: List of charge point ids nested team access will be assigned + to + nullable: true + items: + type: integer + format: int64 PatchPriceGroupTag: type: object properties: @@ -11336,17 +16642,19 @@ components: nullable: true example: Monta CPH Site address: + description: "Address of the site, Note: please ensure to always provide\ + \ a valid address" nullable: true allOf: - - $ref: '#/components/schemas/CreatedOrUpdateAddress' - - description: "Address of the site, Note: please ensure to always provide\ - \ a valid address" + - $ref: "#/components/schemas/CreatedOrUpdateAddress" + - {} visibility: + description: Visibility type of the site nullable: true + example: private allOf: - - $ref: '#/components/schemas/VisibilityType_3' - - description: Visibility type of the site - example: private + - $ref: "#/components/schemas/VisibilityType_3" + - {} partnerExternalId: type: string description: "External Id of this entity, managed by you." @@ -11371,11 +16679,12 @@ components: nullable: true example: 1 payoutSchedule: + description: The payout schedule for this sponsored charge point nullable: true + example: "1" allOf: - - $ref: '#/components/schemas/SponsoredChargePointPayoutType' - - description: The payout schedule for this sponsored charge point - example: "1" + - $ref: "#/components/schemas/SponsoredChargePointPayoutType" + - {} payForSubscriptions: type: boolean description: Indicates that company pay for subscriptions @@ -11412,10 +16721,11 @@ components: nullable: true example: contact@monta.com address: + description: Address of the team nullable: true allOf: - - $ref: '#/components/schemas/CreatedOrUpdateAddress' - - description: Address of the team + - $ref: "#/components/schemas/CreatedOrUpdateAddress" + - {} companyName: type: string description: The company name for the team @@ -11444,22 +16754,46 @@ components: type: array description: Ids of the charge points to patch this team member with nullable: true - example: "[1,2,3,4]" + example: + - 1 + - 2 + - 3 + - 4 items: type: integer format: int64 role: + description: Role for this member within the team nullable: true + example: admin allOf: - - $ref: '#/components/schemas/TeamMemberRole' - - description: Role for this member within the team - example: admin + - $ref: "#/components/schemas/TeamMemberRole" + - {} priceGroupId: type: integer description: The price group for this team member format: int64 nullable: true example: 1 + costGroupId: + type: integer + description: The cost group for this team member + format: int64 + nullable: true + example: 1 + teamMemberProfileId: + type: integer + description: The team member profile id to apply to this team member + format: int64 + nullable: true + example: 1 + canConfigureChargePoints: + type: boolean + description: Indicates if the team member access to pay with team wallet + when charging + nullable: true + example: false + default: false canPayWithTeamWallet: type: boolean description: Gives the team member access to pay with team wallet when charging @@ -11489,7 +16823,18 @@ components: teamWalletChargePaymentType: nullable: true allOf: - - $ref: '#/components/schemas/TeamWalletChargePaymentType' + - $ref: "#/components/schemas/TeamWalletChargePaymentType" + canPayForChargesCountryIds: + type: array + description: List of country ids for which the team member can pay for charges + nullable: true + example: + - 1 + - 2 + - 3 + items: + type: integer + format: int32 note: type: string description: A note for the team member @@ -11506,6 +16851,85 @@ components: nullable: true items: type: object + PatchTeamMemberProfile: + type: object + properties: + name: + type: string + description: Name for the team member profile + nullable: true + example: seasonal offer + description: + type: string + description: Description for the team member profile + nullable: true + example: detail description + role: + description: Role for the team member profile + nullable: true + example: admin + allOf: + - $ref: "#/components/schemas/TeamMemberRole" + - {} + priceGroupId: + type: integer + description: The price group for the team member profile + format: int64 + nullable: true + example: 1 + costGroupId: + type: integer + description: The cost group for the team member profile + format: int64 + nullable: true + example: 1 + canPayWithTeamWallet: + type: boolean + description: Gives the team member access to pay with team wallet when charging + nullable: true + example: false + default: false + canManageTeamWallet: + type: boolean + description: Gives the team member access to withdraw and deposit from your + team wallet to your bank account + nullable: true + example: false + default: false + canRequestSponsoring: + type: boolean + description: Allows the team member to request sponsoring from this team + for their charge point + nullable: true + example: false + default: false + canManageTeamMembers: + type: boolean + description: Allows the team member to view and manage other members settings + nullable: true + example: false + default: false + teamWalletChargePaymentType: + nullable: true + allOf: + - $ref: "#/components/schemas/TeamWalletChargePaymentType" + canConfigureChargePoints: + type: boolean + description: Allows the team member profile to configure charge points + nullable: true + example: false + default: false + canPayForChargesCountryIds: + type: array + description: List of country ids for which the team member can pay for charges + nullable: true + example: + - 1 + - 2 + - 3 + items: + type: integer + format: int32 PatchWalletTransaction: type: object properties: @@ -11554,10 +16978,11 @@ components: description: "Id of this terminal. **NOTE: This is a String**" example: payter_123 type: + description: "Type of this terminal, ie \"payter\"" + example: payter allOf: - - $ref: '#/components/schemas/PaymentTerminalType' - - description: "Type of this terminal, ie \"payter\"" - example: payter + - $ref: "#/components/schemas/PaymentTerminalType" + - {} teamId: type: integer description: The team this terminal belongs to @@ -11611,6 +17036,24 @@ components: enum: - payter - other + Performance: + required: + - status + - usagePercentage + type: object + properties: + status: + required: + - "true" + type: string + description: State of the system or charge point + example: operational + usagePercentage: + required: + - "true" + type: number + description: Percentage of time in this state + example: 75 Plan: required: - active @@ -11692,11 +17135,12 @@ components: nullable: true example: support@acme.com applicableFor: + description: Indicates whether this plan can be applied to teams or charge + points. 'operator' value is only used internally. + example: charge-point allOf: - - $ref: '#/components/schemas/PlanApplicableFor' - - description: Indicates whether this plan can be applied to teams or charge - points. 'operator' value is only used internally. - example: charge-point + - $ref: "#/components/schemas/PlanApplicableFor" + - {} active: required: - "true" @@ -11704,11 +17148,12 @@ components: description: Indicates if the plan is active (only active plans can be applied). example: true applicationAudience: + description: "Indicates whether this plan is shown in your (operator's)\ + \ app only, or in the Monta app as well." + example: all allOf: - - $ref: '#/components/schemas/PlanApplicationAudience' - - description: "Indicates whether this plan is shown in your (operator's)\ - \ app only, or in the Monta app as well." - example: all + - $ref: "#/components/schemas/PlanApplicationAudience" + - {} visibleInMarketPlace: required: - "true" @@ -11717,31 +17162,34 @@ components: not. example: true priceModel: + description: Indicates if the price is per charge point or a fixed price. + example: fixed allOf: - - $ref: '#/components/schemas/PlanPriceModel' - - description: Indicates if the price is per charge point or a fixed price. - example: fixed + - $ref: "#/components/schemas/PlanPriceModel" + - {} prices: required: - "true" type: array description: Active plan prices items: - $ref: '#/components/schemas/PlanPrice' + $ref: "#/components/schemas/PlanPrice" pricesWithVat: required: - "true" type: boolean description: Indicates if the prices are incl. VAT or not. Default is `true`. serviceType: + description: "Plan service type, custom or tax-refund" + example: tax-refund allOf: - - $ref: '#/components/schemas/PlanServiceType' - - description: "Service of the Plan, custom or tax-refund" - example: tax-refund + - $ref: "#/components/schemas/PlanServiceType" + - {} serviceConfig: + description: "Additional configuration, based on serviceType" allOf: - - $ref: '#/components/schemas/PlanServiceConfig' - - description: "Additional configuration, based on serviceType" + - $ref: "#/components/schemas/PlanServiceConfig" + - {} PlanApplicableFor: type: string enum: @@ -11753,6 +17201,11 @@ components: enum: - all - own + PlanCustomAdditionalFeeApplicationScope: + type: string + enum: + - all + - paid PlanPrice: required: - currency @@ -11769,9 +17222,10 @@ components: format: double example: 4.99 currency: + description: Currency for `price`. allOf: - - $ref: '#/components/schemas/Currency' - - description: Currency for `price`. + - $ref: "#/components/schemas/Currency_1" + - {} PlanPriceModel: type: string enum: @@ -11780,14 +17234,22 @@ components: PlanServiceConfig: type: object anyOf: - - $ref: '#/components/schemas/PlanServiceConfigCustom' - - $ref: '#/components/schemas/PlanServiceConfigTaxRefund' + - $ref: "#/components/schemas/PlanServiceConfigCustom" + - $ref: "#/components/schemas/PlanServiceConfigTaxRefund" PlanServiceConfigCustom: required: - additionalFeeAbsolute - additionalFeePercentage + - additionalStartingFee type: object properties: + additionalFeeApplicationScope: + description: Type of charges to which custom additional fees are applied + nullable: true + example: all + allOf: + - $ref: "#/components/schemas/PlanCustomAdditionalFeeApplicationScope" + - {} additionalFeePercentage: required: - "true" @@ -11805,6 +17267,43 @@ components: \ operator.Note: This uses the default currency of the operator!" format: double example: 0.5 + additionalStartingFee: + required: + - "true" + type: number + description: "This absolute value will be added as additional fee, once\ + \ per charge session, paid by charge point owner.Will only be applied\ + \ to charge point owned by operator.Note: This uses the default currency\ + \ of the operator!" + format: double + example: 0.5 + roamingAdditionalFeePercentage: + required: + - "false" + type: integer + description: "Same as the additional fee percentage, but only applied to\ + \ roaming sessions." + format: int32 + nullable: true + example: 2 + roamingAdditionalFeeAbsolute: + required: + - "false" + type: number + description: "Same as the additional fee absolute, but only applied to roaming\ + \ sessions." + format: double + nullable: true + example: 0.5 + roamingAdditionalStartingFee: + required: + - "false" + type: number + description: "Same as the additional starting fee, but only applied to roaming\ + \ sessions." + format: double + nullable: true + example: 0.5 PlanServiceConfigTaxRefund: required: - additionalFeeAbsolute @@ -11813,6 +17312,13 @@ components: - priceIncludesVat type: object properties: + additionalFeeApplicationScope: + description: Type of charges to which custom additional fees are applied + nullable: true + example: all + allOf: + - $ref: "#/components/schemas/PlanCustomAdditionalFeeApplicationScope" + - {} additionalFeePercentage: required: - "true" @@ -11840,36 +17346,297 @@ components: priceIncludesVat: required: - "true" - type: boolean - description: Indicates whether the VAT is already included in the price - example: true - PlanServiceType: - type: string - enum: - - custom - - tax-refund - Price: + type: boolean + description: Indicates whether the VAT is already included in the price + example: true + PlanServiceType: + type: string + enum: + - custom + - tax-refund + Price: + required: + - start + type: object + properties: + start: + type: string + description: start + format: date-time + price: + type: number + description: price + nullable: true + PriceGroup: + required: + - appliedTo + - createdAt + - id + - masterPrice + - name + - tariffs + - type + type: object + properties: + id: + minimum: 0 + exclusiveMinimum: true + required: + - "true" + type: integer + description: Id of the price group + format: int64 + example: 522 + name: + required: + - "true" + type: string + description: Name of the price group + example: Public Price Group + default: + type: boolean + type: + description: Type of the price group + example: public + allOf: + - $ref: "#/components/schemas/PriceGroupType" + - {} + masterPrice: + description: The master price + allOf: + - $ref: "#/components/schemas/Pricing" + - {} + tariffs: + required: + - "true" + type: array + description: Tariffs of the price group + nullable: true + items: + $ref: "#/components/schemas/Pricing" + fees: + required: + - "false" + type: array + description: Fees of the price group + nullable: true + items: + $ref: "#/components/schemas/Pricing" + teamMemberCount: + required: + - "false" + type: integer + description: To how many team members the price group has been applied to + format: int32 + nullable: true + chargePointCount: + required: + - "false" + type: integer + description: To how many charge points the price group has been applied + to + format: int32 + nullable: true + appliedTo: + $ref: "#/components/schemas/PriceGroupAppliedTo" + createdAt: + required: + - "true" + type: string + description: When the price group was created + format: date-time + example: 2023-03-16T15:37:23Z + updatedAt: + required: + - "false" + type: string + description: When the price group was updated + format: date-time + nullable: true + example: 2023-03-16T15:37:23Z + PriceGroupAppliedTo: + required: + - chargePoints + - sites + - teamMembers + type: object + properties: + chargePoints: + required: + - "true" + type: array + description: Id's of the ChargePoints this Pricegroup has been applied to + items: + type: integer + format: int64 + sites: + required: + - "true" + type: array + description: Id's of the Sites this Pricegroup has been applied to + items: + type: integer + format: int64 + teamMembers: + required: + - "true" + type: array + description: Id's of the Team Members this Pricegroup has been applied to + items: + type: integer + format: int64 + PriceGroupTag: + required: + - createdAt + - name + type: object + properties: + id: + type: integer + description: The id for this tag. + format: int64 + example: null + name: + type: string + description: The name for this tag. + example: Energy + description: + type: string + description: The description for this tag. + nullable: true + example: Used to group `Energy` pricing elements + partnerExternalId: + type: string + description: "External Id of this entity, managed by you." + nullable: true + example: ACME-12345 + partnerCustomPayload: + type: array + description: "Custom JSON payload for this entity, managed by you." + nullable: true + items: + type: object + operator: + description: The operator to which this resource belongs to. + nullable: true + allOf: + - $ref: "#/components/schemas/Operator" + - {} + createdAt: + type: string + description: Creation date of this resource. + format: date-time + example: 2022-05-12T15:56:45.99Z + updatedAt: + type: string + description: Last update date of this resource. + format: date-time + nullable: true + example: 2022-05-12T16:56:45.99Z + PriceGroupType: + type: string + enum: + - public + - member + - sponsored + - cost + - roaming + - reimbursement + - other + PriceGroup_1: + required: + - name + type: object + properties: + id: + type: integer + description: Id of the price group + format: int64 + example: 1 + name: + type: string + description: Name of the price group + example: Standard Pricing + PriceSpecification: + required: + - specifications + type: object + properties: + specifications: + type: array + description: price specifications + items: + $ref: "#/components/schemas/Pair_String.BigDecimal_" + PricesForecast: + required: + - currency + - forecasts + - operator + - priceGroup + type: object + properties: + operator: + description: The operator to which this charge point and price group belongs + to + allOf: + - $ref: "#/components/schemas/Operator" + - {} + currency: + description: The currency applicable for this forecast + allOf: + - $ref: "#/components/schemas/Currency_17" + - {} + priceGroup: + description: The price group applicable for this forecast + allOf: + - $ref: "#/components/schemas/PriceGroup" + - {} + forecasts: + required: + - "true" + type: array + description: The compilation of entries composing this prices forecast + items: + $ref: "#/components/schemas/PricesForecastEntry" + PricesForecastEntry: required: - - start + - name + - pricePerKwh + - time type: object properties: - start: + time: + required: + - "true" type: string - description: start + description: "The time this forecasted price is applicable, forecast is\ + \ valid from time + 1 Hour" format: date-time - price: - type: number - description: price - nullable: true - PriceGroup: + example: 2023-11-29T18:00:00Z + pricePerKwh: + required: + - "true" + type: integer + description: The projected price per kWh + format: int64 + example: 5978 + name: + required: + - "true" + type: string + description: The human readable name for the forecast (includes the currency + information) + example: 0.60 DKK/kWh + Pricing: required: - - appliedTo - - createdAt + - dynamicPricing + - endAtFullyCharged - id - - masterPrice - - name - - tariffs + - master + - price - type + - updatedAt + - vat type: object properties: id: @@ -11878,468 +17645,513 @@ components: required: - "true" type: integer - description: Id of the price group + description: Id of the pricing format: int64 - example: 522 - name: + example: 1 + description: required: - - "true" + - "false" type: string - description: Name of the price group - example: Public Price Group - default: - type: boolean + description: Name of the pricing. It will be null when it's the master price + nullable: true + example: Starting Fee type: + description: Type of the pricing. `minute` is used for Minute fee. `min` + is used for the master price. + example: min allOf: - - $ref: '#/components/schemas/PriceGroupType' - - description: Type of the price group - example: public - masterPrice: - allOf: - - $ref: '#/components/schemas/Pricing' - - description: The master price - tariffs: + - $ref: "#/components/schemas/PricingType" + - {} + master: required: - "true" - type: array - description: Tariffs of the price group + type: boolean + description: If this is the master price (not a fee) + example: true + dynamicPricing: + required: + - "true" + type: boolean + description: If it's a dynamic price. It will be true if a `tariffId` is + present. + example: false + endAtFullyCharged: + required: + - "true" + type: boolean + description: Used by the Minute fee. True means it will stop charging the + fee when the charge is complete. False means it will stop charging the + fee when the cable is unplugged + example: false + vat: + required: + - "true" + type: boolean + description: "Used by Spot Price. True means it will add % of VAT on top\ + \ the price calculations
*Note*: `vat` rates differ from country to\ + \ country." + example: false + percentage: + type: number + description: Used by Spot Price. It will multiply the fallback price by + this percentage + format: float nullable: true - items: - $ref: '#/components/schemas/Pricing' - fees: + example: 10.2 + tariffId: required: - "false" - type: array - description: Fees of the price group + type: integer + description: The id of the selected Tariff + format: int64 nullable: true - items: - $ref: '#/components/schemas/Pricing' - teamMemberCount: + example: 5 + updatedAt: + required: + - "true" + type: string + description: When the pricing was last updated + format: date-time + example: 2023-03-16T15:37:23Z + applyAfterMinutes: required: - "false" type: integer - description: To how many team members the price group has been applied to + description: "Used by Charging, Minute and Idle Fees. After how many minutes\ + \ the fee should start being applied." format: int32 nullable: true - chargePointCount: + example: 30 + price: + description: The price of this Fee or Master price + allOf: + - $ref: "#/components/schemas/Money" + - {} + priceMin: + description: Used by spot price. The minimum that the raw spot price can + be. This will be used in calculations if spot price is lower than this + nullable: true + allOf: + - $ref: "#/components/schemas/Money" + - {} + priceMax: + description: Used by spot price. The maximum that the raw spot price can + be. This will be used in calculations if spot price is higher than this + nullable: true + allOf: + - $ref: "#/components/schemas/Money" + - {} + feePriceMax: + description: Used by Idle fee. The maximum the user will be charged for + the idle fee + nullable: true + allOf: + - $ref: "#/components/schemas/Money" + - {} + additional: required: - "false" - type: integer - description: To how many charge points the price group has been applied - to - format: int32 + type: array + description: Used by spot price. Additional absolute money or percentages + values to be added on top of the previous calculations nullable: true - appliedTo: - $ref: '#/components/schemas/PriceGroupAppliedTo' - createdAt: + items: + $ref: "#/components/schemas/AdditionalPricing" + from: required: - - "true" + - "false" type: string - description: When the price group was created + description: DateTime "from" time to which this pricing should apply from format: date-time + nullable: true example: 2023-03-16T15:37:23Z - updatedAt: + to: required: - "false" type: string - description: When the price group was updated + description: DateTime "to" time to which this pricing should apply to format: date-time nullable: true example: 2023-03-16T15:37:23Z - PriceGroupAppliedTo: - required: - - chargePoints - - sites - - teamMembers - type: object - properties: - chargePoints: - required: - - "true" - type: array - description: Id's of the ChargePoints this Pricegroup has been applied to - items: - type: integer - format: int64 - sites: - required: - - "true" - type: array - description: Id's of the Sites this Pricegroup has been applied to - items: - type: integer - format: int64 - teamMembers: + tagId: required: - - "true" - type: array - description: Id's of the Team Members this Pricegroup has been applied to - items: - type: integer - format: int64 - PriceGroupTag: + - "false" + type: integer + description: The id of the charge pricing tag for this pricing + format: int64 + nullable: true + example: 109 + PricingType: + type: string + enum: + - kwh + - min + - spot + - tariff + - starting + - charging + - idle + - minute + PublicChargePoint: required: - - createdAt - - name + - chargePointOperatorName + - evseId + - location type: object properties: id: type: integer - description: The id for this tag. + description: Id of this charge point + format: int64 + example: 1 + evseId: + type: string + description: The EVSE id for this charge point + example: DK*MON*E2 + name: + type: string + description: Name of the charge point + nullable: true + example: Monta CPH HQ + chargePointOperatorName: + type: string + description: The charge point operator name + nullable: false + example: Monta + location: + description: Location information for this charge point + allOf: + - $ref: "#/components/schemas/Location" + - {} + maxKw: + type: number + description: Max KW available at this charge point. + format: double + nullable: true + example: 150 + chargePointModelId: + type: integer + description: The ID of the charge point model for this charge point. format: int64 - name: + nullable: true + example: 42 + brandName: type: string - description: The name for this tag. - example: Energy - description: + description: Brand name for this charge point + nullable: true + example: Easee + modelName: type: string - description: The description for this tag. + description: Model name for this charge point nullable: true - example: Used to group `Energy` pricing elements - partnerExternalId: + example: Easee - Home + deletedAt: type: string - description: "External Id of this entity, managed by you." + description: Date this charge point was deleted + format: date-time nullable: true - example: ACME-12345 - partnerCustomPayload: - type: array - description: "Custom JSON payload for this entity, managed by you." + example: 2022-05-12T16:56:45.99Z + PublicTeam: + type: object + properties: + id: + type: integer + description: Id of the public team + format: int64 + example: 1 + publicName: + type: string + description: Public name of the team nullable: true - items: - type: object - operator: + example: Example Team + memberCount: + type: integer + description: Number of members in the team + format: int64 nullable: true - allOf: - - $ref: '#/components/schemas/Operator' - - description: The operator to which this resource belongs to. - createdAt: + example: 10 + PublicUser: + type: object + properties: + id: + type: integer + description: Id of the user + format: int64 + example: 1 + firstName: type: string - description: Creation date of this resource. - format: date-time - example: 2022-05-12T15:56:45.99Z - updatedAt: + description: First name of the user + nullable: true + example: John + lastName: type: string - description: Last update date of this resource. - format: date-time + description: Last name of the user nullable: true - example: 2022-05-12T16:56:45.99Z - PriceGroupType: - type: string - enum: - - public - - member - - sponsored - - cost - - roaming - - reimbursement - - other - PriceSpecification: + example: Doe + displayName: + type: string + description: Display name of the user + nullable: true + example: johndoe123 + PublicUser_1: required: - - specifications + - displayName + - id type: object properties: - specifications: - type: array - description: price specifications - items: - $ref: '#/components/schemas/Pair_String.BigDecimal_' - PricesForecast: + id: + required: + - "true" + type: integer + description: Id of the user + format: int64 + example: 10 + displayName: + required: + - "true" + type: string + description: Formatted name to be displayed + example: John Doe + PublicUser_3: required: - - currency - - forecasts - - operator - - priceGroup + - displayName + - id type: object properties: - operator: - allOf: - - $ref: '#/components/schemas/Operator' - - description: The operator to which this charge point and price group belongs - to - currency: - allOf: - - $ref: '#/components/schemas/Currency' - - description: The currency applicable for this forecast - priceGroup: - allOf: - - $ref: '#/components/schemas/PriceGroup' - - description: The price group applicable for this forecast - forecasts: + id: required: - "true" - type: array - description: The compilation of entries composing this prices forecast - items: - $ref: '#/components/schemas/PricesForecastEntry' - PricesForecastEntry: + type: integer + description: Id of the user + format: int64 + example: 10 + displayName: + required: + - "true" + type: string + description: Formatted name to be displayed + example: John Doe + ReasonDto: required: - - name - - pricePerKwh - - time + - id + - identifier + - priority + - reason + - type type: object properties: - time: + id: + required: + - "true" + type: integer + description: Id of the reason + format: int32 + example: 10 + identifier: required: - "true" type: string - description: "The time this forecasted price is applicable, forecast is\ - \ valid from time + 1 Hour" - format: date-time - example: 2023-11-29T18:00:00Z - pricePerKwh: + description: Identifier of the reason + reason: required: - "true" - type: integer - description: The projected price per kWh - format: int64 - example: 5978 - name: + type: string + description: Reason of the report + type: required: - "true" type: string - description: The human readable name for the forecast (includes the currency - information) - example: 0.60 DKK/kWh - Pricing: + description: Type of the report + priority: + required: + - "true" + type: string + description: Priority of the report + ReportDto: required: - - dynamicPricing - - endAtFullyCharged + - createdAt - id - - master - - price - - type - - updatedAt - - vat + - imageUrls + - operatorId + - relationId + - relationType + - state type: object properties: id: - minimum: 0 - exclusiveMinimum: true required: - "true" type: integer - description: Id of the pricing + description: Id of the report format: int64 - example: 1 - description: + example: 10 + reportedByUserId: required: - "false" - type: string - description: Name of the pricing. It will be null when it's the master price + type: integer + description: Id of the user who reported + format: int64 nullable: true - example: Starting Fee - type: - allOf: - - $ref: '#/components/schemas/PricingType' - - description: Type of the pricing. `minute` is used for Minute fee. `min` - is used for the master price. - example: min - master: + example: 10 + operatorId: required: - "true" - type: boolean - description: If this is the master price (not a fee) - example: true - dynamicPricing: + type: integer + description: Id of the operator related to the report + format: int64 + example: 10 + relationType: required: - "true" - type: boolean - description: If it's a dynamic price. It will be true if a `tariffId` is - present. - example: false - endAtFullyCharged: + type: string + description: Type of the relation + relationId: required: - "true" - type: boolean - description: Used by the Minute fee. True means it will stop charging the - fee when the charge is complete. False means it will stop charging the - fee when the cable is unplugged - example: false - vat: + type: integer + description: Id of the relation + format: int64 + example: 10 + body: + required: + - "false" + type: string + description: Body of the report + nullable: true + example: available but can not start + state: required: - "true" - type: boolean - description: "Used by Spot Price. True means it will add % of VAT on top\ - \ the price calculations
*Note*: `vat` rates differ from country to\ - \ country." - example: false - percentage: + type: string + description: State of the report + reason: + description: Reason of the report + nullable: true + allOf: + - $ref: "#/components/schemas/ReasonDto" + - {} + source: required: - "false" - type: number - description: Used by Spot Price. It will multiply the fallback price by - this percentage - format: float + type: string + description: Source of the report nullable: true - example: 10.2 - default: 100 - tariffId: + imageUrls: + required: + - "true" + type: array + description: List of image URLs + example: + - https://monta.imgix.net/reports/example-image-1.png + - https://monta.imgix.net/reports/example-image-2.png + items: + type: string + assignedToOperatorId: required: - "false" type: integer - description: The id of the selected Tariff + description: Id of the operator assigned to the report format: int64 nullable: true - example: 5 - updatedAt: - required: - - "true" - type: string - description: When the pricing was last updated - format: date-time - example: 2023-03-16T15:37:23Z - applyAfterMinutes: + example: 10 + assignedToUserId: required: - "false" type: integer - description: "Used by Charging, Minute and Idle Fees. After how many minutes\ - \ the fee should start being applied." - format: int32 - nullable: true - example: 30 - price: - allOf: - - $ref: '#/components/schemas/Money' - - description: The price of this Fee or Master price - priceMin: + description: Id of the user assigned to the report + format: int64 nullable: true - allOf: - - $ref: '#/components/schemas/Money' - - description: Used by spot price. The minimum that the raw spot price can - be. This will be used in calculations if spot price is lower than this - priceMax: + example: 10 + resolvedByUserId: + required: + - "false" + type: integer + description: Id of the user who resolved the report + format: int64 nullable: true - allOf: - - $ref: '#/components/schemas/Money' - - description: Used by spot price. The maximum that the raw spot price can - be. This will be used in calculations if spot price is higher than this - feePriceMax: + example: 10 + operatorNote: + required: + - "false" + type: string + description: Note from the operator nullable: true - allOf: - - $ref: '#/components/schemas/Money' - - description: Used by Idle fee. The maximum the user will be charged for - the idle fee - additional: + example: The charge point is not working + adminNote: required: - "false" - type: array - description: Used by spot price. Additional absolute money or percentages - values to be added on top of the previous calculations + type: string + description: Note from the admin nullable: true - items: - $ref: '#/components/schemas/AdditionalPricing' - from: + example: The charge point is not working + userNote: required: - "false" type: string - description: DateTime "from" time to which this pricing should apply from - format: date-time + description: Note from the user nullable: true - example: 2023-03-16T15:37:23Z - to: + example: The charge point is not working + resolvedAt: required: - "false" type: string - description: DateTime "to" time to which this pricing should apply to + description: Time when the report was resolved format: date-time nullable: true - example: 2023-03-16T15:37:23Z - tagId: + example: 2023-02-06T11:00:00Z + escalatedAt: required: - "false" - type: integer - description: The id of the charge pricing tag for this pricing - format: int64 - nullable: true - example: 109 - PricingType: - type: string - enum: - - kwh - - min - - spot - - tariff - - starting - - charging - - idle - - minute - PublicChargePoint: - required: - - chargePointOperatorName - - evseId - - location - type: object - properties: - id: - type: integer - description: Id of this charge point - format: int64 - example: 1 - evseId: - type: string - description: The EVSE id for this charge point - example: DK*MON*E2 - name: type: string - description: Name of the charge point + description: Time when the report was escalated + format: date-time nullable: true - example: Monta CPH HQ - chargePointOperatorName: + example: 2023-02-06T10:00:00Z + assignedAt: + required: + - "false" type: string - description: The charge point operator name - nullable: false - example: Monta - location: - allOf: - - $ref: '#/components/schemas/Location' - - description: Location information for this charge point - maxKw: - type: number - description: Max KW available at this charge point. - format: double - nullable: true - example: 150 - chargePointModelId: - type: integer - description: The ID of the charge point model for this charge point. - format: int64 + description: Time when the report was assigned + format: date-time nullable: true - example: 42 - brandName: + example: 2023-02-06T09:00:00Z + createdAt: + required: + - "true" type: string - description: Brand name for this charge point - nullable: true - example: Easee - modelName: + description: Time when the report was created + format: date-time + example: 2023-02-06T08:00:00Z + updatedAt: + required: + - "false" type: string - description: Model name for this charge point + description: Time when the report was updated + format: date-time nullable: true - example: Easee - Home + example: 2023-02-06T11:00:00Z deletedAt: + required: + - "false" type: string - description: Date this charge point was deleted + description: Time when the report was deleted format: date-time nullable: true - example: 2022-05-12T16:56:45.99Z - PublicUser: - required: - - displayName - - id + example: 2023-02-06T12:00:00Z + SimCard: type: object properties: - id: - required: - - "true" - type: integer - description: Id of the user - format: int64 - example: 10 - displayName: - required: - - "true" + imsi: type: string - description: Formatted name to be displayed - example: John Doe + description: imsi (International Mobile Subscriber Identity) for the SIM + card + nullable: true + example: "310150123456789" + iccid: + type: string + description: iccid (Integrated Circuit Card Identifier) for the SIM card + nullable: true + example: "8931501234567890123" SimpleTeamMemberDto: required: - id @@ -12411,10 +18223,11 @@ components: description: Name of the site example: Monta CPH HQ operator: + description: Operator of this charging site nullable: true allOf: - - $ref: '#/components/schemas/Operator' - - description: Operator of this charging site + - $ref: "#/components/schemas/Operator" + - {} createdAt: type: string description: Creation date of this charging site @@ -12482,15 +18295,16 @@ components: nullable: true example: In order to access this site enter 0000 as code at the gate. location: + description: Location information for this site allOf: - - $ref: '#/components/schemas/Location' - - description: Location information for this site + - $ref: "#/components/schemas/Location" + - {} connectors: type: array description: "List of supported connector types at this site (e.g. type-2,\ \ ccs, ...)" items: - $ref: '#/components/schemas/ChargePointConnector' + $ref: "#/components/schemas/ChargePointConnector" Slice_TariffRecurringPeriodDto_: required: - content @@ -12500,9 +18314,9 @@ components: content: type: array items: - $ref: '#/components/schemas/TariffRecurringPeriod' + $ref: "#/components/schemas/TariffRecurringPeriod" pageable: - $ref: '#/components/schemas/Pageable' + $ref: "#/components/schemas/Pageable" pageNumber: type: integer format: int32 @@ -12525,7 +18339,7 @@ components: orderBy: type: array items: - $ref: '#/components/schemas/Sort.Order' + $ref: "#/components/schemas/Sort.Order" Sort.Order: required: - direction @@ -12536,7 +18350,7 @@ components: ignoreCase: type: boolean direction: - $ref: '#/components/schemas/Sort.Order.Direction' + $ref: "#/components/schemas/Sort.Order.Direction" property: type: string ascending: @@ -12579,23 +18393,26 @@ components: format: int64 example: 1 payout: + description: The payout frequency for this sponsored charge point + example: realtime allOf: - - $ref: '#/components/schemas/SponsoredChargePointPayoutType' - - description: The payout frequency for this sponsored charge point - example: realtime + - $ref: "#/components/schemas/SponsoredChargePointPayoutType" + - {} payForSubscriptions: type: boolean description: Indicates the company pays for the subscriptions example: true operator: + description: Operator of this sponsored charge point nullable: true allOf: - - $ref: '#/components/schemas/Operator' - - description: Operator of this sponsored charge point + - $ref: "#/components/schemas/Operator" + - {} chargePoint: + description: The charge point being sponsored allOf: - - $ref: '#/components/schemas/SponsoredChargePointData' - - description: The charge point being sponsored + - $ref: "#/components/schemas/SponsoredChargePointData" + - {} acceptedAt: type: string description: Date the sponsorshi was accepted @@ -12636,19 +18453,22 @@ components: nullable: true example: Monta CPH HQ user: + description: The user (owner) of this charge point nullable: true allOf: - - $ref: '#/components/schemas/PublicUser' - - description: The user (owner) of this charge point + - $ref: "#/components/schemas/PublicUser_1" + - {} sponsoredPriceGroup: + description: The sponsored price group of this charge point nullable: true allOf: - - $ref: '#/components/schemas/PriceGroup' - - description: The sponsored price group of this charge point + - $ref: "#/components/schemas/PriceGroup" + - {} location: + description: Location information for this charge point allOf: - - $ref: '#/components/schemas/Location' - - description: Location information for this charge point + - $ref: "#/components/schemas/Location" + - {} serialNumber: type: string description: Serial number for this charge point @@ -12725,10 +18545,11 @@ components: type: object properties: type: + description: The type of this metadata entry + example: spot-price-additional-percentage-metadata allOf: - - $ref: '#/components/schemas/ComponentMetadataTypeDto' - - description: The type of this metadata entry - example: spot-price-additional-percentage-metadata + - $ref: "#/components/schemas/ComponentMetadataTypeDto" + - {} price: type: integer description: The additional price on top of the spot price metadata entry @@ -12749,10 +18570,11 @@ components: type: object properties: type: + description: The type of this metadata entry + example: spot-price-additional-price-metadata allOf: - - $ref: '#/components/schemas/ComponentMetadataTypeDto' - - description: The type of this metadata entry - example: spot-price-additional-price-metadata + - $ref: "#/components/schemas/ComponentMetadataTypeDto" + - {} kwh: required: - "true" @@ -12772,10 +18594,11 @@ components: type: object properties: type: + description: The type of this metadata entry + example: spot-price-metadata allOf: - - $ref: '#/components/schemas/ComponentMetadataTypeDto' - - description: The type of this metadata entry - example: spot-price-metadata + - $ref: "#/components/schemas/ComponentMetadataTypeDto" + - {} kwh: type: number description: The kwh for this metadata entry @@ -12817,6 +18640,7 @@ components: \ with `socLimit`, in this case the first limit to hit will stop the charge" format: double nullable: true + example: 20 socLimit: maximum: 100 minimum: 1 @@ -12826,6 +18650,16 @@ components: \ with `kwhLimit`, in this case the first limit to hit will stop the charge" format: double nullable: true + example: null + priceLimit: + minimum: 1 + type: number + description: "The charge price limit, meaning the charge will stop once\ + \ the price limit is reached.
*Note*: `priceLimit` will be in the\ + \ currency of the charge point." + format: double + nullable: true + example: 12.5 priceGroupId: minimum: 0 exclusiveMinimum: true @@ -12836,16 +18670,19 @@ components: nullable: true example: 42 genericPaymentSession: + description: "For Partners who want to start charging from payment terminals,\ + \ kiosks etc. Used to link charge transaction against your billing and\ + \ to allow users retrieving receipts via receipt.monta.com by using date\ + \ and `genericPaymentSession.externalId`or `genericPaymentSession.cardLast4`." nullable: true allOf: - - $ref: '#/components/schemas/GenericPaymentSession' - - description: "For Partners who want to start charging from payment terminals,\ - \ kiosks etc. Used to link charge transaction against your billing and\ - \ to allow users retrieving receipts via receipt.monta.com by using\ - \ date and `genericPaymentSession.externalId`or `genericPaymentSession.cardLast4`." + - $ref: "#/components/schemas/GenericPaymentSession" + - {} partnerExternalId: type: string - description: "External Id of this entity, managed by you." + description: "External Id of this entity, managed by you.
*Note*: How\ + \ this field is used is up to the partner, but we highly recommend using\ + \ a unique `partnerExternalId` for each `charge`." nullable: true example: ACME-12345 partnerCustomPayload: @@ -12871,6 +18708,32 @@ components: enum: - charge-point - vehicle + States: + required: + - duration + - percentage + - state + type: object + properties: + state: + required: + - "true" + type: string + description: State of the system or charge point + example: operational + percentage: + required: + - "true" + type: number + description: Percentage of the time spent in this state + example: 75 + duration: + required: + - "true" + type: integer + description: Duration in this state (in seconds) + format: int64 + example: 3600 Subscription: required: - createdAt @@ -12885,10 +18748,11 @@ components: format: int64 example: 1 state: + description: State of the subscription + example: active allOf: - - $ref: '#/components/schemas/SubscriptionState' - - description: State of the subscription - example: active + - $ref: "#/components/schemas/SubscriptionState" + - {} nextPurchaseAt: type: string description: Date of next purchase @@ -12948,21 +18812,23 @@ components: format: int64 example: 1 customerType: + description: Customer type + example: charge-point allOf: - - $ref: '#/components/schemas/SubscriptionCustomerType' - - description: Customer type - example: charge-point + - $ref: "#/components/schemas/SubscriptionCustomerType" + - {} planId: type: integer description: Plan id format: int64 example: 42 serviceConfig: + description: "Subscription configuration, based on the plans serviceType.Currently\ + \ you can configure tax-refund subscriptions only." nullable: true allOf: - - $ref: '#/components/schemas/SubscriptionServiceConfig' - - description: "Subscription configuration, based on the plans serviceType.Currently\ - \ you can configure tax-refund subscriptions only." + - $ref: "#/components/schemas/SubscriptionServiceConfig" + - {} createdAt: type: string description: Subscription creation date @@ -12983,13 +18849,19 @@ components: format: date-time nullable: true example: 2023-05-12T15:56:45.99Z + SubscriptionCustomAdditionalFeeApplicationScope: + type: string + enum: + - all + - paid SubscriptionCustomerType: type: string + description: Enumerate the various subscription customer types enum: - - team - - charge-point - - operator - - other + - TEAM + - CHARGE_POINT + - OPERATOR + - OTHER SubscriptionPurchase: required: - createdAt @@ -13009,10 +18881,11 @@ components: nullable: true example: "1" type: + description: The type of this subscription purchase + example: period allOf: - - $ref: '#/components/schemas/SubscriptionPurchaseTypeDto' - - description: The type of this subscription purchase - example: period + - $ref: "#/components/schemas/SubscriptionPurchaseTypeDto" + - {} discountPercentage: type: number description: The discount percentage applied to this purchase @@ -13039,13 +18912,15 @@ components: format: double example: 25 currency: + description: The currency for this purchase allOf: - - $ref: '#/components/schemas/Currency' - - description: The currency for this purchase + - $ref: "#/components/schemas/Currency_3" + - {} subscription: + description: The subscription this purchase refers to allOf: - - $ref: '#/components/schemas/Subscription' - - description: The subscription this purchase refers to + - $ref: "#/components/schemas/Subscription" + - {} createdAt: type: string description: Creation date of this subscription purchase @@ -13073,7 +18948,84 @@ components: SubscriptionServiceConfig: type: object anyOf: - - $ref: '#/components/schemas/SubscriptionServiceConfigTaxRefund' + - $ref: "#/components/schemas/SubscriptionServiceConfigTaxRefund" + - $ref: "#/components/schemas/SubscriptionServiceConfigCustom" + SubscriptionServiceConfigCustom: + required: + - additionalFeeAbsolute + - additionalFeePercentage + - additionalStartingFee + - serviceType + - subscriptionAdditionalFeeApplicationScope + type: object + properties: + serviceType: + description: "Plan service type, custom or tax-refund" + example: custom + allOf: + - $ref: "#/components/schemas/PlanServiceType" + - {} + subscriptionAdditionalFeeApplicationScope: + description: Amount to pay out per kWh + nullable: true + example: "1.29" + allOf: + - $ref: "#/components/schemas/SubscriptionCustomAdditionalFeeApplicationScope" + - {} + additionalFeePercentage: + required: + - "true" + type: integer + description: "This percentage will be added as additional fee, paid by charge\ + \ point owner.Will only be applied to charge point owned by operator." + format: int32 + example: 2 + additionalFeeAbsolute: + required: + - "true" + type: number + description: "This absolute value will be added as additional fee, paid\ + \ by charge point owner.Will only be applied to charge point owned by\ + \ operator.Note: This uses the default currency of the operator!" + format: double + example: 0.5 + additionalStartingFee: + required: + - "true" + type: number + description: "This absolute value will be added as additional fee, once\ + \ per charge session, paid by charge point owner.Will only be applied\ + \ to charge point owned by operator.Note: This uses the default currency\ + \ of the operator!" + format: double + example: 0.5 + roamingAdditionalFeePercentage: + required: + - "false" + type: integer + description: "Same as the additional fee percentage, but only applied to\ + \ roaming sessions." + format: int32 + nullable: true + example: 2 + roamingAdditionalFeeAbsolute: + required: + - "false" + type: number + description: "Same as the additional fee absolute, but only applied to roaming\ + \ sessions." + format: double + nullable: true + example: 0.5 + roamingAdditionalStartingFee: + required: + - "false" + type: number + description: "Same as the additional starting fee, but only applied to roaming\ + \ sessions." + format: double + nullable: true + example: 0.5 SubscriptionServiceConfigTaxRefund: required: - payoutPerKwh @@ -13082,10 +19034,11 @@ components: type: object properties: serviceType: + description: "Plan service type, custom or tax-refund" + example: tax-refund allOf: - - $ref: '#/components/schemas/PlanServiceType' - - description: "Service of the Plan, custom or tax-refund" - example: tax-refund + - $ref: "#/components/schemas/PlanServiceType" + - {} payoutPerKwh: required: - "true" @@ -13113,10 +19066,11 @@ components: type: object properties: type: + description: The type of this metadata entry + example: tariff-metadata allOf: - - $ref: '#/components/schemas/ComponentMetadataTypeDto' - - description: The type of this metadata entry - example: tariff-metadata + - $ref: "#/components/schemas/ComponentMetadataTypeDto" + - {} tariffId: type: integer description: The tariff id for this metadata entry @@ -13220,14 +19174,17 @@ components: zipCodes: type: array description: Zip codes of the tariff - example: "[5610, 5960]" + example: + - 5610 + - 5960 items: type: string tariffType: + description: Type of the tariff + example: WEEKLY allOf: - - $ref: '#/components/schemas/TariffType' - - description: Type of the tariff - example: WEEKLY + - $ref: "#/components/schemas/TariffType" + - {} active: type: boolean description: Indicates if the Tariff is active or not @@ -13241,11 +19198,12 @@ components: description: Area of the tariff example: Jylland customerType: + description: Customer type of the tariff nullable: true + example: B_HIGH allOf: - - $ref: '#/components/schemas/TariffCustomerType' - - description: Customer type of the tariff - example: B_HIGH + - $ref: "#/components/schemas/TariffCustomerType" + - {} createdAt: type: string description: Creation date of the tariff @@ -13283,6 +19241,45 @@ components: type: integer description: tariff id format: int64 + TariffPeriodGroup_1: + required: + - activeFrom + - activeTo + - description + type: object + properties: + activeFrom: + type: string + description: tariff period group active from date + format: date + activeTo: + type: string + description: tariff period group active to date + format: date + description: + type: string + description: tariff period group description + tariffId: + type: integer + description: tariff id + format: int64 + TariffPeriodGroup_2: + type: object + properties: + activeFrom: + type: string + description: tariff period group active from date + format: date + nullable: true + activeTo: + type: string + description: tariff period group active to date + format: date + nullable: true + description: + type: string + description: tariff period group description + nullable: true TariffRecurringPeriod: required: - dayOfWeek @@ -13298,14 +19295,16 @@ components: description: id of the tariff format: int64 dayOfWeek: + description: day of the period allOf: - - $ref: '#/components/schemas/DayOfWeek' - - description: day of the period + - $ref: "#/components/schemas/DayOfWeek" + - {} endDayOfWeek: + description: End day of the period nullable: true allOf: - - $ref: '#/components/schemas/DayOfWeek' - - description: End day of the period + - $ref: "#/components/schemas/DayOfWeek" + - {} start: type: integer description: starting hour of the period @@ -13342,17 +19341,18 @@ components: format: int64 example: 1 dayOfWeek: + description: Capitalized name of the day of the week + example: MONDAY allOf: - - $ref: '#/components/schemas/DayOfWeek' - - description: Capitalized name of the day of the week - example: MONDAY + - $ref: "#/components/schemas/DayOfWeek" + - {} endDayOfWeek: + description: Capitalized name of the day of the week that the price is for nullable: true + example: FRIDAY allOf: - - $ref: '#/components/schemas/DayOfWeek' - - description: Capitalized name of the day of the week that the price is - for - example: FRIDAY + - $ref: "#/components/schemas/DayOfWeek" + - {} startHour: required: - "true" @@ -13377,17 +19377,19 @@ components: type: object properties: dayOfWeek: + description: Capitalized name of the day of the week nullable: true + example: MONDAY allOf: - - $ref: '#/components/schemas/DayOfWeek' - - description: Capitalized name of the day of the week - example: MONDAY + - $ref: "#/components/schemas/DayOfWeek" + - {} endDayOfWeek: + description: Capitalized name of the end day of the week nullable: true + example: FRIDAY allOf: - - $ref: '#/components/schemas/DayOfWeek' - - description: Capitalized name of the end day of the week - example: FRIDAY + - $ref: "#/components/schemas/DayOfWeek" + - {} startHour: required: - "false" @@ -13432,9 +19434,15 @@ components: format: double example: 13.77 type: + description: The type of this metadata allOf: - - $ref: '#/components/schemas/MetadataTypeDto' - - description: The type of this metadata + - $ref: "#/components/schemas/MetadataTypeDto" + - {} + chargeId: + type: integer + description: The reference to chargeId for the tax refund + format: int64 + nullable: true Team: required: - address @@ -13486,18 +19494,21 @@ components: nullable: true example: DE123456789 operator: + description: The operator to this team is associated nullable: true allOf: - - $ref: '#/components/schemas/Operator' - - description: The operator to this team is associated + - $ref: "#/components/schemas/Operator" + - {} address: + description: The address where the team is located allOf: - - $ref: '#/components/schemas/TeamDto.TeamAddressDto' - - description: The address where the team is located + - $ref: "#/components/schemas/TeamDto.TeamAddressDto" + - {} currency: + description: The currency assigned for this team allOf: - - $ref: '#/components/schemas/Currency' - - description: The currency assigned for this team + - $ref: "#/components/schemas/Currency_7" + - {} type: type: string description: Type of the team @@ -13506,6 +19517,12 @@ components: - private - professional - operator + category: + description: Category of the team + nullable: true + allOf: + - $ref: "#/components/schemas/TeamDto.TeamCategoryDto" + - {} operatorId: type: integer description: "Deprecated (will be removed by 01.04.24), use `operator` field\ @@ -13520,6 +19537,21 @@ components: description: Id of the user that owns this team format: int64 example: 1 + isFrozen: + type: boolean + description: Whether the team is frozen or not + example: false + frozenReason: + type: string + description: Team freezing reason + nullable: true + example: removed team + frozenAt: + type: string + description: Frozen date of this team + format: date-time + nullable: true + example: 2022-05-12T16:56:45.99Z blockedAt: type: string description: Blocked date of this team @@ -13554,7 +19586,7 @@ components: type: string description: Second line of address nullable: true - example: København + example: København address3: type: string description: Third line of address @@ -13575,20 +19607,24 @@ components: description: The address country format: int64 example: 1 - TeamMemberAccess: - type: string - description: "definitions: \n* `all` - Indicates the team member has access\ - \ all the team's charge points. \n* `selected` - Indicates the team member\ - \ has only access to the selected charge points. \n* `other` - Fallback value,\ - \ Indicates a new type was added but is not mapped/unknown on this API yet.\ - \ \n" - enum: - - all - - selected - - other - TeamMemberDto: + TeamDto.TeamCategoryDto: + required: + - identifier + - name + type: object + properties: + identifier: + type: string + description: Category Identifier + example: cpo + name: + type: string + description: Category name + example: Charge Point Operator + TeamMember: required: - access + - canPayForChargesCountryIds - chargePointIds - id - role @@ -13599,9 +19635,10 @@ components: id: required: - "true" - type: string + type: integer description: Id of the team member - example: "1" + format: int64 + example: 1 teamId: type: integer description: Team id of team member @@ -13614,10 +19651,11 @@ components: nullable: true example: Casper Rasmussen operator: + description: Operator of this team member nullable: true allOf: - - $ref: '#/components/schemas/Operator' - - description: Operator of this team member + - $ref: "#/components/schemas/Operator" + - {} partnerExternalTeamId: type: string description: The partner external id for the team @@ -13631,21 +19669,24 @@ components: nullable: true example: 1 role: + description: Role of the this member within the team + example: admin allOf: - - $ref: '#/components/schemas/TeamMemberRole' - - description: Role of the this member within the team - example: admin + - $ref: "#/components/schemas/TeamMemberRole" + - {} access: + description: Indicates if the user has access to all charge points or only + to selected charge points + example: all allOf: - - $ref: '#/components/schemas/TeamMemberAccess' - - description: Indicates if the user has access to all charge points or - only to selected charge points - example: all + - $ref: "#/components/schemas/TeamMemberAccess_1" + - {} state: + description: State of the invitation + example: accepted allOf: - - $ref: '#/components/schemas/TeamMemberState' - - description: State of the invitation - example: accepted + - $ref: "#/components/schemas/TeamMemberState_1" + - {} note: type: string description: Note for team member @@ -13701,6 +19742,24 @@ components: format: int64 nullable: true example: 1 + costGroupId: + type: integer + description: The cost group for this team member + format: int64 + nullable: true + example: 1 + teamMemberProfileId: + type: integer + description: The team member profile id to apply to this team member + format: int64 + nullable: true + example: 1 + canConfigureChargePoints: + type: boolean + description: Indicates if the team member access to pay with team wallet + when charging + example: false + default: false canPayWithTeamWallet: type: boolean description: Indicates if the team member access to pay with team wallet @@ -13725,8 +19784,18 @@ components: settings example: false default: false + canPayForChargesCountryIds: + type: array + description: List of country ids for which the team member can pay for charges + example: + - 1 + - 2 + - 3 + items: + type: integer + format: int32 teamWalletChargePaymentType: - $ref: '#/components/schemas/TeamWalletChargePaymentType' + $ref: "#/components/schemas/TeamWalletChargePaymentType" partnerExternalId: type: string description: "External Id of this entity, managed by you." @@ -13738,6 +19807,136 @@ components: nullable: true items: type: object + TeamMemberAccess: + type: string + enum: + - all + - selected + TeamMemberAccess_1: + type: string + description: "definitions: \n* `all` - Indicates the team member has access\ + \ all the team's charge points. \n* `selected` - Indicates the team member\ + \ has only access to the selected charge points. \n* `other` - Fallback value,\ + \ Indicates a new type was added but is not mapped/unknown on this API yet.\ + \ \n" + enum: + - all + - selected + - other + TeamMemberProfile: + required: + - id + - name + - role + - teamWalletChargePaymentType + type: object + properties: + id: + required: + - "true" + type: integer + description: Id of the team member profile + format: int64 + example: 1 + teamId: + type: integer + description: Team id of team member profile + format: int64 + example: 42 + name: + type: string + description: The team member profile name + example: Example profile 1 + description: + type: string + description: The team member profile description + nullable: true + example: description + role: + description: Role of the this team member profile + example: admin + allOf: + - $ref: "#/components/schemas/TeamMemberRole" + - {} + priceGroupId: + type: integer + description: The price group for this team member profile + format: int64 + nullable: true + example: 1 + costGroupId: + type: integer + description: The cost group for this team member profile + format: int64 + nullable: true + example: 1 + canPayWithTeamWallet: + type: boolean + description: Indicates if the team member profile access to pay with team + wallet when charging + example: false + default: false + canManageTeamWallet: + type: boolean + description: Indicates if team member profile has access to withdraw and + deposit from your team wallet to your bank account + example: false + default: false + canRequestSponsoring: + type: boolean + description: Indicates if the team member profile is allowed to request + sponsoring from this team for their charge point + example: false + default: false + canManageTeamMembers: + type: boolean + description: Indicates that the team member profile can view and manage + other members settings + example: false + default: false + canConfigureChargePoints: + type: boolean + description: Indicates that the team member profile can configure charge + points + example: false + default: false + teamWalletChargePaymentType: + $ref: "#/components/schemas/TeamWalletChargePaymentType" + canPayForChargesCountryIds: + type: array + description: List of country ids for which the team member can pay for charges + nullable: true + example: + - 1 + - 2 + - 3 + items: + type: integer + format: int32 + operator: + description: Operator of this team member + nullable: true + allOf: + - $ref: "#/components/schemas/Operator" + - {} + createdAt: + type: string + description: Date the team member profile was created + format: date-time + nullable: true + example: 2022-05-12T15:56:45.99Z + updatedAt: + type: string + description: Date the team member profile was updated + format: date-time + nullable: true + example: 2022-05-12T16:56:45.99Z + deletedAt: + type: string + description: Date the team member profile was deleted + format: date-time + nullable: true + example: 2022-05-12T16:56:45.99Z TeamMemberRole: type: string enum: @@ -13745,6 +19944,25 @@ components: - user - other TeamMemberState: + type: string + enum: + - requested + - invited + - accepted + - rejected_at + - blocked + - expired + TeamMemberState_1: + type: string + enum: + - requested + - invited + - rejected + - accepted + - blocked + - expired + - other + TeamMemberState_3: type: string enum: - requested @@ -13757,8 +19975,8 @@ components: TeamOrOperator: type: object anyOf: - - $ref: '#/components/schemas/Operator' - - $ref: '#/components/schemas/PayingTeam' + - $ref: "#/components/schemas/Operator" + - $ref: "#/components/schemas/PayingTeam" TeamType.Creatable: type: string enum: @@ -13775,6 +19993,26 @@ components: - all - none default: none + TimePeriod: + required: + - dailyPerformance + - date + type: object + properties: + date: + required: + - "true" + type: string + description: Date for the statistics + format: date-time + example: 2024-03-30T00:00:00Z + dailyPerformance: + required: + - "true" + type: array + description: Performance metrics for the day + items: + $ref: "#/components/schemas/Performance" Token: required: - accessToken @@ -13876,15 +20114,18 @@ components: type: array description: Zip codes where this tariff is applicable nullable: true - example: "[\"2200\", \"2100\"]" + example: + - "2200" + - "2100" items: type: string tariffType: + description: Dynamic or weekly nullable: true + example: WEEKLY allOf: - - $ref: '#/components/schemas/TariffType' - - description: Dynamic or weekly - example: WEEKLY + - $ref: "#/components/schemas/TariffType" + - {} active: required: - "true" @@ -13904,13 +20145,117 @@ components: description: Human description of the area the tariff is active in example: Fyn customerType: + description: What kind of customer types are the tariff for? + nullable: true + example: c_customer + allOf: + - $ref: "#/components/schemas/TariffCustomerType" + - {} + UpdateTeamStateDto: + type: object + properties: + reason: + type: string + description: Team freezing reason + nullable: true + example: removed team + User: + required: + - id + type: object + properties: + id: + required: + - "true" + type: integer + description: Id of the user + format: int64 + example: 10 + firstName: + required: + - "false" + type: string + description: First name of the user + nullable: true + example: John + lastName: + required: + - "false" + type: string + description: Last name of the user + nullable: true + example: Doe + email: + required: + - "false" + type: string + description: Email of the user + nullable: true + example: john.doe@example.com + phone: + required: + - "false" + type: string + description: Phone number of the user + nullable: true + example: "+1234567890" + profileImageUrl: + required: + - "false" + type: string + description: URL of the profile image + nullable: true + example: https://example.com/profile.jpg + address: + description: Address of the user nullable: true allOf: - - $ref: '#/components/schemas/TariffCustomerType' - - description: What kind of customer types are the tariff for? - example: c_customer + - $ref: "#/components/schemas/Address" + - {} + language: + required: + - "false" + type: string + description: Preferred language of the user + nullable: true + example: en + termsReadAt: + required: + - "false" + type: string + description: Timestamp when the user read the terms + format: date-time + nullable: true + example: 2023-06-21T15:03:14Z + createdAt: + required: + - "false" + type: string + description: Timestamp when the user was created + format: date-time + nullable: true + example: 2023-06-21T15:03:14Z + updatedAt: + required: + - "false" + type: string + description: Timestamp when the user was last updated + format: date-time + nullable: true + example: 2023-06-21T15:03:14Z + deletedAt: + required: + - "false" + type: string + description: Timestamp when the user was deleted + format: date-time + nullable: true + example: 2023-06-21T15:03:14Z VisibilityType: type: string + description: "definitions: \n* `private` - Indicates the charge point access\ + \ is private, only available to users from operator umbrella. \n* `public`\ + \ - Indicates the charge point access is public. \n" enum: - private - public @@ -13953,10 +20298,11 @@ components: description: CountryId of this wallet. format: int64 balance: + description: "Balance of this wallet, if available (not in list endpoints)." nullable: true allOf: - - $ref: '#/components/schemas/WalletDto.BalanceDto' - - description: "Balance of this wallet, if available (not in list endpoints)." + - $ref: "#/components/schemas/WalletDto.BalanceDto" + - {} WalletDto.BalanceDto: type: object properties: @@ -14001,20 +20347,22 @@ components: format: double example: 2.75 fromCurrency: + description: Currency for `fromAmount`. allOf: - - $ref: '#/components/schemas/Currency' - - description: Currency for `fromAmount`. + - $ref: "#/components/schemas/Currency_13" + - {} fromType: type: string description: "Type of sender: operator, team" nullable: true example: team from: + description: "Type of sender: operator, team" nullable: true + example: team allOf: - - $ref: '#/components/schemas/TeamOrOperator' - - description: "Type of sender: operator, team" - example: team + - $ref: "#/components/schemas/TeamOrOperator" + - {} fromWalletId: required: - "false" @@ -14040,20 +20388,22 @@ components: format: double example: 2.75 toCurrency: + description: Currency used for `toAmount`. allOf: - - $ref: '#/components/schemas/Currency' - - description: Currency used for `toAmount`. + - $ref: "#/components/schemas/Currency_14" + - {} toType: type: string description: "Type of receiver: operator, team" nullable: true example: operator to: + description: "Type of sender: operator, team" nullable: true + example: team allOf: - - $ref: '#/components/schemas/TeamOrOperator' - - description: "Type of sender: operator, team" - example: team + - $ref: "#/components/schemas/TeamOrOperator" + - {} toWalletId: required: - "false" @@ -14081,23 +20431,32 @@ components: format: date-time nullable: true example: 2022-04-22T09:47:05Z + completedAt: + required: + - "false" + type: string + description: Completion date of transaction + format: date-time + nullable: true + example: 2022-04-22T09:47:05Z referenceId: type: string description: Reference id of this transaction. e.g the charge id nullable: true example: referenceId referenceType: + description: Reference type of this transaction. nullable: true + example: CHARGE allOf: - - $ref: '#/components/schemas/WalletTransactionReferenceType' - - description: Reference type of this transaction. - example: CHARGE + - $ref: "#/components/schemas/WalletTransactionReferenceType" + - {} group: + description: Transaction group of this transaction + example: withdraw allOf: - - $ref: '#/components/schemas/WalletTransactionGroup' + - $ref: "#/components/schemas/WalletTransactionGroup" - type: string - description: Transaction group of this transaction - example: withdraw kind: type: string description: "\n Kind of this transaction, ie 'charge-sponsored'.\n\ @@ -14110,11 +20469,11 @@ components: format: double example: 25 state: + description: Transaction state of this transaction + example: complete allOf: - - $ref: '#/components/schemas/WalletTransactionState' + - $ref: "#/components/schemas/WalletTransactionState" - type: string - description: Transaction state of this transaction - example: complete note: type: string description: A note that has been entered for this transaction. @@ -14122,20 +20481,25 @@ components: example: Test transaction. partnerExternalId: type: string - description: "External Id of this entity, managed by you." + description: "**Note: This has been deprecated and will be null always.**External\ + \ Id of this entity, managed by you." nullable: true example: ACME-12345 + deprecated: true partnerCustomPayload: type: array - description: "Custom JSON payload for this entity, managed by you." + description: "**Note: This has been deprecated and will be null always.**Custom\ + \ JSON payload for this entity, managed by you." nullable: true + deprecated: true items: type: object metadata: + description: Additional information for this transaction nullable: true allOf: - - $ref: '#/components/schemas/MetadataDto' - - description: Additional information for this transaction + - $ref: "#/components/schemas/MetadataDto" + - {} WalletTransactionGroup: type: string enum: @@ -14177,13 +20541,14 @@ components: - other WebhookConfig: required: + - eventTypes - webhookSecret - webhookUrl type: object properties: webhookUrl: maxLength: 191 - pattern: https://.* + pattern: https://(?!(.*monta\.com?)).* required: - "true" type: string @@ -14200,13 +20565,14 @@ components: eventTypes: maxItems: 512 required: - - "false" + - "true" type: array - description: "A list of event type to subscribe to. Use [\"*\"] to subscribe\ - \ to all." - example: "[\"charges\", \"team-members\"]" + description: A list of event types to subscribe to. + example: + - charges + - team-members items: - $ref: '#/components/schemas/WebhookEntry.EventType' + $ref: "#/components/schemas/WebhookEntry.EventType" WebhookEntry: required: - createdAt @@ -14231,28 +20597,34 @@ components: format: int64 example: 1 eventType: + description: "\n Type of event this entry belongs to.\n \ + \ Note: This is not the type of the entity (payload.EntityType),\ + \ but the type of the event that you can subscribe to.\n " + example: charge-points allOf: - - $ref: '#/components/schemas/WebhookEntry.EventType' - - description: "\n Type of event this entry belongs to.\n \ - \ Note: This is not the type of the entity (payload.EntityType),\ - \ but the type of the event that you can subscribe to.\n " - example: charge-points + - $ref: "#/components/schemas/WebhookEntry.EventType" + - {} payload: + description: payload of this entry + example: "See [Charge](/reference/get-charge) payload" allOf: - - $ref: '#/components/schemas/WebhookEntryPayload' - - description: payload of this entry - example: "See [Charge](/reference/get-charge) payload" + - $ref: "#/components/schemas/WebhookEntryPayload" + - {} status: + description: Status of the entry + example: completed allOf: - - $ref: '#/components/schemas/WebhookEntry.Status' - - description: Status of the entry - example: completed + - $ref: "#/components/schemas/WebhookEntry.Status" + - {} error: + description: Contains the error message if the delivery failed nullable: true + example: + errorCode: "500" + errorMessage: "Bad Gateway: The server is unreachable at this time." allOf: - - $ref: '#/components/schemas/WebhookEntryErrorPayload' - - description: Contains the error message if the delivery failed - example: TBD + - $ref: "#/components/schemas/WebhookEntryErrorPayload" + - {} createdAt: type: string description: Creation date of this entry @@ -14267,10 +20639,10 @@ components: WebhookEntry.EventType: type: string enum: - - '*' - charges - charge-points - sites + - users - team-members - teams - installer-jobs @@ -14278,6 +20650,8 @@ components: - price-groups - subscriptions - plans + - charge-auth-tokens + - reports WebhookEntry.Status: type: string enum: @@ -14313,24 +20687,34 @@ components: type: object properties: entityType: + description: Type of the entity + example: charge allOf: - - $ref: '#/components/schemas/WebhookEntryPayload.EntityType' - - description: Type of the entity - example: charge + - $ref: "#/components/schemas/WebhookEntryPayload.EntityType" + - {} entityId: type: string description: Id of the entity example: "42" eventType: + description: Type of the event + example: updated allOf: - - $ref: '#/components/schemas/KafkaEventType' - - description: Type of the event - example: updated + - $ref: "#/components/schemas/KafkaEventType" + - {} + eventTime: + type: string + description: The timestamp indicating when the event was generated + format: date-time + nullable: true + example: 2024-10-22T16:56:45.999Z payload: type: array description: "payload of this entity, e.g. a full Charge object" nullable: true - example: "{ \"id\": \"42\", \"amount\": 1000 }}" + example: + - id: "42" + amount: 1000 items: type: object WebhookEntryPayload.EntityType: @@ -14339,6 +20723,7 @@ components: - charge - charge-point - site + - user - team - team-member - installer-job @@ -14346,7 +20731,10 @@ components: - price-group - subscription - plan + - charge-auth-token + - report securitySchemes: BearerAccessToken: type: http - scheme: bearer \ No newline at end of file + scheme: bearer +x-stability-level: stable diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargeAuthTokens/ChargeAuthToken.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargeAuthTokens/ChargeAuthToken.verified.cs index bd3770c8..83cea5a3 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargeAuthTokens/ChargeAuthToken.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargeAuthTokens/ChargeAuthToken.verified.cs @@ -54,6 +54,9 @@ public class ChargeAuthToken /// public string? Name { get; set; } + /// + /// Operator of this charge auth token. + /// public Operator? Operator { get; set; } /// diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargeAuthTokens/CreateChargeAuthToken.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargeAuthTokens/CreateChargeAuthToken.verified.cs index e60f320b..fd5aca7e 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargeAuthTokens/CreateChargeAuthToken.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargeAuthTokens/CreateChargeAuthToken.verified.cs @@ -33,6 +33,9 @@ public class CreateChargeAuthToken [RegularExpression("^(?!VID:)[\\s\\S]*")] public string Identifier { get; set; } + /// + /// Type of the charge auth token. + /// [Required] public ChargeAuthenticationType Type { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointIntegrations/ChargePointIntegration.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointIntegrations/ChargePointIntegration.verified.cs index cf8613de..663b1e20 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointIntegrations/ChargePointIntegration.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointIntegrations/ChargePointIntegration.verified.cs @@ -17,6 +17,9 @@ public class ChargePointIntegration /// public long Id { get; set; } + /// + /// The current state of the charge point integration. + /// [Required] public ChargePointIntegrationStateDto State { get; set; } @@ -37,6 +40,9 @@ public class ChargePointIntegration /// public int? ConnectorId { get; set; } + /// + /// The charge point associated to this integration. + /// [Required] public ChargePoint ChargePoint { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointModels/ChargePointModel.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointModels/ChargePointModel.verified.cs index f69530d9..c11cab51 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointModels/ChargePointModel.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointModels/ChargePointModel.verified.cs @@ -29,6 +29,9 @@ public class ChargePointModel [Required] public string Name { get; set; } + /// + /// The brand of the charge point model. + /// [Required] public ChargePointModelDtoChargePointBrandDto Brand { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointStatistics/ChargePointStatisticsDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointStatistics/ChargePointStatisticsDto.verified.cs new file mode 100644 index 00000000..acfc1785 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointStatistics/ChargePointStatisticsDto.verified.cs @@ -0,0 +1,68 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.ChargePointStatistics; + +/// +/// ChargePointStatisticsDto. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class ChargePointStatisticsDto +{ + /// + /// Start date of the statistics period. + /// + [Required] + public DateTimeOffset FromDate { get; set; } + + /// + /// End date of the statistics period. + /// + [Required] + public DateTimeOffset ToDate { get; set; } + + /// + /// Total energy consumed during the period (in kWh). + /// + [Required] + public double TotalEnergyConsumed { get; set; } + + /// + /// Total number of charging sessions during the period. + /// + [Required] + public int TotalSessions { get; set; } + + /// + /// Success rate of charging sessions during the period (as a percentage). + /// + [Required] + public double SessionSuccessRate { get; set; } + + /// + /// Percentage of uptime for the system during the period. + /// + public double? SystemUptimePercentage { get; set; } + + /// + /// Detailed state for the period. + /// + public List States { get; set; } = new List(); + + /// + /// Daily statistics for the period. + /// + public List Days { get; set; } = new List(); + + /// + /// Monthly statistics for the period. + /// + public List Months { get; set; } = new List(); + + /// + public override string ToString() + => $"{nameof(FromDate)}: ({FromDate}), {nameof(ToDate)}: ({ToDate}), {nameof(TotalEnergyConsumed)}: {TotalEnergyConsumed}, {nameof(TotalSessions)}: {TotalSessions}, {nameof(SessionSuccessRate)}: {SessionSuccessRate}, {nameof(SystemUptimePercentage)}: {SystemUptimePercentage}, {nameof(States)}.Count: {States?.Count ?? 0}, {nameof(Days)}.Count: {Days?.Count ?? 0}, {nameof(Months)}.Count: {Months?.Count ?? 0}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointStatistics/Performance.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointStatistics/Performance.verified.cs new file mode 100644 index 00000000..97c4818e --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointStatistics/Performance.verified.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.ChargePointStatistics; + +/// +/// Performance. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class Performance +{ + /// + /// State of the system or charge point. + /// + [Required] + public string Status { get; set; } + + /// + /// Percentage of time in this state. + /// + [Required] + public double UsagePercentage { get; set; } + + /// + public override string ToString() + => $"{nameof(Status)}: {Status}, {nameof(UsagePercentage)}: {UsagePercentage}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointStatistics/RequestParameters/GetChargePointStatisticsParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointStatistics/RequestParameters/GetChargePointStatisticsParameters.verified.cs new file mode 100644 index 00000000..034adbdc --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointStatistics/RequestParameters/GetChargePointStatisticsParameters.verified.cs @@ -0,0 +1,32 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.ChargePointStatistics; + +/// +/// Parameters for operation request. +/// Description: Retrieve statistics related to a charge point. +/// Operation: GetChargePointStatistics. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetChargePointStatisticsParameters +{ + [Required] + [Range(0, 2147483647)] + public long ChargePointId { get; set; } + + [Required] + [RegularExpression("\\d{4}-\\d{2}-\\d{2}")] + public DateTimeOffset FromDate { get; set; } + + [Required] + [RegularExpression("\\d{4}-\\d{2}-\\d{2}")] + public DateTimeOffset ToDate { get; set; } + + /// + public override string ToString() + => $"{nameof(ChargePointId)}: {ChargePointId}, {nameof(FromDate)}: ({FromDate}), {nameof(ToDate)}: ({ToDate})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointStatistics/RequestParameters/GetSiteStatisticsParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointStatistics/RequestParameters/GetSiteStatisticsParameters.verified.cs new file mode 100644 index 00000000..ef21177d --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointStatistics/RequestParameters/GetSiteStatisticsParameters.verified.cs @@ -0,0 +1,32 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.ChargePointStatistics; + +/// +/// Parameters for operation request. +/// Description: Retrieve statistics related to a site. +/// Operation: GetSiteStatistics. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetSiteStatisticsParameters +{ + [Required] + [Range(0, 2147483647)] + public long SiteId { get; set; } + + [Required] + [RegularExpression("\\d{4}-\\d{2}-\\d{2}")] + public DateTimeOffset FromDate { get; set; } + + [Required] + [RegularExpression("\\d{4}-\\d{2}-\\d{2}")] + public DateTimeOffset ToDate { get; set; } + + /// + public override string ToString() + => $"{nameof(SiteId)}: {SiteId}, {nameof(FromDate)}: ({FromDate}), {nameof(ToDate)}: ({ToDate})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointStatistics/States.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointStatistics/States.verified.cs new file mode 100644 index 00000000..7d347456 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointStatistics/States.verified.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.ChargePointStatistics; + +/// +/// States. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class States +{ + /// + /// State of the system or charge point. + /// + [Required] + public string State { get; set; } + + /// + /// Percentage of the time spent in this state. + /// + [Required] + public double Percentage { get; set; } + + /// + /// Duration in this state (in seconds). + /// + [Required] + public long Duration { get; set; } + + /// + public override string ToString() + => $"{nameof(State)}: {State}, {nameof(Percentage)}: {Percentage}, {nameof(Duration)}: {Duration}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointStatistics/TimePeriod.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointStatistics/TimePeriod.verified.cs new file mode 100644 index 00000000..277889d5 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePointStatistics/TimePeriod.verified.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.ChargePointStatistics; + +/// +/// TimePeriod. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class TimePeriod +{ + /// + /// Date for the statistics. + /// + [Required] + public DateTimeOffset Date { get; set; } + + /// + /// Performance metrics for the day. + /// + [Required] + public List DailyPerformance { get; set; } + + /// + public override string ToString() + => $"{nameof(Date)}: ({Date}), {nameof(DailyPerformance)}.Count: {DailyPerformance?.Count ?? 0}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/ChargePointOcppLog.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/ChargePointOcppLog.verified.cs new file mode 100644 index 00000000..53a9e298 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/ChargePointOcppLog.verified.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.ChargePoints; + +/// +/// ChargePointOcppLog. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class ChargePointOcppLog +{ + /// + /// Timestamp of the OCPP log. + /// + [Required] + public DateTimeOffset Timestamp { get; set; } + + /// + /// Message content of the OCPP log, can be a string or an array of mixed types. + /// + [Required] + public string Message { get; set; } + + /// + public override string ToString() + => $"{nameof(Timestamp)}: ({Timestamp}), {nameof(Message)}: {Message}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/CreateChargePoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/CreateChargePoint.verified.cs index c93eeb9c..3ee25d28 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/CreateChargePoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/CreateChargePoint.verified.cs @@ -46,9 +46,15 @@ public class CreateChargePoint [Required] public double MaxKw { get; set; } + /// + /// Visibility type of the charge point. + /// [Required] public VisibilityType Visibility { get; set; } + /// + /// Electric current type the charge point support. + /// [Required] public ElectricCurrentType Type { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/MapResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/MapResult.verified.cs index 710ae8e8..4664281c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/MapResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/MapResult.verified.cs @@ -12,12 +12,21 @@ namespace Monta.ApiClient.Generated.Contracts.ChargePoints; [GeneratedCode("ApiGenerator", "x.x.x.x")] public class MapResult { + /// + /// list of all charge points found in that area. + /// [Required] public List ChargePoints { get; set; } + /// + /// list of all sites found in that area. + /// [Required] public List Sites { get; set; } + /// + /// list of all clusters (of charge points and sites) found in that area. + /// [Required] public List Cluster { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/MapResultChargePoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/MapResultChargePoint.verified.cs index a00725a3..196b1079 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/MapResultChargePoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/MapResultChargePoint.verified.cs @@ -53,6 +53,9 @@ public class MapResultChargePoint /// public string? State { get; set; } + /// + /// Location information for this charge point. + /// [Required] public Location Location { get; set; } @@ -62,6 +65,9 @@ public class MapResultChargePoint [Required] public List Connectors { get; set; } + /// + /// Deeplinks to open charge screen in Monta app or web. + /// [Required] public ChargePointDeeplinks Deeplinks { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/MapResultCluster.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/MapResultCluster.verified.cs index 6136723f..52619e88 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/MapResultCluster.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/MapResultCluster.verified.cs @@ -12,6 +12,9 @@ namespace Monta.ApiClient.Generated.Contracts.ChargePoints; [GeneratedCode("ApiGenerator", "x.x.x.x")] public class MapResultCluster { + /// + /// Coordinates of the cluster. + /// [Required] public Coordinates Coordinates { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/MapResultSite.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/MapResultSite.verified.cs index 53869087..24b12bfd 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/MapResultSite.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/MapResultSite.verified.cs @@ -49,6 +49,9 @@ public class MapResultSite /// public string? Note { get; set; } + /// + /// Location information for this site. + /// [Required] public Location Location { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/MontaPageChargePointOcppLogDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/MontaPageChargePointOcppLogDto.verified.cs new file mode 100644 index 00000000..ece6e7ca --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/MontaPageChargePointOcppLogDto.verified.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.ChargePoints; + +/// +/// MontaPageChargePointOcppLogDto. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class MontaPageChargePointOcppLogDto +{ + [Required] + public List Data { get; set; } + + [Required] + public MontaPageMeta Meta { get; set; } + + /// + public override string ToString() + => $"{nameof(Data)}.Count: {Data?.Count ?? 0}, {nameof(Meta)}: ({Meta})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/PatchChargePoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/PatchChargePoint.verified.cs index aff50a69..e0d5854d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/PatchChargePoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/PatchChargePoint.verified.cs @@ -29,8 +29,14 @@ public class PatchChargePoint /// public double? MaxKw { get; set; } + /// + /// Visibility type of the charge point. + /// public VisibilityType? Visibility { get; set; } + /// + /// Electric current type the charge point support. + /// [Required] public ElectricCurrentType? Type { get; set; } @@ -62,7 +68,12 @@ public class PatchChargePoint public string? PartnerExternalId { get; set; } /// - /// Custom JSON payload for this entity, managed by you. + /// Custom JSON payload managed by you. + /// <br />To override default values or provide additional metadata. + /// Can include keys like `custom_roaming_name` and `custom_roaming_evse_id` for roaming charge points, + /// if so the fields must follow the correct format. + /// The payload is limited to 1000 characters overall. + /// . /// public List? PartnerCustomPayload { get; set; } = new List(); diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/RequestParameters/GetChargePointOcppLogsParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/RequestParameters/GetChargePointOcppLogsParameters.verified.cs new file mode 100644 index 00000000..81852c37 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/RequestParameters/GetChargePointOcppLogsParameters.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.ChargePoints; + +/// +/// Parameters for operation request. +/// Description: Retrieve charge point OCPP logs. +/// Operation: GetChargePointOcppLogs. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetChargePointOcppLogsParameters +{ + /// + /// page number to retrieve (starts with 0). + /// + public int Page { get; set; } = 0; + + /// + /// number of items per page (between 1 and 100, default 10). + /// + public int PerPage { get; set; } = 10; + + [Required] + public long ChargePointId { get; set; } + + public DateTimeOffset? FromDate { get; set; } + + public DateTimeOffset? ToDate { get; set; } + + /// + public override string ToString() + => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}, {nameof(ChargePointId)}: {ChargePointId}, {nameof(FromDate)}: ({FromDate}), {nameof(ToDate)}: ({ToDate})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/RequestParameters/GetChargePointsParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/RequestParameters/GetChargePointsParameters.verified.cs index 0cdeadea..91e56695 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/RequestParameters/GetChargePointsParameters.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/RequestParameters/GetChargePointsParameters.verified.cs @@ -33,11 +33,17 @@ public class GetChargePointsParameters [RegularExpression("^(-?\\d*\\.\\d+|\\d+\\.\\d*)(,)(-?\\d*\\.\\d+|\\d+\\.\\d*)$")] public string? SortByLocation { get; set; } - public bool? IncludeDeleted { get; set; } + public string? BoundingBox { get; set; } + + public long? OperatorId { get; set; } + + public bool IncludeDeleted { get; set; } = false; + + public bool IncludePublic { get; set; } = false; public ChargePointState? State { get; set; } /// public override string ToString() - => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}, {nameof(SiteId)}: {SiteId}, {nameof(TeamId)}: {TeamId}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(SortByLocation)}: {SortByLocation}, {nameof(IncludeDeleted)}: {IncludeDeleted}, {nameof(State)}: ({State})"; + => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}, {nameof(SiteId)}: {SiteId}, {nameof(TeamId)}: {TeamId}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(SortByLocation)}: {SortByLocation}, {nameof(BoundingBox)}: {BoundingBox}, {nameof(OperatorId)}: {OperatorId}, {nameof(IncludeDeleted)}: {IncludeDeleted}, {nameof(IncludePublic)}: {IncludePublic}, {nameof(State)}: ({State})"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/RequestParameters/RebootChargePointParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/RequestParameters/RebootChargePointParameters.verified.cs new file mode 100644 index 00000000..ca468ed0 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/RequestParameters/RebootChargePointParameters.verified.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.ChargePoints; + +/// +/// Parameters for operation request. +/// Description: Reboot an existing charge point. +/// Operation: RebootChargePoint. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class RebootChargePointParameters +{ + [Required] + public long ChargePointId { get; set; } + + /// + public override string ToString() + => $"{nameof(ChargePointId)}: {ChargePointId}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/RequestParameters/UnlockChargePointParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/RequestParameters/UnlockChargePointParameters.verified.cs new file mode 100644 index 00000000..3f37e4e2 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/ChargePoints/RequestParameters/UnlockChargePointParameters.verified.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.ChargePoints; + +/// +/// Parameters for operation request. +/// Description: Unlock an existing charge point. +/// Operation: UnlockChargePoint. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class UnlockChargePointParameters +{ + [Required] + public long ChargePointId { get; set; } + + /// + public override string ToString() + => $"{nameof(ChargePointId)}: {ChargePointId}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/BreakdownSummary.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/BreakdownSummary.verified.cs index cd2eef0d..a6928234 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/BreakdownSummary.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/BreakdownSummary.verified.cs @@ -42,7 +42,12 @@ public class BreakdownSummary [Required] public long TotalPrice { get; set; } + /// + /// Total discount applied for the given charge. + /// + public long? TotalDiscount { get; set; } + /// public override string ToString() - => $"{nameof(TotalMasterPrice)}: {TotalMasterPrice}, {nameof(TotalSecondaryPrice)}: {TotalSecondaryPrice}, {nameof(TotalFees)}: {TotalFees}, {nameof(TotalAdjustments)}: {TotalAdjustments}, {nameof(TotalPrice)}: {TotalPrice}"; + => $"{nameof(TotalMasterPrice)}: {TotalMasterPrice}, {nameof(TotalSecondaryPrice)}: {TotalSecondaryPrice}, {nameof(TotalFees)}: {TotalFees}, {nameof(TotalAdjustments)}: {TotalAdjustments}, {nameof(TotalPrice)}: {TotalPrice}, {nameof(TotalDiscount)}: {TotalDiscount}"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/Charge.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/Charge.verified.cs index fc14b0d2..dffa823c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/Charge.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/Charge.verified.cs @@ -17,11 +17,20 @@ public class Charge /// public long Id { get; set; } + /// + /// User that performed the charge. + /// [Required] - public PublicUser User { get; set; } + public PublicUser3 User { get; set; } + /// + /// Team that performed the charge, if part of the charge points' team. + /// public SimpleTeamMemberDto? TeamMember { get; set; } + /// + /// Type of the charge. + /// [Required] public ChargeType Type { get; set; } @@ -30,6 +39,9 @@ public class Charge /// public long ChargePointId { get; set; } + /// + /// The public information about the charge point related to this charge. + /// [Required] public PublicChargePoint PublicChargePoint { get; set; } @@ -106,6 +118,9 @@ public class Charge /// public DateTimeOffset? CompletedAt { get; set; } + /// + /// State of the charge. + /// [Required] public ChargeStateDto State { get; set; } @@ -185,16 +200,34 @@ public class Charge /// public string? Note { get; set; } - public Currency? Currency { get; set; } + /// + /// Currency used for payment. + /// + public Currency11? Currency { get; set; } + /// + /// Team who paid for this charge. + /// public PayingTeam? PayingTeam { get; set; } + /// + /// Team who sponsored this charge. + /// public SponsorTeam? SponsorTeam { get; set; } + /// + /// Operator this of this charge. + /// public Operator? Operator { get; set; } + /// + /// The object used to authenticate a charge. + /// public ChargeAuthentication? ChargeAuth { get; set; } + /// + /// Information about the state of charge if available. + /// public StateOfCharge? Soc { get; set; } /// @@ -202,6 +235,9 @@ public class Charge /// public double? SocLimit { get; set; } + /// + /// Generic payment session for this charge. If provided, the charge was paid with this payment session. + /// public GenericPaymentSession? GenericPaymentSession { get; set; } /// diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/ChargeBreakdown.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/ChargeBreakdown.verified.cs index 530d76c5..a742fb0b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/ChargeBreakdown.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/ChargeBreakdown.verified.cs @@ -18,9 +18,15 @@ public class ChargeBreakdown [Required] public long ChargeId { get; set; } + /// + /// The price breakdown, Includes information necessary to understand the composition of the final charge price. + /// [Required] public DetailedBreakdown PriceBreakdown { get; set; } + /// + /// The cost breakdown is similar to the price breakdown but focuses on the costs incurred for the given charge. + /// [Required] public DetailedBreakdown CostBreakdown { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/ChargesInsight.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/ChargesInsight.verified.cs index 65637d8a..84871cd9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/ChargesInsight.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/ChargesInsight.verified.cs @@ -12,6 +12,9 @@ namespace Monta.ApiClient.Generated.Contracts.Charges; [GeneratedCode("ApiGenerator", "x.x.x.x")] public class ChargesInsight { + /// + /// The type of charge insight. + /// [Required] public ChargesInsightTypeDto Type { get; set; } @@ -33,11 +36,17 @@ public class ChargesInsight [Required] public string Title { get; set; } + /// + /// The operator to which this charge insight belongs to. + /// [Required] public Operator Operator { get; set; } + /// + /// The currency applicable for this charge insight. + /// [Required] - public Currency Currency { get; set; } + public Currency5 Currency { get; set; } /// /// The compilation of insights entries composing this charge insight. diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/ChargesInsightEntry.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/ChargesInsightEntry.verified.cs index a4444f7f..ad93a40c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/ChargesInsightEntry.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/ChargesInsightEntry.verified.cs @@ -12,9 +12,15 @@ namespace Monta.ApiClient.Generated.Contracts.Charges; [GeneratedCode("ApiGenerator", "x.x.x.x")] public class ChargesInsightEntry { + /// + /// The type for this insight entry. + /// [Required] public ChargesInsightEntryTypeDto Type { get; set; } + /// + /// The summary for this insight entry, The summary contains the compiled statistics for the entry. + /// [Required] public ChargesInsightSummary Summary { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/Component.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/Component.verified.cs index bf6e7f29..80275866 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/Component.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/Component.verified.cs @@ -12,6 +12,9 @@ namespace Monta.ApiClient.Generated.Contracts.Charges; [GeneratedCode("ApiGenerator", "x.x.x.x")] public class Component { + /// + /// The type of price/fee for this component. + /// [Required] public ComponentTypeDto Type { get; set; } @@ -33,8 +36,14 @@ public class Component [Required] public bool MasterPricing { get; set; } + /// + /// The tag for this component. + /// public PriceGroupTag? Tag { get; set; } + /// + /// Additional information (metadata) for this component, e.g tariffId, kwh and others. + /// public ComponentMetadataDto? Metadata { get; set; } /// diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Currencies/CurrencyDto4.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/Currency11.verified.cs similarity index 59% rename from test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Currencies/CurrencyDto4.verified.cs rename to test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/Currency11.verified.cs index 5662ff61..ba1fff75 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Currencies/CurrencyDto4.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/Currency11.verified.cs @@ -4,29 +4,25 @@ // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. //------------------------------------------------------------------------------ -namespace Monta.ApiClient.Generated.Contracts.Currencies; +namespace Monta.ApiClient.Generated.Contracts.Charges; /// -/// CurrencyDto4. +/// Currency11. /// [GeneratedCode("ApiGenerator", "x.x.x.x")] -public class CurrencyDto4 +public class Currency11 { /// - /// id of the currency. + /// Currency identifier, e.g. dkk. /// - [Range(0, int.MaxValue)] - public long? Id { get; set; } - - /// - /// Currency identifier, e.g. DKK. - /// - public string? Identifier { get; set; } + [Required] + public string Identifier { get; set; } /// /// Readable name of currency. /// - public string? Name { get; set; } + [Required] + public string Name { get; set; } /// /// Number of decimals for this currency. @@ -35,5 +31,5 @@ public class CurrencyDto4 /// public override string ToString() - => $"{nameof(Id)}: {Id}, {nameof(Identifier)}: {Identifier}, {nameof(Name)}: {Name}, {nameof(Decimals)}: {Decimals}"; + => $"{nameof(Identifier)}: {Identifier}, {nameof(Name)}: {Name}, {nameof(Decimals)}: {Decimals}"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/Currency5.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/Currency5.verified.cs new file mode 100644 index 00000000..05b7b473 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/Currency5.verified.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Charges; + +/// +/// Currency5. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class Currency5 +{ + /// + /// Currency identifier, e.g. dkk. + /// + [Required] + public string Identifier { get; set; } + + /// + /// Readable name of currency. + /// + [Required] + public string Name { get; set; } + + /// + /// Number of decimals for this currency. + /// + public int Decimals { get; set; } + + /// + public override string ToString() + => $"{nameof(Identifier)}: {Identifier}, {nameof(Name)}: {Name}, {nameof(Decimals)}: {Decimals}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/Currency9.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/Currency9.verified.cs new file mode 100644 index 00000000..6e687b65 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/Currency9.verified.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Charges; + +/// +/// Currency9. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class Currency9 +{ + /// + /// Currency identifier, e.g. dkk. + /// + [Required] + public string Identifier { get; set; } + + /// + /// Readable name of currency. + /// + [Required] + public string Name { get; set; } + + /// + /// Number of decimals for this currency. + /// + public int Decimals { get; set; } + + /// + public override string ToString() + => $"{nameof(Identifier)}: {Identifier}, {nameof(Name)}: {Name}, {nameof(Decimals)}: {Decimals}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/DetailedBreakdown.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/DetailedBreakdown.verified.cs index 58165751..419f58f0 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/DetailedBreakdown.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/DetailedBreakdown.verified.cs @@ -12,11 +12,17 @@ namespace Monta.ApiClient.Generated.Contracts.Charges; [GeneratedCode("ApiGenerator", "x.x.x.x")] public class DetailedBreakdown { + /// + /// The summary of the total prices for this breakdown. + /// [Required] public BreakdownSummary Summary { get; set; } + /// + /// The currency applicable for this breakdown (for all the components: prices, fees, adjustments). + /// [Required] - public Currency Currency { get; set; } + public Currency9 Currency { get; set; } /// /// The breakdown entries for this breakdown, currently organized on an hourly basis. diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/GenericPaymentSession.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/GenericPaymentSession.verified.cs index 59a26e79..73f96f5f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/GenericPaymentSession.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/GenericPaymentSession.verified.cs @@ -39,7 +39,12 @@ public class GenericPaymentSession /// public string? CardLast4 { get; set; } + /// + /// The amount of the payment session. Negative amounts will be rejected by the API. + /// + public double? Amount { get; set; } + /// public override string ToString() - => $"{nameof(Provider)}: {Provider}, {nameof(ExternalId)}: {ExternalId}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(CardBrand)}: {CardBrand}, {nameof(CardLast4)}: {CardLast4}"; + => $"{nameof(Provider)}: {Provider}, {nameof(ExternalId)}: {ExternalId}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(CardBrand)}: {CardBrand}, {nameof(CardLast4)}: {CardLast4}, {nameof(Amount)}: {Amount}"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/PatchCharge.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/PatchCharge.verified.cs index 87b8bcc3..a3f76574 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/PatchCharge.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/PatchCharge.verified.cs @@ -12,7 +12,10 @@ namespace Monta.ApiClient.Generated.Contracts.Charges; [GeneratedCode("ApiGenerator", "x.x.x.x")] public class PatchCharge { - public GenericPaymentSession? GenericPaymentSession { get; set; } + /// + /// For Partners who want to start charging from payment terminals, kiosks etc. Used to link charge transaction against your billing and to allow users retrieving receipts via receipt.monta.com by using date and `genericPaymentSession.externalId`or `genericPaymentSession.cardLast4`.<br/><br/>**Note: This field is optional, but if provided, you need to provide the full data, since it will be overwritten with values from this object.**. + /// + public PatchGenericPaymentSession? GenericPaymentSession { get; set; } /// /// External Id of this entity, managed by you. diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/PatchGenericPaymentSession.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/PatchGenericPaymentSession.verified.cs new file mode 100644 index 00000000..28dceed8 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/PatchGenericPaymentSession.verified.cs @@ -0,0 +1,50 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Charges; + +/// +/// PatchGenericPaymentSession. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class PatchGenericPaymentSession +{ + /// + /// The provider of the payment session. + /// + [Required] + public string Provider { get; set; } + + /// + /// The external id of the payment session. Allows retrieving receipts via receipt.monta.com by using date and `externalId` or `cardLast4`. + /// + [Required] + public string ExternalId { get; set; } + + /// + /// External Id of this entity, managed by you. + /// + public string? PartnerExternalId { get; set; } + + /// + /// The brand of the card used for the payment session. + /// + public string? CardBrand { get; set; } + + /// + /// The last 4 digits of the card used for the payment session. Allows retrieving receipts via receipt.monta.com by using date and `externalId` or `cardLast4`. + /// + public string? CardLast4 { get; set; } + + /// + /// The amount of the payment session. Negative amounts will be rejected by the API. + /// + public double? Amount { get; set; } + + /// + public override string ToString() + => $"{nameof(Provider)}: {Provider}, {nameof(ExternalId)}: {ExternalId}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(CardBrand)}: {CardBrand}, {nameof(CardLast4)}: {CardLast4}, {nameof(Amount)}: {Amount}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/PublicChargePoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/PublicChargePoint.verified.cs index 8e64f40b..b023ffda 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/PublicChargePoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/PublicChargePoint.verified.cs @@ -34,6 +34,9 @@ public class PublicChargePoint [Required] public string ChargePointOperatorName { get; set; } + /// + /// Location information for this charge point. + /// [Required] public Location Location { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/PublicUser.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/PublicUser3.verified.cs similarity index 88% rename from test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/PublicUser.verified.cs rename to test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/PublicUser3.verified.cs index 4505f764..c155e8d1 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/PublicUser.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/PublicUser3.verified.cs @@ -4,13 +4,13 @@ // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. //------------------------------------------------------------------------------ -namespace Monta.ApiClient.Generated.Contracts; +namespace Monta.ApiClient.Generated.Contracts.Charges; /// -/// PublicUser. +/// PublicUser3. /// [GeneratedCode("ApiGenerator", "x.x.x.x")] -public class PublicUser +public class PublicUser3 { /// /// Id of the user. diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/RequestParameters/GetChargesParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/RequestParameters/GetChargesParameters.verified.cs index 220b64ec..e8961ac9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/RequestParameters/GetChargesParameters.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/RequestParameters/GetChargesParameters.verified.cs @@ -26,6 +26,8 @@ public class GetChargesParameters public long? TeamId { get; set; } + public long? OperatorId { get; set; } + public long? ChargePointId { get; set; } public long? SiteId { get; set; } @@ -42,9 +44,9 @@ public class GetChargesParameters public string? PartnerExternalId { get; set; } - public OperatorRole? OperatorRole { get; set; } + public OperatorRole? OperatorRole { get; set; } = Contracts.OperatorRole.Owner; /// public override string ToString() - => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}, {nameof(TeamId)}: {TeamId}, {nameof(ChargePointId)}: {ChargePointId}, {nameof(SiteId)}: {SiteId}, {nameof(State)}: {State}, {nameof(FromDate)}: ({FromDate}), {nameof(ToDate)}: ({ToDate}), {nameof(ChargeAuthType)}: ({ChargeAuthType}), {nameof(ChargeAuthId)}: {ChargeAuthId}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(OperatorRole)}: ({OperatorRole})"; + => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}, {nameof(TeamId)}: {TeamId}, {nameof(OperatorId)}: {OperatorId}, {nameof(ChargePointId)}: {ChargePointId}, {nameof(SiteId)}: {SiteId}, {nameof(State)}: {State}, {nameof(FromDate)}: ({FromDate}), {nameof(ToDate)}: ({ToDate}), {nameof(ChargeAuthType)}: ({ChargeAuthType}), {nameof(ChargeAuthId)}: {ChargeAuthId}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(OperatorRole)}: ({OperatorRole})"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/StartChargeRequest.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/StartChargeRequest.verified.cs index 40b32104..3526ea6b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/StartChargeRequest.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Charges/StartChargeRequest.verified.cs @@ -40,16 +40,24 @@ public class StartChargeRequest /// public double? SocLimit { get; set; } + /// + /// The charge price limit, meaning the charge will stop once the price limit is reached. <br />*Note*: `priceLimit` will be in the currency of the charge point. + /// + public double? PriceLimit { get; set; } + /// /// Allows you to enforce a specific price group for this charge. <br />*Note*: The price group must be of type `team` or `charge-point`. /// [Range(0, int.MaxValue)] public long? PriceGroupId { get; set; } + /// + /// For Partners who want to start charging from payment terminals, kiosks etc. Used to link charge transaction against your billing and to allow users retrieving receipts via receipt.monta.com by using date and `genericPaymentSession.externalId`or `genericPaymentSession.cardLast4`. + /// public GenericPaymentSession? GenericPaymentSession { get; set; } /// - /// External Id of this entity, managed by you. + /// External Id of this entity, managed by you. <br />*Note*: How this field is used is up to the partner, but we highly recommend using a unique `partnerExternalId` for each `charge`. /// public string? PartnerExternalId { get; set; } @@ -60,5 +68,5 @@ public class StartChargeRequest /// public override string ToString() - => $"{nameof(PayingTeamId)}: {PayingTeamId}, {nameof(ChargePointId)}: {ChargePointId}, {nameof(ReserveCharge)}: {ReserveCharge}, {nameof(KwhLimit)}: {KwhLimit}, {nameof(SocLimit)}: {SocLimit}, {nameof(PriceGroupId)}: {PriceGroupId}, {nameof(GenericPaymentSession)}: ({GenericPaymentSession}), {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(PartnerCustomPayload)}.Count: {PartnerCustomPayload?.Count ?? 0}"; + => $"{nameof(PayingTeamId)}: {PayingTeamId}, {nameof(ChargePointId)}: {ChargePointId}, {nameof(ReserveCharge)}: {ReserveCharge}, {nameof(KwhLimit)}: {KwhLimit}, {nameof(SocLimit)}: {SocLimit}, {nameof(PriceLimit)}: {PriceLimit}, {nameof(PriceGroupId)}: {PriceGroupId}, {nameof(GenericPaymentSession)}: ({GenericPaymentSession}), {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(PartnerCustomPayload)}.Count: {PartnerCustomPayload?.Count ?? 0}"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/CountryAreas/CountryArea.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/CountryAreas/CountryArea.verified.cs index 215924fd..45b61e02 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/CountryAreas/CountryArea.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/CountryAreas/CountryArea.verified.cs @@ -35,6 +35,9 @@ public class CountryArea /// public string? ExternalId { get; set; } + /// + /// The level of depth for this country area. + /// [Required] public CountryAreaLevel Level { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Currencies/MontaPageCurrencyDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Currencies/MontaPageCurrencyDto.verified.cs index 0c92b90e..cb7a9fc9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Currencies/MontaPageCurrencyDto.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Currencies/MontaPageCurrencyDto.verified.cs @@ -13,7 +13,7 @@ namespace Monta.ApiClient.Generated.Contracts.Currencies; public class MontaPageCurrencyDto { [Required] - public List Data { get; set; } + public List Data { get; set; } [Required] public MontaPageMeta Meta { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/ChargesInsightByChargeAuthTokenReportDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/ChargesInsightByChargeAuthTokenReportDto.verified.cs new file mode 100644 index 00000000..23b2a3f9 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/ChargesInsightByChargeAuthTokenReportDto.verified.cs @@ -0,0 +1,41 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Insights; + +/// +/// ChargesInsightByChargeAuthTokenReportDto. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class ChargesInsightByChargeAuthTokenReportDto +{ + /// + /// The id of the charge auth token. + /// + public long Id { get; set; } + + /// + /// The identifier of the charge auth token, Note: without prefix e.g `VID:`. + /// + [Required] + public string Identifier { get; set; } + + /// + /// The method type used for this charge auth token. + /// + [Required] + public string Type { get; set; } + + /// + /// Charge consumptions grouped by `chargeType`. + /// + [Required] + public List Consumptions { get; set; } + + /// + public override string ToString() + => $"{nameof(Id)}: {Id}, {nameof(Identifier)}: {Identifier}, {nameof(Type)}: {Type}, {nameof(Consumptions)}.Count: {Consumptions?.Count ?? 0}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/ChargesInsightByChargeAuthTokenReportDtoConsumption.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/ChargesInsightByChargeAuthTokenReportDtoConsumption.verified.cs new file mode 100644 index 00000000..d04206e6 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/ChargesInsightByChargeAuthTokenReportDtoConsumption.verified.cs @@ -0,0 +1,74 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Insights; + +/// +/// ChargesInsightByChargeAuthTokenReportDtoConsumption. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class ChargesInsightByChargeAuthTokenReportDtoConsumption +{ + /// + /// Defines the type of charge, ie. if it was a sponsored or public charge. + /// definitions: + /// * `sponsored` - Charges that have been sponsored. + /// * `team-operator` - Charges that belong to Charge Points of the same operator as paying team operator. + /// * `public` - Any charge that was paid for by this team that does not match the other cases. + /// Note that more chargeTypes might be added in the future. Make sure to handle this gracefully. + /// + [Required] + public string ChargeType { get; set; } + + /// + /// Number of charging sessions. + /// + [Required] + public long TotalSessions { get; set; } + + /// + /// Sum of all Kwh consumed. + /// + [Required] + public double TotalKwh { get; set; } + + /// + /// Sum of all charge net prices. + /// + [Required] + public double TotalNetPrice { get; set; } + + /// + /// Sum of all charge vat amounts. + /// + [Required] + public double TotalVat { get; set; } + + /// + /// Sum of all charge gross prices. + /// + [Required] + public double TotalGrossPrice { get; set; } + + /// + /// The ID of the Member Cost Group applied to this charges, or Null if none. + /// + public long? MemberCostGroupId { get; set; } + + /// + /// The name of the Member Cost Group applied to this charges, or Null if none. + /// + public string? MemberCostGroupName { get; set; } + + /// + /// Sum of all charge costs in the Member Cost Group currency, or Null if none. + /// + public double? MemberCostGroupPrice { get; set; } + + /// + public override string ToString() + => $"{nameof(ChargeType)}: {ChargeType}, {nameof(TotalSessions)}: {TotalSessions}, {nameof(TotalKwh)}: {TotalKwh}, {nameof(TotalNetPrice)}: {TotalNetPrice}, {nameof(TotalVat)}: {TotalVat}, {nameof(TotalGrossPrice)}: {TotalGrossPrice}, {nameof(MemberCostGroupId)}: {MemberCostGroupId}, {nameof(MemberCostGroupName)}: {MemberCostGroupName}, {nameof(MemberCostGroupPrice)}: {MemberCostGroupPrice}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/ChargesInsightDriverMemberCostsReport.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/ChargesInsightDriverMemberCostsReport.verified.cs new file mode 100644 index 00000000..d9b5b61c --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/ChargesInsightDriverMemberCostsReport.verified.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Insights; + +/// +/// ChargesInsightDriverMemberCostsReport. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class ChargesInsightDriverMemberCostsReport +{ + /// + /// Team ID used for this report. + /// + [Required] + public long TeamId { get; set; } + + /// + /// Team Member ID of the Driver. + /// + [Required] + public long TeamMemberId { get; set; } + + /// + /// User ID of the Driver. + /// + [Required] + public long UserId { get; set; } + + /// + /// Charge consumptions grouped by `chargeType`. + /// + [Required] + public List Consumptions { get; set; } + + /// + public override string ToString() + => $"{nameof(TeamId)}: {TeamId}, {nameof(TeamMemberId)}: {TeamMemberId}, {nameof(UserId)}: {UserId}, {nameof(Consumptions)}.Count: {Consumptions?.Count ?? 0}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/ChargesInsightDriverMemberCostsReportDtoConsumption.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/ChargesInsightDriverMemberCostsReportDtoConsumption.verified.cs new file mode 100644 index 00000000..87d26cc6 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/ChargesInsightDriverMemberCostsReportDtoConsumption.verified.cs @@ -0,0 +1,80 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Insights; + +/// +/// ChargesInsightDriverMemberCostsReportDtoConsumption. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class ChargesInsightDriverMemberCostsReportDtoConsumption +{ + /// + /// Defines the type of charge, ie. if it was a sponsored or public charge. + /// definitions: + /// * `sponsored` - Charges that have been sponsored. + /// * `team-operator` - Charges that belong to Charge Points of the same operator as paying team operator. + /// * `public` - Any charge that was paid for by this team that does not match the other cases. + /// Note that more chargeTypes might be added in the future. Make sure to handle this gracefully. + /// + [Required] + public string ChargeType { get; set; } + + /// + /// Number of charging sessions. + /// + [Required] + public long TotalSessions { get; set; } + + /// + /// Sum of all Kwh consumed. + /// + [Required] + public double TotalKwh { get; set; } + + /// + /// Sum of all charge net prices. + /// + [Required] + public double TotalNetPrice { get; set; } + + /// + /// Sum of all charge vat amounts. + /// + [Required] + public double TotalVat { get; set; } + + /// + /// Sum of all charge gross prices. + /// + [Required] + public double TotalGrossPrice { get; set; } + + /// + /// The ID of the Member Cost Group applied to this charges, or Null if none. + /// + public long? MemberCostGroupId { get; set; } + + /// + /// The name of the Member Cost Group applied to this charges, or Null if none. + /// + public string? MemberCostGroupName { get; set; } + + /// + /// Sum of all charge costs in the Member Cost Group currency, or Null if none. + /// + public double? MemberCostGroupPrice { get; set; } + + /// + /// Breakdown of the charges by country. + /// + [Required] + public List CountryBreakdown { get; set; } + + /// + public override string ToString() + => $"{nameof(ChargeType)}: {ChargeType}, {nameof(TotalSessions)}: {TotalSessions}, {nameof(TotalKwh)}: {TotalKwh}, {nameof(TotalNetPrice)}: {TotalNetPrice}, {nameof(TotalVat)}: {TotalVat}, {nameof(TotalGrossPrice)}: {TotalGrossPrice}, {nameof(MemberCostGroupId)}: {MemberCostGroupId}, {nameof(MemberCostGroupName)}: {MemberCostGroupName}, {nameof(MemberCostGroupPrice)}: {MemberCostGroupPrice}, {nameof(CountryBreakdown)}.Count: {CountryBreakdown?.Count ?? 0}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/ChargesInsightDriverMemberCostsReportDtoConsumptionCountryBreakdown.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/ChargesInsightDriverMemberCostsReportDtoConsumptionCountryBreakdown.verified.cs new file mode 100644 index 00000000..2e9e775d --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/ChargesInsightDriverMemberCostsReportDtoConsumptionCountryBreakdown.verified.cs @@ -0,0 +1,59 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Insights; + +/// +/// ChargesInsightDriverMemberCostsReportDtoConsumptionCountryBreakdown. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class ChargesInsightDriverMemberCostsReportDtoConsumptionCountryBreakdown +{ + /// + /// Two letter Country Code. + /// + [Required] + public string CountryCode { get; set; } + + /// + /// Number of charging sessions. + /// + [Required] + public long TotalSessions { get; set; } + + /// + /// Sum of all Kwh consumed. + /// + [Required] + public double TotalKwh { get; set; } + + /// + /// Sum of all charge net prices. + /// + [Required] + public double TotalNetPrice { get; set; } + + /// + /// Sum of all charge vat amounts. + /// + [Required] + public double TotalVat { get; set; } + + /// + /// Sum of all charge gross prices. + /// + [Required] + public double TotalGrossPrice { get; set; } + + /// + /// Sum of all charge costs in the Member Cost Group currency, or Null if none. + /// + public double? MemberCostGroupPrice { get; set; } + + /// + public override string ToString() + => $"{nameof(CountryCode)}: {CountryCode}, {nameof(TotalSessions)}: {TotalSessions}, {nameof(TotalKwh)}: {TotalKwh}, {nameof(TotalNetPrice)}: {TotalNetPrice}, {nameof(TotalVat)}: {TotalVat}, {nameof(TotalGrossPrice)}: {TotalGrossPrice}, {nameof(MemberCostGroupPrice)}: {MemberCostGroupPrice}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/MontaPageChargesInsightByChargeAuthTokenReportDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/MontaPageChargesInsightByChargeAuthTokenReportDto.verified.cs new file mode 100644 index 00000000..902e2ce9 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/MontaPageChargesInsightByChargeAuthTokenReportDto.verified.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Insights; + +/// +/// MontaPageChargesInsightByChargeAuthTokenReportDto. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class MontaPageChargesInsightByChargeAuthTokenReportDto +{ + [Required] + public List Data { get; set; } + + [Required] + public MontaPageMeta Meta { get; set; } + + /// + public override string ToString() + => $"{nameof(Data)}.Count: {Data?.Count ?? 0}, {nameof(Meta)}: ({Meta})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/MontaPageChargesInsightDriverMemberCostsReportDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/MontaPageChargesInsightDriverMemberCostsReportDto.verified.cs new file mode 100644 index 00000000..c69af7ee --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/MontaPageChargesInsightDriverMemberCostsReportDto.verified.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Insights; + +/// +/// MontaPageChargesInsightDriverMemberCostsReportDto. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class MontaPageChargesInsightDriverMemberCostsReportDto +{ + [Required] + public List Data { get; set; } + + [Required] + public MontaPageMeta Meta { get; set; } + + /// + public override string ToString() + => $"{nameof(Data)}.Count: {Data?.Count ?? 0}, {nameof(Meta)}: ({Meta})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/RequestParameters/GetInsightsChargesChargeAuthTokenReportParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/RequestParameters/GetInsightsChargesChargeAuthTokenReportParameters.verified.cs new file mode 100644 index 00000000..b67b1d69 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/RequestParameters/GetInsightsChargesChargeAuthTokenReportParameters.verified.cs @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Insights; + +/// +/// Parameters for operation request. +/// Description: Retrieve insights about charges broken down by charge auth token and member cost groups of a team. +/// Operation: GetInsightsChargesChargeAuthTokenReport. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetInsightsChargesChargeAuthTokenReportParameters +{ + /// + /// page number to retrieve (starts with 0). + /// + public int Page { get; set; } = 0; + + /// + /// number of items per page (between 1 and 100, default 10). + /// + public int PerPage { get; set; } = 10; + + [Required] + [Range(0, 2147483647)] + public long TeamId { get; set; } + + [Required] + public DateTimeOffset FromDate { get; set; } + + [Required] + public DateTimeOffset ToDate { get; set; } + + public DriverReportDatesFilteredBy? DatesFilteredBy { get; set; } = DriverReportDatesFilteredBy.ChargeTransaction; + + /// + public override string ToString() + => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}, {nameof(TeamId)}: {TeamId}, {nameof(FromDate)}: ({FromDate}), {nameof(ToDate)}: ({ToDate}), {nameof(DatesFilteredBy)}: ({DatesFilteredBy})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/RequestParameters/GetInsightsChargesChargerReportParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/RequestParameters/GetInsightsChargesChargerReportParameters.verified.cs index 40bf9ef5..dcad281a 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/RequestParameters/GetInsightsChargesChargerReportParameters.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/RequestParameters/GetInsightsChargesChargerReportParameters.verified.cs @@ -14,7 +14,18 @@ namespace Monta.ApiClient.Generated.Contracts.Insights; [GeneratedCode("ApiGenerator", "x.x.x.x")] public class GetInsightsChargesChargerReportParameters { + /// + /// page number to retrieve (starts with 0). + /// + public int Page { get; set; } = 0; + + /// + /// number of items per page (between 1 and 100, default 10). + /// + public int PerPage { get; set; } = 10; + [Required] + [Range(0, 2147483647)] public long TeamId { get; set; } public string? ChargePointIds { get; set; } @@ -27,5 +38,5 @@ public class GetInsightsChargesChargerReportParameters /// public override string ToString() - => $"{nameof(TeamId)}: {TeamId}, {nameof(ChargePointIds)}: {ChargePointIds}, {nameof(FromDate)}: ({FromDate}), {nameof(ToDate)}: ({ToDate})"; + => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}, {nameof(TeamId)}: {TeamId}, {nameof(ChargePointIds)}: {ChargePointIds}, {nameof(FromDate)}: ({FromDate}), {nameof(ToDate)}: ({ToDate})"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/RequestParameters/GetInsightsChargesDriverMemberCostsReportParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/RequestParameters/GetInsightsChargesDriverMemberCostsReportParameters.verified.cs new file mode 100644 index 00000000..c092859f --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/RequestParameters/GetInsightsChargesDriverMemberCostsReportParameters.verified.cs @@ -0,0 +1,44 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Insights; + +/// +/// Parameters for operation request. +/// Description: Retrieve insights about charges broken down by team members and member cost groups of a team. +/// Operation: GetInsightsChargesDriverMemberCostsReport. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetInsightsChargesDriverMemberCostsReportParameters +{ + /// + /// page number to retrieve (starts with 0). + /// + public int Page { get; set; } = 0; + + /// + /// number of items per page (between 1 and 100, default 10). + /// + public int PerPage { get; set; } = 10; + + [Required] + [Range(0, 2147483647)] + public long TeamId { get; set; } + + public string? TeamMemberIds { get; set; } + + [Required] + public DateTimeOffset FromDate { get; set; } + + [Required] + public DateTimeOffset ToDate { get; set; } + + public DriverReportDatesFilteredBy? DatesFilteredBy { get; set; } = DriverReportDatesFilteredBy.ChargeTransaction; + + /// + public override string ToString() + => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}, {nameof(TeamId)}: {TeamId}, {nameof(TeamMemberIds)}: {TeamMemberIds}, {nameof(FromDate)}: ({FromDate}), {nameof(ToDate)}: ({ToDate}), {nameof(DatesFilteredBy)}: ({DatesFilteredBy})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/RequestParameters/GetInsightsChargesDriverReportParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/RequestParameters/GetInsightsChargesDriverReportParameters.verified.cs index f91bfade..ccf20f58 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/RequestParameters/GetInsightsChargesDriverReportParameters.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Insights/RequestParameters/GetInsightsChargesDriverReportParameters.verified.cs @@ -14,7 +14,18 @@ namespace Monta.ApiClient.Generated.Contracts.Insights; [GeneratedCode("ApiGenerator", "x.x.x.x")] public class GetInsightsChargesDriverReportParameters { + /// + /// page number to retrieve (starts with 0). + /// + public int Page { get; set; } = 0; + + /// + /// number of items per page (between 1 and 100, default 10). + /// + public int PerPage { get; set; } = 10; + [Required] + [Range(0, 2147483647)] public long TeamId { get; set; } public string? TeamMemberIds { get; set; } @@ -25,9 +36,9 @@ public class GetInsightsChargesDriverReportParameters [Required] public DateTimeOffset ToDate { get; set; } - public DriverReportDatesFilteredBy? DatesFilteredBy { get; set; } + public DriverReportDatesFilteredBy? DatesFilteredBy { get; set; } = DriverReportDatesFilteredBy.ChargeTransaction; /// public override string ToString() - => $"{nameof(TeamId)}: {TeamId}, {nameof(TeamMemberIds)}: {TeamMemberIds}, {nameof(FromDate)}: ({FromDate}), {nameof(ToDate)}: ({ToDate}), {nameof(DatesFilteredBy)}: ({DatesFilteredBy})"; + => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}, {nameof(TeamId)}: {TeamId}, {nameof(TeamMemberIds)}: {TeamMemberIds}, {nameof(FromDate)}: ({FromDate}), {nameof(ToDate)}: ({ToDate}), {nameof(DatesFilteredBy)}: ({DatesFilteredBy})"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/InstallerJobs/InstallerJob.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/InstallerJobs/InstallerJob.verified.cs index 20299ac4..c28e121a 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/InstallerJobs/InstallerJob.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/InstallerJobs/InstallerJob.verified.cs @@ -22,6 +22,9 @@ public class InstallerJob /// public long SiteId { get; set; } + /// + /// The operator of this installer job. + /// [Required] public Operator Operator { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Invoices/InvoiceDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Invoices/InvoiceDto.verified.cs new file mode 100644 index 00000000..5628809c --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Invoices/InvoiceDto.verified.cs @@ -0,0 +1,87 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Invoices; + +/// +/// InvoiceDto. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class InvoiceDto +{ + /// + /// Id of the invoice. + /// + [Required] + public long Id { get; set; } + + /// + /// Id of the wallet. + /// + [Required] + public long WalletId { get; set; } + + /// + /// Invoice from date. + /// + [Required] + public DateTimeOffset From { get; set; } + + /// + /// Invoice to date. + /// + [Required] + public DateTimeOffset To { get; set; } + + /// + /// The date it was approved. + /// + public DateTimeOffset? ApprovedAt { get; set; } + + /// + /// Total statement. + /// + public double? TotalStatement { get; set; } + + /// + /// Total payable balance. + /// + [Required] + public double TotalPayableBalance { get; set; } + + /// + /// Currency. + /// + [Required] + public CurrencyDto Currency { get; set; } + + /// + /// status of the invoice. + /// + [Required] + public string Status { get; set; } + + /// + /// Invoice creation date. + /// + [Required] + public DateTimeOffset CreatedAt { get; set; } + + /// + /// Invoice due date. + /// + [Required] + public DateTimeOffset? DueAt { get; set; } + + /// + /// URL to the invoice PDF. + /// + public string? PdfUrl { get; set; } + + /// + public override string ToString() + => $"{nameof(Id)}: {Id}, {nameof(WalletId)}: {WalletId}, {nameof(From)}: ({From}), {nameof(To)}: ({To}), {nameof(ApprovedAt)}: ({ApprovedAt}), {nameof(TotalStatement)}: {TotalStatement}, {nameof(TotalPayableBalance)}: {TotalPayableBalance}, {nameof(Currency)}: ({Currency}), {nameof(Status)}: {Status}, {nameof(CreatedAt)}: ({CreatedAt}), {nameof(DueAt)}: ({DueAt}), {nameof(PdfUrl)}: {PdfUrl}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Invoices/MontaPageInvoiceDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Invoices/MontaPageInvoiceDto.verified.cs new file mode 100644 index 00000000..a8ce2d8a --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Invoices/MontaPageInvoiceDto.verified.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Invoices; + +/// +/// MontaPageInvoiceDto. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class MontaPageInvoiceDto +{ + [Required] + public List Data { get; set; } + + [Required] + public MontaPageMeta Meta { get; set; } + + /// + public override string ToString() + => $"{nameof(Data)}.Count: {Data?.Count ?? 0}, {nameof(Meta)}: ({Meta})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Invoices/RequestParameters/GetInvoice1Parameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Invoices/RequestParameters/GetInvoice1Parameters.verified.cs new file mode 100644 index 00000000..22b48975 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Invoices/RequestParameters/GetInvoice1Parameters.verified.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Invoices; + +/// +/// Parameters for operation request. +/// Description: Retrieves an invoice by its id. +/// Operation: GetInvoice1. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetInvoice1Parameters +{ + [Required] + public long InvoiceId { get; set; } + + /// + public override string ToString() + => $"{nameof(InvoiceId)}: {InvoiceId}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Invoices/RequestParameters/GetInvoiceParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Invoices/RequestParameters/GetInvoiceParameters.verified.cs new file mode 100644 index 00000000..697c3074 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Invoices/RequestParameters/GetInvoiceParameters.verified.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Invoices; + +/// +/// Parameters for operation request. +/// Description: Retrieves a list of invoices by walletId. +/// Operation: GetInvoice. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetInvoiceParameters +{ + /// + /// page number to retrieve (starts with 0). + /// + public int Page { get; set; } = 0; + + /// + /// number of items per page (between 1 and 100, default 10). + /// + public int PerPage { get; set; } = 10; + + [Required] + public long WalletId { get; set; } + + [Required] + public Pageable Pageable { get; set; } + + /// + public override string ToString() + => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}, {nameof(WalletId)}: {WalletId}, {nameof(Pageable)}: ({Pageable})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/MontaPageNestedTeamDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/MontaPageNestedTeamDto.verified.cs new file mode 100644 index 00000000..2f1ba779 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/MontaPageNestedTeamDto.verified.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.NestedTeams; + +/// +/// MontaPageNestedTeamDto. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class MontaPageNestedTeamDto +{ + [Required] + public List Data { get; set; } + + [Required] + public MontaPageMeta Meta { get; set; } + + /// + public override string ToString() + => $"{nameof(Data)}.Count: {Data?.Count ?? 0}, {nameof(Meta)}: ({Meta})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/NestedTeam.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/NestedTeam.verified.cs new file mode 100644 index 00000000..d3181599 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/NestedTeam.verified.cs @@ -0,0 +1,89 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.NestedTeams; + +/// +/// NestedTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class NestedTeam +{ + /// + /// Id of the nested team relation. + /// + public long Id { get; set; } + + /// + /// Parent team, the one who sends the invite. + /// + [Required] + public PublicTeam ParentTeam { get; set; } + + /// + /// Parent team, the one who receives the invite. + /// + [JsonPropertyName("nestedTeam")] + public PublicTeam? NestedTeamProperty { get; set; } + + /// + /// Price group applied to the nested team. + /// + public PriceGroup1? PriceGroup { get; set; } + + /// + /// User who requested the invitation. + /// + public PublicUser? InvitedByUser { get; set; } + + /// + /// The role assigned to the nested team. + /// + [Required] + public string UserRole { get; set; } + + /// + /// Access to parent team CPs / sites: to all or selected charge points and/or sites. + /// + [Required] + public TeamMemberAccess Access { get; set; } + + /// + /// State of the nested team invitation. + /// + [Required] + public TeamMemberState State { get; set; } + + /// + /// Selected charge points nested team has access to. + /// + public List? SelectedChargePointIds { get; set; } = new List(); + + /// + /// Internal note for this nested team. + /// + public string? Note { get; set; } + + /// + /// Datetime of the creation of nested team invite. + /// + [Required] + public DateTimeOffset CreatedAt { get; set; } + + /// + /// Datetime of the update of nested team invite. + /// + public DateTimeOffset? UpdatedAt { get; set; } + + /// + /// Datetime nested team was invited. + /// + public DateTimeOffset? InvitedAt { get; set; } + + /// + public override string ToString() + => $"{nameof(Id)}: {Id}, {nameof(ParentTeam)}: ({ParentTeam}), {nameof(NestedTeamProperty)}: ({NestedTeamProperty}), {nameof(PriceGroup)}: ({PriceGroup}), {nameof(InvitedByUser)}: ({InvitedByUser}), {nameof(UserRole)}: {UserRole}, {nameof(Access)}: ({Access}), {nameof(State)}: ({State}), {nameof(SelectedChargePointIds)}.Count: {SelectedChargePointIds?.Count ?? 0}, {nameof(Note)}: {Note}, {nameof(CreatedAt)}: ({CreatedAt}), {nameof(UpdatedAt)}: ({UpdatedAt}), {nameof(InvitedAt)}: ({InvitedAt})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/NestedTeamInvite.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/NestedTeamInvite.verified.cs new file mode 100644 index 00000000..97e4428c --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/NestedTeamInvite.verified.cs @@ -0,0 +1,52 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.NestedTeams; + +/// +/// NestedTeamInvite. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class NestedTeamInvite +{ + /// + /// Id of the parent team, the one who sends the invite. + /// + [Required] + public long ParentTeamId { get; set; } + + /// + /// Id of the nested team, the one who receives the invite. + /// + [Required] + public long NestedTeamId { get; set; } + + /// + /// Price group applied to the nested team. + /// + [Required] + public long PriceGroupId { get; set; } + + /// + /// Is access granted to all or selected charge points and sites. + /// + [Required] + public TeamMemberAccess Access { get; set; } + + /// + /// List of charge point ids nested team access will be assigned to. + /// + public List? SelectedChargePointIds { get; set; } = new List(); + + /// + /// List of site ids nested team access will be assigned to. + /// + public List? SelectedSiteIds { get; set; } = new List(); + + /// + public override string ToString() + => $"{nameof(ParentTeamId)}: {ParentTeamId}, {nameof(NestedTeamId)}: {NestedTeamId}, {nameof(PriceGroupId)}: {PriceGroupId}, {nameof(Access)}: ({Access}), {nameof(SelectedChargePointIds)}.Count: {SelectedChargePointIds?.Count ?? 0}, {nameof(SelectedSiteIds)}.Count: {SelectedSiteIds?.Count ?? 0}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/PatchNestedTeam.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/PatchNestedTeam.verified.cs new file mode 100644 index 00000000..6a68c16c --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/PatchNestedTeam.verified.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.NestedTeams; + +/// +/// PatchNestedTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class PatchNestedTeam +{ + /// + /// Price group applied to the nested team. + /// + public long? PriceGroupId { get; set; } + + /// + /// A note (instructions, warning, information) you have entered for this nested team member. + /// + [StringLength(255)] + public string? Note { get; set; } + + /// + /// List of charge point ids nested team access will be assigned to. + /// + public List? SelectedChargePointIds { get; set; } = new List(); + + /// + public override string ToString() + => $"{nameof(PriceGroupId)}: {PriceGroupId}, {nameof(Note)}: {Note}, {nameof(SelectedChargePointIds)}.Count: {SelectedChargePointIds?.Count ?? 0}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/PriceGroup1.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/PriceGroup1.verified.cs new file mode 100644 index 00000000..db94ddbd --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/PriceGroup1.verified.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.NestedTeams; + +/// +/// PriceGroup1. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class PriceGroup1 +{ + /// + /// Id of the price group. + /// + public long Id { get; set; } + + /// + /// Name of the price group. + /// + [Required] + public string Name { get; set; } + + /// + public override string ToString() + => $"{nameof(Id)}: {Id}, {nameof(Name)}: {Name}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/PublicTeam.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/PublicTeam.verified.cs new file mode 100644 index 00000000..99d2a282 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/PublicTeam.verified.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.NestedTeams; + +/// +/// PublicTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class PublicTeam +{ + /// + /// Id of the public team. + /// + public long Id { get; set; } + + /// + /// Public name of the team. + /// + public string? PublicName { get; set; } + + /// + /// Number of members in the team. + /// + public long? MemberCount { get; set; } + + /// + public override string ToString() + => $"{nameof(Id)}: {Id}, {nameof(PublicName)}: {PublicName}, {nameof(MemberCount)}: {MemberCount}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/PublicUser.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/PublicUser.verified.cs new file mode 100644 index 00000000..85fd8c11 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/PublicUser.verified.cs @@ -0,0 +1,38 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.NestedTeams; + +/// +/// PublicUser. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class PublicUser +{ + /// + /// Id of the user. + /// + public long Id { get; set; } + + /// + /// First name of the user. + /// + public string? FirstName { get; set; } + + /// + /// Last name of the user. + /// + public string? LastName { get; set; } + + /// + /// Display name of the user. + /// + public string? DisplayName { get; set; } + + /// + public override string ToString() + => $"{nameof(Id)}: {Id}, {nameof(FirstName)}: {FirstName}, {nameof(LastName)}: {LastName}, {nameof(DisplayName)}: {DisplayName}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/AcceptInviteParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/AcceptInviteParameters.verified.cs new file mode 100644 index 00000000..9606c482 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/AcceptInviteParameters.verified.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.NestedTeams; + +/// +/// Parameters for operation request. +/// Description: Accept a nested team invitation. +/// Operation: AcceptInvite. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class AcceptInviteParameters +{ + [Required] + [Range(0, 2147483647)] + public long RelationId { get; set; } + + /// + public override string ToString() + => $"{nameof(RelationId)}: {RelationId}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/DeleteNestedTeamParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/DeleteNestedTeamParameters.verified.cs new file mode 100644 index 00000000..6d79c999 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/DeleteNestedTeamParameters.verified.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.NestedTeams; + +/// +/// Parameters for operation request. +/// Description: Delete a nested team relation. +/// Operation: DeleteNestedTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class DeleteNestedTeamParameters +{ + [Required] + [Range(0, 2147483647)] + public long RelationId { get; set; } + + /// + public override string ToString() + => $"{nameof(RelationId)}: {RelationId}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/GetNestedTeamParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/GetNestedTeamParameters.verified.cs new file mode 100644 index 00000000..a8f8d7ea --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/GetNestedTeamParameters.verified.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.NestedTeams; + +/// +/// Parameters for operation request. +/// Description: Get a nested team by nested team relation id. +/// Operation: GetNestedTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetNestedTeamParameters +{ + [Required] + [Range(0, 2147483647)] + public long RelationId { get; set; } + + /// + public override string ToString() + => $"{nameof(RelationId)}: {RelationId}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/GetNestedTeamsParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/GetNestedTeamsParameters.verified.cs new file mode 100644 index 00000000..1bf45646 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/GetNestedTeamsParameters.verified.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.NestedTeams; + +/// +/// Parameters for operation request. +/// Description: Retrieve a list of nested team relations. +/// Operation: GetNestedTeams. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetNestedTeamsParameters +{ + /// + /// page number to retrieve (starts with 0). + /// + public int Page { get; set; } = 0; + + /// + /// number of items per page (between 1 and 100, default 10). + /// + public int PerPage { get; set; } = 10; + + public TeamMemberState? State { get; set; } + + public bool? IncludeDeleted { get; set; } = false; + + /// + public override string ToString() + => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}, {nameof(State)}: ({State}), {nameof(IncludeDeleted)}: {IncludeDeleted}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/InviteParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/InviteParameters.verified.cs new file mode 100644 index 00000000..466ba9e0 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/InviteParameters.verified.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.NestedTeams; + +/// +/// Parameters for operation request. +/// Description: Nested team invite. +/// Operation: Invite. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class InviteParameters +{ + [Required] + public NestedTeamInvite Request { get; set; } + + /// + public override string ToString() + => $"{nameof(Request)}: ({Request})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/RejectInviteParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/RejectInviteParameters.verified.cs new file mode 100644 index 00000000..9f17bf79 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/RejectInviteParameters.verified.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.NestedTeams; + +/// +/// Parameters for operation request. +/// Description: Reject a nested team invitation. +/// Operation: RejectInvite. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class RejectInviteParameters +{ + [Required] + [Range(0, 2147483647)] + public long RelationId { get; set; } + + /// + public override string ToString() + => $"{nameof(RelationId)}: {RelationId}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/UpdateNestedTeamParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/UpdateNestedTeamParameters.verified.cs new file mode 100644 index 00000000..ac7560d8 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/NestedTeams/RequestParameters/UpdateNestedTeamParameters.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.NestedTeams; + +/// +/// Parameters for operation request. +/// Description: Update a nested team relation. +/// Operation: UpdateNestedTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class UpdateNestedTeamParameters +{ + [Required] + [Range(0, 2147483647)] + public long RelationId { get; set; } + + [Required] + public PatchNestedTeam Request { get; set; } + + /// + public override string ToString() + => $"{nameof(RelationId)}: {RelationId}, {nameof(Request)}: ({Request})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Operators/RequestParameters/GetOperatorsParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Operators/RequestParameters/GetOperatorsParameters.verified.cs index faee74e0..0807ef66 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Operators/RequestParameters/GetOperatorsParameters.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Operators/RequestParameters/GetOperatorsParameters.verified.cs @@ -14,9 +14,15 @@ namespace Monta.ApiClient.Generated.Contracts.Operators; [GeneratedCode("ApiGenerator", "x.x.x.x")] public class GetOperatorsParameters { - public int? Page { get; set; } = 0; + /// + /// page number to retrieve (starts with 0). + /// + public int Page { get; set; } = 0; - public int? PerPage { get; set; } + /// + /// number of items per page (between 1 and 100, default 10). + /// + public int PerPage { get; set; } = 10; /// public override string ToString() diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/PaymentTerminals/PaymentTerminal.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/PaymentTerminals/PaymentTerminal.verified.cs index 16eccf08..c360ba0d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/PaymentTerminals/PaymentTerminal.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/PaymentTerminals/PaymentTerminal.verified.cs @@ -18,6 +18,9 @@ public class PaymentTerminal [Required] public string Id { get; set; } + /// + /// Type of this terminal, ie "payter". + /// [Required] public PaymentTerminalType Type { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Plans/Currency1.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Plans/Currency1.verified.cs new file mode 100644 index 00000000..6fa9ff34 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Plans/Currency1.verified.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Plans; + +/// +/// Currency1. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class Currency1 +{ + /// + /// Currency identifier, e.g. dkk. + /// + [Required] + public string Identifier { get; set; } + + /// + /// Readable name of currency. + /// + [Required] + public string Name { get; set; } + + /// + /// Number of decimals for this currency. + /// + public int Decimals { get; set; } + + /// + public override string ToString() + => $"{nameof(Identifier)}: {Identifier}, {nameof(Name)}: {Name}, {nameof(Decimals)}: {Decimals}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Plans/Plan.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Plans/Plan.verified.cs index 7f0f1abe..0334fcda 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Plans/Plan.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Plans/Plan.verified.cs @@ -60,6 +60,9 @@ public class Plan /// public string? SupportEmail { get; set; } + /// + /// Indicates whether this plan can be applied to teams or charge points. 'operator' value is only used internally. + /// [Required] public PlanApplicableFor ApplicableFor { get; set; } @@ -69,6 +72,9 @@ public class Plan [Required] public bool Active { get; set; } + /// + /// Indicates whether this plan is shown in your (operator's) app only, or in the Monta app as well. + /// [Required] public PlanApplicationAudience ApplicationAudience { get; set; } @@ -78,6 +84,9 @@ public class Plan [Required] public bool VisibleInMarketPlace { get; set; } + /// + /// Indicates if the price is per charge point or a fixed price. + /// [Required] public PlanPriceModel PriceModel { get; set; } @@ -93,9 +102,15 @@ public class Plan [Required] public bool PricesWithVat { get; set; } + /// + /// Plan service type, custom or tax-refund. + /// [Required] public PlanServiceType ServiceType { get; set; } + /// + /// Additional configuration, based on serviceType. + /// [Required] public PlanServiceConfig ServiceConfig { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Plans/PlanPrice.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Plans/PlanPrice.verified.cs index 93023eed..1a9c0fc4 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Plans/PlanPrice.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Plans/PlanPrice.verified.cs @@ -22,8 +22,11 @@ public class PlanPrice /// public double Price { get; set; } + /// + /// Currency for `price`. + /// [Required] - public Currency Currency { get; set; } + public Currency1 Currency { get; set; } /// public override string ToString() diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/PriceGroups/CreateAdditionalPricingDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/PriceGroups/CreateAdditionalPricingDto.verified.cs index 0970ce4b..97b955c0 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/PriceGroups/CreateAdditionalPricingDto.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/PriceGroups/CreateAdditionalPricingDto.verified.cs @@ -12,6 +12,9 @@ namespace Monta.ApiClient.Generated.Contracts.PriceGroups; [GeneratedCode("ApiGenerator", "x.x.x.x")] public class CreateAdditionalPricingDto { + /// + /// Type of the additional pricing. `absolute` means the value is a price. + /// [Required] public AdditionalPricingType Type { get; set; } @@ -19,9 +22,15 @@ public class CreateAdditionalPricingDto /// The value of this additional pricing. /// [Required] + [Range(0, double.MaxValue)] public double Value { get; set; } + /// + /// A title for this additional pricing. + /// + public string? Title { get; set; } + /// public override string ToString() - => $"{nameof(Type)}: ({Type}), {nameof(Value)}: {Value}"; + => $"{nameof(Type)}: ({Type}), {nameof(Value)}: {Value}, {nameof(Title)}: {Title}"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/PriceGroups/CreateOrUpdatePriceGroupDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/PriceGroups/CreateOrUpdatePriceGroupDto.verified.cs index f045adab..8342eb8e 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/PriceGroups/CreateOrUpdatePriceGroupDto.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/PriceGroups/CreateOrUpdatePriceGroupDto.verified.cs @@ -25,9 +25,15 @@ public class CreateOrUpdatePriceGroupDto [Required] public string Name { get; set; } + /// + /// Type of the price group. + /// [Required] public PriceGroupType Type { get; set; } + /// + /// The master price. + /// [Required] public CreateOrUpdatePricingDto MasterPrice { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/PriceGroups/CreateOrUpdatePricingDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/PriceGroups/CreateOrUpdatePricingDto.verified.cs index 4af26f7d..12aec7c6 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/PriceGroups/CreateOrUpdatePricingDto.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/PriceGroups/CreateOrUpdatePricingDto.verified.cs @@ -17,6 +17,9 @@ public class CreateOrUpdatePricingDto /// public string? Description { get; set; } + /// + /// Type of the pricing. `minute` is used for Minute fee. `min` is used for the master price. + /// [Required] public PricingType Type { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Prices/Currency17.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Prices/Currency17.verified.cs new file mode 100644 index 00000000..ebc3544f --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Prices/Currency17.verified.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Prices; + +/// +/// Currency17. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class Currency17 +{ + /// + /// Currency identifier, e.g. dkk. + /// + [Required] + public string Identifier { get; set; } + + /// + /// Readable name of currency. + /// + [Required] + public string Name { get; set; } + + /// + /// Number of decimals for this currency. + /// + public int Decimals { get; set; } + + /// + public override string ToString() + => $"{nameof(Identifier)}: {Identifier}, {nameof(Name)}: {Name}, {nameof(Decimals)}: {Decimals}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Prices/PricesForecast.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Prices/PricesForecast.verified.cs index ceb96fb4..ea3c874b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Prices/PricesForecast.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Prices/PricesForecast.verified.cs @@ -12,12 +12,21 @@ namespace Monta.ApiClient.Generated.Contracts.Prices; [GeneratedCode("ApiGenerator", "x.x.x.x")] public class PricesForecast { + /// + /// The operator to which this charge point and price group belongs to. + /// [Required] public Operator Operator { get; set; } + /// + /// The currency applicable for this forecast. + /// [Required] - public Currency Currency { get; set; } + public Currency17 Currency { get; set; } + /// + /// The price group applicable for this forecast. + /// [Required] public PriceGroup PriceGroup { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Reports/MontaPageReportDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Reports/MontaPageReportDto.verified.cs new file mode 100644 index 00000000..8e29ee7c --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Reports/MontaPageReportDto.verified.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Reports; + +/// +/// MontaPageReportDto. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class MontaPageReportDto +{ + [Required] + public List Data { get; set; } + + [Required] + public MontaPageMeta Meta { get; set; } + + /// + public override string ToString() + => $"{nameof(Data)}.Count: {Data?.Count ?? 0}, {nameof(Meta)}: ({Meta})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Reports/ReasonDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Reports/ReasonDto.verified.cs new file mode 100644 index 00000000..1641d5f0 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Reports/ReasonDto.verified.cs @@ -0,0 +1,48 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Reports; + +/// +/// ReasonDto. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class ReasonDto +{ + /// + /// Id of the reason. + /// + [Required] + public int Id { get; set; } + + /// + /// Identifier of the reason. + /// + [Required] + public string Identifier { get; set; } + + /// + /// Reason of the report. + /// + [Required] + public string Reason { get; set; } + + /// + /// Type of the report. + /// + [Required] + public string Type { get; set; } + + /// + /// Priority of the report. + /// + [Required] + public string Priority { get; set; } + + /// + public override string ToString() + => $"{nameof(Id)}: {Id}, {nameof(Identifier)}: {Identifier}, {nameof(Reason)}: {Reason}, {nameof(Type)}: {Type}, {nameof(Priority)}: {Priority}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Reports/ReportDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Reports/ReportDto.verified.cs new file mode 100644 index 00000000..b24a83e7 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Reports/ReportDto.verified.cs @@ -0,0 +1,135 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Reports; + +/// +/// ReportDto. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class ReportDto +{ + /// + /// Id of the report. + /// + [Required] + public long Id { get; set; } + + /// + /// Id of the user who reported. + /// + public long? ReportedByUserId { get; set; } + + /// + /// Id of the operator related to the report. + /// + [Required] + public long OperatorId { get; set; } + + /// + /// Type of the relation. + /// + [Required] + public string RelationType { get; set; } + + /// + /// Id of the relation. + /// + [Required] + public long RelationId { get; set; } + + /// + /// Body of the report. + /// + public string? Body { get; set; } + + /// + /// State of the report. + /// + [Required] + public string State { get; set; } + + /// + /// Reason of the report. + /// + public ReasonDto? Reason { get; set; } + + /// + /// Source of the report. + /// + public string? Source { get; set; } + + /// + /// List of image URLs. + /// + [Required] + public List ImageUrls { get; set; } + + /// + /// Id of the operator assigned to the report. + /// + public long? AssignedToOperatorId { get; set; } + + /// + /// Id of the user assigned to the report. + /// + public long? AssignedToUserId { get; set; } + + /// + /// Id of the user who resolved the report. + /// + public long? ResolvedByUserId { get; set; } + + /// + /// Note from the operator. + /// + public string? OperatorNote { get; set; } + + /// + /// Note from the admin. + /// + public string? AdminNote { get; set; } + + /// + /// Note from the user. + /// + public string? UserNote { get; set; } + + /// + /// Time when the report was resolved. + /// + public DateTimeOffset? ResolvedAt { get; set; } + + /// + /// Time when the report was escalated. + /// + public DateTimeOffset? EscalatedAt { get; set; } + + /// + /// Time when the report was assigned. + /// + public DateTimeOffset? AssignedAt { get; set; } + + /// + /// Time when the report was created. + /// + [Required] + public DateTimeOffset CreatedAt { get; set; } + + /// + /// Time when the report was updated. + /// + public DateTimeOffset? UpdatedAt { get; set; } + + /// + /// Time when the report was deleted. + /// + public DateTimeOffset? DeletedAt { get; set; } + + /// + public override string ToString() + => $"{nameof(Id)}: {Id}, {nameof(ReportedByUserId)}: {ReportedByUserId}, {nameof(OperatorId)}: {OperatorId}, {nameof(RelationType)}: {RelationType}, {nameof(RelationId)}: {RelationId}, {nameof(Body)}: {Body}, {nameof(State)}: {State}, {nameof(Reason)}: ({Reason}), {nameof(Source)}: {Source}, {nameof(ImageUrls)}.Count: {ImageUrls?.Count ?? 0}, {nameof(AssignedToOperatorId)}: {AssignedToOperatorId}, {nameof(AssignedToUserId)}: {AssignedToUserId}, {nameof(ResolvedByUserId)}: {ResolvedByUserId}, {nameof(OperatorNote)}: {OperatorNote}, {nameof(AdminNote)}: {AdminNote}, {nameof(UserNote)}: {UserNote}, {nameof(ResolvedAt)}: ({ResolvedAt}), {nameof(EscalatedAt)}: ({EscalatedAt}), {nameof(AssignedAt)}: ({AssignedAt}), {nameof(CreatedAt)}: ({CreatedAt}), {nameof(UpdatedAt)}: ({UpdatedAt}), {nameof(DeletedAt)}: ({DeletedAt})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Reports/RequestParameters/GetReportParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Reports/RequestParameters/GetReportParameters.verified.cs new file mode 100644 index 00000000..0d2099bd --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Reports/RequestParameters/GetReportParameters.verified.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Reports; + +/// +/// Parameters for operation request. +/// Description: Retrieve a report related to a charge point. +/// Operation: GetReport. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetReportParameters +{ + [Required] + public long ReportId { get; set; } + + /// + public override string ToString() + => $"{nameof(ReportId)}: {ReportId}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Reports/RequestParameters/GetReportsParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Reports/RequestParameters/GetReportsParameters.verified.cs new file mode 100644 index 00000000..55857df0 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Reports/RequestParameters/GetReportsParameters.verified.cs @@ -0,0 +1,40 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Reports; + +/// +/// Parameters for operation request. +/// Description: Retrieve a list of reports for charge point(s). +/// Operation: GetReports. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetReportsParameters +{ + /// + /// page number to retrieve (starts with 0). + /// + public int Page { get; set; } = 0; + + /// + /// number of items per page (between 1 and 100, default 10). + /// + public int PerPage { get; set; } = 10; + + public long? ChargePointId { get; set; } + + public string? State { get; set; } + + public DateTimeOffset? FromDate { get; set; } + + public DateTimeOffset? ToDate { get; set; } + + public string? Priority { get; set; } + + /// + public override string ToString() + => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}, {nameof(ChargePointId)}: {ChargePointId}, {nameof(State)}: {State}, {nameof(FromDate)}: ({FromDate}), {nameof(ToDate)}: ({ToDate}), {nameof(Priority)}: {Priority}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Sites/CreateSite.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Sites/CreateSite.verified.cs index 1702f728..39aed0eb 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Sites/CreateSite.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Sites/CreateSite.verified.cs @@ -25,9 +25,15 @@ public class CreateSite [MinLength(1)] public string Name { get; set; } + /// + /// Address of the site, Note: please ensure to always provide a valid address. + /// [Required] public CreatedOrUpdateAddress Address { get; set; } + /// + /// Visibility type of the site. + /// [Required] public VisibilityType1 Visibility { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Sites/PatchSite.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Sites/PatchSite.verified.cs index 6eb2a146..e830f1c6 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Sites/PatchSite.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Sites/PatchSite.verified.cs @@ -17,8 +17,14 @@ public class PatchSite /// public string? Name { get; set; } + /// + /// Address of the site, Note: please ensure to always provide a valid address. + /// public CreatedOrUpdateAddress? Address { get; set; } + /// + /// Visibility type of the site. + /// public VisibilityType3? Visibility { get; set; } /// diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Sites/RequestParameters/GetSitesParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Sites/RequestParameters/GetSitesParameters.verified.cs index 41439f01..16e5c1cf 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Sites/RequestParameters/GetSitesParameters.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Sites/RequestParameters/GetSitesParameters.verified.cs @@ -24,28 +24,20 @@ public class GetSitesParameters /// public int PerPage { get; set; } = 10; - /// - /// The team id from which sites will be filtered by. - /// - public long TeamId { get; set; } + public long? TeamId { get; set; } - /// - /// Filter sites by partnerExternalId, to filter only resources without `partnerExternalId` *use* `partnerExternalId=""`. - /// - public string PartnerExternalId { get; set; } + public string? PartnerExternalId { get; set; } - /// - /// lat,long coordinates. If supplied, the Charge Points will be sorted in nearest first order relative - /// to this point. (Format: 55.7096,12.5856). - /// - public string SortByLocation { get; set; } + [RegularExpression("^(-?\\d*\\.\\d+|\\d+\\.\\d*)(,)(-?\\d*\\.\\d+|\\d+\\.\\d*)$")] + public string? SortByLocation { get; set; } + + public long? OperatorId { get; set; } + + public bool IncludePublic { get; set; } = false; - /// - /// Includes deleted resources in the response. - /// public bool IncludeDeleted { get; set; } = false; /// public override string ToString() - => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}, {nameof(TeamId)}: {TeamId}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(SortByLocation)}: {SortByLocation}, {nameof(IncludeDeleted)}: {IncludeDeleted}"; + => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}, {nameof(TeamId)}: {TeamId}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(SortByLocation)}: {SortByLocation}, {nameof(OperatorId)}: {OperatorId}, {nameof(IncludePublic)}: {IncludePublic}, {nameof(IncludeDeleted)}: {IncludeDeleted}"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Sites/Site.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Sites/Site.verified.cs index 0ac16536..a762ee5e 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Sites/Site.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Sites/Site.verified.cs @@ -38,6 +38,9 @@ public class Site [Required] public string Name { get; set; } + /// + /// Operator of this charging site. + /// public Operator? Operator { get; set; } /// @@ -93,6 +96,9 @@ public class Site /// public string? Note { get; set; } + /// + /// Location information for this site. + /// [Required] public Location Location { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SponsoredChargePoints/CreateSponsoredChargePointDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SponsoredChargePoints/CreateSponsoredChargePointDto.verified.cs index de51b957..6fda9802 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SponsoredChargePoints/CreateSponsoredChargePointDto.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SponsoredChargePoints/CreateSponsoredChargePointDto.verified.cs @@ -36,6 +36,9 @@ public class CreateSponsoredChargePointDto [Range(0, int.MaxValue)] public long? PriceGroupId { get; set; } + /// + /// The payout schedule for this sponsored charge point. + /// [Required] public SponsoredChargePointPayoutType PayoutSchedule { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SponsoredChargePoints/PatchSponsoredChargePoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SponsoredChargePoints/PatchSponsoredChargePoint.verified.cs index 3e5cb069..7fa989b8 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SponsoredChargePoints/PatchSponsoredChargePoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SponsoredChargePoints/PatchSponsoredChargePoint.verified.cs @@ -17,6 +17,9 @@ public class PatchSponsoredChargePoint /// public long? PriceGroupId { get; set; } + /// + /// The payout schedule for this sponsored charge point. + /// public SponsoredChargePointPayoutType? PayoutSchedule { get; set; } /// diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SponsoredChargePoints/PublicUser1.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SponsoredChargePoints/PublicUser1.verified.cs new file mode 100644 index 00000000..3062ac2f --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SponsoredChargePoints/PublicUser1.verified.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.SponsoredChargePoints; + +/// +/// PublicUser1. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class PublicUser1 +{ + /// + /// Id of the user. + /// + [Required] + public long Id { get; set; } + + /// + /// Formatted name to be displayed. + /// + [Required] + public string DisplayName { get; set; } + + /// + public override string ToString() + => $"{nameof(Id)}: {Id}, {nameof(DisplayName)}: {DisplayName}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SponsoredChargePoints/SponsoredChargePoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SponsoredChargePoints/SponsoredChargePoint.verified.cs index d16c0cde..95bc2ff2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SponsoredChargePoints/SponsoredChargePoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SponsoredChargePoints/SponsoredChargePoint.verified.cs @@ -22,6 +22,9 @@ public class SponsoredChargePoint /// public long TeamId { get; set; } + /// + /// The payout frequency for this sponsored charge point. + /// [Required] public SponsoredChargePointPayoutType Payout { get; set; } @@ -30,8 +33,14 @@ public class SponsoredChargePoint /// public bool PayForSubscriptions { get; set; } + /// + /// Operator of this sponsored charge point. + /// public Operator? Operator { get; set; } + /// + /// The charge point being sponsored. + /// [Required] public SponsoredChargePointData ChargePoint { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SponsoredChargePoints/SponsoredChargePointData.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SponsoredChargePoints/SponsoredChargePointData.verified.cs index 7d541ac9..01f3645f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SponsoredChargePoints/SponsoredChargePointData.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SponsoredChargePoints/SponsoredChargePointData.verified.cs @@ -22,10 +22,19 @@ public class SponsoredChargePointData /// public string? Name { get; set; } - public PublicUser? User { get; set; } + /// + /// The user (owner) of this charge point. + /// + public PublicUser1? User { get; set; } + /// + /// The sponsored price group of this charge point. + /// public PriceGroup? SponsoredPriceGroup { get; set; } + /// + /// Location information for this charge point. + /// [Required] public Location Location { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SubscriptionPurchases/Currency3.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SubscriptionPurchases/Currency3.verified.cs new file mode 100644 index 00000000..01b772bb --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SubscriptionPurchases/Currency3.verified.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.SubscriptionPurchases; + +/// +/// Currency3. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class Currency3 +{ + /// + /// Currency identifier, e.g. dkk. + /// + [Required] + public string Identifier { get; set; } + + /// + /// Readable name of currency. + /// + [Required] + public string Name { get; set; } + + /// + /// Number of decimals for this currency. + /// + public int Decimals { get; set; } + + /// + public override string ToString() + => $"{nameof(Identifier)}: {Identifier}, {nameof(Name)}: {Name}, {nameof(Decimals)}: {Decimals}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SubscriptionPurchases/SubscriptionPurchase.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SubscriptionPurchases/SubscriptionPurchase.verified.cs index 984c54c7..1a3486e8 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SubscriptionPurchases/SubscriptionPurchase.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/SubscriptionPurchases/SubscriptionPurchase.verified.cs @@ -22,6 +22,9 @@ public class SubscriptionPurchase /// public string? Note { get; set; } + /// + /// The type of this subscription purchase. + /// [Required] public SubscriptionPurchaseTypeDto Type { get; set; } @@ -50,9 +53,15 @@ public class SubscriptionPurchase /// public double TotalAmount { get; set; } + /// + /// The currency for this purchase. + /// [Required] - public Currency Currency { get; set; } + public Currency3 Currency { get; set; } + /// + /// The subscription this purchase refers to. + /// [Required] public Subscription Subscription { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Subscriptions/CreateSubscription.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Subscriptions/CreateSubscription.verified.cs index e8b43930..de23a290 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Subscriptions/CreateSubscription.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Subscriptions/CreateSubscription.verified.cs @@ -18,15 +18,18 @@ public class CreateSubscription [Range(0, int.MaxValue)] public long PlanId { get; set; } - [Required] - public SubscriptionCustomerType CustomerType { get; set; } - /// - /// Id of the customer the subscription is created for, e.g. a chargePointId. + /// Id of the customer the subscription is created for, e.g. team or charge-point id. /// [Range(0, int.MaxValue)] public long CustomerId { get; set; } + /// + /// Type of the customer that the subscription is created for. e.g. team or charge-point. + /// + [Required] + public SubscriptionCustomerType CustomerType { get; set; } + /// /// Allows to modify the absolute discount on a subscription if provided. /// If not provided, the discount of the plan is used. @@ -41,9 +44,18 @@ public class CreateSubscription /// public double? DiscountPercentage { get; set; } + /// + /// Configure the subscription, based on the plans serviceType.Currently you can configure tax-refund subscriptions only. + /// public SubscriptionServiceConfig? ServiceConfig { get; set; } + /// + /// The user that should be assigned as the purchaser of the subscription. If not provided, the subscription will be assigned to the default user for this consumer. + /// + [Range(0, int.MaxValue)] + public long? UserId { get; set; } + /// public override string ToString() - => $"{nameof(PlanId)}: {PlanId}, {nameof(CustomerType)}: ({CustomerType}), {nameof(CustomerId)}: {CustomerId}, {nameof(DiscountAbsolute)}: {DiscountAbsolute}, {nameof(DiscountPercentage)}: {DiscountPercentage}, {nameof(ServiceConfig)}: ({ServiceConfig})"; + => $"{nameof(PlanId)}: {PlanId}, {nameof(CustomerId)}: {CustomerId}, {nameof(CustomerType)}: ({CustomerType}), {nameof(DiscountAbsolute)}: {DiscountAbsolute}, {nameof(DiscountPercentage)}: {DiscountPercentage}, {nameof(ServiceConfig)}: ({ServiceConfig}), {nameof(UserId)}: {UserId}"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Subscriptions/RequestParameters/GetSubscriptionsParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Subscriptions/RequestParameters/GetSubscriptionsParameters.verified.cs index f27899cb..70fc0816 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Subscriptions/RequestParameters/GetSubscriptionsParameters.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Subscriptions/RequestParameters/GetSubscriptionsParameters.verified.cs @@ -28,9 +28,13 @@ public class GetSubscriptionsParameters public long? ChargePointId { get; set; } + public long? CustomerId { get; set; } + + public SubscriptionCustomerType? CustomerType { get; set; } + public long? SubscriptionPurchaseId { get; set; } /// public override string ToString() - => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}, {nameof(PlanId)}: {PlanId}, {nameof(ChargePointId)}: {ChargePointId}, {nameof(SubscriptionPurchaseId)}: {SubscriptionPurchaseId}"; + => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}, {nameof(PlanId)}: {PlanId}, {nameof(ChargePointId)}: {ChargePointId}, {nameof(CustomerId)}: {CustomerId}, {nameof(CustomerType)}: ({CustomerType}), {nameof(SubscriptionPurchaseId)}: {SubscriptionPurchaseId}"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffPeriodGroups/RequestParameters/CreateTariffPeriodGroupParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffPeriodGroups/RequestParameters/CreateTariffPeriodGroupParameters.verified.cs index a34cd03c..eb227dc2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffPeriodGroups/RequestParameters/CreateTariffPeriodGroupParameters.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffPeriodGroups/RequestParameters/CreateTariffPeriodGroupParameters.verified.cs @@ -15,7 +15,7 @@ namespace Monta.ApiClient.Generated.Contracts.TariffPeriodGroups; public class CreateTariffPeriodGroupParameters { [Required] - public TariffPeriodGroup Request { get; set; } + public TariffPeriodGroup1 Request { get; set; } /// public override string ToString() diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffPeriodGroups/RequestParameters/UpdateTariffPeriodGroupParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffPeriodGroups/RequestParameters/UpdateTariffPeriodGroupParameters.verified.cs index b3df17d5..904e15de 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffPeriodGroups/RequestParameters/UpdateTariffPeriodGroupParameters.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffPeriodGroups/RequestParameters/UpdateTariffPeriodGroupParameters.verified.cs @@ -18,7 +18,7 @@ public class UpdateTariffPeriodGroupParameters public long Id { get; set; } [Required] - public TariffPeriodGroup Request { get; set; } + public TariffPeriodGroup2 Request { get; set; } /// public override string ToString() diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffPeriodGroups/TariffPeriodGroup1.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffPeriodGroups/TariffPeriodGroup1.verified.cs new file mode 100644 index 00000000..95cdd528 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffPeriodGroups/TariffPeriodGroup1.verified.cs @@ -0,0 +1,41 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.TariffPeriodGroups; + +/// +/// TariffPeriodGroup1. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class TariffPeriodGroup1 +{ + /// + /// tariff period group active from date. + /// + [Required] + public DateTimeOffset ActiveFrom { get; set; } + + /// + /// tariff period group active to date. + /// + [Required] + public DateTimeOffset ActiveTo { get; set; } + + /// + /// tariff period group description. + /// + [Required] + public string Description { get; set; } + + /// + /// tariff id. + /// + public long TariffId { get; set; } + + /// + public override string ToString() + => $"{nameof(ActiveFrom)}: ({ActiveFrom}), {nameof(ActiveTo)}: ({ActiveTo}), {nameof(Description)}: {Description}, {nameof(TariffId)}: {TariffId}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffPeriodGroups/TariffPeriodGroup2.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffPeriodGroups/TariffPeriodGroup2.verified.cs new file mode 100644 index 00000000..f7a8067e --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffPeriodGroups/TariffPeriodGroup2.verified.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.TariffPeriodGroups; + +/// +/// TariffPeriodGroup2. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class TariffPeriodGroup2 +{ + /// + /// tariff period group active from date. + /// + public DateTimeOffset? ActiveFrom { get; set; } + + /// + /// tariff period group active to date. + /// + public DateTimeOffset? ActiveTo { get; set; } + + /// + /// tariff period group description. + /// + public string? Description { get; set; } + + /// + public override string ToString() + => $"{nameof(ActiveFrom)}: ({ActiveFrom}), {nameof(ActiveTo)}: ({ActiveTo}), {nameof(Description)}: {Description}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffRecurringPeriods/TariffRecurringPeriod.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffRecurringPeriods/TariffRecurringPeriod.verified.cs index fd8f01bb..19d8ddb9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffRecurringPeriods/TariffRecurringPeriod.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffRecurringPeriods/TariffRecurringPeriod.verified.cs @@ -22,9 +22,15 @@ public class TariffRecurringPeriod /// public long TariffId { get; set; } + /// + /// day of the period. + /// [Required] public DayOfWeek DayOfWeek { get; set; } + /// + /// End day of the period. + /// public DayOfWeek? EndDayOfWeek { get; set; } /// diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffRecurringPeriods/TariffRecurringPeriodCreateRequestDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffRecurringPeriods/TariffRecurringPeriodCreateRequestDto.verified.cs index 08ffcbb4..06444044 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffRecurringPeriods/TariffRecurringPeriodCreateRequestDto.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffRecurringPeriods/TariffRecurringPeriodCreateRequestDto.verified.cs @@ -24,9 +24,15 @@ public class TariffRecurringPeriodCreateRequestDto [Required] public long GroupId { get; set; } + /// + /// Capitalized name of the day of the week. + /// [Required] public DayOfWeek DayOfWeek { get; set; } + /// + /// Capitalized name of the day of the week that the price is for. + /// public DayOfWeek? EndDayOfWeek { get; set; } /// diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffRecurringPeriods/TariffRecurringPeriodUpdateRequestDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffRecurringPeriods/TariffRecurringPeriodUpdateRequestDto.verified.cs index d5fb1def..d691db0d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffRecurringPeriods/TariffRecurringPeriodUpdateRequestDto.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TariffRecurringPeriods/TariffRecurringPeriodUpdateRequestDto.verified.cs @@ -12,8 +12,14 @@ namespace Monta.ApiClient.Generated.Contracts.TariffRecurringPeriods; [GeneratedCode("ApiGenerator", "x.x.x.x")] public class TariffRecurringPeriodUpdateRequestDto { + /// + /// Capitalized name of the day of the week. + /// public DayOfWeek? DayOfWeek { get; set; } + /// + /// Capitalized name of the end day of the week. + /// public DayOfWeek? EndDayOfWeek { get; set; } /// diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Tariffs/CreateTariffRequest.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Tariffs/CreateTariffRequest.verified.cs index d70a46cc..892f5b51 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Tariffs/CreateTariffRequest.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Tariffs/CreateTariffRequest.verified.cs @@ -64,6 +64,9 @@ public class CreateTariffRequest [Required] public List ZipCodes { get; set; } + /// + /// Dynamic or weekly. + /// public TariffType TariffType { get; set; } /// @@ -83,6 +86,9 @@ public class CreateTariffRequest [Required] public string Area { get; set; } + /// + /// What kind of customer types are the tariff for?. + /// public TariffCustomerType? CustomerType { get; set; } /// diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Tariffs/FullTariff.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Tariffs/FullTariff.verified.cs index be711f88..d3e79b77 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Tariffs/FullTariff.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Tariffs/FullTariff.verified.cs @@ -12,6 +12,9 @@ namespace Monta.ApiClient.Generated.Contracts.Tariffs; [GeneratedCode("ApiGenerator", "x.x.x.x")] public class FullTariff { + /// + /// tariff. + /// [Required] public TariffDto Tariff { get; set; } @@ -21,6 +24,9 @@ public class FullTariff [Required] public List Prices { get; set; } + /// + /// Price specification. + /// public PriceSpecification? PriceSpecification { get; set; } /// diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Tariffs/TariffDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Tariffs/TariffDto.verified.cs index c4ccbaaf..f0fdc4f1 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Tariffs/TariffDto.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Tariffs/TariffDto.verified.cs @@ -71,6 +71,9 @@ public class TariffDto [Required] public List ZipCodes { get; set; } + /// + /// Type of the tariff. + /// [Required] public TariffType TariffType { get; set; } @@ -91,6 +94,9 @@ public class TariffDto [Required] public string Area { get; set; } + /// + /// Customer type of the tariff. + /// public TariffCustomerType? CustomerType { get; set; } /// diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Tariffs/UpdateTariffRequest.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Tariffs/UpdateTariffRequest.verified.cs index 376283ab..e5c771eb 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Tariffs/UpdateTariffRequest.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Tariffs/UpdateTariffRequest.verified.cs @@ -63,6 +63,9 @@ public class UpdateTariffRequest /// public List? ZipCodes { get; set; } = new List(); + /// + /// Dynamic or weekly. + /// public TariffType? TariffType { get; set; } /// @@ -83,6 +86,9 @@ public class UpdateTariffRequest [Required] public string Area { get; set; } + /// + /// What kind of customer types are the tariff for?. + /// public TariffCustomerType? CustomerType { get; set; } /// diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/CreateTeamMemberProfile.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/CreateTeamMemberProfile.verified.cs new file mode 100644 index 00000000..42fe17dc --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/CreateTeamMemberProfile.verified.cs @@ -0,0 +1,89 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.TeamMemberProfiles; + +/// +/// CreateTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class CreateTeamMemberProfile +{ + /// + /// Id of the team. + /// + [Range(0, int.MaxValue)] + public long TeamId { get; set; } + + /// + /// The team member profile name. + /// + [Required] + public string Name { get; set; } + + /// + /// The team member profile description. + /// + [Required] + public string Description { get; set; } + + /// + /// Role for team member profile. + /// + [Required] + public TeamMemberRole Role { get; set; } + + /// + /// The price group, when not provided the default team price group will be applied. + /// + public long? PriceGroupId { get; set; } + + /// + /// The cost group. + /// + public long? CostGroupId { get; set; } + + /// + /// Allows the team applying member profile to configure charge points. + /// + public bool CanConfigureChargePoints { get; set; } = false; + + /// + /// Gives the team applying member profile access to pay with team wallet when charging. + /// + public bool CanPayWithTeamWallet { get; set; } = false; + + /// + /// Allows the team applying member profile to request sponsoring from this team for their charge point. + /// + public bool CanRequestSponsoring { get; set; } = false; + + /// + /// Allows the team applying member profile to view and manage other members settings. + /// + public bool CanManageTeamMembers { get; set; } = false; + + /// + /// Who can pay the charging with Wallet?. + /// + [Required] + public TeamWalletChargePaymentType TeamWalletChargePaymentType { get; set; } = TeamWalletChargePaymentType.None; + + /// + /// Gives the team member access to withdraw and deposit from your team wallet to your bank account. + /// + public bool CanManageTeamWallet { get; set; } = false; + + /// + /// List of country ids for which the team member can pay for charges. + /// + [Required] + public List CanPayForChargesCountryIds { get; set; } + + /// + public override string ToString() + => $"{nameof(TeamId)}: {TeamId}, {nameof(Name)}: {Name}, {nameof(Description)}: {Description}, {nameof(Role)}: ({Role}), {nameof(PriceGroupId)}: {PriceGroupId}, {nameof(CostGroupId)}: {CostGroupId}, {nameof(CanConfigureChargePoints)}: {CanConfigureChargePoints}, {nameof(CanPayWithTeamWallet)}: {CanPayWithTeamWallet}, {nameof(CanRequestSponsoring)}: {CanRequestSponsoring}, {nameof(CanManageTeamMembers)}: {CanManageTeamMembers}, {nameof(TeamWalletChargePaymentType)}: {TeamWalletChargePaymentType}, {nameof(CanManageTeamWallet)}: {CanManageTeamWallet}, {nameof(CanPayForChargesCountryIds)}.Count: {CanPayForChargesCountryIds?.Count ?? 0}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/MontaPageTeamMemberProfileDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/MontaPageTeamMemberProfileDto.verified.cs new file mode 100644 index 00000000..a4aea7ec --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/MontaPageTeamMemberProfileDto.verified.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.TeamMemberProfiles; + +/// +/// MontaPageTeamMemberProfileDto. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class MontaPageTeamMemberProfileDto +{ + [Required] + public List Data { get; set; } + + [Required] + public MontaPageMeta Meta { get; set; } + + /// + public override string ToString() + => $"{nameof(Data)}.Count: {Data?.Count ?? 0}, {nameof(Meta)}: ({Meta})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/PatchTeamMemberProfile.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/PatchTeamMemberProfile.verified.cs new file mode 100644 index 00000000..74287bb9 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/PatchTeamMemberProfile.verified.cs @@ -0,0 +1,75 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.TeamMemberProfiles; + +/// +/// PatchTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class PatchTeamMemberProfile +{ + /// + /// Name for the team member profile. + /// + public string? Name { get; set; } + + /// + /// Description for the team member profile. + /// + public string? Description { get; set; } + + /// + /// Role for the team member profile. + /// + public TeamMemberRole? Role { get; set; } + + /// + /// The price group for the team member profile. + /// + public long? PriceGroupId { get; set; } + + /// + /// The cost group for the team member profile. + /// + public long? CostGroupId { get; set; } + + /// + /// Gives the team member access to pay with team wallet when charging. + /// + public bool? CanPayWithTeamWallet { get; set; } = false; + + /// + /// Gives the team member access to withdraw and deposit from your team wallet to your bank account. + /// + public bool? CanManageTeamWallet { get; set; } = false; + + /// + /// Allows the team member to request sponsoring from this team for their charge point. + /// + public bool? CanRequestSponsoring { get; set; } = false; + + /// + /// Allows the team member to view and manage other members settings. + /// + public bool? CanManageTeamMembers { get; set; } = false; + + public TeamWalletChargePaymentType? TeamWalletChargePaymentType { get; set; } + + /// + /// Allows the team member profile to configure charge points. + /// + public bool? CanConfigureChargePoints { get; set; } = false; + + /// + /// List of country ids for which the team member can pay for charges. + /// + public List? CanPayForChargesCountryIds { get; set; } = new List(); + + /// + public override string ToString() + => $"{nameof(Name)}: {Name}, {nameof(Description)}: {Description}, {nameof(Role)}: ({Role}), {nameof(PriceGroupId)}: {PriceGroupId}, {nameof(CostGroupId)}: {CostGroupId}, {nameof(CanPayWithTeamWallet)}: {CanPayWithTeamWallet}, {nameof(CanManageTeamWallet)}: {CanManageTeamWallet}, {nameof(CanRequestSponsoring)}: {CanRequestSponsoring}, {nameof(CanManageTeamMembers)}: {CanManageTeamMembers}, {nameof(TeamWalletChargePaymentType)}: ({TeamWalletChargePaymentType}), {nameof(CanConfigureChargePoints)}: {CanConfigureChargePoints}, {nameof(CanPayForChargesCountryIds)}.Count: {CanPayForChargesCountryIds?.Count ?? 0}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/RequestParameters/DeleteTeamMemberProfileParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/RequestParameters/DeleteTeamMemberProfileParameters.verified.cs new file mode 100644 index 00000000..b1d74ab2 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/RequestParameters/DeleteTeamMemberProfileParameters.verified.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.TeamMemberProfiles; + +/// +/// Parameters for operation request. +/// Description: Delete an existing team member profile. +/// Operation: DeleteTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class DeleteTeamMemberProfileParameters +{ + [Required] + public long Id { get; set; } + + /// + public override string ToString() + => $"{nameof(Id)}: {Id}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/RequestParameters/GetTeamMemberProfileParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/RequestParameters/GetTeamMemberProfileParameters.verified.cs new file mode 100644 index 00000000..eeadddf6 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/RequestParameters/GetTeamMemberProfileParameters.verified.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.TeamMemberProfiles; + +/// +/// Parameters for operation request. +/// Description: Retrieve a team member profile by id. +/// Operation: GetTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetTeamMemberProfileParameters +{ + [Required] + public long Id { get; set; } + + /// + public override string ToString() + => $"{nameof(Id)}: {Id}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/RequestParameters/GetTeamMemberProfilesParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/RequestParameters/GetTeamMemberProfilesParameters.verified.cs new file mode 100644 index 00000000..f2cc5d79 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/RequestParameters/GetTeamMemberProfilesParameters.verified.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.TeamMemberProfiles; + +/// +/// Parameters for operation request. +/// Description: Retrieve a list of team member profiles. +/// Operation: GetTeamMemberProfiles. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetTeamMemberProfilesParameters +{ + /// + /// page number to retrieve (starts with 0). + /// + public int Page { get; set; } = 0; + + /// + /// number of items per page (between 1 and 100, default 10). + /// + public int PerPage { get; set; } = 10; + + public long? TeamId { get; set; } + + public string? Name { get; set; } + + /// + public override string ToString() + => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}, {nameof(TeamId)}: {TeamId}, {nameof(Name)}: {Name}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/RequestParameters/PostTeamMemberProfileParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/RequestParameters/PostTeamMemberProfileParameters.verified.cs new file mode 100644 index 00000000..69a4f513 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/RequestParameters/PostTeamMemberProfileParameters.verified.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.TeamMemberProfiles; + +/// +/// Parameters for operation request. +/// Description: Create a team member profile. +/// Operation: PostTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class PostTeamMemberProfileParameters +{ + [Required] + public CreateTeamMemberProfile Request { get; set; } + + /// + public override string ToString() + => $"{nameof(Request)}: ({Request})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/RequestParameters/UpdateTeamMemberProfileParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/RequestParameters/UpdateTeamMemberProfileParameters.verified.cs new file mode 100644 index 00000000..fce06436 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/RequestParameters/UpdateTeamMemberProfileParameters.verified.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.TeamMemberProfiles; + +/// +/// Parameters for operation request. +/// Description: Patch a team member profile. +/// Operation: UpdateTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class UpdateTeamMemberProfileParameters +{ + [Required] + public long Id { get; set; } + + [Required] + public PatchTeamMemberProfile Request { get; set; } + + /// + public override string ToString() + => $"{nameof(Id)}: {Id}, {nameof(Request)}: ({Request})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/TeamMemberProfile.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/TeamMemberProfile.verified.cs new file mode 100644 index 00000000..21e38336 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMemberProfiles/TeamMemberProfile.verified.cs @@ -0,0 +1,112 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.TeamMemberProfiles; + +/// +/// TeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class TeamMemberProfile +{ + /// + /// Id of the team member profile. + /// + [Required] + public long Id { get; set; } + + /// + /// Team id of team member profile. + /// + public long TeamId { get; set; } + + /// + /// The team member profile name. + /// + [Required] + public string Name { get; set; } + + /// + /// The team member profile description. + /// + public string? Description { get; set; } + + /// + /// Role of the this team member profile. + /// + [Required] + public TeamMemberRole Role { get; set; } + + /// + /// The price group for this team member profile. + /// + public long? PriceGroupId { get; set; } + + /// + /// The cost group for this team member profile. + /// + public long? CostGroupId { get; set; } + + /// + /// Indicates if the team member profile access to pay with team wallet when charging. + /// + public bool CanPayWithTeamWallet { get; set; } = false; + + /// + /// Indicates if team member profile has access to withdraw and deposit from your team wallet to your bank account. + /// + public bool CanManageTeamWallet { get; set; } = false; + + /// + /// Indicates if the team member profile is allowed to request sponsoring from this team for their charge point. + /// + public bool CanRequestSponsoring { get; set; } = false; + + /// + /// Indicates that the team member profile can view and manage other members settings. + /// + public bool CanManageTeamMembers { get; set; } = false; + + /// + /// Indicates that the team member profile can configure charge points. + /// + public bool CanConfigureChargePoints { get; set; } = false; + + /// + /// Who can pay the charging with Wallet?. + /// + [Required] + public TeamWalletChargePaymentType TeamWalletChargePaymentType { get; set; } = TeamWalletChargePaymentType.None; + + /// + /// List of country ids for which the team member can pay for charges. + /// + public List? CanPayForChargesCountryIds { get; set; } = new List(); + + /// + /// Operator of this team member. + /// + public Operator? Operator { get; set; } + + /// + /// Date the team member profile was created. + /// + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// Date the team member profile was updated. + /// + public DateTimeOffset? UpdatedAt { get; set; } + + /// + /// Date the team member profile was deleted. + /// + public DateTimeOffset? DeletedAt { get; set; } + + /// + public override string ToString() + => $"{nameof(Id)}: {Id}, {nameof(TeamId)}: {TeamId}, {nameof(Name)}: {Name}, {nameof(Description)}: {Description}, {nameof(Role)}: ({Role}), {nameof(PriceGroupId)}: {PriceGroupId}, {nameof(CostGroupId)}: {CostGroupId}, {nameof(CanPayWithTeamWallet)}: {CanPayWithTeamWallet}, {nameof(CanManageTeamWallet)}: {CanManageTeamWallet}, {nameof(CanRequestSponsoring)}: {CanRequestSponsoring}, {nameof(CanManageTeamMembers)}: {CanManageTeamMembers}, {nameof(CanConfigureChargePoints)}: {CanConfigureChargePoints}, {nameof(TeamWalletChargePaymentType)}: {TeamWalletChargePaymentType}, {nameof(CanPayForChargesCountryIds)}.Count: {CanPayForChargesCountryIds?.Count ?? 0}, {nameof(Operator)}: ({Operator}), {nameof(CreatedAt)}: ({CreatedAt}), {nameof(UpdatedAt)}: ({UpdatedAt}), {nameof(DeletedAt)}: ({DeletedAt})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/CreateTeamMember.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/CreateTeamMember.verified.cs index e1e24e4d..27e932b2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/CreateTeamMember.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/CreateTeamMember.verified.cs @@ -39,6 +39,9 @@ public class CreateTeamMember [RegularExpression("^\\+[1-9]\\d{1,14}$")] public string? Phone { get; set; } + /// + /// Role for this member within the team. + /// [Required] public TeamMemberRole Role { get; set; } @@ -47,6 +50,21 @@ public class CreateTeamMember /// public long? PriceGroupId { get; set; } + /// + /// The cost group for this team member. + /// + public long? CostGroupId { get; set; } + + /// + /// The team member profile id to apply to this team member. + /// + public long? TeamMemberProfileId { get; set; } + + /// + /// Indicates if the team member access to pay with team wallet when charging. + /// + public bool CanConfigureChargePoints { get; set; } = false; + /// /// Gives the team member access to pay with team wallet when charging. /// @@ -69,6 +87,11 @@ public class CreateTeamMember /// public bool CanManageTeamWallet { get; set; } = false; + /// + /// List of country ids for which the team member can pay for charges. + /// + public List? CanPayForChargesCountryIds { get; set; } = new List(); + /// /// A note for the team member. /// @@ -91,5 +114,5 @@ public class CreateTeamMember /// public override string ToString() - => $"{nameof(TeamId)}: {TeamId}, {nameof(UserId)}: {UserId}, {nameof(Email)}: {Email}, {nameof(Phone)}: {Phone}, {nameof(Role)}: ({Role}), {nameof(PriceGroupId)}: {PriceGroupId}, {nameof(CanPayWithTeamWallet)}: {CanPayWithTeamWallet}, {nameof(CanRequestSponsoring)}: {CanRequestSponsoring}, {nameof(CanManageTeamMembers)}: {CanManageTeamMembers}, {nameof(TeamWalletChargePaymentType)}: ({TeamWalletChargePaymentType}), {nameof(CanManageTeamWallet)}: {CanManageTeamWallet}, {nameof(Note)}: {Note}, {nameof(ChargePointIds)}.Count: {ChargePointIds?.Count ?? 0}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(PartnerCustomPayload)}.Count: {PartnerCustomPayload?.Count ?? 0}"; + => $"{nameof(TeamId)}: {TeamId}, {nameof(UserId)}: {UserId}, {nameof(Email)}: {Email}, {nameof(Phone)}: {Phone}, {nameof(Role)}: ({Role}), {nameof(PriceGroupId)}: {PriceGroupId}, {nameof(CostGroupId)}: {CostGroupId}, {nameof(TeamMemberProfileId)}: {TeamMemberProfileId}, {nameof(CanConfigureChargePoints)}: {CanConfigureChargePoints}, {nameof(CanPayWithTeamWallet)}: {CanPayWithTeamWallet}, {nameof(CanRequestSponsoring)}: {CanRequestSponsoring}, {nameof(CanManageTeamMembers)}: {CanManageTeamMembers}, {nameof(TeamWalletChargePaymentType)}: ({TeamWalletChargePaymentType}), {nameof(CanManageTeamWallet)}: {CanManageTeamWallet}, {nameof(CanPayForChargesCountryIds)}.Count: {CanPayForChargesCountryIds?.Count ?? 0}, {nameof(Note)}: {Note}, {nameof(ChargePointIds)}.Count: {ChargePointIds?.Count ?? 0}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(PartnerCustomPayload)}.Count: {PartnerCustomPayload?.Count ?? 0}"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/MontaPageTeamMemberDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/MontaPageTeamMemberDto.verified.cs index cdf1d449..b0413e1b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/MontaPageTeamMemberDto.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/MontaPageTeamMemberDto.verified.cs @@ -13,7 +13,7 @@ namespace Monta.ApiClient.Generated.Contracts.TeamMembers; public class MontaPageTeamMemberDto { [Required] - public List Data { get; set; } + public List Data { get; set; } [Required] public MontaPageMeta Meta { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/PatchTeamMember.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/PatchTeamMember.verified.cs index 834bf5de..c89c2355 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/PatchTeamMember.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/PatchTeamMember.verified.cs @@ -17,6 +17,9 @@ public class PatchTeamMember /// public List? ChargePointIds { get; set; } = new List(); + /// + /// Role for this member within the team. + /// public TeamMemberRole? Role { get; set; } /// @@ -24,6 +27,21 @@ public class PatchTeamMember /// public long? PriceGroupId { get; set; } + /// + /// The cost group for this team member. + /// + public long? CostGroupId { get; set; } + + /// + /// The team member profile id to apply to this team member. + /// + public long? TeamMemberProfileId { get; set; } + + /// + /// Indicates if the team member access to pay with team wallet when charging. + /// + public bool? CanConfigureChargePoints { get; set; } = false; + /// /// Gives the team member access to pay with team wallet when charging. /// @@ -46,6 +64,11 @@ public class PatchTeamMember public TeamWalletChargePaymentType? TeamWalletChargePaymentType { get; set; } + /// + /// List of country ids for which the team member can pay for charges. + /// + public List? CanPayForChargesCountryIds { get; set; } = new List(); + /// /// A note for the team member. /// @@ -63,5 +86,5 @@ public class PatchTeamMember /// public override string ToString() - => $"{nameof(ChargePointIds)}.Count: {ChargePointIds?.Count ?? 0}, {nameof(Role)}: ({Role}), {nameof(PriceGroupId)}: {PriceGroupId}, {nameof(CanPayWithTeamWallet)}: {CanPayWithTeamWallet}, {nameof(CanManageTeamWallet)}: {CanManageTeamWallet}, {nameof(CanRequestSponsoring)}: {CanRequestSponsoring}, {nameof(CanManageTeamMembers)}: {CanManageTeamMembers}, {nameof(TeamWalletChargePaymentType)}: ({TeamWalletChargePaymentType}), {nameof(Note)}: {Note}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(PartnerCustomPayload)}.Count: {PartnerCustomPayload?.Count ?? 0}"; + => $"{nameof(ChargePointIds)}.Count: {ChargePointIds?.Count ?? 0}, {nameof(Role)}: ({Role}), {nameof(PriceGroupId)}: {PriceGroupId}, {nameof(CostGroupId)}: {CostGroupId}, {nameof(TeamMemberProfileId)}: {TeamMemberProfileId}, {nameof(CanConfigureChargePoints)}: {CanConfigureChargePoints}, {nameof(CanPayWithTeamWallet)}: {CanPayWithTeamWallet}, {nameof(CanManageTeamWallet)}: {CanManageTeamWallet}, {nameof(CanRequestSponsoring)}: {CanRequestSponsoring}, {nameof(CanManageTeamMembers)}: {CanManageTeamMembers}, {nameof(TeamWalletChargePaymentType)}: ({TeamWalletChargePaymentType}), {nameof(CanPayForChargesCountryIds)}.Count: {CanPayForChargesCountryIds?.Count ?? 0}, {nameof(Note)}: {Note}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(PartnerCustomPayload)}.Count: {PartnerCustomPayload?.Count ?? 0}"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/RequestParameters/AcceptTeamMemberJoinRequestParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/RequestParameters/AcceptTeamMemberJoinRequestParameters.verified.cs new file mode 100644 index 00000000..ee07915a --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/RequestParameters/AcceptTeamMemberJoinRequestParameters.verified.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.TeamMembers; + +/// +/// Parameters for operation request. +/// Description: Approve a team member who requested to join a team. +/// Operation: AcceptTeamMemberJoinRequest. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class AcceptTeamMemberJoinRequestParameters +{ + [Required] + public long Id { get; set; } + + /// + public override string ToString() + => $"{nameof(Id)}: {Id}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/RequestParameters/GetTeamMembersParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/RequestParameters/GetTeamMembersParameters.verified.cs index 2ff54961..710b81f9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/RequestParameters/GetTeamMembersParameters.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/RequestParameters/GetTeamMembersParameters.verified.cs @@ -30,7 +30,7 @@ public class GetTeamMembersParameters public TeamMemberRole? Role { get; set; } - public TeamMemberState? State { get; set; } + public TeamMemberState3? State { get; set; } [Range(0, 2147483647)] public long? UserId { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/TeamMemberDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/TeamMember.verified.cs similarity index 70% rename from test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/TeamMemberDto.verified.cs rename to test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/TeamMember.verified.cs index 08ba8154..a318bebe 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/TeamMemberDto.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/TeamMembers/TeamMember.verified.cs @@ -7,16 +7,16 @@ namespace Monta.ApiClient.Generated.Contracts.TeamMembers; /// -/// TeamMemberDto. +/// TeamMember. /// [GeneratedCode("ApiGenerator", "x.x.x.x")] -public class TeamMemberDto +public class TeamMember { /// /// Id of the team member. /// [Required] - public string Id { get; set; } + public long Id { get; set; } /// /// Team id of team member. @@ -28,6 +28,9 @@ public class TeamMemberDto /// public string? DisplayName { get; set; } + /// + /// Operator of this team member. + /// public Operator? Operator { get; set; } /// @@ -40,14 +43,23 @@ public class TeamMemberDto /// public long? UserId { get; set; } + /// + /// Role of the this member within the team. + /// [Required] public TeamMemberRole Role { get; set; } + /// + /// Indicates if the user has access to all charge points or only to selected charge points. + /// [Required] - public TeamMemberAccess Access { get; set; } + public TeamMemberAccess1 Access { get; set; } + /// + /// State of the invitation. + /// [Required] - public TeamMemberState State { get; set; } + public TeamMemberState1 State { get; set; } /// /// Note for team member. @@ -95,6 +107,21 @@ public class TeamMemberDto /// public long? PriceGroupId { get; set; } + /// + /// The cost group for this team member. + /// + public long? CostGroupId { get; set; } + + /// + /// The team member profile id to apply to this team member. + /// + public long? TeamMemberProfileId { get; set; } + + /// + /// Indicates if the team member access to pay with team wallet when charging. + /// + public bool CanConfigureChargePoints { get; set; } = false; + /// /// Indicates if the team member access to pay with team wallet when charging. /// @@ -115,6 +142,12 @@ public class TeamMemberDto /// public bool CanManageTeamMembers { get; set; } = false; + /// + /// List of country ids for which the team member can pay for charges. + /// + [Required] + public List CanPayForChargesCountryIds { get; set; } + /// /// Who can pay the charging with Wallet?. /// @@ -133,5 +166,5 @@ public class TeamMemberDto /// public override string ToString() - => $"{nameof(Id)}: {Id}, {nameof(TeamId)}: {TeamId}, {nameof(DisplayName)}: {DisplayName}, {nameof(Operator)}: ({Operator}), {nameof(PartnerExternalTeamId)}: {PartnerExternalTeamId}, {nameof(UserId)}: {UserId}, {nameof(Role)}: ({Role}), {nameof(Access)}: ({Access}), {nameof(State)}: ({State}), {nameof(Note)}: {Note}, {nameof(InvitedAt)}: ({InvitedAt}), {nameof(AcceptedAt)}: ({AcceptedAt}), {nameof(RejectedAt)}: ({RejectedAt}), {nameof(CreatedAt)}: ({CreatedAt}), {nameof(UpdatedAt)}: ({UpdatedAt}), {nameof(DeletedAt)}: ({DeletedAt}), {nameof(ChargePointIds)}.Count: {ChargePointIds?.Count ?? 0}, {nameof(PriceGroupId)}: {PriceGroupId}, {nameof(CanPayWithTeamWallet)}: {CanPayWithTeamWallet}, {nameof(CanManageTeamWallet)}: {CanManageTeamWallet}, {nameof(CanRequestSponsoring)}: {CanRequestSponsoring}, {nameof(CanManageTeamMembers)}: {CanManageTeamMembers}, {nameof(TeamWalletChargePaymentType)}: {TeamWalletChargePaymentType}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(PartnerCustomPayload)}.Count: {PartnerCustomPayload?.Count ?? 0}"; + => $"{nameof(Id)}: {Id}, {nameof(TeamId)}: {TeamId}, {nameof(DisplayName)}: {DisplayName}, {nameof(Operator)}: ({Operator}), {nameof(PartnerExternalTeamId)}: {PartnerExternalTeamId}, {nameof(UserId)}: {UserId}, {nameof(Role)}: ({Role}), {nameof(Access)}: ({Access}), {nameof(State)}: ({State}), {nameof(Note)}: {Note}, {nameof(InvitedAt)}: ({InvitedAt}), {nameof(AcceptedAt)}: ({AcceptedAt}), {nameof(RejectedAt)}: ({RejectedAt}), {nameof(CreatedAt)}: ({CreatedAt}), {nameof(UpdatedAt)}: ({UpdatedAt}), {nameof(DeletedAt)}: ({DeletedAt}), {nameof(ChargePointIds)}.Count: {ChargePointIds?.Count ?? 0}, {nameof(PriceGroupId)}: {PriceGroupId}, {nameof(CostGroupId)}: {CostGroupId}, {nameof(TeamMemberProfileId)}: {TeamMemberProfileId}, {nameof(CanConfigureChargePoints)}: {CanConfigureChargePoints}, {nameof(CanPayWithTeamWallet)}: {CanPayWithTeamWallet}, {nameof(CanManageTeamWallet)}: {CanManageTeamWallet}, {nameof(CanRequestSponsoring)}: {CanRequestSponsoring}, {nameof(CanManageTeamMembers)}: {CanManageTeamMembers}, {nameof(CanPayForChargesCountryIds)}.Count: {CanPayForChargesCountryIds?.Count ?? 0}, {nameof(TeamWalletChargePaymentType)}: {TeamWalletChargePaymentType}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(PartnerCustomPayload)}.Count: {PartnerCustomPayload?.Count ?? 0}"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/CreateTeamDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/CreateTeamDto.verified.cs index 67a9104e..2d957cce 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/CreateTeamDto.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/CreateTeamDto.verified.cs @@ -18,7 +18,7 @@ public class CreateTeamDto public long? UserId { get; set; } /// - /// email of the user that owns the team, useful when the userId is not known. + /// Email of the user that owns the team, useful when the userId is not known. /// /// /// Email validation being enforced. @@ -26,6 +26,12 @@ public class CreateTeamDto [EmailAddress] public string? UserEmail { get; set; } + /// + /// Id of the operator this team should be assigned to<br />*Note*: if not provided the team will be assigned to the default operator for the given consumer, if the default operator cannot be assigned the request will be rejected. + /// + [Range(0, int.MaxValue)] + public long? OperatorId { get; set; } + /// /// Name of the team. /// @@ -43,9 +49,15 @@ public class CreateTeamDto [EmailAddress] public string ContactEmail { get; set; } + /// + /// type of the team. + /// [Required] public TeamTypeCreatable Type { get; set; } + /// + /// Address of the team, Note: be sure to add always a valid address. + /// [Required] public CreatedOrUpdateAddress Address { get; set; } @@ -80,5 +92,5 @@ public class CreateTeamDto /// public override string ToString() - => $"{nameof(UserId)}: {UserId}, {nameof(UserEmail)}: {UserEmail}, {nameof(Name)}: {Name}, {nameof(ContactEmail)}: {ContactEmail}, {nameof(Type)}: ({Type}), {nameof(Address)}: ({Address}), {nameof(CompanyName)}: {CompanyName}, {nameof(VatNumber)}: {VatNumber}, {nameof(FinanceEmail)}: {FinanceEmail}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(PartnerCustomPayload)}.Count: {PartnerCustomPayload?.Count ?? 0}"; + => $"{nameof(UserId)}: {UserId}, {nameof(UserEmail)}: {UserEmail}, {nameof(OperatorId)}: {OperatorId}, {nameof(Name)}: {Name}, {nameof(ContactEmail)}: {ContactEmail}, {nameof(Type)}: ({Type}), {nameof(Address)}: ({Address}), {nameof(CompanyName)}: {CompanyName}, {nameof(VatNumber)}: {VatNumber}, {nameof(FinanceEmail)}: {FinanceEmail}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(PartnerCustomPayload)}.Count: {PartnerCustomPayload?.Count ?? 0}"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/Currency7.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/Currency7.verified.cs new file mode 100644 index 00000000..316cd3b7 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/Currency7.verified.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Teams; + +/// +/// Currency7. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class Currency7 +{ + /// + /// Currency identifier, e.g. dkk. + /// + [Required] + public string Identifier { get; set; } + + /// + /// Readable name of currency. + /// + [Required] + public string Name { get; set; } + + /// + /// Number of decimals for this currency. + /// + public int Decimals { get; set; } + + /// + public override string ToString() + => $"{nameof(Identifier)}: {Identifier}, {nameof(Name)}: {Name}, {nameof(Decimals)}: {Decimals}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/PatchTeam.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/PatchTeam.verified.cs index fc5fa7b8..1d3dedd1 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/PatchTeam.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/PatchTeam.verified.cs @@ -40,6 +40,9 @@ public class PatchTeam [EmailAddress] public string? ContactEmail { get; set; } + /// + /// Address of the team. + /// public CreatedOrUpdateAddress? Address { get; set; } /// diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/RequestParameters/FreezeTeamParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/RequestParameters/FreezeTeamParameters.verified.cs new file mode 100644 index 00000000..51dd37c3 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/RequestParameters/FreezeTeamParameters.verified.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Teams; + +/// +/// Parameters for operation request. +/// Description: Freeze a team. +/// Operation: FreezeTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class FreezeTeamParameters +{ + [Required] + public long Id { get; set; } + + [Required] + public UpdateTeamStateDto Request { get; set; } + + /// + public override string ToString() + => $"{nameof(Id)}: {Id}, {nameof(Request)}: ({Request})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/RequestParameters/GetTeamsParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/RequestParameters/GetTeamsParameters.verified.cs index cefeef68..227fa36f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/RequestParameters/GetTeamsParameters.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/RequestParameters/GetTeamsParameters.verified.cs @@ -14,16 +14,6 @@ namespace Monta.ApiClient.Generated.Contracts.Teams; [GeneratedCode("ApiGenerator", "x.x.x.x")] public class GetTeamsParameters { - /// - /// Filter teams by partnerExternalId, to filter only resources without `partnerExternalId` *use* `partnerExternalId=""`. - /// - public string PartnerExternalId { get; set; } - - /// - /// Filter to include delete teams in the response. - /// - public bool IncludeDeleted { get; set; } = false; - /// /// page number to retrieve (starts with 0). /// @@ -36,5 +26,5 @@ public class GetTeamsParameters /// public override string ToString() - => $"{nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(IncludeDeleted)}: {IncludeDeleted}, {nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}"; + => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/RequestParameters/UnfreezeTeamParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/RequestParameters/UnfreezeTeamParameters.verified.cs new file mode 100644 index 00000000..ad8c8b79 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/RequestParameters/UnfreezeTeamParameters.verified.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Teams; + +/// +/// Parameters for operation request. +/// Description: Unfreeze a team. +/// Operation: UnfreezeTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class UnfreezeTeamParameters +{ + [Required] + public long Id { get; set; } + + /// + public override string ToString() + => $"{nameof(Id)}: {Id}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/Team.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/Team.verified.cs index 3b2ea93a..82bc9e4e 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/Team.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/Team.verified.cs @@ -54,13 +54,22 @@ public class Team /// public string? VatNumber { get; set; } + /// + /// The operator to this team is associated. + /// public Operator? Operator { get; set; } + /// + /// The address where the team is located. + /// [Required] public TeamDtoTeamAddressDto Address { get; set; } + /// + /// The currency assigned for this team. + /// [Required] - public Currency Currency { get; set; } + public Currency7 Currency { get; set; } /// /// Type of the team. @@ -68,11 +77,31 @@ public class Team [Required] public string Type { get; set; } + /// + /// Category of the team. + /// + public TeamDtoTeamCategoryDto? Category { get; set; } + /// /// Id of the user that owns this team. /// public long UserId { get; set; } + /// + /// Whether the team is frozen or not. + /// + public bool IsFrozen { get; set; } + + /// + /// Team freezing reason. + /// + public string? FrozenReason { get; set; } + + /// + /// Frozen date of this team. + /// + public DateTimeOffset? FrozenAt { get; set; } + /// /// Blocked date of this team. /// @@ -97,5 +126,5 @@ public class Team /// public override string ToString() - => $"{nameof(Id)}: {Id}, {nameof(Name)}: {Name}, {nameof(ExternalId)}: {ExternalId}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(PartnerCustomPayload)}.Count: {PartnerCustomPayload?.Count ?? 0}, {nameof(JoinCode)}: {JoinCode}, {nameof(CompanyName)}: {CompanyName}, {nameof(VatNumber)}: {VatNumber}, {nameof(Operator)}: ({Operator}), {nameof(Address)}: ({Address}), {nameof(Currency)}: ({Currency}), {nameof(Type)}: {Type}, {nameof(UserId)}: {UserId}, {nameof(BlockedAt)}: ({BlockedAt}), {nameof(CreatedAt)}: ({CreatedAt}), {nameof(UpdatedAt)}: ({UpdatedAt}), {nameof(DeletedAt)}: ({DeletedAt})"; + => $"{nameof(Id)}: {Id}, {nameof(Name)}: {Name}, {nameof(ExternalId)}: {ExternalId}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(PartnerCustomPayload)}.Count: {PartnerCustomPayload?.Count ?? 0}, {nameof(JoinCode)}: {JoinCode}, {nameof(CompanyName)}: {CompanyName}, {nameof(VatNumber)}: {VatNumber}, {nameof(Operator)}: ({Operator}), {nameof(Address)}: ({Address}), {nameof(Currency)}: ({Currency}), {nameof(Type)}: {Type}, {nameof(Category)}: ({Category}), {nameof(UserId)}: {UserId}, {nameof(IsFrozen)}: {IsFrozen}, {nameof(FrozenReason)}: {FrozenReason}, {nameof(FrozenAt)}: ({FrozenAt}), {nameof(BlockedAt)}: ({BlockedAt}), {nameof(CreatedAt)}: ({CreatedAt}), {nameof(UpdatedAt)}: ({UpdatedAt}), {nameof(DeletedAt)}: ({DeletedAt})"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/TeamDtoTeamCategoryDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/TeamDtoTeamCategoryDto.verified.cs new file mode 100644 index 00000000..4e46c587 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/TeamDtoTeamCategoryDto.verified.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Teams; + +/// +/// TeamDtoTeamCategoryDto. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class TeamDtoTeamCategoryDto +{ + /// + /// Category Identifier. + /// + [Required] + public string Identifier { get; set; } + + /// + /// Category name. + /// + [Required] + public string Name { get; set; } + + /// + public override string ToString() + => $"{nameof(Identifier)}: {Identifier}, {nameof(Name)}: {Name}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/UpdateTeamStateDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/UpdateTeamStateDto.verified.cs new file mode 100644 index 00000000..5ba01470 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Teams/UpdateTeamStateDto.verified.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Teams; + +/// +/// UpdateTeamStateDto. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class UpdateTeamStateDto +{ + /// + /// Team freezing reason. + /// + public string? Reason { get; set; } + + /// + public override string ToString() + => $"{nameof(Reason)}: {Reason}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Users/MontaPageUserDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Users/MontaPageUserDto.verified.cs new file mode 100644 index 00000000..bbf5ce7b --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Users/MontaPageUserDto.verified.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Users; + +/// +/// MontaPageUserDto. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class MontaPageUserDto +{ + [Required] + public List Data { get; set; } + + [Required] + public MontaPageMeta Meta { get; set; } + + /// + public override string ToString() + => $"{nameof(Data)}.Count: {Data?.Count ?? 0}, {nameof(Meta)}: ({Meta})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Users/RequestParameters/GetUserParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Users/RequestParameters/GetUserParameters.verified.cs new file mode 100644 index 00000000..fe565c49 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Users/RequestParameters/GetUserParameters.verified.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Users; + +/// +/// Parameters for operation request. +/// Description: Retrieve a user. +/// Operation: GetUser. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetUserParameters +{ + [Required] + public long UserId { get; set; } + + /// + public override string ToString() + => $"{nameof(UserId)}: {UserId}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Users/RequestParameters/GetUsersParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Users/RequestParameters/GetUsersParameters.verified.cs new file mode 100644 index 00000000..f62769fa --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Users/RequestParameters/GetUsersParameters.verified.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Users; + +/// +/// Parameters for operation request. +/// Description: Retrieve users. +/// Operation: GetUsers. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetUsersParameters +{ + /// + /// page number to retrieve (starts with 0). + /// + public int Page { get; set; } = 0; + + /// + /// number of items per page (between 1 and 100, default 10). + /// + public int PerPage { get; set; } = 10; + + /// + /// filter user by email. + /// + /// + /// Email validation being enforced. + /// + [EmailAddress] + public string Email { get; set; } + + /// + /// filter user by phone. + /// + public string Phone { get; set; } + + /// + /// Set to 'true' to include deleted users, 'false' otherwise. + /// + public bool IncludeDeleted { get; set; } = false; + + /// + public override string ToString() + => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}, {nameof(Email)}: {Email}, {nameof(Phone)}: {Phone}, {nameof(IncludeDeleted)}: {IncludeDeleted}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Users/User.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Users/User.verified.cs new file mode 100644 index 00000000..0d295f74 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Users/User.verified.cs @@ -0,0 +1,79 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.Users; + +/// +/// User. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class User +{ + /// + /// Id of the user. + /// + [Required] + public long Id { get; set; } + + /// + /// First name of the user. + /// + public string? FirstName { get; set; } + + /// + /// Last name of the user. + /// + public string? LastName { get; set; } + + /// + /// Email of the user. + /// + public string? Email { get; set; } + + /// + /// Phone number of the user. + /// + public string? Phone { get; set; } + + /// + /// URL of the profile image. + /// + public string? ProfileImageUrl { get; set; } + + /// + /// Address of the user. + /// + public Address? Address { get; set; } + + /// + /// Preferred language of the user. + /// + public string? Language { get; set; } + + /// + /// Timestamp when the user read the terms. + /// + public DateTimeOffset? TermsReadAt { get; set; } + + /// + /// Timestamp when the user was created. + /// + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// Timestamp when the user was last updated. + /// + public DateTimeOffset? UpdatedAt { get; set; } + + /// + /// Timestamp when the user was deleted. + /// + public DateTimeOffset? DeletedAt { get; set; } + + /// + public override string ToString() + => $"{nameof(Id)}: {Id}, {nameof(FirstName)}: {FirstName}, {nameof(LastName)}: {LastName}, {nameof(Email)}: {Email}, {nameof(Phone)}: {Phone}, {nameof(ProfileImageUrl)}: {ProfileImageUrl}, {nameof(Address)}: ({Address}), {nameof(Language)}: {Language}, {nameof(TermsReadAt)}: ({TermsReadAt}), {nameof(CreatedAt)}: ({CreatedAt}), {nameof(UpdatedAt)}: ({UpdatedAt}), {nameof(DeletedAt)}: ({DeletedAt})"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/Currency13.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/Currency13.verified.cs new file mode 100644 index 00000000..699fb11f --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/Currency13.verified.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.WalletTransactions; + +/// +/// Currency13. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class Currency13 +{ + /// + /// Currency identifier, e.g. dkk. + /// + [Required] + public string Identifier { get; set; } + + /// + /// Readable name of currency. + /// + [Required] + public string Name { get; set; } + + /// + /// Number of decimals for this currency. + /// + public int Decimals { get; set; } + + /// + public override string ToString() + => $"{nameof(Identifier)}: {Identifier}, {nameof(Name)}: {Name}, {nameof(Decimals)}: {Decimals}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/Currency14.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/Currency14.verified.cs new file mode 100644 index 00000000..8d129a10 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/Currency14.verified.cs @@ -0,0 +1,35 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts.WalletTransactions; + +/// +/// Currency14. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class Currency14 +{ + /// + /// Currency identifier, e.g. dkk. + /// + [Required] + public string Identifier { get; set; } + + /// + /// Readable name of currency. + /// + [Required] + public string Name { get; set; } + + /// + /// Number of decimals for this currency. + /// + public int Decimals { get; set; } + + /// + public override string ToString() + => $"{nameof(Identifier)}: {Identifier}, {nameof(Name)}: {Name}, {nameof(Decimals)}: {Decimals}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/OperatorAdjustmentTransaction.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/OperatorAdjustmentTransaction.verified.cs index 090c27be..e6c1e214 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/OperatorAdjustmentTransaction.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/OperatorAdjustmentTransaction.verified.cs @@ -39,17 +39,7 @@ public class OperatorAdjustmentTransaction /// public double Amount { get; set; } - /// - /// External Id of this entity, managed by you. - /// - public string? PartnerExternalId { get; set; } - - /// - /// Custom JSON payload for this entity, managed by you. - /// - public List? PartnerCustomPayload { get; set; } = new List(); - /// public override string ToString() - => $"{nameof(FromWalletId)}: {FromWalletId}, {nameof(ToWalletId)}: {ToWalletId}, {nameof(Note)}: {Note}, {nameof(CurrencyId)}: {CurrencyId}, {nameof(Amount)}: {Amount}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(PartnerCustomPayload)}.Count: {PartnerCustomPayload?.Count ?? 0}"; + => $"{nameof(FromWalletId)}: {FromWalletId}, {nameof(ToWalletId)}: {ToWalletId}, {nameof(Note)}: {Note}, {nameof(CurrencyId)}: {CurrencyId}, {nameof(Amount)}: {Amount}"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/RequestParameters/PatchTransactionParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/RequestParameters/GetWalletTransactions1Parameters.verified.cs similarity index 65% rename from test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/RequestParameters/PatchTransactionParameters.verified.cs rename to test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/RequestParameters/GetWalletTransactions1Parameters.verified.cs index a589b771..9b48de03 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/RequestParameters/PatchTransactionParameters.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/RequestParameters/GetWalletTransactions1Parameters.verified.cs @@ -8,19 +8,19 @@ namespace Monta.ApiClient.Generated.Contracts.WalletTransactions; /// /// Parameters for operation request. -/// Description: Patch an existing transaction. -/// Operation: PatchTransaction. +/// Description: Retrieves wallet transactions for an invoice. +/// Operation: GetWalletTransactions1. /// [GeneratedCode("ApiGenerator", "x.x.x.x")] -public class PatchTransactionParameters +public class GetWalletTransactions1Parameters { [Required] - public long TransactionId { get; set; } + public long InvoiceId { get; set; } [Required] - public PatchWalletTransaction Request { get; set; } + public Pageable Pageable { get; set; } /// public override string ToString() - => $"{nameof(TransactionId)}: {TransactionId}, {nameof(Request)}: ({Request})"; + => $"{nameof(InvoiceId)}: {InvoiceId}, {nameof(Pageable)}: ({Pageable})"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/RequestParameters/GetWalletTransactionsParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/RequestParameters/GetWalletTransactionsParameters.verified.cs index 68d3bf5f..135e3c1e 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/RequestParameters/GetWalletTransactionsParameters.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/RequestParameters/GetWalletTransactionsParameters.verified.cs @@ -24,6 +24,8 @@ public class GetWalletTransactionsParameters /// public int PerPage { get; set; } = 10; + public int? OperatorId { get; set; } + public int? TeamId { get; set; } [RegularExpression("^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2})Z$")] @@ -44,5 +46,5 @@ public class GetWalletTransactionsParameters /// public override string ToString() - => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}, {nameof(TeamId)}: {TeamId}, {nameof(FromDate)}: ({FromDate}), {nameof(ToDate)}: ({ToDate}), {nameof(ReferenceId)}: {ReferenceId}, {nameof(ReferenceType)}: ({ReferenceType}), {nameof(State)}: ({State}), {nameof(Group)}: ({Group}), {nameof(PartnerExternalId)}: {PartnerExternalId}"; + => $"{nameof(Page)}: {Page}, {nameof(PerPage)}: {PerPage}, {nameof(OperatorId)}: {OperatorId}, {nameof(TeamId)}: {TeamId}, {nameof(FromDate)}: ({FromDate}), {nameof(ToDate)}: ({ToDate}), {nameof(ReferenceId)}: {ReferenceId}, {nameof(ReferenceType)}: ({ReferenceType}), {nameof(State)}: ({State}), {nameof(Group)}: ({Group}), {nameof(PartnerExternalId)}: {PartnerExternalId}"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/WalletTransaction.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/WalletTransaction.verified.cs index e0cea0ce..cb872eb6 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/WalletTransaction.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/WalletTransactions/WalletTransaction.verified.cs @@ -32,14 +32,20 @@ public class WalletTransaction /// public double FromVatAmount { get; set; } + /// + /// Currency for `fromAmount`. + /// [Required] - public Currency FromCurrency { get; set; } + public Currency13 FromCurrency { get; set; } /// /// Type of sender: operator, team. /// public string? FromType { get; set; } + /// + /// Type of sender: operator, team. + /// public TeamOrOperator? From { get; set; } /// @@ -62,14 +68,20 @@ public class WalletTransaction /// public double ToVatAmount { get; set; } + /// + /// Currency used for `toAmount`. + /// [Required] - public Currency ToCurrency { get; set; } + public Currency14 ToCurrency { get; set; } /// /// Type of receiver: operator, team. /// public string? ToType { get; set; } + /// + /// Type of sender: operator, team. + /// public TeamOrOperator? To { get; set; } /// @@ -93,13 +105,24 @@ public class WalletTransaction /// public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Completion date of transaction. + /// + public DateTimeOffset? CompletedAt { get; set; } + /// /// Reference id of this transaction. e.g the charge id. /// public string? ReferenceId { get; set; } + /// + /// Reference type of this transaction. + /// public WalletTransactionReferenceType? ReferenceType { get; set; } + /// + /// Transaction group of this transaction. + /// [Required] public WalletTransactionGroup Group { get; set; } @@ -116,6 +139,9 @@ public class WalletTransaction /// public double VatPercentage { get; set; } + /// + /// Transaction state of this transaction. + /// [Required] public WalletTransactionState State { get; set; } @@ -125,18 +151,11 @@ public class WalletTransaction public string? Note { get; set; } /// - /// External Id of this entity, managed by you. + /// Additional information for this transaction. /// - public string? PartnerExternalId { get; set; } - - /// - /// Custom JSON payload for this entity, managed by you. - /// - public List? PartnerCustomPayload { get; set; } = new List(); - public MetadataDto? Metadata { get; set; } /// public override string ToString() - => $"{nameof(Id)}: {Id}, {nameof(FromAmount)}: {FromAmount}, {nameof(FromSubAmount)}: {FromSubAmount}, {nameof(FromVatAmount)}: {FromVatAmount}, {nameof(FromCurrency)}: ({FromCurrency}), {nameof(FromType)}: {FromType}, {nameof(From)}: ({From}), {nameof(FromWalletId)}: {FromWalletId}, {nameof(ToAmount)}: {ToAmount}, {nameof(ToSubAmount)}: {ToSubAmount}, {nameof(ToVatAmount)}: {ToVatAmount}, {nameof(ToCurrency)}: ({ToCurrency}), {nameof(ToType)}: {ToType}, {nameof(To)}: ({To}), {nameof(ToWalletId)}: {ToWalletId}, {nameof(ExchangeRate)}: {ExchangeRate}, {nameof(CreatedAt)}: ({CreatedAt}), {nameof(UpdatedAt)}: ({UpdatedAt}), {nameof(ReferenceId)}: {ReferenceId}, {nameof(ReferenceType)}: ({ReferenceType}), {nameof(Group)}: ({Group}), {nameof(Kind)}: {Kind}, {nameof(VatPercentage)}: {VatPercentage}, {nameof(State)}: ({State}), {nameof(Note)}: {Note}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(PartnerCustomPayload)}.Count: {PartnerCustomPayload?.Count ?? 0}, {nameof(Metadata)}: ({Metadata})"; + => $"{nameof(Id)}: {Id}, {nameof(FromAmount)}: {FromAmount}, {nameof(FromSubAmount)}: {FromSubAmount}, {nameof(FromVatAmount)}: {FromVatAmount}, {nameof(FromCurrency)}: ({FromCurrency}), {nameof(FromType)}: {FromType}, {nameof(From)}: ({From}), {nameof(FromWalletId)}: {FromWalletId}, {nameof(ToAmount)}: {ToAmount}, {nameof(ToSubAmount)}: {ToSubAmount}, {nameof(ToVatAmount)}: {ToVatAmount}, {nameof(ToCurrency)}: ({ToCurrency}), {nameof(ToType)}: {ToType}, {nameof(To)}: ({To}), {nameof(ToWalletId)}: {ToWalletId}, {nameof(ExchangeRate)}: {ExchangeRate}, {nameof(CreatedAt)}: ({CreatedAt}), {nameof(UpdatedAt)}: ({UpdatedAt}), {nameof(CompletedAt)}: ({CompletedAt}), {nameof(ReferenceId)}: {ReferenceId}, {nameof(ReferenceType)}: ({ReferenceType}), {nameof(Group)}: ({Group}), {nameof(Kind)}: {Kind}, {nameof(VatPercentage)}: {VatPercentage}, {nameof(State)}: ({State}), {nameof(Note)}: {Note}, {nameof(Metadata)}: ({Metadata})"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Wallets/Wallet.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Wallets/Wallet.verified.cs index 368dce5b..e6868d59 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Wallets/Wallet.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Wallets/Wallet.verified.cs @@ -38,6 +38,9 @@ public class Wallet /// public long CountryId { get; set; } + /// + /// Balance of this wallet, if available (not in list endpoints). + /// public WalletDtoBalanceDto? Balance { get; set; } /// diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Webhooks/RequestParameters/GetWebhookEntriesParameters.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Webhooks/RequestParameters/GetWebhookEntriesParameters.verified.cs index 73b1aff2..eb340e68 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Webhooks/RequestParameters/GetWebhookEntriesParameters.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Webhooks/RequestParameters/GetWebhookEntriesParameters.verified.cs @@ -24,10 +24,7 @@ public class GetWebhookEntriesParameters /// public int PerPage { get; set; } = 10; - /// - /// The status from which webhook entries will be filtered by. - /// - public long Status { get; set; } + public string? Status { get; set; } /// public override string ToString() diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Webhooks/WebhookConfig.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Webhooks/WebhookConfig.verified.cs index 6de7c3b4..74848fd2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Webhooks/WebhookConfig.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Webhooks/WebhookConfig.verified.cs @@ -17,7 +17,7 @@ public class WebhookConfig /// [Required] [StringLength(191)] - [RegularExpression("https://.*")] + [RegularExpression("https://(?!(.*monta\\.com?)).*")] public string WebhookUrl { get; set; } /// @@ -29,9 +29,10 @@ public class WebhookConfig public string WebhookSecret { get; set; } /// - /// A list of event type to subscribe to. Use ["*"] to subscribe to all. + /// A list of event types to subscribe to. /// - public List EventTypes { get; set; } = new List(); + [Required] + public List EventTypes { get; set; } /// public override string ToString() diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Webhooks/WebhookEntry.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Webhooks/WebhookEntry.verified.cs index ac4108ec..6d782b3f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Webhooks/WebhookEntry.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Webhooks/WebhookEntry.verified.cs @@ -27,15 +27,28 @@ public class WebhookEntry /// public long OperatorId { get; set; } + /// + /// Type of event this entry belongs to. + /// Note: This is not the type of the entity (payload.EntityType), but the type of the event that you can subscribe to. + /// [Required] public WebhookEntryEventType EventType { get; set; } + /// + /// payload of this entry. + /// [Required] public WebhookEntryPayload Payload { get; set; } + /// + /// Status of the entry. + /// [Required] public WebhookEntryStatus Status { get; set; } + /// + /// Contains the error message if the delivery failed. + /// public WebhookEntryErrorPayload? Error { get; set; } /// diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Webhooks/WebhookEntryPayload.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Webhooks/WebhookEntryPayload.verified.cs index 04e6afd0..5e72de16 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Webhooks/WebhookEntryPayload.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Webhooks/WebhookEntryPayload.verified.cs @@ -12,6 +12,9 @@ namespace Monta.ApiClient.Generated.Contracts.Webhooks; [GeneratedCode("ApiGenerator", "x.x.x.x")] public class WebhookEntryPayload { + /// + /// Type of the entity. + /// [Required] public WebhookEntryPayloadEntityType EntityType { get; set; } @@ -21,9 +24,17 @@ public class WebhookEntryPayload [Required] public string EntityId { get; set; } + /// + /// Type of the event. + /// [Required] public KafkaEventType EventType { get; set; } + /// + /// The timestamp indicating when the event was generated. + /// + public DateTimeOffset? EventTime { get; set; } + /// /// payload of this entity, e.g. a full Charge object. /// @@ -31,5 +42,5 @@ public class WebhookEntryPayload /// public override string ToString() - => $"{nameof(EntityType)}: ({EntityType}), {nameof(EntityId)}: {EntityId}, {nameof(EventType)}: ({EventType}), {nameof(Payload)}.Count: {Payload?.Count ?? 0}"; + => $"{nameof(EntityType)}: ({EntityType}), {nameof(EntityId)}: {EntityId}, {nameof(EventType)}: ({EventType}), {nameof(EventTime)}: ({EventTime}), {nameof(Payload)}.Count: {Payload?.Count ?? 0}"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/ComponentTypeDto.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/ComponentTypeDto.verified.cs index b6cce361..44e3002f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/ComponentTypeDto.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/ComponentTypeDto.verified.cs @@ -49,6 +49,9 @@ public enum ComponentTypeDto [EnumMember(Value = "adjustment")] Adjustment, + [EnumMember(Value = "bilateral-agreement")] + BilateralAgreement, + [EnumMember(Value = "other")] Other, } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/ElectricCurrentType.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/ElectricCurrentType.verified.cs index 4e1ed738..99d3b138 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/ElectricCurrentType.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/ElectricCurrentType.verified.cs @@ -18,4 +18,7 @@ public enum ElectricCurrentType [EnumMember(Value = "dc")] Dc, + + [EnumMember(Value = "other")] + Other, } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/SubscriptionCustomerType.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/SubscriptionCustomerType.verified.cs index 6dd6f009..e46b747b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/SubscriptionCustomerType.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/SubscriptionCustomerType.verified.cs @@ -10,18 +10,10 @@ namespace Monta.ApiClient.Generated.Contracts; /// Enumeration: SubscriptionCustomerType. /// [GeneratedCode("ApiGenerator", "x.x.x.x")] -[JsonConverter(typeof(JsonStringEnumConverter))] public enum SubscriptionCustomerType { - [EnumMember(Value = "team")] - Team, - - [EnumMember(Value = "charge-point")] - ChargePoint, - - [EnumMember(Value = "operator")] - Operator, - - [EnumMember(Value = "other")] - Other, + TEAM, + CHARGE_POINT, + OPERATOR, + OTHER, } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/TeamMemberAccess.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/TeamMemberAccess.verified.cs index 2d51595c..ce2cdb0f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/TeamMemberAccess.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/TeamMemberAccess.verified.cs @@ -18,7 +18,4 @@ public enum TeamMemberAccess [EnumMember(Value = "selected")] Selected, - - [EnumMember(Value = "other")] - Other, } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/TeamMemberAccess1.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/TeamMemberAccess1.verified.cs new file mode 100644 index 00000000..f31f048d --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/TeamMemberAccess1.verified.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts; + +/// +/// Enumeration: TeamMemberAccess1. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +[JsonConverter(typeof(JsonStringEnumConverter))] +public enum TeamMemberAccess1 +{ + [EnumMember(Value = "all")] + All, + + [EnumMember(Value = "selected")] + Selected, + + [EnumMember(Value = "other")] + Other, +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/TeamMemberState.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/TeamMemberState.verified.cs index 8bddc6fa..20ea1b81 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/TeamMemberState.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/TeamMemberState.verified.cs @@ -19,18 +19,15 @@ public enum TeamMemberState [EnumMember(Value = "invited")] Invited, - [EnumMember(Value = "rejected")] - Rejected, - [EnumMember(Value = "accepted")] Accepted, + [EnumMember(Value = "rejected_at")] + RejectedAt, + [EnumMember(Value = "blocked")] Blocked, [EnumMember(Value = "expired")] Expired, - - [EnumMember(Value = "other")] - Other, } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/TeamMemberState1.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/TeamMemberState1.verified.cs new file mode 100644 index 00000000..b2cb51ba --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/TeamMemberState1.verified.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts; + +/// +/// Enumeration: TeamMemberState1. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +[JsonConverter(typeof(JsonStringEnumConverter))] +public enum TeamMemberState1 +{ + [EnumMember(Value = "requested")] + Requested, + + [EnumMember(Value = "invited")] + Invited, + + [EnumMember(Value = "rejected")] + Rejected, + + [EnumMember(Value = "accepted")] + Accepted, + + [EnumMember(Value = "blocked")] + Blocked, + + [EnumMember(Value = "expired")] + Expired, + + [EnumMember(Value = "other")] + Other, +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/TeamMemberState3.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/TeamMemberState3.verified.cs new file mode 100644 index 00000000..6052737f --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/TeamMemberState3.verified.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts; + +/// +/// Enumeration: TeamMemberState3. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +[JsonConverter(typeof(JsonStringEnumConverter))] +public enum TeamMemberState3 +{ + [EnumMember(Value = "requested")] + Requested, + + [EnumMember(Value = "invited")] + Invited, + + [EnumMember(Value = "rejected")] + Rejected, + + [EnumMember(Value = "accepted")] + Accepted, + + [EnumMember(Value = "blocked")] + Blocked, + + [EnumMember(Value = "expired")] + Expired, + + [EnumMember(Value = "other")] + Other, +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/WebhookEntryEventType.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/WebhookEntryEventType.verified.cs index ab40da61..48a4ab49 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/WebhookEntryEventType.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/WebhookEntryEventType.verified.cs @@ -13,9 +13,6 @@ namespace Monta.ApiClient.Generated.Contracts; [JsonConverter(typeof(JsonStringEnumConverter))] public enum WebhookEntryEventType { - [EnumMember(Value = "*")] - None, - [EnumMember(Value = "charges")] Charges, @@ -25,6 +22,9 @@ public enum WebhookEntryEventType [EnumMember(Value = "sites")] Sites, + [EnumMember(Value = "users")] + Users, + [EnumMember(Value = "team-members")] TeamMembers, @@ -45,4 +45,10 @@ public enum WebhookEntryEventType [EnumMember(Value = "plans")] Plans, + + [EnumMember(Value = "charge-auth-tokens")] + ChargeAuthTokens, + + [EnumMember(Value = "reports")] + Reports, } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/WebhookEntryPayloadEntityType.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/WebhookEntryPayloadEntityType.verified.cs index ba745105..715bf4fc 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/WebhookEntryPayloadEntityType.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_EnumerationTypes/WebhookEntryPayloadEntityType.verified.cs @@ -22,6 +22,9 @@ public enum WebhookEntryPayloadEntityType [EnumMember(Value = "site")] Site, + [EnumMember(Value = "user")] + User, + [EnumMember(Value = "team")] Team, @@ -42,4 +45,10 @@ public enum WebhookEntryPayloadEntityType [EnumMember(Value = "plan")] Plan, + + [EnumMember(Value = "charge-auth-token")] + ChargeAuthToken, + + [EnumMember(Value = "report")] + Report, } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/AdditionalPricing.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/AdditionalPricing.verified.cs index bac4fa8c..9221f13a 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/AdditionalPricing.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/AdditionalPricing.verified.cs @@ -12,13 +12,24 @@ namespace Monta.ApiClient.Generated.Contracts; [GeneratedCode("ApiGenerator", "x.x.x.x")] public class AdditionalPricing { + /// + /// Type of the additional pricing. `absolute` means the value is a price. + /// [Required] public AdditionalPricingType Type { get; set; } + /// + /// The value of this additional pricing. Both `absolute` and `percentage` values here are represented as a money object. + /// [Required] public Money Value { get; set; } + /// + /// A title for this additional pricing. + /// + public string? Title { get; set; } + /// public override string ToString() - => $"{nameof(Type)}: ({Type}), {nameof(Value)}: ({Value})"; + => $"{nameof(Type)}: ({Type}), {nameof(Value)}: ({Value}), {nameof(Title)}: {Title}"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/ChargePoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/ChargePoint.verified.cs index 042050c0..4b6b1f75 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/ChargePoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/ChargePoint.verified.cs @@ -37,6 +37,9 @@ public class ChargePoint /// public long? SiteId { get; set; } + /// + /// Operator of this charge point. + /// public Operator? Operator { get; set; } /// @@ -97,8 +100,14 @@ public class ChargePoint /// public string? OperatorNote { get; set; } + /// + /// State of the charge point. + /// public ChargePointState? State { get; set; } + /// + /// Location information for this charge point. + /// [Required] public Location Location { get; set; } @@ -108,6 +117,9 @@ public class ChargePoint [Required] public List Connectors { get; set; } + /// + /// Deeplinks to open charge screen in Monta app or web. + /// [Required] public ChargePointDeeplinks Deeplinks { get; set; } @@ -141,6 +153,9 @@ public class ChargePoint /// public string? FirmwareVersion { get; set; } + /// + /// Indicates what kind of integration this charge point is using (e.g oicp, ocpi, Note: null meaning not integrated). + /// public ChargePointIntegrationType? IntegrationType { get; set; } /// @@ -184,7 +199,27 @@ public class ChargePoint /// public int? ReservationTime { get; set; } + /// + /// SIM card data for the given charge point. + /// + public SimCard? SimCard { get; set; } + + /// + /// Indicates whether roaming is enabled for this charge point. + /// + public bool Roaming { get; set; } + + /// + /// The last date/time this charge point was reported as connected. + /// + public DateTimeOffset? LastConnectedAt { get; set; } + + /// + /// The date/time this charge point was reported as disconnected. + /// + public DateTimeOffset? DisconnectedAt { get; set; } + /// public override string ToString() - => $"{nameof(Id)}: {Id}, {nameof(TeamId)}: {TeamId}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(PartnerCustomPayload)}.Count: {PartnerCustomPayload?.Count ?? 0}, {nameof(SiteId)}: {SiteId}, {nameof(Operator)}: ({Operator}), {nameof(CreatedAt)}: ({CreatedAt}), {nameof(UpdatedAt)}: ({UpdatedAt}), {nameof(DeletedAt)}: ({DeletedAt}), {nameof(ActiveAt)}: ({ActiveAt}), {nameof(SerialNumber)}: {SerialNumber}, {nameof(Name)}: {Name}, {nameof(Visibility)}: {Visibility}, {nameof(MaxKw)}: {MaxKw}, {nameof(Type)}: {Type}, {nameof(Note)}: {Note}, {nameof(OperatorNote)}: {OperatorNote}, {nameof(State)}: ({State}), {nameof(Location)}: ({Location}), {nameof(Connectors)}.Count: {Connectors?.Count ?? 0}, {nameof(Deeplinks)}: ({Deeplinks}), {nameof(LastMeterReadingKwh)}: {LastMeterReadingKwh}, {nameof(CablePluggedIn)}: {CablePluggedIn}, {nameof(ChargePointModelId)}: {ChargePointModelId}, {nameof(BrandName)}: {BrandName}, {nameof(ModelName)}: {ModelName}, {nameof(FirmwareVersion)}: {FirmwareVersion}, {nameof(IntegrationType)}: ({IntegrationType}), {nameof(EvseId)}: {EvseId}, {nameof(PriceGroupId)}: {PriceGroupId}, {nameof(CostGroupId)}: {CostGroupId}, {nameof(RoamingPriceGroupId)}: {RoamingPriceGroupId}, {nameof(SponsoredPriceGroupId)}: {SponsoredPriceGroupId}, {nameof(IsActive)}: {IsActive}, {nameof(Reservable)}: {Reservable}, {nameof(ReservationTime)}: {ReservationTime}"; + => $"{nameof(Id)}: {Id}, {nameof(TeamId)}: {TeamId}, {nameof(PartnerExternalId)}: {PartnerExternalId}, {nameof(PartnerCustomPayload)}.Count: {PartnerCustomPayload?.Count ?? 0}, {nameof(SiteId)}: {SiteId}, {nameof(Operator)}: ({Operator}), {nameof(CreatedAt)}: ({CreatedAt}), {nameof(UpdatedAt)}: ({UpdatedAt}), {nameof(DeletedAt)}: ({DeletedAt}), {nameof(ActiveAt)}: ({ActiveAt}), {nameof(SerialNumber)}: {SerialNumber}, {nameof(Name)}: {Name}, {nameof(Visibility)}: {Visibility}, {nameof(MaxKw)}: {MaxKw}, {nameof(Type)}: {Type}, {nameof(Note)}: {Note}, {nameof(OperatorNote)}: {OperatorNote}, {nameof(State)}: ({State}), {nameof(Location)}: ({Location}), {nameof(Connectors)}.Count: {Connectors?.Count ?? 0}, {nameof(Deeplinks)}: ({Deeplinks}), {nameof(LastMeterReadingKwh)}: {LastMeterReadingKwh}, {nameof(CablePluggedIn)}: {CablePluggedIn}, {nameof(ChargePointModelId)}: {ChargePointModelId}, {nameof(BrandName)}: {BrandName}, {nameof(ModelName)}: {ModelName}, {nameof(FirmwareVersion)}: {FirmwareVersion}, {nameof(IntegrationType)}: ({IntegrationType}), {nameof(EvseId)}: {EvseId}, {nameof(PriceGroupId)}: {PriceGroupId}, {nameof(CostGroupId)}: {CostGroupId}, {nameof(RoamingPriceGroupId)}: {RoamingPriceGroupId}, {nameof(SponsoredPriceGroupId)}: {SponsoredPriceGroupId}, {nameof(IsActive)}: {IsActive}, {nameof(Reservable)}: {Reservable}, {nameof(ReservationTime)}: {ReservationTime}, {nameof(SimCard)}: ({SimCard}), {nameof(Roaming)}: {Roaming}, {nameof(LastConnectedAt)}: ({LastConnectedAt}), {nameof(DisconnectedAt)}: ({DisconnectedAt})"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Consumer.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Consumer.verified.cs index e471363c..7d9cad42 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Consumer.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Consumer.verified.cs @@ -24,7 +24,13 @@ public class Consumer public long OperatorId { get; set; } /// - /// List of team ids that are unlocked for API operations. If empty, all teams of this operator are unlocked. + /// List of operator ids that are authorized for API operations. If empty, all child operators of this operator are authorized. + /// + [Required] + public List OperatorIds { get; set; } + + /// + /// List of team ids that are authorized for API operations. If empty, all teams of this operator are authorized. /// [Required] public List TeamIds { get; set; } @@ -64,5 +70,5 @@ public class Consumer /// public override string ToString() - => $"{nameof(Name)}: {Name}, {nameof(OperatorId)}: {OperatorId}, {nameof(TeamIds)}.Count: {TeamIds?.Count ?? 0}, {nameof(ClientId)}: {ClientId}, {nameof(RateLimit)}: {RateLimit}, {nameof(RateLimitIntervalInSeconds)}: {RateLimitIntervalInSeconds}, {nameof(Scopes)}.Count: {Scopes?.Count ?? 0}, {nameof(CreatedAt)}: ({CreatedAt}), {nameof(UpdatedAt)}: ({UpdatedAt})"; + => $"{nameof(Name)}: {Name}, {nameof(OperatorId)}: {OperatorId}, {nameof(OperatorIds)}.Count: {OperatorIds?.Count ?? 0}, {nameof(TeamIds)}.Count: {TeamIds?.Count ?? 0}, {nameof(ClientId)}: {ClientId}, {nameof(RateLimit)}: {RateLimit}, {nameof(RateLimitIntervalInSeconds)}: {RateLimitIntervalInSeconds}, {nameof(Scopes)}.Count: {Scopes?.Count ?? 0}, {nameof(CreatedAt)}: ({CreatedAt}), {nameof(UpdatedAt)}: ({UpdatedAt})"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/CreatedOrUpdateAddress.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/CreatedOrUpdateAddress.verified.cs index b335234f..2daacc13 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/CreatedOrUpdateAddress.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/CreatedOrUpdateAddress.verified.cs @@ -22,13 +22,11 @@ public class CreatedOrUpdateAddress /// /// Second line of address. /// - [MinLength(1)] public string? Address2 { get; set; } /// /// Third line of address. /// - [MinLength(1)] public string? Address3 { get; set; } /// diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Currency.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Currency.verified.cs index adbdb1c9..2a7af6fb 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Currency.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Currency.verified.cs @@ -13,23 +13,37 @@ namespace Monta.ApiClient.Generated.Contracts; public class Currency { /// - /// Currency identifier, e.g. dkk. + /// id of the currency. + /// + [Range(0, int.MaxValue)] + public long? Id { get; set; } + + /// + /// Whether the currency is master or not, master meaning the default currency. + /// + public bool Master { get; set; } + + /// + /// 3 characters identifier. /// [Required] + [MinLength(3)] + [MaxLength(3)] public string Identifier { get; set; } /// - /// Readable name of currency. + /// Name of the currency. /// - [Required] public string Name { get; set; } /// - /// Number of decimals for this currency. + /// How many decimals the currency has. /// + [Required] + [Range(0, int.MaxValue)] public int Decimals { get; set; } /// public override string ToString() - => $"{nameof(Identifier)}: {Identifier}, {nameof(Name)}: {Name}, {nameof(Decimals)}: {Decimals}"; + => $"{nameof(Id)}: {Id}, {nameof(Master)}: {Master}, {nameof(Identifier)}: {Identifier}, {nameof(Name)}: {Name}, {nameof(Decimals)}: {Decimals}"; } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Currencies/CurrencyDto3.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/CurrencyDto.verified.cs similarity index 87% rename from test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Currencies/CurrencyDto3.verified.cs rename to test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/CurrencyDto.verified.cs index f0572d35..52c77cac 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/Currencies/CurrencyDto3.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/CurrencyDto.verified.cs @@ -4,13 +4,13 @@ // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. //------------------------------------------------------------------------------ -namespace Monta.ApiClient.Generated.Contracts.Currencies; +namespace Monta.ApiClient.Generated.Contracts; /// -/// CurrencyDto3. +/// CurrencyDto. /// [GeneratedCode("ApiGenerator", "x.x.x.x")] -public class CurrencyDto3 +public class CurrencyDto { /// /// id of the currency. @@ -19,7 +19,7 @@ public class CurrencyDto3 public long? Id { get; set; } /// - /// Currency identifier, e.g. DKK. + /// Currency identifier. /// public string? Identifier { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Location.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Location.verified.cs index 23387956..beed3aa1 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Location.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Location.verified.cs @@ -12,8 +12,14 @@ namespace Monta.ApiClient.Generated.Contracts; [GeneratedCode("ApiGenerator", "x.x.x.x")] public class Location { + /// + /// Coordinates (lat, lng). + /// public Coordinates? Coordinates { get; set; } + /// + /// Address. + /// public Address? Address { get; set; } /// diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Money.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Money.verified.cs index 9816fd0e..2c5b7db4 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Money.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Money.verified.cs @@ -18,6 +18,9 @@ public class Money [Required] public long Amount { get; set; } + /// + /// Currency. + /// [Required] public Currency Currency { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Pageable.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Pageable.verified.cs new file mode 100644 index 00000000..8fc25027 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Pageable.verified.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts; + +/// +/// Pageable. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class Pageable +{ + /// + /// A list of Pageable. + /// + public List PageableList { get; set; } = new List(); + + /// + public override string ToString() + => $"{nameof(PageableList)}.Count: {PageableList?.Count ?? 0}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/PriceGroup.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/PriceGroup.verified.cs index c2b3ad36..ffc847e9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/PriceGroup.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/PriceGroup.verified.cs @@ -27,9 +27,15 @@ public class PriceGroup public bool Default { get; set; } + /// + /// Type of the price group. + /// [Required] public PriceGroupType Type { get; set; } + /// + /// The master price. + /// [Required] public Pricing MasterPrice { get; set; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/PriceGroupTag.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/PriceGroupTag.verified.cs index 8a214ed2..291723d8 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/PriceGroupTag.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/PriceGroupTag.verified.cs @@ -38,6 +38,9 @@ public class PriceGroupTag /// public List? PartnerCustomPayload { get; set; } = new List(); + /// + /// The operator to which this resource belongs to. + /// public Operator? Operator { get; set; } /// diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Pricing.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Pricing.verified.cs index 191b4b25..f83b1bc5 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Pricing.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Pricing.verified.cs @@ -24,6 +24,9 @@ public class Pricing /// public string? Description { get; set; } + /// + /// Type of the pricing. `minute` is used for Minute fee. `min` is used for the master price. + /// [Required] public PricingType Type { get; set; } @@ -54,7 +57,7 @@ public class Pricing /// /// Used by Spot Price. It will multiply the fallback price by this percentage. /// - public double? Percentage { get; set; } = 100.000; + public double? Percentage { get; set; } /// /// The id of the selected Tariff. @@ -72,13 +75,25 @@ public class Pricing /// public int? ApplyAfterMinutes { get; set; } + /// + /// The price of this Fee or Master price. + /// [Required] public Money Price { get; set; } + /// + /// Used by spot price. The minimum that the raw spot price can be. This will be used in calculations if spot price is lower than this. + /// public Money? PriceMin { get; set; } + /// + /// Used by spot price. The maximum that the raw spot price can be. This will be used in calculations if spot price is higher than this. + /// public Money? PriceMax { get; set; } + /// + /// Used by Idle fee. The maximum the user will be charged for the idle fee. + /// public Money? FeePriceMax { get; set; } /// diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/SimCard.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/SimCard.verified.cs new file mode 100644 index 00000000..28f92cbb --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/SimCard.verified.cs @@ -0,0 +1,28 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Contracts; + +/// +/// SimCard. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class SimCard +{ + /// + /// imsi (International Mobile Subscriber Identity) for the SIM card. + /// + public string? Imsi { get; set; } + + /// + /// iccid (Integrated Circuit Card Identifier) for the SIM card. + /// + public string? Iccid { get; set; } + + /// + public override string ToString() + => $"{nameof(Imsi)}: {Imsi}, {nameof(Iccid)}: {Iccid}"; +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Subscription.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Subscription.verified.cs index 872ac62a..42feca76 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Subscription.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Contracts/_Shared/Subscription.verified.cs @@ -17,6 +17,9 @@ public class Subscription /// public long Id { get; set; } + /// + /// State of the subscription. + /// [Required] public SubscriptionState State { get; set; } @@ -75,6 +78,9 @@ public class Subscription /// public long CustomerId { get; set; } + /// + /// Customer type. + /// [Required] public SubscriptionCustomerType CustomerType { get; set; } @@ -83,6 +89,9 @@ public class Subscription /// public long PlanId { get; set; } + /// + /// Subscription configuration, based on the plans serviceType.Currently you can configure tax-refund subscriptions only. + /// public SubscriptionServiceConfig? ServiceConfig { get; set; } /// diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/BlockChargeAuthTokenEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/BlockChargeAuthTokenEndpoint.verified.cs index b2472f42..643d5525 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/BlockChargeAuthTokenEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/BlockChargeAuthTokenEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new BlockChargeAuthTokenEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/BlockChargeAuthTokenEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/BlockChargeAuthTokenEndpointResult.verified.cs index b7485f4d..daba8199 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/BlockChargeAuthTokenEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/BlockChargeAuthTokenEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public ChargeAuthToken OkContent => IsOk && ContentObject is ChargeAuthToken result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/CreateChargeAuthTokenEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/CreateChargeAuthTokenEndpoint.verified.cs index 2e9f3aa9..dc15e49a 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/CreateChargeAuthTokenEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/CreateChargeAuthTokenEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new CreateChargeAuthTokenEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/CreateChargeAuthTokenEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/CreateChargeAuthTokenEndpointResult.verified.cs index ad8a36b7..f1b3a145 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/CreateChargeAuthTokenEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/CreateChargeAuthTokenEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? CreatedContent => IsCreated && ContentObject is string result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/GetChargeAuthTokensEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/GetChargeAuthTokensEndpoint.verified.cs index 5b2caa4b..b5cefdfc 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/GetChargeAuthTokensEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/GetChargeAuthTokensEndpoint.verified.cs @@ -45,6 +45,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetChargeAuthTokensEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/GetChargeAuthTokensEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/GetChargeAuthTokensEndpointResult.verified.cs index 5e4f8add..bd2d9ac8 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/GetChargeAuthTokensEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/GetChargeAuthTokensEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageChargeAuthTokenDto OkContent => IsOk && ContentObject is MontaPageChargeAuthTokenDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/Interfaces/IBlockChargeAuthTokenEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/Interfaces/IBlockChargeAuthTokenEndpointResult.verified.cs index 6c00d372..9b3a33b6 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/Interfaces/IBlockChargeAuthTokenEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/Interfaces/IBlockChargeAuthTokenEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IBlockChargeAuthTokenEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + ChargeAuthToken OkContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IBlockChargeAuthTokenEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/Interfaces/ICreateChargeAuthTokenEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/Interfaces/ICreateChargeAuthTokenEndpointResult.verified.cs index 28f58519..04dae2c6 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/Interfaces/ICreateChargeAuthTokenEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/Interfaces/ICreateChargeAuthTokenEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface ICreateChargeAuthTokenEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + string? CreatedContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface ICreateChargeAuthTokenEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/Interfaces/IGetChargeAuthTokensEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/Interfaces/IGetChargeAuthTokensEndpointResult.verified.cs index da853d54..70134a8f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/Interfaces/IGetChargeAuthTokensEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/Interfaces/IGetChargeAuthTokensEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetChargeAuthTokensEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageChargeAuthTokenDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/Interfaces/IPatchChargeAuthTokenEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/Interfaces/IPatchChargeAuthTokenEndpointResult.verified.cs index 4611f2d3..4b0a2cdd 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/Interfaces/IPatchChargeAuthTokenEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/Interfaces/IPatchChargeAuthTokenEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IPatchChargeAuthTokenEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + ChargeAuthToken OkContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IPatchChargeAuthTokenEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/Interfaces/IUnblockChargeAuthTokenEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/Interfaces/IUnblockChargeAuthTokenEndpointResult.verified.cs index 1e547ea5..87c60701 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/Interfaces/IUnblockChargeAuthTokenEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/Interfaces/IUnblockChargeAuthTokenEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IUnblockChargeAuthTokenEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + ChargeAuthToken OkContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IUnblockChargeAuthTokenEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/PatchChargeAuthTokenEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/PatchChargeAuthTokenEndpoint.verified.cs index e755b532..e1f7d9d9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/PatchChargeAuthTokenEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/PatchChargeAuthTokenEndpoint.verified.cs @@ -44,6 +44,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new PatchChargeAuthTokenEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/PatchChargeAuthTokenEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/PatchChargeAuthTokenEndpointResult.verified.cs index 6c9726fb..07be2d44 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/PatchChargeAuthTokenEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/PatchChargeAuthTokenEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public ChargeAuthToken OkContent => IsOk && ContentObject is ChargeAuthToken result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/UnblockChargeAuthTokenEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/UnblockChargeAuthTokenEndpoint.verified.cs index 3ac23517..048b5c58 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/UnblockChargeAuthTokenEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/UnblockChargeAuthTokenEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new UnblockChargeAuthTokenEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/UnblockChargeAuthTokenEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/UnblockChargeAuthTokenEndpointResult.verified.cs index 70e10fc7..3365db4e 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/UnblockChargeAuthTokenEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargeAuthTokens/UnblockChargeAuthTokenEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public ChargeAuthToken OkContent => IsOk && ContentObject is ChargeAuthToken result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointBrands/GetChargePointBrandsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointBrands/GetChargePointBrandsEndpoint.verified.cs index 5ea6c0ed..d4cf385f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointBrands/GetChargePointBrandsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointBrands/GetChargePointBrandsEndpoint.verified.cs @@ -44,6 +44,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetChargePointBrandsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointBrands/GetChargePointBrandsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointBrands/GetChargePointBrandsEndpointResult.verified.cs index 73bec3f9..d8cbe9b9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointBrands/GetChargePointBrandsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointBrands/GetChargePointBrandsEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageChargePointBrandDto OkContent => IsOk && ContentObject is MontaPageChargePointBrandDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointBrands/Interfaces/IGetChargePointBrandsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointBrands/Interfaces/IGetChargePointBrandsEndpointResult.verified.cs index df41ae39..88c1866f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointBrands/Interfaces/IGetChargePointBrandsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointBrands/Interfaces/IGetChargePointBrandsEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetChargePointBrandsEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageChargePointBrandDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointConnectors/GetConnectorsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointConnectors/GetConnectorsEndpoint.verified.cs index 0548d2ad..e209e6f7 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointConnectors/GetConnectorsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointConnectors/GetConnectorsEndpoint.verified.cs @@ -40,6 +40,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetConnectorsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointConnectors/GetConnectorsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointConnectors/GetConnectorsEndpointResult.verified.cs index 52ef19bc..5affa880 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointConnectors/GetConnectorsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointConnectors/GetConnectorsEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageChargePointConnectorDto OkContent => IsOk && ContentObject is MontaPageChargePointConnectorDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointConnectors/Interfaces/IGetConnectorsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointConnectors/Interfaces/IGetConnectorsEndpointResult.verified.cs index 762365c0..11a96d17 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointConnectors/Interfaces/IGetConnectorsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointConnectors/Interfaces/IGetConnectorsEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetConnectorsEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageChargePointConnectorDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/GetChargePointIntegrationsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/GetChargePointIntegrationsEndpoint.verified.cs index 75749a1f..56cc089b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/GetChargePointIntegrationsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/GetChargePointIntegrationsEndpoint.verified.cs @@ -45,6 +45,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetChargePointIntegrationsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/GetChargePointIntegrationsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/GetChargePointIntegrationsEndpointResult.verified.cs index fde3b4b4..b4017d11 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/GetChargePointIntegrationsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/GetChargePointIntegrationsEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageChargePointIntegrationDto OkContent => IsOk && ContentObject is MontaPageChargePointIntegrationDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/Interfaces/IGetChargePointIntegrationsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/Interfaces/IGetChargePointIntegrationsEndpointResult.verified.cs index 27cf6cfd..81accc2b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/Interfaces/IGetChargePointIntegrationsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/Interfaces/IGetChargePointIntegrationsEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetChargePointIntegrationsEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageChargePointIntegrationDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/Interfaces/IPostOrPutChargePointIntegrationEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/Interfaces/IPostOrPutChargePointIntegrationEndpointResult.verified.cs index e4a4b20f..50b74963 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/Interfaces/IPostOrPutChargePointIntegrationEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/Interfaces/IPostOrPutChargePointIntegrationEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IPostOrPutChargePointIntegrationEndpointResult : IEndpointRespo bool IsForbidden { get; } + bool IsNotFound { get; } + ChargePointIntegration OkContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IPostOrPutChargePointIntegrationEndpointResult : IEndpointRespo string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/PostOrPutChargePointIntegrationEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/PostOrPutChargePointIntegrationEndpoint.verified.cs index 39fc068f..b82b25c8 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/PostOrPutChargePointIntegrationEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/PostOrPutChargePointIntegrationEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new PostOrPutChargePointIntegrationEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/PostOrPutChargePointIntegrationEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/PostOrPutChargePointIntegrationEndpointResult.verified.cs index 53980c0f..ad4d4bd7 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/PostOrPutChargePointIntegrationEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointIntegrations/PostOrPutChargePointIntegrationEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public ChargePointIntegration OkContent => IsOk && ContentObject is ChargePointIntegration result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointModels/GetChargePointModelsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointModels/GetChargePointModelsEndpoint.verified.cs index 99833b27..49abd2b9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointModels/GetChargePointModelsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointModels/GetChargePointModelsEndpoint.verified.cs @@ -45,6 +45,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetChargePointModelsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointModels/GetChargePointModelsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointModels/GetChargePointModelsEndpointResult.verified.cs index 0644c6ba..fc90ddd5 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointModels/GetChargePointModelsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointModels/GetChargePointModelsEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageChargePointModelDto OkContent => IsOk && ContentObject is MontaPageChargePointModelDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointModels/Interfaces/IGetChargePointModelsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointModels/Interfaces/IGetChargePointModelsEndpointResult.verified.cs index 9c213bbc..aab3e6d1 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointModels/Interfaces/IGetChargePointModelsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointModels/Interfaces/IGetChargePointModelsEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetChargePointModelsEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageChargePointModelDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/GetChargePointStatisticsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/GetChargePointStatisticsEndpoint.verified.cs new file mode 100644 index 00000000..5dac0bf0 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/GetChargePointStatisticsEndpoint.verified.cs @@ -0,0 +1,51 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.ChargePointStatistics; + +/// +/// Client Endpoint. +/// Description: Retrieve statistics related to a charge point. +/// Operation: GetChargePointStatistics. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetChargePointStatisticsEndpoint : IGetChargePointStatisticsEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public GetChargePointStatisticsEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + GetChargePointStatisticsParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/charge-point-statistics/by-charge-point"); + requestBuilder.WithQueryParameter("chargePointId", parameters.ChargePointId); + requestBuilder.WithQueryParameter("fromDate", parameters.FromDate); + requestBuilder.WithQueryParameter("toDate", parameters.ToDate); + + using var requestMessage = requestBuilder.Build(HttpMethod.Get); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new GetChargePointStatisticsEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/GetChargePointStatisticsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/GetChargePointStatisticsEndpointResult.verified.cs new file mode 100644 index 00000000..86c0d5e8 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/GetChargePointStatisticsEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.ChargePointStatistics; + +/// +/// Client Endpoint result. +/// Description: Retrieve statistics related to a charge point. +/// Operation: GetChargePointStatistics. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetChargePointStatisticsEndpointResult : EndpointResponse, IGetChargePointStatisticsEndpointResult +{ + public GetChargePointStatisticsEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public ChargePointStatisticsDto OkContent + => IsOk && ContentObject is ChargePointStatisticsDto result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/GetSiteStatisticsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/GetSiteStatisticsEndpoint.verified.cs new file mode 100644 index 00000000..922a8a71 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/GetSiteStatisticsEndpoint.verified.cs @@ -0,0 +1,51 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.ChargePointStatistics; + +/// +/// Client Endpoint. +/// Description: Retrieve statistics related to a site. +/// Operation: GetSiteStatistics. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetSiteStatisticsEndpoint : IGetSiteStatisticsEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public GetSiteStatisticsEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + GetSiteStatisticsParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/charge-point-statistics/by-site"); + requestBuilder.WithQueryParameter("siteId", parameters.SiteId); + requestBuilder.WithQueryParameter("fromDate", parameters.FromDate); + requestBuilder.WithQueryParameter("toDate", parameters.ToDate); + + using var requestMessage = requestBuilder.Build(HttpMethod.Get); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new GetSiteStatisticsEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/GetSiteStatisticsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/GetSiteStatisticsEndpointResult.verified.cs new file mode 100644 index 00000000..6e5037db --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/GetSiteStatisticsEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.ChargePointStatistics; + +/// +/// Client Endpoint result. +/// Description: Retrieve statistics related to a site. +/// Operation: GetSiteStatistics. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetSiteStatisticsEndpointResult : EndpointResponse, IGetSiteStatisticsEndpointResult +{ + public GetSiteStatisticsEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public ChargePointStatisticsDto OkContent + => IsOk && ContentObject is ChargePointStatisticsDto result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/Interfaces/IGetChargePointStatisticsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/Interfaces/IGetChargePointStatisticsEndpoint.verified.cs new file mode 100644 index 00000000..ea9a2eef --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/Interfaces/IGetChargePointStatisticsEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.ChargePointStatistics.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Retrieve statistics related to a charge point. +/// Operation: GetChargePointStatistics. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetChargePointStatisticsEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + GetChargePointStatisticsParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/Interfaces/IGetChargePointStatisticsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/Interfaces/IGetChargePointStatisticsEndpointResult.verified.cs new file mode 100644 index 00000000..38add9a7 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/Interfaces/IGetChargePointStatisticsEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.ChargePointStatistics.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Retrieve statistics related to a charge point. +/// Operation: GetChargePointStatistics. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetChargePointStatisticsEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + ChargePointStatisticsDto OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/Interfaces/IGetSiteStatisticsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/Interfaces/IGetSiteStatisticsEndpoint.verified.cs new file mode 100644 index 00000000..097e91b8 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/Interfaces/IGetSiteStatisticsEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.ChargePointStatistics.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Retrieve statistics related to a site. +/// Operation: GetSiteStatistics. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetSiteStatisticsEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + GetSiteStatisticsParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/Interfaces/IGetSiteStatisticsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/Interfaces/IGetSiteStatisticsEndpointResult.verified.cs new file mode 100644 index 00000000..9a6429ff --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePointStatistics/Interfaces/IGetSiteStatisticsEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.ChargePointStatistics.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Retrieve statistics related to a site. +/// Operation: GetSiteStatistics. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetSiteStatisticsEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + ChargePointStatisticsDto OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/DeleteChargePointEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/DeleteChargePointEndpoint.verified.cs index 14813f54..9b13ec10 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/DeleteChargePointEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/DeleteChargePointEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new DeleteChargePointEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/DeleteChargePointEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/DeleteChargePointEndpointResult.verified.cs index 516e86a0..2d81a048 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/DeleteChargePointEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/DeleteChargePointEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? NoContentContent => IsNoContent && ContentObject is string result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointMapEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointMapEndpoint.verified.cs index 181e6296..ae6b3383 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointMapEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointMapEndpoint.verified.cs @@ -50,6 +50,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetChargePointMapEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointMapEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointMapEndpointResult.verified.cs index 5fb55865..fcaa0929 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointMapEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointMapEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MapResult OkContent => IsOk && ContentObject is MapResult result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointOcppLogsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointOcppLogsEndpoint.verified.cs new file mode 100644 index 00000000..8b0009a0 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointOcppLogsEndpoint.verified.cs @@ -0,0 +1,53 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.ChargePoints; + +/// +/// Client Endpoint. +/// Description: Retrieve charge point OCPP logs. +/// Operation: GetChargePointOcppLogs. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetChargePointOcppLogsEndpoint : IGetChargePointOcppLogsEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public GetChargePointOcppLogsEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + GetChargePointOcppLogsParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/charge-points/{chargePointId}/logs"); + requestBuilder.WithQueryParameter("page", parameters.Page); + requestBuilder.WithQueryParameter("perPage", parameters.PerPage); + requestBuilder.WithPathParameter("chargePointId", parameters.ChargePointId); + requestBuilder.WithQueryParameter("fromDate", parameters.FromDate); + requestBuilder.WithQueryParameter("toDate", parameters.ToDate); + + using var requestMessage = requestBuilder.Build(HttpMethod.Get); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new GetChargePointOcppLogsEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointOcppLogsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointOcppLogsEndpointResult.verified.cs new file mode 100644 index 00000000..94ad452a --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointOcppLogsEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.ChargePoints; + +/// +/// Client Endpoint result. +/// Description: Retrieve charge point OCPP logs. +/// Operation: GetChargePointOcppLogs. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetChargePointOcppLogsEndpointResult : EndpointResponse, IGetChargePointOcppLogsEndpointResult +{ + public GetChargePointOcppLogsEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public MontaPageChargePointOcppLogDto OkContent + => IsOk && ContentObject is MontaPageChargePointOcppLogDto result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointsEndpoint.verified.cs index 23b5072a..9f4b548c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointsEndpoint.verified.cs @@ -39,7 +39,10 @@ public async Task ExecuteAsync( requestBuilder.WithQueryParameter("teamId", parameters.TeamId); requestBuilder.WithQueryParameter("partnerExternalId", parameters.PartnerExternalId); requestBuilder.WithQueryParameter("sortByLocation", parameters.SortByLocation); + requestBuilder.WithQueryParameter("boundingBox", parameters.BoundingBox); + requestBuilder.WithQueryParameter("operatorId", parameters.OperatorId); requestBuilder.WithQueryParameter("includeDeleted", parameters.IncludeDeleted); + requestBuilder.WithQueryParameter("includePublic", parameters.IncludePublic); requestBuilder.WithQueryParameter("state", parameters.State); using var requestMessage = requestBuilder.Build(HttpMethod.Get); @@ -49,6 +52,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetChargePointsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointsEndpointResult.verified.cs index 70a6d168..fd3c705e 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/GetChargePointsEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageChargePointDto OkContent => IsOk && ContentObject is MontaPageChargePointDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IDeleteChargePointEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IDeleteChargePointEndpointResult.verified.cs index d394e770..3ddf113b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IDeleteChargePointEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IDeleteChargePointEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IDeleteChargePointEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + string? NoContentContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IDeleteChargePointEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IGetChargePointMapEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IGetChargePointMapEndpointResult.verified.cs index 0c1b8f6b..eef03b51 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IGetChargePointMapEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IGetChargePointMapEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetChargePointMapEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MapResult OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IGetChargePointOcppLogsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IGetChargePointOcppLogsEndpoint.verified.cs new file mode 100644 index 00000000..952217f9 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IGetChargePointOcppLogsEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.ChargePoints.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Retrieve charge point OCPP logs. +/// Operation: GetChargePointOcppLogs. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetChargePointOcppLogsEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + GetChargePointOcppLogsParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IGetChargePointOcppLogsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IGetChargePointOcppLogsEndpointResult.verified.cs new file mode 100644 index 00000000..fc4da2ad --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IGetChargePointOcppLogsEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.ChargePoints.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Retrieve charge point OCPP logs. +/// Operation: GetChargePointOcppLogs. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetChargePointOcppLogsEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + MontaPageChargePointOcppLogDto OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IGetChargePointsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IGetChargePointsEndpointResult.verified.cs index 22388277..01112725 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IGetChargePointsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IGetChargePointsEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetChargePointsEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageChargePointDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IPatchChargePointEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IPatchChargePointEndpointResult.verified.cs index aab2d7e7..4d429333 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IPatchChargePointEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IPatchChargePointEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IPatchChargePointEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + ChargePoint OkContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IPatchChargePointEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IPostChargePointEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IPostChargePointEndpointResult.verified.cs index 446fee35..ac40a19c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IPostChargePointEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IPostChargePointEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IPostChargePointEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + string? CreatedContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IPostChargePointEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IRebootChargePointEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IRebootChargePointEndpoint.verified.cs new file mode 100644 index 00000000..a9234f2e --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IRebootChargePointEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.ChargePoints.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Reboot an existing charge point. +/// Operation: RebootChargePoint. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IRebootChargePointEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + RebootChargePointParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IRebootChargePointEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IRebootChargePointEndpointResult.verified.cs new file mode 100644 index 00000000..575a4b27 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IRebootChargePointEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.ChargePoints.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Reboot an existing charge point. +/// Operation: RebootChargePoint. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IRebootChargePointEndpointResult : IEndpointResponse +{ + + bool IsNoContent { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + string? NoContentContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IUnlockChargePointEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IUnlockChargePointEndpoint.verified.cs new file mode 100644 index 00000000..279ba986 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IUnlockChargePointEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.ChargePoints.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Unlock an existing charge point. +/// Operation: UnlockChargePoint. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IUnlockChargePointEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + UnlockChargePointParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IUnlockChargePointEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IUnlockChargePointEndpointResult.verified.cs new file mode 100644 index 00000000..66157f06 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/Interfaces/IUnlockChargePointEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.ChargePoints.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Unlock an existing charge point. +/// Operation: UnlockChargePoint. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IUnlockChargePointEndpointResult : IEndpointResponse +{ + + bool IsNoContent { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + string? NoContentContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/PatchChargePointEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/PatchChargePointEndpoint.verified.cs index b4714c0f..5574a69e 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/PatchChargePointEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/PatchChargePointEndpoint.verified.cs @@ -44,6 +44,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new PatchChargePointEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/PatchChargePointEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/PatchChargePointEndpointResult.verified.cs index 07dbab82..04483b40 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/PatchChargePointEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/PatchChargePointEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public ChargePoint OkContent => IsOk && ContentObject is ChargePoint result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/PostChargePointEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/PostChargePointEndpoint.verified.cs index f87258bf..2edc9ee1 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/PostChargePointEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/PostChargePointEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new PostChargePointEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/PostChargePointEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/PostChargePointEndpointResult.verified.cs index 8683fa4f..abd8b8ea 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/PostChargePointEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/PostChargePointEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? CreatedContent => IsCreated && ContentObject is string result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/RebootChargePointEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/RebootChargePointEndpoint.verified.cs new file mode 100644 index 00000000..eb549376 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/RebootChargePointEndpoint.verified.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.ChargePoints; + +/// +/// Client Endpoint. +/// Description: Reboot an existing charge point. +/// Operation: RebootChargePoint. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class RebootChargePointEndpoint : IRebootChargePointEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public RebootChargePointEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + RebootChargePointParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/charge-points/{chargePointId}/reboot"); + requestBuilder.WithPathParameter("chargePointId", parameters.ChargePointId); + + using var requestMessage = requestBuilder.Build(HttpMethod.Post); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddErrorResponse(HttpStatusCode.NoContent); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new RebootChargePointEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/RebootChargePointEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/RebootChargePointEndpointResult.verified.cs new file mode 100644 index 00000000..875795bf --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/RebootChargePointEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.ChargePoints; + +/// +/// Client Endpoint result. +/// Description: Reboot an existing charge point. +/// Operation: RebootChargePoint. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class RebootChargePointEndpointResult : EndpointResponse, IRebootChargePointEndpointResult +{ + public RebootChargePointEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsNoContent + => StatusCode == HttpStatusCode.NoContent; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public string? NoContentContent + => IsNoContent && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNoContent property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/UnlockChargePointEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/UnlockChargePointEndpoint.verified.cs new file mode 100644 index 00000000..43c6674e --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/UnlockChargePointEndpoint.verified.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.ChargePoints; + +/// +/// Client Endpoint. +/// Description: Unlock an existing charge point. +/// Operation: UnlockChargePoint. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class UnlockChargePointEndpoint : IUnlockChargePointEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public UnlockChargePointEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + UnlockChargePointParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/charge-points/{chargePointId}/unlock"); + requestBuilder.WithPathParameter("chargePointId", parameters.ChargePointId); + + using var requestMessage = requestBuilder.Build(HttpMethod.Post); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddErrorResponse(HttpStatusCode.NoContent); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new UnlockChargePointEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/UnlockChargePointEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/UnlockChargePointEndpointResult.verified.cs new file mode 100644 index 00000000..70bdc566 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/ChargePoints/UnlockChargePointEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.ChargePoints; + +/// +/// Client Endpoint result. +/// Description: Unlock an existing charge point. +/// Operation: UnlockChargePoint. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class UnlockChargePointEndpointResult : EndpointResponse, IUnlockChargePointEndpointResult +{ + public UnlockChargePointEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsNoContent + => StatusCode == HttpStatusCode.NoContent; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public string? NoContentContent + => IsNoContent && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNoContent property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/GetChargeBreakdownEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/GetChargeBreakdownEndpoint.verified.cs index c1e52817..f84392a0 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/GetChargeBreakdownEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/GetChargeBreakdownEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetChargeBreakdownEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/GetChargeBreakdownEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/GetChargeBreakdownEndpointResult.verified.cs index 2fe7098a..687cf967 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/GetChargeBreakdownEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/GetChargeBreakdownEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public ChargeBreakdown OkContent => IsOk && ContentObject is ChargeBreakdown result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/GetChargesEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/GetChargesEndpoint.verified.cs index 13f06584..8d9e63e8 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/GetChargesEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/GetChargesEndpoint.verified.cs @@ -36,6 +36,7 @@ public async Task ExecuteAsync( requestBuilder.WithQueryParameter("page", parameters.Page); requestBuilder.WithQueryParameter("perPage", parameters.PerPage); requestBuilder.WithQueryParameter("teamId", parameters.TeamId); + requestBuilder.WithQueryParameter("operatorId", parameters.OperatorId); requestBuilder.WithQueryParameter("chargePointId", parameters.ChargePointId); requestBuilder.WithQueryParameter("siteId", parameters.SiteId); requestBuilder.WithQueryParameter("state", parameters.State); @@ -53,6 +54,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetChargesEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/GetChargesEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/GetChargesEndpointResult.verified.cs index 3ee661c9..501e8684 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/GetChargesEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/GetChargesEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageChargeDto OkContent => IsOk && ContentObject is MontaPageChargeDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/Interfaces/IGetChargeBreakdownEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/Interfaces/IGetChargeBreakdownEndpointResult.verified.cs index c2fbb15e..329d6e2d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/Interfaces/IGetChargeBreakdownEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/Interfaces/IGetChargeBreakdownEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IGetChargeBreakdownEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + ChargeBreakdown OkContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IGetChargeBreakdownEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/Interfaces/IGetChargesEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/Interfaces/IGetChargesEndpointResult.verified.cs index b065b080..5301b320 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/Interfaces/IGetChargesEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/Interfaces/IGetChargesEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetChargesEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageChargeDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/Interfaces/IPatchChargeEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/Interfaces/IPatchChargeEndpointResult.verified.cs index 41e6b714..831e10a3 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/Interfaces/IPatchChargeEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/Interfaces/IPatchChargeEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IPatchChargeEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + Charge OkContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IPatchChargeEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/Interfaces/IStartChargeEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/Interfaces/IStartChargeEndpointResult.verified.cs index 160a47d7..e966deb4 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/Interfaces/IStartChargeEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/Interfaces/IStartChargeEndpointResult.verified.cs @@ -21,6 +21,8 @@ public interface IStartChargeEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + bool IsNotFound { get; } Charge OkContent { get; } @@ -29,5 +31,7 @@ public interface IStartChargeEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } + string? ForbiddenContent { get; } + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/PatchChargeEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/PatchChargeEndpoint.verified.cs index 994f61f2..6c37ae0a 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/PatchChargeEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/PatchChargeEndpoint.verified.cs @@ -44,6 +44,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new PatchChargeEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/PatchChargeEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/PatchChargeEndpointResult.verified.cs index 1d635086..33d2868e 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/PatchChargeEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/PatchChargeEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public Charge OkContent => IsOk && ContentObject is Charge result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/StartChargeEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/StartChargeEndpoint.verified.cs index a6573bfe..3a9265c9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/StartChargeEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/StartChargeEndpoint.verified.cs @@ -42,6 +42,7 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new StartChargeEndpointResult(x), cancellationToken); } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/StartChargeEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/StartChargeEndpointResult.verified.cs index ac0016e0..620b42ba 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/StartChargeEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Charges/StartChargeEndpointResult.verified.cs @@ -28,6 +28,9 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -46,6 +49,11 @@ public string? UnauthorizedContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + public string? NotFoundContent => IsNotFound && ContentObject is string result ? result diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Consumers/GetCurrentConsumerEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Consumers/GetCurrentConsumerEndpoint.verified.cs index 934fe045..c555186f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Consumers/GetCurrentConsumerEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Consumers/GetCurrentConsumerEndpoint.verified.cs @@ -40,6 +40,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetCurrentConsumerEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Consumers/GetCurrentConsumerEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Consumers/GetCurrentConsumerEndpointResult.verified.cs index 010c1ebf..8d99384f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Consumers/GetCurrentConsumerEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Consumers/GetCurrentConsumerEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public Consumer OkContent => IsOk && ContentObject is Consumer result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Consumers/Interfaces/IGetCurrentConsumerEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Consumers/Interfaces/IGetCurrentConsumerEndpointResult.verified.cs index c0fe007f..c920230d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Consumers/Interfaces/IGetCurrentConsumerEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Consumers/Interfaces/IGetCurrentConsumerEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetCurrentConsumerEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + Consumer OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/GetCountriesEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/GetCountriesEndpoint.verified.cs index c02ce017..93e2ef8c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/GetCountriesEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/GetCountriesEndpoint.verified.cs @@ -40,6 +40,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetCountriesEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/GetCountriesEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/GetCountriesEndpointResult.verified.cs index e951eb4e..1998ade6 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/GetCountriesEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/GetCountriesEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageCountryDto OkContent => IsOk && ContentObject is MontaPageCountryDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/GetCountryEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/GetCountryEndpoint.verified.cs index a86475ff..d30535a0 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/GetCountryEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/GetCountryEndpoint.verified.cs @@ -42,6 +42,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetCountryEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/GetCountryEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/GetCountryEndpointResult.verified.cs index fcdc17ef..3cb5175f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/GetCountryEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/GetCountryEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public Country OkContent => IsOk && ContentObject is Country result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/Interfaces/IGetCountriesEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/Interfaces/IGetCountriesEndpointResult.verified.cs index 4e8705db..e0866b01 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/Interfaces/IGetCountriesEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/Interfaces/IGetCountriesEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetCountriesEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageCountryDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/Interfaces/IGetCountryEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/Interfaces/IGetCountryEndpointResult.verified.cs index 337aebec..ce57089c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/Interfaces/IGetCountryEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Countries/Interfaces/IGetCountryEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetCountryEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + Country OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/GetCountriesAreasEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/GetCountriesAreasEndpoint.verified.cs index 445b69bd..dc12f054 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/GetCountriesAreasEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/GetCountriesAreasEndpoint.verified.cs @@ -42,6 +42,7 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetCountriesAreasEndpointResult(x), cancellationToken); } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/GetCountriesAreasEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/GetCountriesAreasEndpointResult.verified.cs index b85b0467..f5984e75 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/GetCountriesAreasEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/GetCountriesAreasEndpointResult.verified.cs @@ -28,6 +28,9 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -46,6 +49,11 @@ public string? UnauthorizedContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + public string? NotFoundContent => IsNotFound && ContentObject is string result ? result diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/GetCountryAreaEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/GetCountryAreaEndpoint.verified.cs index bef2b8b6..df742c46 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/GetCountryAreaEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/GetCountryAreaEndpoint.verified.cs @@ -42,6 +42,7 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetCountryAreaEndpointResult(x), cancellationToken); } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/GetCountryAreaEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/GetCountryAreaEndpointResult.verified.cs index 02b9ecde..d885af9f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/GetCountryAreaEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/GetCountryAreaEndpointResult.verified.cs @@ -28,6 +28,9 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -46,6 +49,11 @@ public string? UnauthorizedContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + public string? NotFoundContent => IsNotFound && ContentObject is string result ? result diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/Interfaces/IGetCountriesAreasEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/Interfaces/IGetCountriesAreasEndpointResult.verified.cs index e5458ae9..c1d0f33a 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/Interfaces/IGetCountriesAreasEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/Interfaces/IGetCountriesAreasEndpointResult.verified.cs @@ -21,6 +21,8 @@ public interface IGetCountriesAreasEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + bool IsNotFound { get; } MontaPageCountryAreaDto OkContent { get; } @@ -29,5 +31,7 @@ public interface IGetCountriesAreasEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } + string? ForbiddenContent { get; } + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/Interfaces/IGetCountryAreaEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/Interfaces/IGetCountryAreaEndpointResult.verified.cs index cf505b53..19cccd0c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/Interfaces/IGetCountryAreaEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/CountryAreas/Interfaces/IGetCountryAreaEndpointResult.verified.cs @@ -21,6 +21,8 @@ public interface IGetCountryAreaEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + bool IsNotFound { get; } CountryArea OkContent { get; } @@ -29,5 +31,7 @@ public interface IGetCountryAreaEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } + string? ForbiddenContent { get; } + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/GetCurrenciesEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/GetCurrenciesEndpoint.verified.cs index 608982e7..886cd3d1 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/GetCurrenciesEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/GetCurrenciesEndpoint.verified.cs @@ -44,6 +44,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetCurrenciesEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/GetCurrenciesEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/GetCurrenciesEndpointResult.verified.cs index 79a513b9..fcb9efaf 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/GetCurrenciesEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/GetCurrenciesEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageCurrencyDto OkContent => IsOk && ContentObject is MontaPageCurrencyDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/GetCurrencyEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/GetCurrencyEndpoint.verified.cs index 3ed11111..5ab04505 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/GetCurrencyEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/GetCurrencyEndpoint.verified.cs @@ -39,7 +39,7 @@ public async Task ExecuteAsync( using var response = await client.SendAsync(requestMessage, cancellationToken); var responseBuilder = httpMessageFactory.FromResponse(response); - responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/GetCurrencyEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/GetCurrencyEndpointResult.verified.cs index 472659e1..05f1bafa 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/GetCurrencyEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/GetCurrencyEndpointResult.verified.cs @@ -34,8 +34,8 @@ public bool IsForbidden public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; - public CurrencyDto4 OkContent - => IsOk && ContentObject is CurrencyDto4 result + public CurrencyDto OkContent + => IsOk && ContentObject is CurrencyDto result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/Interfaces/IGetCurrenciesEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/Interfaces/IGetCurrenciesEndpointResult.verified.cs index 05669c43..2218c354 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/Interfaces/IGetCurrenciesEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/Interfaces/IGetCurrenciesEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetCurrenciesEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageCurrencyDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/Interfaces/IGetCurrencyEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/Interfaces/IGetCurrencyEndpointResult.verified.cs index 60d5f825..04b2381b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/Interfaces/IGetCurrencyEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Currencies/Interfaces/IGetCurrencyEndpointResult.verified.cs @@ -25,7 +25,7 @@ public interface IGetCurrencyEndpointResult : IEndpointResponse bool IsNotFound { get; } - CurrencyDto4 OkContent { get; } + CurrencyDto OkContent { get; } string? BadRequestContent { get; } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesChargeAuthTokenReportEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesChargeAuthTokenReportEndpoint.verified.cs new file mode 100644 index 00000000..70b88aa7 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesChargeAuthTokenReportEndpoint.verified.cs @@ -0,0 +1,54 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Insights; + +/// +/// Client Endpoint. +/// Description: Retrieve insights about charges broken down by charge auth token and member cost groups of a team. +/// Operation: GetInsightsChargesChargeAuthTokenReport. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetInsightsChargesChargeAuthTokenReportEndpoint : IGetInsightsChargesChargeAuthTokenReportEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public GetInsightsChargesChargeAuthTokenReportEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + GetInsightsChargesChargeAuthTokenReportParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/insights/charges/charge-auth-token-report"); + requestBuilder.WithQueryParameter("page", parameters.Page); + requestBuilder.WithQueryParameter("perPage", parameters.PerPage); + requestBuilder.WithQueryParameter("teamId", parameters.TeamId); + requestBuilder.WithQueryParameter("fromDate", parameters.FromDate); + requestBuilder.WithQueryParameter("toDate", parameters.ToDate); + requestBuilder.WithQueryParameter("datesFilteredBy", parameters.DatesFilteredBy); + + using var requestMessage = requestBuilder.Build(HttpMethod.Get); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new GetInsightsChargesChargeAuthTokenReportEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesChargeAuthTokenReportEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesChargeAuthTokenReportEndpointResult.verified.cs new file mode 100644 index 00000000..d17d8781 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesChargeAuthTokenReportEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Insights; + +/// +/// Client Endpoint result. +/// Description: Retrieve insights about charges broken down by charge auth token and member cost groups of a team. +/// Operation: GetInsightsChargesChargeAuthTokenReport. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetInsightsChargesChargeAuthTokenReportEndpointResult : EndpointResponse, IGetInsightsChargesChargeAuthTokenReportEndpointResult +{ + public GetInsightsChargesChargeAuthTokenReportEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public MontaPageChargesInsightByChargeAuthTokenReportDto OkContent + => IsOk && ContentObject is MontaPageChargesInsightByChargeAuthTokenReportDto result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesChargerReportEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesChargerReportEndpoint.verified.cs index ef56f58e..bd78b64d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesChargerReportEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesChargerReportEndpoint.verified.cs @@ -33,6 +33,8 @@ public async Task ExecuteAsync( var client = factory.CreateClient(httpClientName); var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/insights/charges/charger-report"); + requestBuilder.WithQueryParameter("page", parameters.Page); + requestBuilder.WithQueryParameter("perPage", parameters.PerPage); requestBuilder.WithQueryParameter("teamId", parameters.TeamId); requestBuilder.WithQueryParameter("chargePointIds", parameters.ChargePointIds); requestBuilder.WithQueryParameter("fromDate", parameters.FromDate); @@ -45,6 +47,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetInsightsChargesChargerReportEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesChargerReportEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesChargerReportEndpointResult.verified.cs index 3cd3c8ba..68aed7a2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesChargerReportEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesChargerReportEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageChargesInsightChargerReportDto OkContent => IsOk && ContentObject is MontaPageChargesInsightChargerReportDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesDriverMemberCostsReportEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesDriverMemberCostsReportEndpoint.verified.cs new file mode 100644 index 00000000..f44b0081 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesDriverMemberCostsReportEndpoint.verified.cs @@ -0,0 +1,55 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Insights; + +/// +/// Client Endpoint. +/// Description: Retrieve insights about charges broken down by team members and member cost groups of a team. +/// Operation: GetInsightsChargesDriverMemberCostsReport. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetInsightsChargesDriverMemberCostsReportEndpoint : IGetInsightsChargesDriverMemberCostsReportEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public GetInsightsChargesDriverMemberCostsReportEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + GetInsightsChargesDriverMemberCostsReportParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/insights/charges/driver-member-costs-report"); + requestBuilder.WithQueryParameter("page", parameters.Page); + requestBuilder.WithQueryParameter("perPage", parameters.PerPage); + requestBuilder.WithQueryParameter("teamId", parameters.TeamId); + requestBuilder.WithQueryParameter("teamMemberIds", parameters.TeamMemberIds); + requestBuilder.WithQueryParameter("fromDate", parameters.FromDate); + requestBuilder.WithQueryParameter("toDate", parameters.ToDate); + requestBuilder.WithQueryParameter("datesFilteredBy", parameters.DatesFilteredBy); + + using var requestMessage = requestBuilder.Build(HttpMethod.Get); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new GetInsightsChargesDriverMemberCostsReportEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesDriverMemberCostsReportEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesDriverMemberCostsReportEndpointResult.verified.cs new file mode 100644 index 00000000..cfb0e805 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesDriverMemberCostsReportEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Insights; + +/// +/// Client Endpoint result. +/// Description: Retrieve insights about charges broken down by team members and member cost groups of a team. +/// Operation: GetInsightsChargesDriverMemberCostsReport. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetInsightsChargesDriverMemberCostsReportEndpointResult : EndpointResponse, IGetInsightsChargesDriverMemberCostsReportEndpointResult +{ + public GetInsightsChargesDriverMemberCostsReportEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public MontaPageChargesInsightDriverMemberCostsReportDto OkContent + => IsOk && ContentObject is MontaPageChargesInsightDriverMemberCostsReportDto result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesDriverReportEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesDriverReportEndpoint.verified.cs index 579d0409..dd93eb5c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesDriverReportEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesDriverReportEndpoint.verified.cs @@ -33,6 +33,8 @@ public async Task ExecuteAsync( var client = factory.CreateClient(httpClientName); var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/insights/charges/driver-report"); + requestBuilder.WithQueryParameter("page", parameters.Page); + requestBuilder.WithQueryParameter("perPage", parameters.PerPage); requestBuilder.WithQueryParameter("teamId", parameters.TeamId); requestBuilder.WithQueryParameter("teamMemberIds", parameters.TeamMemberIds); requestBuilder.WithQueryParameter("fromDate", parameters.FromDate); @@ -46,6 +48,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetInsightsChargesDriverReportEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesDriverReportEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesDriverReportEndpointResult.verified.cs index c29f024a..5c74a8d6 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesDriverReportEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/GetInsightsChargesDriverReportEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageChargesInsightDriverReportDto OkContent => IsOk && ContentObject is MontaPageChargesInsightDriverReportDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/Interfaces/IGetInsightsChargesChargeAuthTokenReportEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/Interfaces/IGetInsightsChargesChargeAuthTokenReportEndpoint.verified.cs new file mode 100644 index 00000000..1bfdc876 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/Interfaces/IGetInsightsChargesChargeAuthTokenReportEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Insights.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Retrieve insights about charges broken down by charge auth token and member cost groups of a team. +/// Operation: GetInsightsChargesChargeAuthTokenReport. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetInsightsChargesChargeAuthTokenReportEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + GetInsightsChargesChargeAuthTokenReportParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/Interfaces/IGetInsightsChargesChargeAuthTokenReportEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/Interfaces/IGetInsightsChargesChargeAuthTokenReportEndpointResult.verified.cs new file mode 100644 index 00000000..5a9c8da5 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/Interfaces/IGetInsightsChargesChargeAuthTokenReportEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Insights.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Retrieve insights about charges broken down by charge auth token and member cost groups of a team. +/// Operation: GetInsightsChargesChargeAuthTokenReport. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetInsightsChargesChargeAuthTokenReportEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + MontaPageChargesInsightByChargeAuthTokenReportDto OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/Interfaces/IGetInsightsChargesChargerReportEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/Interfaces/IGetInsightsChargesChargerReportEndpointResult.verified.cs index 8a05a2f4..a2f87483 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/Interfaces/IGetInsightsChargesChargerReportEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/Interfaces/IGetInsightsChargesChargerReportEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetInsightsChargesChargerReportEndpointResult : IEndpointRespo bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageChargesInsightChargerReportDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/Interfaces/IGetInsightsChargesDriverMemberCostsReportEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/Interfaces/IGetInsightsChargesDriverMemberCostsReportEndpoint.verified.cs new file mode 100644 index 00000000..7ab41970 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/Interfaces/IGetInsightsChargesDriverMemberCostsReportEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Insights.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Retrieve insights about charges broken down by team members and member cost groups of a team. +/// Operation: GetInsightsChargesDriverMemberCostsReport. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetInsightsChargesDriverMemberCostsReportEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + GetInsightsChargesDriverMemberCostsReportParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/Interfaces/IGetInsightsChargesDriverMemberCostsReportEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/Interfaces/IGetInsightsChargesDriverMemberCostsReportEndpointResult.verified.cs new file mode 100644 index 00000000..0aa4a865 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/Interfaces/IGetInsightsChargesDriverMemberCostsReportEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Insights.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Retrieve insights about charges broken down by team members and member cost groups of a team. +/// Operation: GetInsightsChargesDriverMemberCostsReport. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetInsightsChargesDriverMemberCostsReportEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + MontaPageChargesInsightDriverMemberCostsReportDto OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/Interfaces/IGetInsightsChargesDriverReportEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/Interfaces/IGetInsightsChargesDriverReportEndpointResult.verified.cs index 85124d22..3408a34a 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/Interfaces/IGetInsightsChargesDriverReportEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Insights/Interfaces/IGetInsightsChargesDriverReportEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetInsightsChargesDriverReportEndpointResult : IEndpointRespon bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageChargesInsightDriverReportDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/DeleteInstallerJobEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/DeleteInstallerJobEndpoint.verified.cs index 03715389..4fc0ee54 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/DeleteInstallerJobEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/DeleteInstallerJobEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new DeleteInstallerJobEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/DeleteInstallerJobEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/DeleteInstallerJobEndpointResult.verified.cs index b6535bfa..41b10651 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/DeleteInstallerJobEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/DeleteInstallerJobEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? NoContentContent => IsNoContent && ContentObject is string result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/GetInstallerJobsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/GetInstallerJobsEndpoint.verified.cs index 35ed00c7..11426d0f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/GetInstallerJobsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/GetInstallerJobsEndpoint.verified.cs @@ -46,6 +46,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetInstallerJobsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/GetInstallerJobsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/GetInstallerJobsEndpointResult.verified.cs index f2ebebe9..ba7ed8d9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/GetInstallerJobsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/GetInstallerJobsEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageInstallerJobDto OkContent => IsOk && ContentObject is MontaPageInstallerJobDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/Interfaces/IDeleteInstallerJobEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/Interfaces/IDeleteInstallerJobEndpointResult.verified.cs index a2996aaf..be48cb95 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/Interfaces/IDeleteInstallerJobEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/Interfaces/IDeleteInstallerJobEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IDeleteInstallerJobEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + string? NoContentContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IDeleteInstallerJobEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/Interfaces/IGetInstallerJobsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/Interfaces/IGetInstallerJobsEndpointResult.verified.cs index 9b65deab..f5fcde7c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/Interfaces/IGetInstallerJobsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/Interfaces/IGetInstallerJobsEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetInstallerJobsEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageInstallerJobDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/Interfaces/IPostInstallerJobEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/Interfaces/IPostInstallerJobEndpointResult.verified.cs index b8bcb35a..d8f77038 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/Interfaces/IPostInstallerJobEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/Interfaces/IPostInstallerJobEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IPostInstallerJobEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + string? CreatedContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IPostInstallerJobEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/PostInstallerJobEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/PostInstallerJobEndpoint.verified.cs index 2186615d..27445aff 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/PostInstallerJobEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/PostInstallerJobEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new PostInstallerJobEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/PostInstallerJobEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/PostInstallerJobEndpointResult.verified.cs index e5b03234..d60e6223 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/PostInstallerJobEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/InstallerJobs/PostInstallerJobEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? CreatedContent => IsCreated && ContentObject is string result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/GetInvoice1Endpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/GetInvoice1Endpoint.verified.cs new file mode 100644 index 00000000..cd83b217 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/GetInvoice1Endpoint.verified.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Invoices; + +/// +/// Client Endpoint. +/// Description: Retrieves an invoice by its id. +/// Operation: GetInvoice1. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetInvoice1Endpoint : IGetInvoice1Endpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public GetInvoice1Endpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + GetInvoice1Parameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/invoices/{invoiceId}"); + requestBuilder.WithPathParameter("invoiceId", parameters.InvoiceId); + + using var requestMessage = requestBuilder.Build(HttpMethod.Get); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new GetInvoice1EndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/GetInvoice1EndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/GetInvoice1EndpointResult.verified.cs new file mode 100644 index 00000000..74b8b801 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/GetInvoice1EndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Invoices; + +/// +/// Client Endpoint result. +/// Description: Retrieves an invoice by its id. +/// Operation: GetInvoice1. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetInvoice1EndpointResult : EndpointResponse, IGetInvoice1EndpointResult +{ + public GetInvoice1EndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public InvoiceDto OkContent + => IsOk && ContentObject is InvoiceDto result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/GetInvoiceEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/GetInvoiceEndpoint.verified.cs new file mode 100644 index 00000000..71b335d0 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/GetInvoiceEndpoint.verified.cs @@ -0,0 +1,52 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Invoices; + +/// +/// Client Endpoint. +/// Description: Retrieves a list of invoices by walletId. +/// Operation: GetInvoice. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetInvoiceEndpoint : IGetInvoiceEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public GetInvoiceEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + GetInvoiceParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/invoices"); + requestBuilder.WithQueryParameter("page", parameters.Page); + requestBuilder.WithQueryParameter("perPage", parameters.PerPage); + requestBuilder.WithQueryParameter("walletId", parameters.WalletId); + requestBuilder.WithQueryParameter("pageable", parameters.Pageable); + + using var requestMessage = requestBuilder.Build(HttpMethod.Get); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new GetInvoiceEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/GetInvoiceEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/GetInvoiceEndpointResult.verified.cs new file mode 100644 index 00000000..0bf730b8 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/GetInvoiceEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Invoices; + +/// +/// Client Endpoint result. +/// Description: Retrieves a list of invoices by walletId. +/// Operation: GetInvoice. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetInvoiceEndpointResult : EndpointResponse, IGetInvoiceEndpointResult +{ + public GetInvoiceEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public MontaPageInvoiceDto OkContent + => IsOk && ContentObject is MontaPageInvoiceDto result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/Interfaces/IGetInvoice1Endpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/Interfaces/IGetInvoice1Endpoint.verified.cs new file mode 100644 index 00000000..7ba6394a --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/Interfaces/IGetInvoice1Endpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Invoices.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Retrieves an invoice by its id. +/// Operation: GetInvoice1. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetInvoice1Endpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + GetInvoice1Parameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/Interfaces/IGetInvoice1EndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/Interfaces/IGetInvoice1EndpointResult.verified.cs new file mode 100644 index 00000000..ccb3d252 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/Interfaces/IGetInvoice1EndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Invoices.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Retrieves an invoice by its id. +/// Operation: GetInvoice1. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetInvoice1EndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + InvoiceDto OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/Interfaces/IGetInvoiceEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/Interfaces/IGetInvoiceEndpoint.verified.cs new file mode 100644 index 00000000..18515fa6 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/Interfaces/IGetInvoiceEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Invoices.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Retrieves a list of invoices by walletId. +/// Operation: GetInvoice. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetInvoiceEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + GetInvoiceParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/Interfaces/IGetInvoiceEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/Interfaces/IGetInvoiceEndpointResult.verified.cs new file mode 100644 index 00000000..3ac24b05 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Invoices/Interfaces/IGetInvoiceEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Invoices.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Retrieves a list of invoices by walletId. +/// Operation: GetInvoice. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetInvoiceEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + MontaPageInvoiceDto OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/AcceptInviteEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/AcceptInviteEndpoint.verified.cs new file mode 100644 index 00000000..6c1499b9 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/AcceptInviteEndpoint.verified.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams; + +/// +/// Client Endpoint. +/// Description: Accept a nested team invitation. +/// Operation: AcceptInvite. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class AcceptInviteEndpoint : IAcceptInviteEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public AcceptInviteEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + AcceptInviteParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/nested-teams/{relationId}/accept-invite"); + requestBuilder.WithPathParameter("relationId", parameters.RelationId); + + using var requestMessage = requestBuilder.Build(HttpMethod.Post); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new AcceptInviteEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/AcceptInviteEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/AcceptInviteEndpointResult.verified.cs new file mode 100644 index 00000000..a19feeeb --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/AcceptInviteEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams; + +/// +/// Client Endpoint result. +/// Description: Accept a nested team invitation. +/// Operation: AcceptInvite. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class AcceptInviteEndpointResult : EndpointResponse, IAcceptInviteEndpointResult +{ + public AcceptInviteEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public NestedTeam OkContent + => IsOk && ContentObject is NestedTeam result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/DeleteNestedTeamEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/DeleteNestedTeamEndpoint.verified.cs new file mode 100644 index 00000000..ba1ae2a2 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/DeleteNestedTeamEndpoint.verified.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams; + +/// +/// Client Endpoint. +/// Description: Delete a nested team relation. +/// Operation: DeleteNestedTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class DeleteNestedTeamEndpoint : IDeleteNestedTeamEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public DeleteNestedTeamEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + DeleteNestedTeamParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/nested-teams/{relationId}"); + requestBuilder.WithPathParameter("relationId", parameters.RelationId); + + using var requestMessage = requestBuilder.Build(HttpMethod.Delete); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddErrorResponse(HttpStatusCode.NoContent); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new DeleteNestedTeamEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/DeleteNestedTeamEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/DeleteNestedTeamEndpointResult.verified.cs new file mode 100644 index 00000000..453267e1 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/DeleteNestedTeamEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams; + +/// +/// Client Endpoint result. +/// Description: Delete a nested team relation. +/// Operation: DeleteNestedTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class DeleteNestedTeamEndpointResult : EndpointResponse, IDeleteNestedTeamEndpointResult +{ + public DeleteNestedTeamEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsNoContent + => StatusCode == HttpStatusCode.NoContent; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public string? NoContentContent + => IsNoContent && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNoContent property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/GetNestedTeamEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/GetNestedTeamEndpoint.verified.cs new file mode 100644 index 00000000..67074bd8 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/GetNestedTeamEndpoint.verified.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams; + +/// +/// Client Endpoint. +/// Description: Get a nested team by nested team relation id. +/// Operation: GetNestedTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetNestedTeamEndpoint : IGetNestedTeamEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public GetNestedTeamEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + GetNestedTeamParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/nested-teams/{relationId}"); + requestBuilder.WithPathParameter("relationId", parameters.RelationId); + + using var requestMessage = requestBuilder.Build(HttpMethod.Get); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new GetNestedTeamEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/GetNestedTeamEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/GetNestedTeamEndpointResult.verified.cs new file mode 100644 index 00000000..b838c151 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/GetNestedTeamEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams; + +/// +/// Client Endpoint result. +/// Description: Get a nested team by nested team relation id. +/// Operation: GetNestedTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetNestedTeamEndpointResult : EndpointResponse, IGetNestedTeamEndpointResult +{ + public GetNestedTeamEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public NestedTeam OkContent + => IsOk && ContentObject is NestedTeam result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/GetNestedTeamsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/GetNestedTeamsEndpoint.verified.cs new file mode 100644 index 00000000..78137015 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/GetNestedTeamsEndpoint.verified.cs @@ -0,0 +1,52 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams; + +/// +/// Client Endpoint. +/// Description: Retrieve a list of nested team relations. +/// Operation: GetNestedTeams. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetNestedTeamsEndpoint : IGetNestedTeamsEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public GetNestedTeamsEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + GetNestedTeamsParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/nested-teams"); + requestBuilder.WithQueryParameter("page", parameters.Page); + requestBuilder.WithQueryParameter("perPage", parameters.PerPage); + requestBuilder.WithQueryParameter("state", parameters.State); + requestBuilder.WithQueryParameter("includeDeleted", parameters.IncludeDeleted); + + using var requestMessage = requestBuilder.Build(HttpMethod.Get); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new GetNestedTeamsEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/GetNestedTeamsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/GetNestedTeamsEndpointResult.verified.cs new file mode 100644 index 00000000..e3d065c5 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/GetNestedTeamsEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams; + +/// +/// Client Endpoint result. +/// Description: Retrieve a list of nested team relations. +/// Operation: GetNestedTeams. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetNestedTeamsEndpointResult : EndpointResponse, IGetNestedTeamsEndpointResult +{ + public GetNestedTeamsEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public MontaPageNestedTeamDto OkContent + => IsOk && ContentObject is MontaPageNestedTeamDto result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IAcceptInviteEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IAcceptInviteEndpoint.verified.cs new file mode 100644 index 00000000..6ad9637f --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IAcceptInviteEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Accept a nested team invitation. +/// Operation: AcceptInvite. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IAcceptInviteEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + AcceptInviteParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IAcceptInviteEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IAcceptInviteEndpointResult.verified.cs new file mode 100644 index 00000000..e0720002 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IAcceptInviteEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Accept a nested team invitation. +/// Operation: AcceptInvite. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IAcceptInviteEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + NestedTeam OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IDeleteNestedTeamEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IDeleteNestedTeamEndpoint.verified.cs new file mode 100644 index 00000000..0e13f22c --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IDeleteNestedTeamEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Delete a nested team relation. +/// Operation: DeleteNestedTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IDeleteNestedTeamEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + DeleteNestedTeamParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IDeleteNestedTeamEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IDeleteNestedTeamEndpointResult.verified.cs new file mode 100644 index 00000000..8d80375c --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IDeleteNestedTeamEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Delete a nested team relation. +/// Operation: DeleteNestedTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IDeleteNestedTeamEndpointResult : IEndpointResponse +{ + + bool IsNoContent { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + string? NoContentContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IGetNestedTeamEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IGetNestedTeamEndpoint.verified.cs new file mode 100644 index 00000000..6e600a3c --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IGetNestedTeamEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Get a nested team by nested team relation id. +/// Operation: GetNestedTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetNestedTeamEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + GetNestedTeamParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IGetNestedTeamEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IGetNestedTeamEndpointResult.verified.cs new file mode 100644 index 00000000..e98aa022 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IGetNestedTeamEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Get a nested team by nested team relation id. +/// Operation: GetNestedTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetNestedTeamEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + NestedTeam OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IGetNestedTeamsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IGetNestedTeamsEndpoint.verified.cs new file mode 100644 index 00000000..14f4f5c1 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IGetNestedTeamsEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Retrieve a list of nested team relations. +/// Operation: GetNestedTeams. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetNestedTeamsEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + GetNestedTeamsParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IGetNestedTeamsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IGetNestedTeamsEndpointResult.verified.cs new file mode 100644 index 00000000..7cabd90e --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IGetNestedTeamsEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Retrieve a list of nested team relations. +/// Operation: GetNestedTeams. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetNestedTeamsEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + MontaPageNestedTeamDto OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IInviteEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IInviteEndpoint.verified.cs new file mode 100644 index 00000000..410d0269 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IInviteEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Nested team invite. +/// Operation: Invite. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IInviteEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + InviteParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IInviteEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IInviteEndpointResult.verified.cs new file mode 100644 index 00000000..42001b9d --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IInviteEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Nested team invite. +/// Operation: Invite. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IInviteEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + NestedTeam OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IRejectInviteEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IRejectInviteEndpoint.verified.cs new file mode 100644 index 00000000..ca85e001 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IRejectInviteEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Reject a nested team invitation. +/// Operation: RejectInvite. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IRejectInviteEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + RejectInviteParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IRejectInviteEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IRejectInviteEndpointResult.verified.cs new file mode 100644 index 00000000..df799c71 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IRejectInviteEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Reject a nested team invitation. +/// Operation: RejectInvite. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IRejectInviteEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + NestedTeam OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IUpdateNestedTeamEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IUpdateNestedTeamEndpoint.verified.cs new file mode 100644 index 00000000..c3d1c283 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IUpdateNestedTeamEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Update a nested team relation. +/// Operation: UpdateNestedTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IUpdateNestedTeamEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + UpdateNestedTeamParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IUpdateNestedTeamEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IUpdateNestedTeamEndpointResult.verified.cs new file mode 100644 index 00000000..ddc9ce64 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/Interfaces/IUpdateNestedTeamEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Update a nested team relation. +/// Operation: UpdateNestedTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IUpdateNestedTeamEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + NestedTeam OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/PatchTransactionEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/InviteEndpoint.verified.cs similarity index 70% rename from test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/PatchTransactionEndpoint.verified.cs rename to test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/InviteEndpoint.verified.cs index b60aed2a..faf81c3a 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/PatchTransactionEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/InviteEndpoint.verified.cs @@ -4,20 +4,20 @@ // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. //------------------------------------------------------------------------------ -namespace Monta.ApiClient.Generated.Endpoints.WalletTransactions; +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams; /// /// Client Endpoint. -/// Description: Patch an existing transaction. -/// Operation: PatchTransaction. +/// Description: Nested team invite. +/// Operation: Invite. /// [GeneratedCode("ApiGenerator", "x.x.x.x")] -public class PatchTransactionEndpoint : IPatchTransactionEndpoint +public class InviteEndpoint : IInviteEndpoint { private readonly IHttpClientFactory factory; private readonly IHttpMessageFactory httpMessageFactory; - public PatchTransactionEndpoint( + public InviteEndpoint( IHttpClientFactory factory, IHttpMessageFactory httpMessageFactory) { @@ -25,25 +25,25 @@ public PatchTransactionEndpoint( this.httpMessageFactory = httpMessageFactory; } - public async Task ExecuteAsync( - PatchTransactionParameters parameters, + public async Task ExecuteAsync( + InviteParameters parameters, string httpClientName = "Monta-ApiClient", CancellationToken cancellationToken = default) { var client = factory.CreateClient(httpClientName); - var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/wallet-transactions/{transactionId}"); - requestBuilder.WithPathParameter("transactionId", parameters.TransactionId); + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/nested-teams/invite"); requestBuilder.WithBody(parameters.Request); - using var requestMessage = requestBuilder.Build(HttpMethod.Patch); + using var requestMessage = requestBuilder.Build(HttpMethod.Post); using var response = await client.SendAsync(requestMessage, cancellationToken); var responseBuilder = httpMessageFactory.FromResponse(response); - responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); - return await responseBuilder.BuildResponseAsync(x => new PatchTransactionEndpointResult(x), cancellationToken); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new InviteEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/InviteEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/InviteEndpointResult.verified.cs new file mode 100644 index 00000000..48780f8e --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/InviteEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams; + +/// +/// Client Endpoint result. +/// Description: Nested team invite. +/// Operation: Invite. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class InviteEndpointResult : EndpointResponse, IInviteEndpointResult +{ + public InviteEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public NestedTeam OkContent + => IsOk && ContentObject is NestedTeam result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/RejectInviteEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/RejectInviteEndpoint.verified.cs new file mode 100644 index 00000000..17ee681d --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/RejectInviteEndpoint.verified.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams; + +/// +/// Client Endpoint. +/// Description: Reject a nested team invitation. +/// Operation: RejectInvite. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class RejectInviteEndpoint : IRejectInviteEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public RejectInviteEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + RejectInviteParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/nested-teams/{relationId}/reject-invite"); + requestBuilder.WithPathParameter("relationId", parameters.RelationId); + + using var requestMessage = requestBuilder.Build(HttpMethod.Post); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new RejectInviteEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/RejectInviteEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/RejectInviteEndpointResult.verified.cs new file mode 100644 index 00000000..83ea1261 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/RejectInviteEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams; + +/// +/// Client Endpoint result. +/// Description: Reject a nested team invitation. +/// Operation: RejectInvite. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class RejectInviteEndpointResult : EndpointResponse, IRejectInviteEndpointResult +{ + public RejectInviteEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public NestedTeam OkContent + => IsOk && ContentObject is NestedTeam result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/UpdateNestedTeamEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/UpdateNestedTeamEndpoint.verified.cs new file mode 100644 index 00000000..e3412611 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/UpdateNestedTeamEndpoint.verified.cs @@ -0,0 +1,50 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams; + +/// +/// Client Endpoint. +/// Description: Update a nested team relation. +/// Operation: UpdateNestedTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class UpdateNestedTeamEndpoint : IUpdateNestedTeamEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public UpdateNestedTeamEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + UpdateNestedTeamParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/nested-teams/{relationId}"); + requestBuilder.WithPathParameter("relationId", parameters.RelationId); + requestBuilder.WithBody(parameters.Request); + + using var requestMessage = requestBuilder.Build(HttpMethod.Patch); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new UpdateNestedTeamEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/UpdateNestedTeamEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/UpdateNestedTeamEndpointResult.verified.cs new file mode 100644 index 00000000..484e3a6d --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/NestedTeams/UpdateNestedTeamEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.NestedTeams; + +/// +/// Client Endpoint result. +/// Description: Update a nested team relation. +/// Operation: UpdateNestedTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class UpdateNestedTeamEndpointResult : EndpointResponse, IUpdateNestedTeamEndpointResult +{ + public UpdateNestedTeamEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public NestedTeam OkContent + => IsOk && ContentObject is NestedTeam result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/GetOperatorEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/GetOperatorEndpoint.verified.cs index ead8d525..09a31535 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/GetOperatorEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/GetOperatorEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetOperatorEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/GetOperatorEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/GetOperatorEndpointResult.verified.cs index b8f8f06e..d9d2dd9d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/GetOperatorEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/GetOperatorEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public Operator OkContent => IsOk && ContentObject is Operator result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/GetOperatorsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/GetOperatorsEndpoint.verified.cs index 9b4ef98e..b23935f9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/GetOperatorsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/GetOperatorsEndpoint.verified.cs @@ -43,6 +43,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetOperatorsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/GetOperatorsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/GetOperatorsEndpointResult.verified.cs index 56414a78..511582d4 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/GetOperatorsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/GetOperatorsEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageOperatorDto OkContent => IsOk && ContentObject is MontaPageOperatorDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/Interfaces/IGetOperatorEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/Interfaces/IGetOperatorEndpointResult.verified.cs index c6f5f145..392baf3f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/Interfaces/IGetOperatorEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/Interfaces/IGetOperatorEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IGetOperatorEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + Operator OkContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IGetOperatorEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/Interfaces/IGetOperatorsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/Interfaces/IGetOperatorsEndpointResult.verified.cs index 9854f617..85188265 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/Interfaces/IGetOperatorsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Operators/Interfaces/IGetOperatorsEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetOperatorsEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageOperatorDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PaymentTerminals/GetPaymentTerminalsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PaymentTerminals/GetPaymentTerminalsEndpoint.verified.cs index 77325e70..82fd0872 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PaymentTerminals/GetPaymentTerminalsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PaymentTerminals/GetPaymentTerminalsEndpoint.verified.cs @@ -46,6 +46,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetPaymentTerminalsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PaymentTerminals/GetPaymentTerminalsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PaymentTerminals/GetPaymentTerminalsEndpointResult.verified.cs index 07de1fe8..4407bf41 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PaymentTerminals/GetPaymentTerminalsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PaymentTerminals/GetPaymentTerminalsEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPagePaymentTerminalDto OkContent => IsOk && ContentObject is MontaPagePaymentTerminalDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PaymentTerminals/Interfaces/IGetPaymentTerminalsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PaymentTerminals/Interfaces/IGetPaymentTerminalsEndpointResult.verified.cs index e79bc3ff..f9047291 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PaymentTerminals/Interfaces/IGetPaymentTerminalsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PaymentTerminals/Interfaces/IGetPaymentTerminalsEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetPaymentTerminalsEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPagePaymentTerminalDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/GetPlanEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/GetPlanEndpoint.verified.cs index 10a4d720..ea2ae382 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/GetPlanEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/GetPlanEndpoint.verified.cs @@ -42,6 +42,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetPlanEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/GetPlanEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/GetPlanEndpointResult.verified.cs index 8a88221d..02062e59 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/GetPlanEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/GetPlanEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public Plan OkContent => IsOk && ContentObject is Plan result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/GetPlansEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/GetPlansEndpoint.verified.cs index 2c136ce2..ba47851d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/GetPlansEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/GetPlansEndpoint.verified.cs @@ -43,6 +43,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetPlansEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/GetPlansEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/GetPlansEndpointResult.verified.cs index c45923cc..e32ef362 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/GetPlansEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/GetPlansEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPagePlanDto OkContent => IsOk && ContentObject is MontaPagePlanDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/Interfaces/IGetPlanEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/Interfaces/IGetPlanEndpointResult.verified.cs index e53ad632..7daac723 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/Interfaces/IGetPlanEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/Interfaces/IGetPlanEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetPlanEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + Plan OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/Interfaces/IGetPlansEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/Interfaces/IGetPlansEndpointResult.verified.cs index 6969c1dc..89db2fab 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/Interfaces/IGetPlansEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Plans/Interfaces/IGetPlansEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetPlansEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPagePlanDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroupTags/GetPriceGroupTagsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroupTags/GetPriceGroupTagsEndpoint.verified.cs index 47baaab4..264a0be3 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroupTags/GetPriceGroupTagsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroupTags/GetPriceGroupTagsEndpoint.verified.cs @@ -43,6 +43,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetPriceGroupTagsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroupTags/GetPriceGroupTagsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroupTags/GetPriceGroupTagsEndpointResult.verified.cs index 0eed502f..32e2ab25 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroupTags/GetPriceGroupTagsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroupTags/GetPriceGroupTagsEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPagePriceGroupTagDto OkContent => IsOk && ContentObject is MontaPagePriceGroupTagDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroupTags/Interfaces/IGetPriceGroupTagsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroupTags/Interfaces/IGetPriceGroupTagsEndpointResult.verified.cs index d98f619f..da8b9836 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroupTags/Interfaces/IGetPriceGroupTagsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroupTags/Interfaces/IGetPriceGroupTagsEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetPriceGroupTagsEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPagePriceGroupTagDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/ApplyPriceGroupEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/ApplyPriceGroupEndpoint.verified.cs index ea5847f0..d6cc79eb 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/ApplyPriceGroupEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/ApplyPriceGroupEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new ApplyPriceGroupEndpointResult(x), cancellationToken); } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/ApplyPriceGroupEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/ApplyPriceGroupEndpointResult.verified.cs index bcbf6dcd..84df6ba5 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/ApplyPriceGroupEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/ApplyPriceGroupEndpointResult.verified.cs @@ -28,6 +28,9 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -46,6 +49,11 @@ public string? UnauthorizedContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + public string? NotFoundContent => IsNotFound && ContentObject is string result ? result diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/CreatePriceGroupEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/CreatePriceGroupEndpoint.verified.cs index 23a4084e..4ea519eb 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/CreatePriceGroupEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/CreatePriceGroupEndpoint.verified.cs @@ -42,6 +42,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.Created); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new CreatePriceGroupEndpointResult(x), cancellationToken); } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/CreatePriceGroupEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/CreatePriceGroupEndpointResult.verified.cs index 1ffe4eeb..0c889b01 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/CreatePriceGroupEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/CreatePriceGroupEndpointResult.verified.cs @@ -28,6 +28,9 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -46,6 +49,11 @@ public string? UnauthorizedContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + public string? NotFoundContent => IsNotFound && ContentObject is string result ? result diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/DeletePriceGroupEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/DeletePriceGroupEndpoint.verified.cs index b8f7e222..574b752c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/DeletePriceGroupEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/DeletePriceGroupEndpoint.verified.cs @@ -42,6 +42,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.NoContent); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new DeletePriceGroupEndpointResult(x), cancellationToken); } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/DeletePriceGroupEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/DeletePriceGroupEndpointResult.verified.cs index 799a67ca..29324d30 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/DeletePriceGroupEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/DeletePriceGroupEndpointResult.verified.cs @@ -28,6 +28,9 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -46,6 +49,11 @@ public string? UnauthorizedContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + public string? NotFoundContent => IsNotFound && ContentObject is string result ? result diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/GetPriceGroupEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/GetPriceGroupEndpoint.verified.cs index 38ca297d..708deaa9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/GetPriceGroupEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/GetPriceGroupEndpoint.verified.cs @@ -42,6 +42,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetPriceGroupEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/GetPriceGroupEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/GetPriceGroupEndpointResult.verified.cs index 938eaeb8..40946465 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/GetPriceGroupEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/GetPriceGroupEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public PriceGroup OkContent => IsOk && ContentObject is PriceGroup result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/GetPriceGroupsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/GetPriceGroupsEndpoint.verified.cs index 56b6f756..b0db6b66 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/GetPriceGroupsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/GetPriceGroupsEndpoint.verified.cs @@ -42,6 +42,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetPriceGroupsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/GetPriceGroupsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/GetPriceGroupsEndpointResult.verified.cs index 256587b1..ec835d86 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/GetPriceGroupsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/GetPriceGroupsEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPagePriceGroupDto OkContent => IsOk && ContentObject is MontaPagePriceGroupDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/IApplyPriceGroupEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/IApplyPriceGroupEndpointResult.verified.cs index 601475b2..6be9edb9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/IApplyPriceGroupEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/IApplyPriceGroupEndpointResult.verified.cs @@ -21,6 +21,8 @@ public interface IApplyPriceGroupEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + bool IsNotFound { get; } PriceGroup OkContent { get; } @@ -29,5 +31,7 @@ public interface IApplyPriceGroupEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } + string? ForbiddenContent { get; } + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/ICreatePriceGroupEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/ICreatePriceGroupEndpointResult.verified.cs index da9edec9..746a3cef 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/ICreatePriceGroupEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/ICreatePriceGroupEndpointResult.verified.cs @@ -21,6 +21,8 @@ public interface ICreatePriceGroupEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + bool IsNotFound { get; } string? CreatedContent { get; } @@ -29,5 +31,7 @@ public interface ICreatePriceGroupEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } + string? ForbiddenContent { get; } + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/IDeletePriceGroupEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/IDeletePriceGroupEndpointResult.verified.cs index 0c03674d..f1abe0cf 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/IDeletePriceGroupEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/IDeletePriceGroupEndpointResult.verified.cs @@ -21,6 +21,8 @@ public interface IDeletePriceGroupEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + bool IsNotFound { get; } string? NoContentContent { get; } @@ -29,5 +31,7 @@ public interface IDeletePriceGroupEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } + string? ForbiddenContent { get; } + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/IGetPriceGroupEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/IGetPriceGroupEndpointResult.verified.cs index 04b2948a..6ce946a6 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/IGetPriceGroupEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/IGetPriceGroupEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetPriceGroupEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + PriceGroup OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/IGetPriceGroupsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/IGetPriceGroupsEndpointResult.verified.cs index cfe08517..0758caa3 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/IGetPriceGroupsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/IGetPriceGroupsEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetPriceGroupsEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPagePriceGroupDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/ISetDefaultPriceGroupEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/ISetDefaultPriceGroupEndpointResult.verified.cs index caa9985e..b7dfac30 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/ISetDefaultPriceGroupEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/ISetDefaultPriceGroupEndpointResult.verified.cs @@ -21,6 +21,8 @@ public interface ISetDefaultPriceGroupEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + bool IsNotFound { get; } PriceGroup OkContent { get; } @@ -29,5 +31,7 @@ public interface ISetDefaultPriceGroupEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } + string? ForbiddenContent { get; } + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/IUpdatePriceGroupEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/IUpdatePriceGroupEndpointResult.verified.cs index 2c032aad..bce5bb04 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/IUpdatePriceGroupEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/Interfaces/IUpdatePriceGroupEndpointResult.verified.cs @@ -21,6 +21,8 @@ public interface IUpdatePriceGroupEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + bool IsNotFound { get; } PriceGroup OkContent { get; } @@ -29,5 +31,7 @@ public interface IUpdatePriceGroupEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } + string? ForbiddenContent { get; } + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/SetDefaultPriceGroupEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/SetDefaultPriceGroupEndpoint.verified.cs index 13447903..0ad4a7c6 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/SetDefaultPriceGroupEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/SetDefaultPriceGroupEndpoint.verified.cs @@ -42,6 +42,7 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new SetDefaultPriceGroupEndpointResult(x), cancellationToken); } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/SetDefaultPriceGroupEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/SetDefaultPriceGroupEndpointResult.verified.cs index d12b8047..4127b5a9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/SetDefaultPriceGroupEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/SetDefaultPriceGroupEndpointResult.verified.cs @@ -28,6 +28,9 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -46,6 +49,11 @@ public string? UnauthorizedContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + public string? NotFoundContent => IsNotFound && ContentObject is string result ? result diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/UpdatePriceGroupEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/UpdatePriceGroupEndpoint.verified.cs index 678d41b8..127ed689 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/UpdatePriceGroupEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/UpdatePriceGroupEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new UpdatePriceGroupEndpointResult(x), cancellationToken); } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/UpdatePriceGroupEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/UpdatePriceGroupEndpointResult.verified.cs index c0db5a88..c60a3363 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/UpdatePriceGroupEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/PriceGroups/UpdatePriceGroupEndpointResult.verified.cs @@ -28,6 +28,9 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -46,6 +49,11 @@ public string? UnauthorizedContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + public string? NotFoundContent => IsNotFound && ContentObject is string result ? result diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Prices/GetPricesForecastEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Prices/GetPricesForecastEndpoint.verified.cs index ce1cb996..e5e681f4 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Prices/GetPricesForecastEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Prices/GetPricesForecastEndpoint.verified.cs @@ -44,6 +44,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetPricesForecastEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Prices/GetPricesForecastEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Prices/GetPricesForecastEndpointResult.verified.cs index b1c3d1b3..2d8e042a 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Prices/GetPricesForecastEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Prices/GetPricesForecastEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public PricesForecast OkContent => IsOk && ContentObject is PricesForecast result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Prices/Interfaces/IGetPricesForecastEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Prices/Interfaces/IGetPricesForecastEndpointResult.verified.cs index 225ecd91..b17142e3 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Prices/Interfaces/IGetPricesForecastEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Prices/Interfaces/IGetPricesForecastEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetPricesForecastEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + PricesForecast OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/GetReportEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/GetReportEndpoint.verified.cs new file mode 100644 index 00000000..9d0caed2 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/GetReportEndpoint.verified.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Reports; + +/// +/// Client Endpoint. +/// Description: Retrieve a report related to a charge point. +/// Operation: GetReport. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetReportEndpoint : IGetReportEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public GetReportEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + GetReportParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/reports/{reportId}"); + requestBuilder.WithPathParameter("reportId", parameters.ReportId); + + using var requestMessage = requestBuilder.Build(HttpMethod.Get); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new GetReportEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/GetReportEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/GetReportEndpointResult.verified.cs new file mode 100644 index 00000000..0c426b8b --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/GetReportEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Reports; + +/// +/// Client Endpoint result. +/// Description: Retrieve a report related to a charge point. +/// Operation: GetReport. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetReportEndpointResult : EndpointResponse, IGetReportEndpointResult +{ + public GetReportEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public ReportDto OkContent + => IsOk && ContentObject is ReportDto result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/GetReportsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/GetReportsEndpoint.verified.cs new file mode 100644 index 00000000..9dd56eed --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/GetReportsEndpoint.verified.cs @@ -0,0 +1,55 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Reports; + +/// +/// Client Endpoint. +/// Description: Retrieve a list of reports for charge point(s). +/// Operation: GetReports. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetReportsEndpoint : IGetReportsEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public GetReportsEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + GetReportsParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/reports"); + requestBuilder.WithQueryParameter("page", parameters.Page); + requestBuilder.WithQueryParameter("perPage", parameters.PerPage); + requestBuilder.WithQueryParameter("chargePointId", parameters.ChargePointId); + requestBuilder.WithQueryParameter("state", parameters.State); + requestBuilder.WithQueryParameter("fromDate", parameters.FromDate); + requestBuilder.WithQueryParameter("toDate", parameters.ToDate); + requestBuilder.WithQueryParameter("priority", parameters.Priority); + + using var requestMessage = requestBuilder.Build(HttpMethod.Get); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new GetReportsEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/GetReportsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/GetReportsEndpointResult.verified.cs new file mode 100644 index 00000000..821484be --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/GetReportsEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Reports; + +/// +/// Client Endpoint result. +/// Description: Retrieve a list of reports for charge point(s). +/// Operation: GetReports. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetReportsEndpointResult : EndpointResponse, IGetReportsEndpointResult +{ + public GetReportsEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public MontaPageReportDto OkContent + => IsOk && ContentObject is MontaPageReportDto result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/Interfaces/IGetReportEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/Interfaces/IGetReportEndpoint.verified.cs new file mode 100644 index 00000000..1aaba0f9 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/Interfaces/IGetReportEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Reports.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Retrieve a report related to a charge point. +/// Operation: GetReport. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetReportEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + GetReportParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/Interfaces/IGetReportEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/Interfaces/IGetReportEndpointResult.verified.cs new file mode 100644 index 00000000..925114b0 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/Interfaces/IGetReportEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Reports.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Retrieve a report related to a charge point. +/// Operation: GetReport. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetReportEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + ReportDto OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/Interfaces/IGetReportsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/Interfaces/IGetReportsEndpoint.verified.cs new file mode 100644 index 00000000..60489b6a --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/Interfaces/IGetReportsEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Reports.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Retrieve a list of reports for charge point(s). +/// Operation: GetReports. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetReportsEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + GetReportsParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/Interfaces/IGetReportsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/Interfaces/IGetReportsEndpointResult.verified.cs new file mode 100644 index 00000000..3e84c3ce --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Reports/Interfaces/IGetReportsEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Reports.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Retrieve a list of reports for charge point(s). +/// Operation: GetReports. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetReportsEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + MontaPageReportDto OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/DeleteSiteEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/DeleteSiteEndpoint.verified.cs index 45ce4d49..2d12e0d3 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/DeleteSiteEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/DeleteSiteEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new DeleteSiteEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/DeleteSiteEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/DeleteSiteEndpointResult.verified.cs index 4cf4b47d..63fd829c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/DeleteSiteEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/DeleteSiteEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? NoContentContent => IsNoContent && ContentObject is string result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/GetSitesEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/GetSitesEndpoint.verified.cs index 6b383925..4b3fa082 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/GetSitesEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/GetSitesEndpoint.verified.cs @@ -38,6 +38,8 @@ public async Task ExecuteAsync( requestBuilder.WithQueryParameter("teamId", parameters.TeamId); requestBuilder.WithQueryParameter("partnerExternalId", parameters.PartnerExternalId); requestBuilder.WithQueryParameter("sortByLocation", parameters.SortByLocation); + requestBuilder.WithQueryParameter("operatorId", parameters.OperatorId); + requestBuilder.WithQueryParameter("includePublic", parameters.IncludePublic); requestBuilder.WithQueryParameter("includeDeleted", parameters.IncludeDeleted); using var requestMessage = requestBuilder.Build(HttpMethod.Get); @@ -47,6 +49,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetSitesEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/GetSitesEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/GetSitesEndpointResult.verified.cs index 441835cc..0a8b56dd 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/GetSitesEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/GetSitesEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageSiteDto OkContent => IsOk && ContentObject is MontaPageSiteDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/Interfaces/IDeleteSiteEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/Interfaces/IDeleteSiteEndpointResult.verified.cs index 4199deef..42a39e74 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/Interfaces/IDeleteSiteEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/Interfaces/IDeleteSiteEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IDeleteSiteEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + string? NoContentContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IDeleteSiteEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/Interfaces/IGetSitesEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/Interfaces/IGetSitesEndpointResult.verified.cs index 8d194c42..fd361758 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/Interfaces/IGetSitesEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/Interfaces/IGetSitesEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetSitesEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageSiteDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/Interfaces/IPatchSiteEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/Interfaces/IPatchSiteEndpointResult.verified.cs index c8412b9e..700e9d9b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/Interfaces/IPatchSiteEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/Interfaces/IPatchSiteEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IPatchSiteEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + Site OkContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IPatchSiteEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/Interfaces/IPostSiteEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/Interfaces/IPostSiteEndpointResult.verified.cs index f2723e3e..05053273 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/Interfaces/IPostSiteEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/Interfaces/IPostSiteEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IPostSiteEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + string? CreatedContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IPostSiteEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/PatchSiteEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/PatchSiteEndpoint.verified.cs index 7203f08d..d481f9cf 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/PatchSiteEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/PatchSiteEndpoint.verified.cs @@ -44,6 +44,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new PatchSiteEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/PatchSiteEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/PatchSiteEndpointResult.verified.cs index 947c939f..edeacdca 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/PatchSiteEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/PatchSiteEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public Site OkContent => IsOk && ContentObject is Site result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/PostSiteEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/PostSiteEndpoint.verified.cs index 5b384c2c..e92cafd9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/PostSiteEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/PostSiteEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new PostSiteEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/PostSiteEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/PostSiteEndpointResult.verified.cs index 99a06721..1caa9edb 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/PostSiteEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Sites/PostSiteEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? CreatedContent => IsCreated && ContentObject is string result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/DeleteSponsoredChargePointEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/DeleteSponsoredChargePointEndpoint.verified.cs index 7f841d9e..a0013ada 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/DeleteSponsoredChargePointEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/DeleteSponsoredChargePointEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new DeleteSponsoredChargePointEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/DeleteSponsoredChargePointEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/DeleteSponsoredChargePointEndpointResult.verified.cs index 973ea3fe..bb1f3a08 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/DeleteSponsoredChargePointEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/DeleteSponsoredChargePointEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? NoContentContent => IsNoContent && ContentObject is string result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/GetSponsoredChargePointsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/GetSponsoredChargePointsEndpoint.verified.cs index fdcdd1af..6ecd1f6c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/GetSponsoredChargePointsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/GetSponsoredChargePointsEndpoint.verified.cs @@ -46,6 +46,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetSponsoredChargePointsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/GetSponsoredChargePointsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/GetSponsoredChargePointsEndpointResult.verified.cs index 5ffc5f15..eaef8a2a 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/GetSponsoredChargePointsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/GetSponsoredChargePointsEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageSponsoredChargePointDto OkContent => IsOk && ContentObject is MontaPageSponsoredChargePointDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/Interfaces/IDeleteSponsoredChargePointEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/Interfaces/IDeleteSponsoredChargePointEndpointResult.verified.cs index d2c8bc16..bd100f14 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/Interfaces/IDeleteSponsoredChargePointEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/Interfaces/IDeleteSponsoredChargePointEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IDeleteSponsoredChargePointEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + string? NoContentContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IDeleteSponsoredChargePointEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/Interfaces/IGetSponsoredChargePointsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/Interfaces/IGetSponsoredChargePointsEndpointResult.verified.cs index 6185a3ac..3b180dec 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/Interfaces/IGetSponsoredChargePointsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/Interfaces/IGetSponsoredChargePointsEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetSponsoredChargePointsEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageSponsoredChargePointDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/Interfaces/IPatchSponsoredChargePointEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/Interfaces/IPatchSponsoredChargePointEndpointResult.verified.cs index acc48c2a..b8c54037 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/Interfaces/IPatchSponsoredChargePointEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/Interfaces/IPatchSponsoredChargePointEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IPatchSponsoredChargePointEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + SponsoredChargePoint OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/Interfaces/IPostSponsoredChargePointEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/Interfaces/IPostSponsoredChargePointEndpointResult.verified.cs index 070d5b1b..36011ee3 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/Interfaces/IPostSponsoredChargePointEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/Interfaces/IPostSponsoredChargePointEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IPostSponsoredChargePointEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + string? CreatedContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IPostSponsoredChargePointEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/PatchSponsoredChargePointEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/PatchSponsoredChargePointEndpoint.verified.cs index 696427ef..052a74c6 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/PatchSponsoredChargePointEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/PatchSponsoredChargePointEndpoint.verified.cs @@ -43,6 +43,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new PatchSponsoredChargePointEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/PatchSponsoredChargePointEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/PatchSponsoredChargePointEndpointResult.verified.cs index ec3eb628..eb11a1b6 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/PatchSponsoredChargePointEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/PatchSponsoredChargePointEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public SponsoredChargePoint OkContent => IsOk && ContentObject is SponsoredChargePoint result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/PostSponsoredChargePointEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/PostSponsoredChargePointEndpoint.verified.cs index 8109d424..21b599ac 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/PostSponsoredChargePointEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/PostSponsoredChargePointEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new PostSponsoredChargePointEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/PostSponsoredChargePointEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/PostSponsoredChargePointEndpointResult.verified.cs index 42af63aa..5e91b92d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/PostSponsoredChargePointEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SponsoredChargePoints/PostSponsoredChargePointEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? CreatedContent => IsCreated && ContentObject is string result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/GetSubscriptionPurchaseEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/GetSubscriptionPurchaseEndpoint.verified.cs index 9d2198d6..d27d0381 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/GetSubscriptionPurchaseEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/GetSubscriptionPurchaseEndpoint.verified.cs @@ -42,6 +42,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetSubscriptionPurchaseEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/GetSubscriptionPurchaseEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/GetSubscriptionPurchaseEndpointResult.verified.cs index b568ea4e..8ba00c22 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/GetSubscriptionPurchaseEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/GetSubscriptionPurchaseEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public SubscriptionPurchase OkContent => IsOk && ContentObject is SubscriptionPurchase result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/GetSubscriptionPurchasesEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/GetSubscriptionPurchasesEndpoint.verified.cs index 536c8457..400c83dd 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/GetSubscriptionPurchasesEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/GetSubscriptionPurchasesEndpoint.verified.cs @@ -45,6 +45,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetSubscriptionPurchasesEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/GetSubscriptionPurchasesEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/GetSubscriptionPurchasesEndpointResult.verified.cs index 861b52b8..627e65c7 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/GetSubscriptionPurchasesEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/GetSubscriptionPurchasesEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageSubscriptionPurchaseDto OkContent => IsOk && ContentObject is MontaPageSubscriptionPurchaseDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/Interfaces/IGetSubscriptionPurchaseEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/Interfaces/IGetSubscriptionPurchaseEndpointResult.verified.cs index c4fd0354..f40c8fd8 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/Interfaces/IGetSubscriptionPurchaseEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/Interfaces/IGetSubscriptionPurchaseEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetSubscriptionPurchaseEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + SubscriptionPurchase OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/Interfaces/IGetSubscriptionPurchasesEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/Interfaces/IGetSubscriptionPurchasesEndpointResult.verified.cs index 09bfb3c5..71ac925d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/Interfaces/IGetSubscriptionPurchasesEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/SubscriptionPurchases/Interfaces/IGetSubscriptionPurchasesEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetSubscriptionPurchasesEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageSubscriptionPurchaseDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/ApproveSubscriptionEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/ApproveSubscriptionEndpoint.verified.cs index 90b4ee1b..c37739fa 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/ApproveSubscriptionEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/ApproveSubscriptionEndpoint.verified.cs @@ -43,6 +43,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new ApproveSubscriptionEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/ApproveSubscriptionEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/ApproveSubscriptionEndpointResult.verified.cs index de1cefe5..f8c90006 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/ApproveSubscriptionEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/ApproveSubscriptionEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public Subscription OkContent => IsOk && ContentObject is Subscription result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/CreateSubscriptionEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/CreateSubscriptionEndpoint.verified.cs index 08a4612e..38c2eb53 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/CreateSubscriptionEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/CreateSubscriptionEndpoint.verified.cs @@ -42,6 +42,8 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.Created); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new CreateSubscriptionEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/CreateSubscriptionEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/CreateSubscriptionEndpointResult.verified.cs index 4eb725ee..7dc2d5b4 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/CreateSubscriptionEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/CreateSubscriptionEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? CreatedContent => IsCreated && ContentObject is string result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/DeleteSubscriptionEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/DeleteSubscriptionEndpoint.verified.cs index 3cc6ccfd..e8ab8cbc 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/DeleteSubscriptionEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/DeleteSubscriptionEndpoint.verified.cs @@ -42,6 +42,8 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.NoContent); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new DeleteSubscriptionEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/DeleteSubscriptionEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/DeleteSubscriptionEndpointResult.verified.cs index d1b5c59c..1be6e12d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/DeleteSubscriptionEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/DeleteSubscriptionEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? NoContentContent => IsNoContent && ContentObject is string result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/GetSubscriptionEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/GetSubscriptionEndpoint.verified.cs index 22b238f7..a74bf0df 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/GetSubscriptionEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/GetSubscriptionEndpoint.verified.cs @@ -42,6 +42,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetSubscriptionEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/GetSubscriptionEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/GetSubscriptionEndpointResult.verified.cs index 89c51513..44966b1d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/GetSubscriptionEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/GetSubscriptionEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public Subscription OkContent => IsOk && ContentObject is Subscription result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/GetSubscriptionsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/GetSubscriptionsEndpoint.verified.cs index f32ed041..bc5ac121 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/GetSubscriptionsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/GetSubscriptionsEndpoint.verified.cs @@ -37,6 +37,8 @@ public async Task ExecuteAsync( requestBuilder.WithQueryParameter("perPage", parameters.PerPage); requestBuilder.WithQueryParameter("planId", parameters.PlanId); requestBuilder.WithQueryParameter("chargePointId", parameters.ChargePointId); + requestBuilder.WithQueryParameter("customerId", parameters.CustomerId); + requestBuilder.WithQueryParameter("customerType", parameters.CustomerType); requestBuilder.WithQueryParameter("subscriptionPurchaseId", parameters.SubscriptionPurchaseId); using var requestMessage = requestBuilder.Build(HttpMethod.Get); @@ -46,6 +48,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetSubscriptionsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/GetSubscriptionsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/GetSubscriptionsEndpointResult.verified.cs index 0b92c60d..31da1a32 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/GetSubscriptionsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/GetSubscriptionsEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageSubscriptionDto OkContent => IsOk && ContentObject is MontaPageSubscriptionDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/Interfaces/IApproveSubscriptionEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/Interfaces/IApproveSubscriptionEndpointResult.verified.cs index 3e60bc6b..86f9309e 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/Interfaces/IApproveSubscriptionEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/Interfaces/IApproveSubscriptionEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IApproveSubscriptionEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + Subscription OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/Interfaces/ICreateSubscriptionEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/Interfaces/ICreateSubscriptionEndpointResult.verified.cs index ede45581..062d4ca4 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/Interfaces/ICreateSubscriptionEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/Interfaces/ICreateSubscriptionEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface ICreateSubscriptionEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + string? CreatedContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/Interfaces/IDeleteSubscriptionEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/Interfaces/IDeleteSubscriptionEndpointResult.verified.cs index 98a16a29..3c61fead 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/Interfaces/IDeleteSubscriptionEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/Interfaces/IDeleteSubscriptionEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IDeleteSubscriptionEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + string? NoContentContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/Interfaces/IGetSubscriptionEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/Interfaces/IGetSubscriptionEndpointResult.verified.cs index 123926c1..46149a38 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/Interfaces/IGetSubscriptionEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/Interfaces/IGetSubscriptionEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetSubscriptionEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + Subscription OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/Interfaces/IGetSubscriptionsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/Interfaces/IGetSubscriptionsEndpointResult.verified.cs index 3d38d3e5..3504899b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/Interfaces/IGetSubscriptionsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Subscriptions/Interfaces/IGetSubscriptionsEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetSubscriptionsEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageSubscriptionDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/CreateTariffPeriodGroupEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/CreateTariffPeriodGroupEndpoint.verified.cs index 6fd5e4e7..1c946725 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/CreateTariffPeriodGroupEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/CreateTariffPeriodGroupEndpoint.verified.cs @@ -42,6 +42,8 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.Created); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new CreateTariffPeriodGroupEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/CreateTariffPeriodGroupEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/CreateTariffPeriodGroupEndpointResult.verified.cs index a70abee5..cac086e3 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/CreateTariffPeriodGroupEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/CreateTariffPeriodGroupEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? CreatedContent => IsCreated && ContentObject is string result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/DeleteTariffPeriodGroupEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/DeleteTariffPeriodGroupEndpoint.verified.cs index 7a15a9d1..71247477 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/DeleteTariffPeriodGroupEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/DeleteTariffPeriodGroupEndpoint.verified.cs @@ -42,6 +42,8 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.NoContent); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new DeleteTariffPeriodGroupEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/DeleteTariffPeriodGroupEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/DeleteTariffPeriodGroupEndpointResult.verified.cs index ddff9a18..117db80b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/DeleteTariffPeriodGroupEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/DeleteTariffPeriodGroupEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? NoContentContent => IsNoContent && ContentObject is string result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/Interfaces/ICreateTariffPeriodGroupEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/Interfaces/ICreateTariffPeriodGroupEndpointResult.verified.cs index 4c30aeab..84116fbe 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/Interfaces/ICreateTariffPeriodGroupEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/Interfaces/ICreateTariffPeriodGroupEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface ICreateTariffPeriodGroupEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + string? CreatedContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/Interfaces/IDeleteTariffPeriodGroupEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/Interfaces/IDeleteTariffPeriodGroupEndpointResult.verified.cs index 9f531938..14ea6783 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/Interfaces/IDeleteTariffPeriodGroupEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/Interfaces/IDeleteTariffPeriodGroupEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IDeleteTariffPeriodGroupEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + string? NoContentContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/Interfaces/IUpdateTariffPeriodGroupEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/Interfaces/IUpdateTariffPeriodGroupEndpointResult.verified.cs index 42bd83c0..12d09484 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/Interfaces/IUpdateTariffPeriodGroupEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/Interfaces/IUpdateTariffPeriodGroupEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IUpdateTariffPeriodGroupEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + TariffPeriodGroup OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/UpdateTariffPeriodGroupEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/UpdateTariffPeriodGroupEndpoint.verified.cs index 641e1a69..9dfef9db 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/UpdateTariffPeriodGroupEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/UpdateTariffPeriodGroupEndpoint.verified.cs @@ -43,6 +43,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new UpdateTariffPeriodGroupEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/UpdateTariffPeriodGroupEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/UpdateTariffPeriodGroupEndpointResult.verified.cs index c65a0d24..d7c6125a 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/UpdateTariffPeriodGroupEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffPeriodGroups/UpdateTariffPeriodGroupEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public TariffPeriodGroup OkContent => IsOk && ContentObject is TariffPeriodGroup result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/CreateTariffRecurringPeriodsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/CreateTariffRecurringPeriodsEndpoint.verified.cs index b4d19da1..85cffc49 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/CreateTariffRecurringPeriodsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/CreateTariffRecurringPeriodsEndpoint.verified.cs @@ -42,6 +42,8 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.Created); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new CreateTariffRecurringPeriodsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/CreateTariffRecurringPeriodsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/CreateTariffRecurringPeriodsEndpointResult.verified.cs index d0926c48..45fa6bc3 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/CreateTariffRecurringPeriodsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/CreateTariffRecurringPeriodsEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? CreatedContent => IsCreated && ContentObject is string result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/DeleteTariffRecurringPeriodEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/DeleteTariffRecurringPeriodEndpoint.verified.cs index 15be639d..387ee731 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/DeleteTariffRecurringPeriodEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/DeleteTariffRecurringPeriodEndpoint.verified.cs @@ -42,6 +42,8 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.NoContent); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new DeleteTariffRecurringPeriodEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/DeleteTariffRecurringPeriodEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/DeleteTariffRecurringPeriodEndpointResult.verified.cs index 8c090c32..dafdbac3 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/DeleteTariffRecurringPeriodEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/DeleteTariffRecurringPeriodEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? NoContentContent => IsNoContent && ContentObject is string result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/GetTariffRecurringPeriodEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/GetTariffRecurringPeriodEndpoint.verified.cs index b30a65ab..9eeae591 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/GetTariffRecurringPeriodEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/GetTariffRecurringPeriodEndpoint.verified.cs @@ -42,6 +42,7 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetTariffRecurringPeriodEndpointResult(x), cancellationToken); } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/GetTariffRecurringPeriodEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/GetTariffRecurringPeriodEndpointResult.verified.cs index b72e85cb..4052350c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/GetTariffRecurringPeriodEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/GetTariffRecurringPeriodEndpointResult.verified.cs @@ -28,6 +28,9 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -46,6 +49,11 @@ public string? UnauthorizedContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + public string? NotFoundContent => IsNotFound && ContentObject is string result ? result diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/GetTariffRecurringPeriodsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/GetTariffRecurringPeriodsEndpoint.verified.cs index e07a1067..ec0398e7 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/GetTariffRecurringPeriodsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/GetTariffRecurringPeriodsEndpoint.verified.cs @@ -45,6 +45,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetTariffRecurringPeriodsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/GetTariffRecurringPeriodsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/GetTariffRecurringPeriodsEndpointResult.verified.cs index 0977bfb9..040f5d6e 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/GetTariffRecurringPeriodsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/GetTariffRecurringPeriodsEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public PageTariffRecurringPeriodDto OkContent => IsOk && ContentObject is PageTariffRecurringPeriodDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/Interfaces/ICreateTariffRecurringPeriodsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/Interfaces/ICreateTariffRecurringPeriodsEndpointResult.verified.cs index 184875c2..7b2cd34b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/Interfaces/ICreateTariffRecurringPeriodsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/Interfaces/ICreateTariffRecurringPeriodsEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface ICreateTariffRecurringPeriodsEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + string? CreatedContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/Interfaces/IDeleteTariffRecurringPeriodEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/Interfaces/IDeleteTariffRecurringPeriodEndpointResult.verified.cs index 4e2e2cc7..325d29f0 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/Interfaces/IDeleteTariffRecurringPeriodEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/Interfaces/IDeleteTariffRecurringPeriodEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IDeleteTariffRecurringPeriodEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + string? NoContentContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/Interfaces/IGetTariffRecurringPeriodEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/Interfaces/IGetTariffRecurringPeriodEndpointResult.verified.cs index 86f2dd5b..853180d7 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/Interfaces/IGetTariffRecurringPeriodEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/Interfaces/IGetTariffRecurringPeriodEndpointResult.verified.cs @@ -21,6 +21,8 @@ public interface IGetTariffRecurringPeriodEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + bool IsNotFound { get; } TariffRecurringPeriod OkContent { get; } @@ -29,5 +31,7 @@ public interface IGetTariffRecurringPeriodEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } + string? ForbiddenContent { get; } + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/Interfaces/IGetTariffRecurringPeriodsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/Interfaces/IGetTariffRecurringPeriodsEndpointResult.verified.cs index 087e1cdd..f6cc0fd3 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/Interfaces/IGetTariffRecurringPeriodsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/Interfaces/IGetTariffRecurringPeriodsEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetTariffRecurringPeriodsEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + PageTariffRecurringPeriodDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/Interfaces/IUpdateTariffRecurringPeriodsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/Interfaces/IUpdateTariffRecurringPeriodsEndpointResult.verified.cs index 310c5b0f..e2eec3f9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/Interfaces/IUpdateTariffRecurringPeriodsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/Interfaces/IUpdateTariffRecurringPeriodsEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IUpdateTariffRecurringPeriodsEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + TariffRecurringPeriod OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/UpdateTariffRecurringPeriodsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/UpdateTariffRecurringPeriodsEndpoint.verified.cs index 3f410af1..7824cd98 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/UpdateTariffRecurringPeriodsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/UpdateTariffRecurringPeriodsEndpoint.verified.cs @@ -43,6 +43,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new UpdateTariffRecurringPeriodsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/UpdateTariffRecurringPeriodsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/UpdateTariffRecurringPeriodsEndpointResult.verified.cs index 2d22eaa4..8c6959ec 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/UpdateTariffRecurringPeriodsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TariffRecurringPeriods/UpdateTariffRecurringPeriodsEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public TariffRecurringPeriod OkContent => IsOk && ContentObject is TariffRecurringPeriod result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/CreateTariffEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/CreateTariffEndpoint.verified.cs index f6f79dbe..a75e16cf 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/CreateTariffEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/CreateTariffEndpoint.verified.cs @@ -42,6 +42,8 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.Created); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new CreateTariffEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/CreateTariffEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/CreateTariffEndpointResult.verified.cs index cea83569..af615820 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/CreateTariffEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/CreateTariffEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? CreatedContent => IsCreated && ContentObject is string result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/Interfaces/ICreateTariffEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/Interfaces/ICreateTariffEndpointResult.verified.cs index 6d3c1e34..1c412aed 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/Interfaces/ICreateTariffEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/Interfaces/ICreateTariffEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface ICreateTariffEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + string? CreatedContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/Interfaces/IUpdateTariffEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/Interfaces/IUpdateTariffEndpointResult.verified.cs index 22852f6c..c4e99149 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/Interfaces/IUpdateTariffEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/Interfaces/IUpdateTariffEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IUpdateTariffEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + TariffDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/UpdateTariffEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/UpdateTariffEndpoint.verified.cs index 7864c7cc..a2a9c69f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/UpdateTariffEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/UpdateTariffEndpoint.verified.cs @@ -43,6 +43,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new UpdateTariffEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/UpdateTariffEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/UpdateTariffEndpointResult.verified.cs index ededc6e8..f295bc5b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/UpdateTariffEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Tariffs/UpdateTariffEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public TariffDto OkContent => IsOk && ContentObject is TariffDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/DeleteTeamMemberProfileEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/DeleteTeamMemberProfileEndpoint.verified.cs new file mode 100644 index 00000000..e40fe2f1 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/DeleteTeamMemberProfileEndpoint.verified.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles; + +/// +/// Client Endpoint. +/// Description: Delete an existing team member profile. +/// Operation: DeleteTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class DeleteTeamMemberProfileEndpoint : IDeleteTeamMemberProfileEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public DeleteTeamMemberProfileEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + DeleteTeamMemberProfileParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/team-member-profiles/{id}"); + requestBuilder.WithPathParameter("id", parameters.Id); + + using var requestMessage = requestBuilder.Build(HttpMethod.Delete); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddErrorResponse(HttpStatusCode.NoContent); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new DeleteTeamMemberProfileEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/DeleteTeamMemberProfileEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/DeleteTeamMemberProfileEndpointResult.verified.cs new file mode 100644 index 00000000..68589e8e --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/DeleteTeamMemberProfileEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles; + +/// +/// Client Endpoint result. +/// Description: Delete an existing team member profile. +/// Operation: DeleteTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class DeleteTeamMemberProfileEndpointResult : EndpointResponse, IDeleteTeamMemberProfileEndpointResult +{ + public DeleteTeamMemberProfileEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsNoContent + => StatusCode == HttpStatusCode.NoContent; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public string? NoContentContent + => IsNoContent && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNoContent property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/GetTeamMemberProfileEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/GetTeamMemberProfileEndpoint.verified.cs new file mode 100644 index 00000000..2d84d71c --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/GetTeamMemberProfileEndpoint.verified.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles; + +/// +/// Client Endpoint. +/// Description: Retrieve a team member profile by id. +/// Operation: GetTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetTeamMemberProfileEndpoint : IGetTeamMemberProfileEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public GetTeamMemberProfileEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + GetTeamMemberProfileParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/team-member-profiles/{id}"); + requestBuilder.WithPathParameter("id", parameters.Id); + + using var requestMessage = requestBuilder.Build(HttpMethod.Get); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new GetTeamMemberProfileEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/GetTeamMemberProfileEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/GetTeamMemberProfileEndpointResult.verified.cs new file mode 100644 index 00000000..34e48dd2 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/GetTeamMemberProfileEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles; + +/// +/// Client Endpoint result. +/// Description: Retrieve a team member profile by id. +/// Operation: GetTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetTeamMemberProfileEndpointResult : EndpointResponse, IGetTeamMemberProfileEndpointResult +{ + public GetTeamMemberProfileEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public TeamMemberProfile OkContent + => IsOk && ContentObject is TeamMemberProfile result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/GetTeamMemberProfilesEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/GetTeamMemberProfilesEndpoint.verified.cs new file mode 100644 index 00000000..42ad7a73 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/GetTeamMemberProfilesEndpoint.verified.cs @@ -0,0 +1,52 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles; + +/// +/// Client Endpoint. +/// Description: Retrieve a list of team member profiles. +/// Operation: GetTeamMemberProfiles. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetTeamMemberProfilesEndpoint : IGetTeamMemberProfilesEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public GetTeamMemberProfilesEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + GetTeamMemberProfilesParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/team-member-profiles"); + requestBuilder.WithQueryParameter("page", parameters.Page); + requestBuilder.WithQueryParameter("perPage", parameters.PerPage); + requestBuilder.WithQueryParameter("teamId", parameters.TeamId); + requestBuilder.WithQueryParameter("name", parameters.Name); + + using var requestMessage = requestBuilder.Build(HttpMethod.Get); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new GetTeamMemberProfilesEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/GetTeamMemberProfilesEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/GetTeamMemberProfilesEndpointResult.verified.cs new file mode 100644 index 00000000..83b04893 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/GetTeamMemberProfilesEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles; + +/// +/// Client Endpoint result. +/// Description: Retrieve a list of team member profiles. +/// Operation: GetTeamMemberProfiles. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetTeamMemberProfilesEndpointResult : EndpointResponse, IGetTeamMemberProfilesEndpointResult +{ + public GetTeamMemberProfilesEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public MontaPageTeamMemberProfileDto OkContent + => IsOk && ContentObject is MontaPageTeamMemberProfileDto result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IDeleteTeamMemberProfileEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IDeleteTeamMemberProfileEndpoint.verified.cs new file mode 100644 index 00000000..b2da9257 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IDeleteTeamMemberProfileEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Delete an existing team member profile. +/// Operation: DeleteTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IDeleteTeamMemberProfileEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + DeleteTeamMemberProfileParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IDeleteTeamMemberProfileEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IDeleteTeamMemberProfileEndpointResult.verified.cs new file mode 100644 index 00000000..75883100 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IDeleteTeamMemberProfileEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Delete an existing team member profile. +/// Operation: DeleteTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IDeleteTeamMemberProfileEndpointResult : IEndpointResponse +{ + + bool IsNoContent { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + string? NoContentContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IGetTeamMemberProfileEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IGetTeamMemberProfileEndpoint.verified.cs new file mode 100644 index 00000000..713ffdbd --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IGetTeamMemberProfileEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Retrieve a team member profile by id. +/// Operation: GetTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetTeamMemberProfileEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + GetTeamMemberProfileParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IGetTeamMemberProfileEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IGetTeamMemberProfileEndpointResult.verified.cs new file mode 100644 index 00000000..b41fffc4 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IGetTeamMemberProfileEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Retrieve a team member profile by id. +/// Operation: GetTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetTeamMemberProfileEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + TeamMemberProfile OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IGetTeamMemberProfilesEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IGetTeamMemberProfilesEndpoint.verified.cs new file mode 100644 index 00000000..12b3f7b2 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IGetTeamMemberProfilesEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Retrieve a list of team member profiles. +/// Operation: GetTeamMemberProfiles. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetTeamMemberProfilesEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + GetTeamMemberProfilesParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IGetTeamMemberProfilesEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IGetTeamMemberProfilesEndpointResult.verified.cs new file mode 100644 index 00000000..07ca2c22 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IGetTeamMemberProfilesEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Retrieve a list of team member profiles. +/// Operation: GetTeamMemberProfiles. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetTeamMemberProfilesEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + MontaPageTeamMemberProfileDto OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IPostTeamMemberProfileEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IPostTeamMemberProfileEndpoint.verified.cs new file mode 100644 index 00000000..880d0970 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IPostTeamMemberProfileEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Create a team member profile. +/// Operation: PostTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IPostTeamMemberProfileEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + PostTeamMemberProfileParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IPostTeamMemberProfileEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IPostTeamMemberProfileEndpointResult.verified.cs new file mode 100644 index 00000000..38b08a2c --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IPostTeamMemberProfileEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Create a team member profile. +/// Operation: PostTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IPostTeamMemberProfileEndpointResult : IEndpointResponse +{ + + bool IsCreated { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + string? CreatedContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IUpdateTeamMemberProfileEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IUpdateTeamMemberProfileEndpoint.verified.cs new file mode 100644 index 00000000..da3bad4e --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IUpdateTeamMemberProfileEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Patch a team member profile. +/// Operation: UpdateTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IUpdateTeamMemberProfileEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + UpdateTeamMemberProfileParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IUpdateTeamMemberProfileEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IUpdateTeamMemberProfileEndpointResult.verified.cs new file mode 100644 index 00000000..f16d8693 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/Interfaces/IUpdateTeamMemberProfileEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Patch a team member profile. +/// Operation: UpdateTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IUpdateTeamMemberProfileEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + TeamMemberProfile OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/PostTeamMemberProfileEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/PostTeamMemberProfileEndpoint.verified.cs new file mode 100644 index 00000000..a61b1429 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/PostTeamMemberProfileEndpoint.verified.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles; + +/// +/// Client Endpoint. +/// Description: Create a team member profile. +/// Operation: PostTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class PostTeamMemberProfileEndpoint : IPostTeamMemberProfileEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public PostTeamMemberProfileEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + PostTeamMemberProfileParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/team-member-profiles"); + requestBuilder.WithBody(parameters.Request); + + using var requestMessage = requestBuilder.Build(HttpMethod.Post); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddErrorResponse(HttpStatusCode.Created); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new PostTeamMemberProfileEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/PostTeamMemberProfileEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/PostTeamMemberProfileEndpointResult.verified.cs new file mode 100644 index 00000000..91b10627 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/PostTeamMemberProfileEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles; + +/// +/// Client Endpoint result. +/// Description: Create a team member profile. +/// Operation: PostTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class PostTeamMemberProfileEndpointResult : EndpointResponse, IPostTeamMemberProfileEndpointResult +{ + public PostTeamMemberProfileEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsCreated + => StatusCode == HttpStatusCode.Created; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public string? CreatedContent + => IsCreated && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsCreated property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/UpdateTeamMemberProfileEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/UpdateTeamMemberProfileEndpoint.verified.cs new file mode 100644 index 00000000..219e95dc --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/UpdateTeamMemberProfileEndpoint.verified.cs @@ -0,0 +1,50 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles; + +/// +/// Client Endpoint. +/// Description: Patch a team member profile. +/// Operation: UpdateTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class UpdateTeamMemberProfileEndpoint : IUpdateTeamMemberProfileEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public UpdateTeamMemberProfileEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + UpdateTeamMemberProfileParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/team-member-profiles/{id}"); + requestBuilder.WithPathParameter("id", parameters.Id); + requestBuilder.WithBody(parameters.Request); + + using var requestMessage = requestBuilder.Build(HttpMethod.Patch); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new UpdateTeamMemberProfileEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/UpdateTeamMemberProfileEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/UpdateTeamMemberProfileEndpointResult.verified.cs new file mode 100644 index 00000000..dd4fc1ec --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMemberProfiles/UpdateTeamMemberProfileEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles; + +/// +/// Client Endpoint result. +/// Description: Patch a team member profile. +/// Operation: UpdateTeamMemberProfile. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class UpdateTeamMemberProfileEndpointResult : EndpointResponse, IUpdateTeamMemberProfileEndpointResult +{ + public UpdateTeamMemberProfileEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public TeamMemberProfile OkContent + => IsOk && ContentObject is TeamMemberProfile result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/AcceptTeamMemberJoinRequestEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/AcceptTeamMemberJoinRequestEndpoint.verified.cs new file mode 100644 index 00000000..a6a31ff5 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/AcceptTeamMemberJoinRequestEndpoint.verified.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMembers; + +/// +/// Client Endpoint. +/// Description: Approve a team member who requested to join a team. +/// Operation: AcceptTeamMemberJoinRequest. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class AcceptTeamMemberJoinRequestEndpoint : IAcceptTeamMemberJoinRequestEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public AcceptTeamMemberJoinRequestEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + AcceptTeamMemberJoinRequestParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/team-members/{id}/accept"); + requestBuilder.WithPathParameter("id", parameters.Id); + + using var requestMessage = requestBuilder.Build(HttpMethod.Post); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new AcceptTeamMemberJoinRequestEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/AcceptTeamMemberJoinRequestEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/AcceptTeamMemberJoinRequestEndpointResult.verified.cs new file mode 100644 index 00000000..74ca2e1b --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/AcceptTeamMemberJoinRequestEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMembers; + +/// +/// Client Endpoint result. +/// Description: Approve a team member who requested to join a team. +/// Operation: AcceptTeamMemberJoinRequest. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class AcceptTeamMemberJoinRequestEndpointResult : EndpointResponse, IAcceptTeamMemberJoinRequestEndpointResult +{ + public AcceptTeamMemberJoinRequestEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public TeamMember OkContent + => IsOk && ContentObject is TeamMember result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/DeleteTeamMemberEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/DeleteTeamMemberEndpoint.verified.cs index 086cafb1..c65fbebf 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/DeleteTeamMemberEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/DeleteTeamMemberEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new DeleteTeamMemberEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/DeleteTeamMemberEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/DeleteTeamMemberEndpointResult.verified.cs index 8aa238f6..dde83b70 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/DeleteTeamMemberEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/DeleteTeamMemberEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? NoContentContent => IsNoContent && ContentObject is string result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/GetTeamMemberEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/GetTeamMemberEndpoint.verified.cs index 3077d77b..b4c1a196 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/GetTeamMemberEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/GetTeamMemberEndpoint.verified.cs @@ -39,9 +39,11 @@ public async Task ExecuteAsync( using var response = await client.SendAsync(requestMessage, cancellationToken); var responseBuilder = httpMessageFactory.FromResponse(response); - responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetTeamMemberEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/GetTeamMemberEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/GetTeamMemberEndpointResult.verified.cs index ccd67afd..8dd1d3de 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/GetTeamMemberEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/GetTeamMemberEndpointResult.verified.cs @@ -28,8 +28,14 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; - public TeamMemberDto OkContent - => IsOk && ContentObject is TeamMemberDto result + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public TeamMember OkContent + => IsOk && ContentObject is TeamMember result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/GetTeamMembersEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/GetTeamMembersEndpoint.verified.cs index 9c5ec180..4c58a0ad 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/GetTeamMembersEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/GetTeamMembersEndpoint.verified.cs @@ -52,6 +52,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetTeamMembersEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/GetTeamMembersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/GetTeamMembersEndpointResult.verified.cs index 7b08d96b..d35c818b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/GetTeamMembersEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/GetTeamMembersEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageTeamMemberDto OkContent => IsOk && ContentObject is MontaPageTeamMemberDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IAcceptTeamMemberJoinRequestEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IAcceptTeamMemberJoinRequestEndpoint.verified.cs new file mode 100644 index 00000000..7a3f84b7 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IAcceptTeamMemberJoinRequestEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMembers.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Approve a team member who requested to join a team. +/// Operation: AcceptTeamMemberJoinRequest. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IAcceptTeamMemberJoinRequestEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + AcceptTeamMemberJoinRequestParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IAcceptTeamMemberJoinRequestEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IAcceptTeamMemberJoinRequestEndpointResult.verified.cs new file mode 100644 index 00000000..91d2aaf1 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IAcceptTeamMemberJoinRequestEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.TeamMembers.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Approve a team member who requested to join a team. +/// Operation: AcceptTeamMemberJoinRequest. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IAcceptTeamMemberJoinRequestEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + TeamMember OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IDeleteTeamMemberEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IDeleteTeamMemberEndpointResult.verified.cs index 1b869fda..06a0d90a 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IDeleteTeamMemberEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IDeleteTeamMemberEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IDeleteTeamMemberEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + string? NoContentContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IDeleteTeamMemberEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IGetTeamMemberEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IGetTeamMemberEndpointResult.verified.cs index c1a2d3bf..0bbf7da3 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IGetTeamMemberEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IGetTeamMemberEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetTeamMemberEndpointResult : IEndpointResponse bool IsUnauthorized { get; } - TeamMemberDto OkContent { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + + TeamMember OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IGetTeamMembersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IGetTeamMembersEndpointResult.verified.cs index b529fc5e..2076cf53 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IGetTeamMembersEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IGetTeamMembersEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetTeamMembersEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageTeamMemberDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IPatchTeamMemberEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IPatchTeamMemberEndpointResult.verified.cs index 7132965b..a73f4d47 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IPatchTeamMemberEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IPatchTeamMemberEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IPatchTeamMemberEndpointResult : IEndpointResponse bool IsUnauthorized { get; } - TeamMemberDto OkContent { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + + TeamMember OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IPostTeamMemberEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IPostTeamMemberEndpointResult.verified.cs index f4a98bdb..641d8660 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IPostTeamMemberEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IPostTeamMemberEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IPostTeamMemberEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + string? CreatedContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IPostTeamMemberEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IResendTeamMemberInviteEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IResendTeamMemberInviteEndpointResult.verified.cs index c2f901b1..e7fe97fb 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IResendTeamMemberInviteEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/Interfaces/IResendTeamMemberInviteEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IResendTeamMemberInviteEndpointResult : IEndpointResponse bool IsUnauthorized { get; } - TeamMemberDto OkContent { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + + TeamMember OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/PatchTeamMemberEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/PatchTeamMemberEndpoint.verified.cs index ab7dde1d..80e90b59 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/PatchTeamMemberEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/PatchTeamMemberEndpoint.verified.cs @@ -40,9 +40,11 @@ public async Task ExecuteAsync( using var response = await client.SendAsync(requestMessage, cancellationToken); var responseBuilder = httpMessageFactory.FromResponse(response); - responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new PatchTeamMemberEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/PatchTeamMemberEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/PatchTeamMemberEndpointResult.verified.cs index 620a378a..9bbcf0d2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/PatchTeamMemberEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/PatchTeamMemberEndpointResult.verified.cs @@ -28,8 +28,14 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; - public TeamMemberDto OkContent - => IsOk && ContentObject is TeamMemberDto result + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public TeamMember OkContent + => IsOk && ContentObject is TeamMember result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/PostTeamMemberEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/PostTeamMemberEndpoint.verified.cs index a2cfc439..8180296e 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/PostTeamMemberEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/PostTeamMemberEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new PostTeamMemberEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/PostTeamMemberEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/PostTeamMemberEndpointResult.verified.cs index ead46e5d..7795e4d7 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/PostTeamMemberEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/PostTeamMemberEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? CreatedContent => IsCreated && ContentObject is string result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/ResendTeamMemberInviteEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/ResendTeamMemberInviteEndpoint.verified.cs index d80bca49..60e8083a 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/ResendTeamMemberInviteEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/ResendTeamMemberInviteEndpoint.verified.cs @@ -39,9 +39,11 @@ public async Task ExecuteAsync( using var response = await client.SendAsync(requestMessage, cancellationToken); var responseBuilder = httpMessageFactory.FromResponse(response); - responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new ResendTeamMemberInviteEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/ResendTeamMemberInviteEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/ResendTeamMemberInviteEndpointResult.verified.cs index 19a90b0e..bb97301d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/ResendTeamMemberInviteEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/TeamMembers/ResendTeamMemberInviteEndpointResult.verified.cs @@ -28,8 +28,14 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; - public TeamMemberDto OkContent - => IsOk && ContentObject is TeamMemberDto result + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public TeamMember OkContent + => IsOk && ContentObject is TeamMember result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/DeleteTeamEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/DeleteTeamEndpoint.verified.cs index d7d25be6..548a1379 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/DeleteTeamEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/DeleteTeamEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new DeleteTeamEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/DeleteTeamEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/DeleteTeamEndpointResult.verified.cs index 83ae031e..63ae9922 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/DeleteTeamEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/DeleteTeamEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? NoContentContent => IsNoContent && ContentObject is string result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/FreezeTeamEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/FreezeTeamEndpoint.verified.cs new file mode 100644 index 00000000..751bf1d1 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/FreezeTeamEndpoint.verified.cs @@ -0,0 +1,50 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Teams; + +/// +/// Client Endpoint. +/// Description: Freeze a team. +/// Operation: FreezeTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class FreezeTeamEndpoint : IFreezeTeamEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public FreezeTeamEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + FreezeTeamParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/teams/{id}/freeze"); + requestBuilder.WithPathParameter("id", parameters.Id); + requestBuilder.WithBody(parameters.Request); + + using var requestMessage = requestBuilder.Build(HttpMethod.Post); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new FreezeTeamEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/FreezeTeamEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/FreezeTeamEndpointResult.verified.cs new file mode 100644 index 00000000..35a9ee9c --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/FreezeTeamEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Teams; + +/// +/// Client Endpoint result. +/// Description: Freeze a team. +/// Operation: FreezeTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class FreezeTeamEndpointResult : EndpointResponse, IFreezeTeamEndpointResult +{ + public FreezeTeamEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public Team OkContent + => IsOk && ContentObject is Team result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/GetTeamEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/GetTeamEndpoint.verified.cs index 34ac098c..35567ed6 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/GetTeamEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/GetTeamEndpoint.verified.cs @@ -42,6 +42,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetTeamEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/GetTeamEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/GetTeamEndpointResult.verified.cs index 26649d1b..93d7e700 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/GetTeamEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/GetTeamEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public Team OkContent => IsOk && ContentObject is Team result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/GetTeamsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/GetTeamsEndpoint.verified.cs index e0fc5cd2..8bc7deaf 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/GetTeamsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/GetTeamsEndpoint.verified.cs @@ -33,8 +33,6 @@ public async Task ExecuteAsync( var client = factory.CreateClient(httpClientName); var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/teams"); - requestBuilder.WithQueryParameter("partnerExternalId", parameters.PartnerExternalId); - requestBuilder.WithQueryParameter("includeDeleted", parameters.IncludeDeleted); requestBuilder.WithQueryParameter("page", parameters.Page); requestBuilder.WithQueryParameter("perPage", parameters.PerPage); @@ -45,6 +43,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetTeamsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/GetTeamsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/GetTeamsEndpointResult.verified.cs index 5e70cced..eb3ae6bd 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/GetTeamsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/GetTeamsEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageTeamDto OkContent => IsOk && ContentObject is MontaPageTeamDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IDeleteTeamEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IDeleteTeamEndpointResult.verified.cs index e25ba102..87f49115 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IDeleteTeamEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IDeleteTeamEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IDeleteTeamEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + string? NoContentContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IDeleteTeamEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IFreezeTeamEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IFreezeTeamEndpoint.verified.cs new file mode 100644 index 00000000..dc364bbc --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IFreezeTeamEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Teams.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Freeze a team. +/// Operation: FreezeTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IFreezeTeamEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + FreezeTeamParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IFreezeTeamEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IFreezeTeamEndpointResult.verified.cs new file mode 100644 index 00000000..05480ae2 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IFreezeTeamEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Teams.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Freeze a team. +/// Operation: FreezeTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IFreezeTeamEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + Team OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IGetTeamEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IGetTeamEndpointResult.verified.cs index 9e4a4f61..38649fe3 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IGetTeamEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IGetTeamEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetTeamEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + Team OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IGetTeamsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IGetTeamsEndpointResult.verified.cs index 8b3f9591..0ece95f2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IGetTeamsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IGetTeamsEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetTeamsEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageTeamDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IPatchTeamEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IPatchTeamEndpointResult.verified.cs index 2d408d5b..c320866e 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IPatchTeamEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IPatchTeamEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IPatchTeamEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + Team OkContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IPatchTeamEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IPostTeamEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IPostTeamEndpointResult.verified.cs index 7fabca63..8ee6efe1 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IPostTeamEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IPostTeamEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IPostTeamEndpointResult : IEndpointResponse bool IsForbidden { get; } + bool IsNotFound { get; } + string? CreatedContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IPostTeamEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IUnfreezeTeamEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IUnfreezeTeamEndpoint.verified.cs new file mode 100644 index 00000000..c28b1bc4 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IUnfreezeTeamEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Teams.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Unfreeze a team. +/// Operation: UnfreezeTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IUnfreezeTeamEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + UnfreezeTeamParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IUnfreezeTeamEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IUnfreezeTeamEndpointResult.verified.cs new file mode 100644 index 00000000..ee9fdb56 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/Interfaces/IUnfreezeTeamEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Teams.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Unfreeze a team. +/// Operation: UnfreezeTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IUnfreezeTeamEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + Team OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/PatchTeamEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/PatchTeamEndpoint.verified.cs index 2b2f953a..2dd89335 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/PatchTeamEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/PatchTeamEndpoint.verified.cs @@ -44,6 +44,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new PatchTeamEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/PatchTeamEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/PatchTeamEndpointResult.verified.cs index 2117dc2f..cd9e7820 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/PatchTeamEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/PatchTeamEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public Team OkContent => IsOk && ContentObject is Team result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/PostTeamEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/PostTeamEndpoint.verified.cs index 98ef2582..4d5fb68c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/PostTeamEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/PostTeamEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new PostTeamEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/PostTeamEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/PostTeamEndpointResult.verified.cs index d4821124..e30f6ece 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/PostTeamEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/PostTeamEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? CreatedContent => IsCreated && ContentObject is string result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/UnfreezeTeamEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/UnfreezeTeamEndpoint.verified.cs new file mode 100644 index 00000000..bbc3f1ab --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/UnfreezeTeamEndpoint.verified.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Teams; + +/// +/// Client Endpoint. +/// Description: Unfreeze a team. +/// Operation: UnfreezeTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class UnfreezeTeamEndpoint : IUnfreezeTeamEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public UnfreezeTeamEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + UnfreezeTeamParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/teams/{id}/unfreeze"); + requestBuilder.WithPathParameter("id", parameters.Id); + + using var requestMessage = requestBuilder.Build(HttpMethod.Post); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new UnfreezeTeamEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/UnfreezeTeamEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/UnfreezeTeamEndpointResult.verified.cs new file mode 100644 index 00000000..84a4a1b7 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Teams/UnfreezeTeamEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Teams; + +/// +/// Client Endpoint result. +/// Description: Unfreeze a team. +/// Operation: UnfreezeTeam. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class UnfreezeTeamEndpointResult : EndpointResponse, IUnfreezeTeamEndpointResult +{ + public UnfreezeTeamEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public Team OkContent + => IsOk && ContentObject is Team result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/GetUserEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/GetUserEndpoint.verified.cs new file mode 100644 index 00000000..b404d44b --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/GetUserEndpoint.verified.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Users; + +/// +/// Client Endpoint. +/// Description: Retrieve a user. +/// Operation: GetUser. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetUserEndpoint : IGetUserEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public GetUserEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + GetUserParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/users/{userId}"); + requestBuilder.WithPathParameter("userId", parameters.UserId); + + using var requestMessage = requestBuilder.Build(HttpMethod.Get); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new GetUserEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/PatchTransactionEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/GetUserEndpointResult.verified.cs similarity index 72% rename from test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/PatchTransactionEndpointResult.verified.cs rename to test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/GetUserEndpointResult.verified.cs index 61aa9c56..05d8d514 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/PatchTransactionEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/GetUserEndpointResult.verified.cs @@ -4,17 +4,17 @@ // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. //------------------------------------------------------------------------------ -namespace Monta.ApiClient.Generated.Endpoints.WalletTransactions; +namespace Monta.ApiClient.Generated.Endpoints.Users; /// /// Client Endpoint result. -/// Description: Patch an existing transaction. -/// Operation: PatchTransaction. +/// Description: Retrieve a user. +/// Operation: GetUser. /// [GeneratedCode("ApiGenerator", "x.x.x.x")] -public class PatchTransactionEndpointResult : EndpointResponse, IPatchTransactionEndpointResult +public class GetUserEndpointResult : EndpointResponse, IGetUserEndpointResult { - public PatchTransactionEndpointResult(EndpointResponse response) + public GetUserEndpointResult(EndpointResponse response) : base(response) { } @@ -31,8 +31,11 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; - public WalletTransaction OkContent - => IsOk && ContentObject is WalletTransaction result + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public User OkContent + => IsOk && ContentObject is User result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/GetUsersEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/GetUsersEndpoint.verified.cs new file mode 100644 index 00000000..e9f859ec --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/GetUsersEndpoint.verified.cs @@ -0,0 +1,53 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Users; + +/// +/// Client Endpoint. +/// Description: Retrieve users. +/// Operation: GetUsers. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetUsersEndpoint : IGetUsersEndpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public GetUsersEndpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + GetUsersParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/users"); + requestBuilder.WithQueryParameter("page", parameters.Page); + requestBuilder.WithQueryParameter("perPage", parameters.PerPage); + requestBuilder.WithQueryParameter("email", parameters.Email); + requestBuilder.WithQueryParameter("phone", parameters.Phone); + requestBuilder.WithQueryParameter("includeDeleted", parameters.IncludeDeleted); + + using var requestMessage = requestBuilder.Build(HttpMethod.Get); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new GetUsersEndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/GetUsersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/GetUsersEndpointResult.verified.cs new file mode 100644 index 00000000..f383fbb8 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/GetUsersEndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Users; + +/// +/// Client Endpoint result. +/// Description: Retrieve users. +/// Operation: GetUsers. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetUsersEndpointResult : EndpointResponse, IGetUsersEndpointResult +{ + public GetUsersEndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public MontaPageUserDto OkContent + => IsOk && ContentObject is MontaPageUserDto result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserEndpoint.verified.cs new file mode 100644 index 00000000..e77abf6b --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Users.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Retrieve a user. +/// Operation: GetUser. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetUserEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + GetUserParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserEndpointResult.verified.cs new file mode 100644 index 00000000..5242423b --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Users.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Retrieve a user. +/// Operation: GetUser. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetUserEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + User OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpoint.verified.cs new file mode 100644 index 00000000..7e8e03fc --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpoint.verified.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Users.Interfaces; + +/// +/// Interface for Client Endpoint. +/// Description: Retrieve users. +/// Operation: GetUsers. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetUsersEndpoint +{ + /// + /// Execute method. + /// + /// The parameters. + /// The http client name. + /// The cancellation token. + Task ExecuteAsync( + GetUsersParameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpointResult.verified.cs new file mode 100644 index 00000000..843063ba --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpointResult.verified.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.Users.Interfaces; + +/// +/// Interface for Client Endpoint Result. +/// Description: Retrieve users. +/// Operation: GetUsers. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public interface IGetUsersEndpointResult : IEndpointResponse +{ + + bool IsOk { get; } + + bool IsBadRequest { get; } + + bool IsUnauthorized { get; } + + bool IsForbidden { get; } + + bool IsNotFound { get; } + + MontaPageUserDto OkContent { get; } + + string? BadRequestContent { get; } + + string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/GetWalletTransactions1Endpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/GetWalletTransactions1Endpoint.verified.cs new file mode 100644 index 00000000..945708c6 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/GetWalletTransactions1Endpoint.verified.cs @@ -0,0 +1,50 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.WalletTransactions; + +/// +/// Client Endpoint. +/// Description: Retrieves wallet transactions for an invoice. +/// Operation: GetWalletTransactions1. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetWalletTransactions1Endpoint : IGetWalletTransactions1Endpoint +{ + private readonly IHttpClientFactory factory; + private readonly IHttpMessageFactory httpMessageFactory; + + public GetWalletTransactions1Endpoint( + IHttpClientFactory factory, + IHttpMessageFactory httpMessageFactory) + { + this.factory = factory; + this.httpMessageFactory = httpMessageFactory; + } + + public async Task ExecuteAsync( + GetWalletTransactions1Parameters parameters, + string httpClientName = "Monta-ApiClient", + CancellationToken cancellationToken = default) + { + var client = factory.CreateClient(httpClientName); + + var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/wallet-transactions/invoices/{invoiceId}"); + requestBuilder.WithPathParameter("invoiceId", parameters.InvoiceId); + requestBuilder.WithQueryParameter("pageable", parameters.Pageable); + + using var requestMessage = requestBuilder.Build(HttpMethod.Get); + using var response = await client.SendAsync(requestMessage, cancellationToken); + + var responseBuilder = httpMessageFactory.FromResponse(response); + responseBuilder.AddSuccessResponse(HttpStatusCode.OK); + responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); + responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + return await responseBuilder.BuildResponseAsync(x => new GetWalletTransactions1EndpointResult(x), cancellationToken); + } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/GetWalletTransactions1EndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/GetWalletTransactions1EndpointResult.verified.cs new file mode 100644 index 00000000..a57543f2 --- /dev/null +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/GetWalletTransactions1EndpointResult.verified.cs @@ -0,0 +1,61 @@ +//------------------------------------------------------------------------------ +// This code was auto-generated by ApiGenerator x.x.x.x. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +//------------------------------------------------------------------------------ +namespace Monta.ApiClient.Generated.Endpoints.WalletTransactions; + +/// +/// Client Endpoint result. +/// Description: Retrieves wallet transactions for an invoice. +/// Operation: GetWalletTransactions1. +/// +[GeneratedCode("ApiGenerator", "x.x.x.x")] +public class GetWalletTransactions1EndpointResult : EndpointResponse, IGetWalletTransactions1EndpointResult +{ + public GetWalletTransactions1EndpointResult(EndpointResponse response) + : base(response) + { + } + + public bool IsOk + => StatusCode == HttpStatusCode.OK; + + public bool IsBadRequest + => StatusCode == HttpStatusCode.BadRequest; + + public bool IsUnauthorized + => StatusCode == HttpStatusCode.Unauthorized; + + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + + public MontaPageWalletTransactionDto OkContent + => IsOk && ContentObject is MontaPageWalletTransactionDto result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); + + public string? BadRequestContent + => IsBadRequest && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); + + public string? UnauthorizedContent + => IsUnauthorized && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/GetWalletTransactionsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/GetWalletTransactionsEndpoint.verified.cs index e8353da6..a8478089 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/GetWalletTransactionsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/GetWalletTransactionsEndpoint.verified.cs @@ -35,6 +35,7 @@ public async Task ExecuteAsync( var requestBuilder = httpMessageFactory.FromTemplate("/api/v1/wallet-transactions"); requestBuilder.WithQueryParameter("page", parameters.Page); requestBuilder.WithQueryParameter("perPage", parameters.PerPage); + requestBuilder.WithQueryParameter("operatorId", parameters.OperatorId); requestBuilder.WithQueryParameter("teamId", parameters.TeamId); requestBuilder.WithQueryParameter("fromDate", parameters.FromDate); requestBuilder.WithQueryParameter("toDate", parameters.ToDate); @@ -51,6 +52,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetWalletTransactionsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/GetWalletTransactionsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/GetWalletTransactionsEndpointResult.verified.cs index 140427e8..cd55001c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/GetWalletTransactionsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/GetWalletTransactionsEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageWalletTransactionDto OkContent => IsOk && ContentObject is MontaPageWalletTransactionDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/Interfaces/IPatchTransactionEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/Interfaces/IGetWalletTransactions1Endpoint.verified.cs similarity index 76% rename from test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/Interfaces/IPatchTransactionEndpoint.verified.cs rename to test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/Interfaces/IGetWalletTransactions1Endpoint.verified.cs index a5106487..5f536761 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/Interfaces/IPatchTransactionEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/Interfaces/IGetWalletTransactions1Endpoint.verified.cs @@ -8,11 +8,11 @@ namespace Monta.ApiClient.Generated.Endpoints.WalletTransactions.Interfaces; /// /// Interface for Client Endpoint. -/// Description: Patch an existing transaction. -/// Operation: PatchTransaction. +/// Description: Retrieves wallet transactions for an invoice. +/// Operation: GetWalletTransactions1. /// [GeneratedCode("ApiGenerator", "x.x.x.x")] -public interface IPatchTransactionEndpoint +public interface IGetWalletTransactions1Endpoint { /// /// Execute method. @@ -20,8 +20,8 @@ public interface IPatchTransactionEndpoint /// The parameters. /// The http client name. /// The cancellation token. - Task ExecuteAsync( - PatchTransactionParameters parameters, + Task ExecuteAsync( + GetWalletTransactions1Parameters parameters, string httpClientName = "Monta-ApiClient", CancellationToken cancellationToken = default); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/Interfaces/IPatchTransactionEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/Interfaces/IGetWalletTransactions1EndpointResult.verified.cs similarity index 71% rename from test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/Interfaces/IPatchTransactionEndpointResult.verified.cs rename to test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/Interfaces/IGetWalletTransactions1EndpointResult.verified.cs index 42a865a0..c3f9efe6 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/Interfaces/IPatchTransactionEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/Interfaces/IGetWalletTransactions1EndpointResult.verified.cs @@ -8,11 +8,11 @@ namespace Monta.ApiClient.Generated.Endpoints.WalletTransactions.Interfaces; /// /// Interface for Client Endpoint Result. -/// Description: Patch an existing transaction. -/// Operation: PatchTransaction. +/// Description: Retrieves wallet transactions for an invoice. +/// Operation: GetWalletTransactions1. /// [GeneratedCode("ApiGenerator", "x.x.x.x")] -public interface IPatchTransactionEndpointResult : IEndpointResponse +public interface IGetWalletTransactions1EndpointResult : IEndpointResponse { bool IsOk { get; } @@ -23,11 +23,15 @@ public interface IPatchTransactionEndpointResult : IEndpointResponse bool IsForbidden { get; } - WalletTransaction OkContent { get; } + bool IsNotFound { get; } + + MontaPageWalletTransactionDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/Interfaces/IGetWalletTransactionsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/Interfaces/IGetWalletTransactionsEndpointResult.verified.cs index a4954757..31a04b27 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/Interfaces/IGetWalletTransactionsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/Interfaces/IGetWalletTransactionsEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetWalletTransactionsEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageWalletTransactionDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/Interfaces/IPostOperatorAdjustmentTransactionEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/Interfaces/IPostOperatorAdjustmentTransactionEndpointResult.verified.cs index 07c5fbf9..5a5a4cfa 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/Interfaces/IPostOperatorAdjustmentTransactionEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/Interfaces/IPostOperatorAdjustmentTransactionEndpointResult.verified.cs @@ -23,6 +23,8 @@ public interface IPostOperatorAdjustmentTransactionEndpointResult : IEndpointRes bool IsForbidden { get; } + bool IsNotFound { get; } + string? CreatedContent { get; } string? BadRequestContent { get; } @@ -30,4 +32,6 @@ public interface IPostOperatorAdjustmentTransactionEndpointResult : IEndpointRes string? UnauthorizedContent { get; } string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/PostOperatorAdjustmentTransactionEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/PostOperatorAdjustmentTransactionEndpoint.verified.cs index fe29a31b..8d3b9b2c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/PostOperatorAdjustmentTransactionEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/PostOperatorAdjustmentTransactionEndpoint.verified.cs @@ -43,6 +43,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new PostOperatorAdjustmentTransactionEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/PostOperatorAdjustmentTransactionEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/PostOperatorAdjustmentTransactionEndpointResult.verified.cs index d5364ec6..06544186 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/PostOperatorAdjustmentTransactionEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/WalletTransactions/PostOperatorAdjustmentTransactionEndpointResult.verified.cs @@ -31,6 +31,9 @@ public bool IsUnauthorized public bool IsForbidden => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? CreatedContent => IsCreated && ContentObject is string result ? result @@ -50,4 +53,9 @@ public string? ForbiddenContent => IsForbidden && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Wallets/GetWalletsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Wallets/GetWalletsEndpoint.verified.cs index 901fcca7..5e2813fe 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Wallets/GetWalletsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Wallets/GetWalletsEndpoint.verified.cs @@ -45,6 +45,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetWalletsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Wallets/GetWalletsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Wallets/GetWalletsEndpointResult.verified.cs index 29950740..d7346a07 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Wallets/GetWalletsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Wallets/GetWalletsEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageWalletDto OkContent => IsOk && ContentObject is MontaPageWalletDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Wallets/Interfaces/IGetWalletsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Wallets/Interfaces/IGetWalletsEndpointResult.verified.cs index a5873fb6..59849609 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Wallets/Interfaces/IGetWalletsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Wallets/Interfaces/IGetWalletsEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetWalletsEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageWalletDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/DeleteWebhookConfigEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/DeleteWebhookConfigEndpoint.verified.cs index e1adc20b..ce0a596f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/DeleteWebhookConfigEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/DeleteWebhookConfigEndpoint.verified.cs @@ -40,6 +40,8 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.NoContent); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new DeleteWebhookConfigEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/DeleteWebhookConfigEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/DeleteWebhookConfigEndpointResult.verified.cs index 2125ab05..ac5e7199 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/DeleteWebhookConfigEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/DeleteWebhookConfigEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public string? NoContentContent => IsNoContent && ContentObject is string result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookConfigEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookConfigEndpoint.verified.cs index 56d5822c..9ae4c147 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookConfigEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookConfigEndpoint.verified.cs @@ -40,6 +40,7 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetWebhookConfigEndpointResult(x), cancellationToken); } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookConfigEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookConfigEndpointResult.verified.cs index 8d7392cf..15bd43f8 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookConfigEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookConfigEndpointResult.verified.cs @@ -28,6 +28,9 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -46,6 +49,11 @@ public string? UnauthorizedContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + public string? NotFoundContent => IsNotFound && ContentObject is string result ? result diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookEntries1Endpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookEntries1Endpoint.verified.cs index 85b1274f..ca9e2973 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookEntries1Endpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookEntries1Endpoint.verified.cs @@ -42,6 +42,7 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetWebhookEntries1EndpointResult(x), cancellationToken); } diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookEntries1EndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookEntries1EndpointResult.verified.cs index 965c79c8..874247c4 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookEntries1EndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookEntries1EndpointResult.verified.cs @@ -28,6 +28,9 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -46,6 +49,11 @@ public string? UnauthorizedContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + public string? NotFoundContent => IsNotFound && ContentObject is string result ? result diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookEntriesEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookEntriesEndpoint.verified.cs index 60b538cd..80c7fba0 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookEntriesEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookEntriesEndpoint.verified.cs @@ -44,6 +44,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetWebhookEntriesEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookEntriesEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookEntriesEndpointResult.verified.cs index eaf54cf3..39436ad0 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookEntriesEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/GetWebhookEntriesEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public MontaPageWebhookEntryDto OkContent => IsOk && ContentObject is MontaPageWebhookEntryDto result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/Interfaces/IDeleteWebhookConfigEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/Interfaces/IDeleteWebhookConfigEndpointResult.verified.cs index 62c85ee2..1a91ce43 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/Interfaces/IDeleteWebhookConfigEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/Interfaces/IDeleteWebhookConfigEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IDeleteWebhookConfigEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + string? NoContentContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/Interfaces/IGetWebhookConfigEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/Interfaces/IGetWebhookConfigEndpointResult.verified.cs index e4dd6f18..dca59dbf 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/Interfaces/IGetWebhookConfigEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/Interfaces/IGetWebhookConfigEndpointResult.verified.cs @@ -21,6 +21,8 @@ public interface IGetWebhookConfigEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + bool IsNotFound { get; } WebhookConfig OkContent { get; } @@ -29,5 +31,7 @@ public interface IGetWebhookConfigEndpointResult : IEndpointResponse string? UnauthorizedContent { get; } + string? ForbiddenContent { get; } + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/Interfaces/IGetWebhookEntries1EndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/Interfaces/IGetWebhookEntries1EndpointResult.verified.cs index faa6f515..4b1c358a 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/Interfaces/IGetWebhookEntries1EndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/Interfaces/IGetWebhookEntries1EndpointResult.verified.cs @@ -21,6 +21,8 @@ public interface IGetWebhookEntries1EndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + bool IsNotFound { get; } WebhookEntry OkContent { get; } @@ -29,5 +31,7 @@ public interface IGetWebhookEntries1EndpointResult : IEndpointResponse string? UnauthorizedContent { get; } + string? ForbiddenContent { get; } + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/Interfaces/IGetWebhookEntriesEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/Interfaces/IGetWebhookEntriesEndpointResult.verified.cs index aca8b593..30d67d32 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/Interfaces/IGetWebhookEntriesEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/Interfaces/IGetWebhookEntriesEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IGetWebhookEntriesEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + MontaPageWebhookEntryDto OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/Interfaces/IUpdateWebhookConfigEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/Interfaces/IUpdateWebhookConfigEndpointResult.verified.cs index fd39f82b..8fffd4fa 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/Interfaces/IUpdateWebhookConfigEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/Interfaces/IUpdateWebhookConfigEndpointResult.verified.cs @@ -21,9 +21,17 @@ public interface IUpdateWebhookConfigEndpointResult : IEndpointResponse bool IsUnauthorized { get; } + bool IsForbidden { get; } + + bool IsNotFound { get; } + WebhookConfig OkContent { get; } string? BadRequestContent { get; } string? UnauthorizedContent { get; } + + string? ForbiddenContent { get; } + + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/UpdateWebhookConfigEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/UpdateWebhookConfigEndpoint.verified.cs index 65f2057f..60a4a426 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/UpdateWebhookConfigEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/UpdateWebhookConfigEndpoint.verified.cs @@ -42,6 +42,8 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); + responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new UpdateWebhookConfigEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/UpdateWebhookConfigEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/UpdateWebhookConfigEndpointResult.verified.cs index c1593835..a73724c0 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/UpdateWebhookConfigEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/Endpoints/Webhooks/UpdateWebhookConfigEndpointResult.verified.cs @@ -28,6 +28,12 @@ public bool IsBadRequest public bool IsUnauthorized => StatusCode == HttpStatusCode.Unauthorized; + public bool IsForbidden + => StatusCode == HttpStatusCode.Forbidden; + + public bool IsNotFound + => StatusCode == HttpStatusCode.NotFound; + public WebhookConfig OkContent => IsOk && ContentObject is WebhookConfig result ? result @@ -42,4 +48,14 @@ public string? UnauthorizedContent => IsUnauthorized && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); + + public string? ForbiddenContent + => IsForbidden && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); + + public string? NotFoundContent + => IsNotFound && ContentObject is string result + ? result + : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/GlobalUsings.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/GlobalUsings.verified.cs index 9ddfacb7..8cf2c8c9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/GlobalUsings.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/Monta/VerifyClient/WCEM/src/Monta.ApiClient.Generated/GlobalUsings.verified.cs @@ -22,18 +22,22 @@ global using Monta.ApiClient.Generated.Contracts.ChargePointIntegrations; global using Monta.ApiClient.Generated.Contracts.ChargePointModels; global using Monta.ApiClient.Generated.Contracts.ChargePoints; +global using Monta.ApiClient.Generated.Contracts.ChargePointStatistics; global using Monta.ApiClient.Generated.Contracts.Charges; global using Monta.ApiClient.Generated.Contracts.Countries; global using Monta.ApiClient.Generated.Contracts.CountryAreas; global using Monta.ApiClient.Generated.Contracts.Currencies; global using Monta.ApiClient.Generated.Contracts.Insights; global using Monta.ApiClient.Generated.Contracts.InstallerJobs; +global using Monta.ApiClient.Generated.Contracts.Invoices; +global using Monta.ApiClient.Generated.Contracts.NestedTeams; global using Monta.ApiClient.Generated.Contracts.Operators; global using Monta.ApiClient.Generated.Contracts.PaymentTerminals; global using Monta.ApiClient.Generated.Contracts.Plans; global using Monta.ApiClient.Generated.Contracts.PriceGroups; global using Monta.ApiClient.Generated.Contracts.PriceGroupTags; global using Monta.ApiClient.Generated.Contracts.Prices; +global using Monta.ApiClient.Generated.Contracts.Reports; global using Monta.ApiClient.Generated.Contracts.Sites; global using Monta.ApiClient.Generated.Contracts.SponsoredChargePoints; global using Monta.ApiClient.Generated.Contracts.SubscriptionPurchases; @@ -41,8 +45,10 @@ global using Monta.ApiClient.Generated.Contracts.TariffPeriodGroups; global using Monta.ApiClient.Generated.Contracts.TariffRecurringPeriods; global using Monta.ApiClient.Generated.Contracts.Tariffs; +global using Monta.ApiClient.Generated.Contracts.TeamMemberProfiles; global using Monta.ApiClient.Generated.Contracts.TeamMembers; global using Monta.ApiClient.Generated.Contracts.Teams; +global using Monta.ApiClient.Generated.Contracts.Users; global using Monta.ApiClient.Generated.Contracts.Wallets; global using Monta.ApiClient.Generated.Contracts.WalletTransactions; global using Monta.ApiClient.Generated.Contracts.Webhooks; @@ -53,6 +59,7 @@ global using Monta.ApiClient.Generated.Endpoints.ChargePointIntegrations.Interfaces; global using Monta.ApiClient.Generated.Endpoints.ChargePointModels.Interfaces; global using Monta.ApiClient.Generated.Endpoints.ChargePoints.Interfaces; +global using Monta.ApiClient.Generated.Endpoints.ChargePointStatistics.Interfaces; global using Monta.ApiClient.Generated.Endpoints.Charges.Interfaces; global using Monta.ApiClient.Generated.Endpoints.Consumers.Interfaces; global using Monta.ApiClient.Generated.Endpoints.Countries.Interfaces; @@ -60,12 +67,15 @@ global using Monta.ApiClient.Generated.Endpoints.Currencies.Interfaces; global using Monta.ApiClient.Generated.Endpoints.Insights.Interfaces; global using Monta.ApiClient.Generated.Endpoints.InstallerJobs.Interfaces; +global using Monta.ApiClient.Generated.Endpoints.Invoices.Interfaces; +global using Monta.ApiClient.Generated.Endpoints.NestedTeams.Interfaces; global using Monta.ApiClient.Generated.Endpoints.Operators.Interfaces; global using Monta.ApiClient.Generated.Endpoints.PaymentTerminals.Interfaces; global using Monta.ApiClient.Generated.Endpoints.Plans.Interfaces; global using Monta.ApiClient.Generated.Endpoints.PriceGroups.Interfaces; global using Monta.ApiClient.Generated.Endpoints.PriceGroupTags.Interfaces; global using Monta.ApiClient.Generated.Endpoints.Prices.Interfaces; +global using Monta.ApiClient.Generated.Endpoints.Reports.Interfaces; global using Monta.ApiClient.Generated.Endpoints.Sites.Interfaces; global using Monta.ApiClient.Generated.Endpoints.SponsoredChargePoints.Interfaces; global using Monta.ApiClient.Generated.Endpoints.SubscriptionPurchases.Interfaces; @@ -73,8 +83,10 @@ global using Monta.ApiClient.Generated.Endpoints.TariffPeriodGroups.Interfaces; global using Monta.ApiClient.Generated.Endpoints.TariffRecurringPeriods.Interfaces; global using Monta.ApiClient.Generated.Endpoints.Tariffs.Interfaces; +global using Monta.ApiClient.Generated.Endpoints.TeamMemberProfiles.Interfaces; global using Monta.ApiClient.Generated.Endpoints.TeamMembers.Interfaces; global using Monta.ApiClient.Generated.Endpoints.Teams.Interfaces; +global using Monta.ApiClient.Generated.Endpoints.Users.Interfaces; global using Monta.ApiClient.Generated.Endpoints.Wallets.Interfaces; global using Monta.ApiClient.Generated.Endpoints.WalletTransactions.Interfaces; global using Monta.ApiClient.Generated.Endpoints.Webhooks.Interfaces; \ No newline at end of file