Skip to content

Commit beced89

Browse files
committed
Updated sources
1 parent 18b977c commit beced89

3 files changed

Lines changed: 89 additions & 3 deletions

File tree

src/GroupDocs.Conversion.Cloud.Sdk/Api/LicenseApi.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,33 @@ public ConsumptionResult GetConsumptionCredit()
9191
return (ConsumptionResult)SerializationHelper.Deserialize(response, typeof(ConsumptionResult));
9292
}
9393

94+
return null;
95+
}
96+
/// <summary>
97+
/// Get license information
98+
/// </summary>
99+
/// <returns><see cref="LicenseInfo"/></returns>
100+
public LicenseInfo GetLicenseInfo()
101+
{
102+
// create path and map variables
103+
var resourcePath = this.configuration.GetServerUrl() + "/conversion/license";
104+
resourcePath = Regex
105+
.Replace(resourcePath, "\\*", string.Empty)
106+
.Replace("&amp;", "&")
107+
.Replace("/?", "?");
108+
109+
var response = this.apiInvoker.InvokeApi(
110+
resourcePath,
111+
"GET",
112+
null,
113+
null,
114+
null);
115+
116+
if (response != null)
117+
{
118+
return (LicenseInfo)SerializationHelper.Deserialize(response, typeof(LicenseInfo));
119+
}
120+
94121
return null;
95122
}
96123
}

src/GroupDocs.Conversion.Cloud.Sdk/GroupDocs.Conversion.Cloud.Sdk.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
44
<TargetFrameworks>netstandard2.0;net20</TargetFrameworks>
5-
<AssemblyVersion>23.9.0.0</AssemblyVersion>
6-
<FileVersion>23.9.0.0</FileVersion>
7-
<Version>23.9</Version>
5+
<AssemblyVersion>23.10.0.0</AssemblyVersion>
6+
<FileVersion>23.10.0.0</FileVersion>
7+
<Version>23.10</Version>
88
<StyleCopTreatErrorsAsWarnings>false</StyleCopTreatErrorsAsWarnings>
99
<Company>GroupDocs</Company>
1010
<Authors>GroupDocs Product Team</Authors>
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// --------------------------------------------------------------------------------------------------------------------
2+
// <copyright company="Aspose Pty Ltd" file="LicenseInfo.cs">
3+
// Copyright (c) 2003-2023 Aspose Pty Ltd
4+
// </copyright>
5+
// <summary>
6+
// Permission is hereby granted, free of charge, to any person obtaining a copy
7+
// of this software and associated documentation files (the "Software"), to deal
8+
// in the Software without restriction, including without limitation the rights
9+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
// copies of the Software, and to permit persons to whom the Software is
11+
// furnished to do so, subject to the following conditions:
12+
//
13+
// The above copyright notice and this permission notice shall be included in all
14+
// copies or substantial portions of the Software.
15+
//
16+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
// SOFTWARE.
23+
// </summary>
24+
// --------------------------------------------------------------------------------------------------------------------
25+
26+
namespace GroupDocs.Conversion.Cloud.Sdk.Model
27+
{
28+
using System;
29+
using System.Collections;
30+
using System.Collections.Generic;
31+
using System.Runtime.Serialization;
32+
using System.Text;
33+
using Newtonsoft.Json;
34+
using Newtonsoft.Json.Converters;
35+
36+
/// <summary>
37+
/// Current license information
38+
/// </summary>
39+
public class LicenseInfo
40+
{
41+
/// <summary>
42+
/// True, if license was applied and valid, otherwise False
43+
/// </summary>
44+
public bool? IsLicensed { get; set; }
45+
46+
/// <summary>
47+
/// Get the string presentation of the object
48+
/// </summary>
49+
/// <returns>String presentation of the object</returns>
50+
public override string ToString()
51+
{
52+
var sb = new StringBuilder();
53+
sb.Append("class LicenseInfo {\n");
54+
sb.Append(" IsLicensed: ").Append(this.IsLicensed).Append("\n");
55+
sb.Append("}\n");
56+
return sb.ToString();
57+
}
58+
}
59+
}

0 commit comments

Comments
 (0)