Skip to content

Commit 0e20241

Browse files
committed
Update cancellations dto following latest changes
1 parent 80e85fb commit 0e20241

File tree

6 files changed

+87
-10
lines changed

6 files changed

+87
-10
lines changed

NugetPackagesSourceCode/Sherweb.Apis.ServiceProvider/HttpClient/IServiceProviderService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ public partial interface IServiceProviderService : System.IDisposable
305305
/// <param name='cancellationToken'>
306306
/// The cancellation token.
307307
/// </param>
308-
Task<HttpOperationResponse<System.Guid?>> CancelSubscriptionsWithHttpMessagesAsync(SubscriptionsCancellationRequest body, System.Guid customerId, string acceptLanguage = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
308+
Task<HttpOperationResponse<SubscriptionsCancellation>> CancelSubscriptionsWithHttpMessagesAsync(SubscriptionsCancellationRequest body, System.Guid customerId, string acceptLanguage = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
309309

310310
/// <summary>
311311
/// GetSubscriptionsAmendmentStatus (beta)

NugetPackagesSourceCode/Sherweb.Apis.ServiceProvider/HttpClient/Models/SubscriptionsAmendment.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public SubscriptionsAmendment()
2222
/// <summary>
2323
/// Initializes a new instance of the SubscriptionsAmendment class.
2424
/// </summary>
25-
public SubscriptionsAmendment(System.Guid? subscriptionsAmendmentId = default(System.Guid?))
25+
public SubscriptionsAmendment(System.Guid subscriptionsAmendmentId)
2626
{
2727
SubscriptionsAmendmentId = subscriptionsAmendmentId;
2828
CustomInit();
@@ -36,7 +36,17 @@ public SubscriptionsAmendment()
3636
/// <summary>
3737
/// </summary>
3838
[JsonProperty(PropertyName = "subscriptionsAmendmentId")]
39-
public System.Guid? SubscriptionsAmendmentId { get; set; }
39+
public System.Guid SubscriptionsAmendmentId { get; set; }
4040

41+
/// <summary>
42+
/// Validate the object.
43+
/// </summary>
44+
/// <exception cref="Microsoft.Rest.ValidationException">
45+
/// Thrown if validation fails
46+
/// </exception>
47+
public virtual void Validate()
48+
{
49+
//Nothing to validate
50+
}
4151
}
4252
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// <auto-generated>
2+
// Code generated by Microsoft (R) AutoRest Code Generator.
3+
// Changes may cause incorrect behavior and will be lost if the code is
4+
// regenerated.
5+
// </auto-generated>
6+
7+
namespace Sherweb.Apis.ServiceProvider.Models
8+
{
9+
using Newtonsoft.Json;
10+
using System.Linq;
11+
12+
public partial class SubscriptionsCancellation
13+
{
14+
/// <summary>
15+
/// Initializes a new instance of the SubscriptionsCancellation class.
16+
/// </summary>
17+
public SubscriptionsCancellation()
18+
{
19+
CustomInit();
20+
}
21+
22+
/// <summary>
23+
/// Initializes a new instance of the SubscriptionsCancellation class.
24+
/// </summary>
25+
public SubscriptionsCancellation(System.Guid subscriptionsCancellationId)
26+
{
27+
SubscriptionsCancellationId = subscriptionsCancellationId;
28+
CustomInit();
29+
}
30+
31+
/// <summary>
32+
/// An initialization method that performs custom operations like setting defaults
33+
/// </summary>
34+
partial void CustomInit();
35+
36+
/// <summary>
37+
/// </summary>
38+
[JsonProperty(PropertyName = "subscriptionsCancellationId")]
39+
public System.Guid SubscriptionsCancellationId { get; set; }
40+
41+
/// <summary>
42+
/// Validate the object.
43+
/// </summary>
44+
/// <exception cref="Microsoft.Rest.ValidationException">
45+
/// Thrown if validation fails
46+
/// </exception>
47+
public virtual void Validate()
48+
{
49+
//Nothing to validate
50+
}
51+
}
52+
}

NugetPackagesSourceCode/Sherweb.Apis.ServiceProvider/HttpClient/ServiceProviderService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,7 +2015,7 @@ private void Initialize()
20152015
/// <return>
20162016
/// A response object containing the response body and response headers.
20172017
/// </return>
2018-
public async Task<HttpOperationResponse<System.Guid?>> CancelSubscriptionsWithHttpMessagesAsync(SubscriptionsCancellationRequest body, System.Guid customerId, string acceptLanguage = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
2018+
public async Task<HttpOperationResponse<SubscriptionsCancellation>> CancelSubscriptionsWithHttpMessagesAsync(SubscriptionsCancellationRequest body, System.Guid customerId, string acceptLanguage = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
20192019
{
20202020
if (body == null)
20212021
{
@@ -2126,7 +2126,7 @@ private void Initialize()
21262126
throw ex;
21272127
}
21282128
// Create Result
2129-
var _result = new HttpOperationResponse<System.Guid?>();
2129+
var _result = new HttpOperationResponse<SubscriptionsCancellation>();
21302130
_result.Request = _httpRequest;
21312131
_result.Response = _httpResponse;
21322132
// Deserialize Response
@@ -2135,7 +2135,7 @@ private void Initialize()
21352135
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
21362136
try
21372137
{
2138-
_result.Body = SafeJsonConvert.DeserializeObject<System.Guid?>(_responseContent, DeserializationSettings);
2138+
_result.Body = SafeJsonConvert.DeserializeObject<SubscriptionsCancellation>(_responseContent, DeserializationSettings);
21392139
}
21402140
catch (JsonException ex)
21412141
{

NugetPackagesSourceCode/Sherweb.Apis.ServiceProvider/HttpClient/ServiceProviderServiceExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ public static partial class ServiceProviderServiceExtensions
583583
/// Specify language (and culture) following [RFC 7231, section 5.3.5:
584584
/// Accept-Language].
585585
/// </param>
586-
public static System.Guid? CancelSubscriptions(this IServiceProviderService operations, SubscriptionsCancellationRequest body, System.Guid customerId, string acceptLanguage = default(string))
586+
public static SubscriptionsCancellation CancelSubscriptions(this IServiceProviderService operations, SubscriptionsCancellationRequest body, System.Guid customerId, string acceptLanguage = default(string))
587587
{
588588
return operations.CancelSubscriptionsAsync(body, customerId, acceptLanguage).GetAwaiter().GetResult();
589589
}
@@ -608,7 +608,7 @@ public static partial class ServiceProviderServiceExtensions
608608
/// <param name='cancellationToken'>
609609
/// The cancellation token.
610610
/// </param>
611-
public static async Task<System.Guid?> CancelSubscriptionsAsync(this IServiceProviderService operations, SubscriptionsCancellationRequest body, System.Guid customerId, string acceptLanguage = default(string), CancellationToken cancellationToken = default(CancellationToken))
611+
public static async Task<SubscriptionsCancellation> CancelSubscriptionsAsync(this IServiceProviderService operations, SubscriptionsCancellationRequest body, System.Guid customerId, string acceptLanguage = default(string), CancellationToken cancellationToken = default(CancellationToken))
612612
{
613613
using (var _result = await operations.CancelSubscriptionsWithHttpMessagesAsync(body, customerId, acceptLanguage, null, cancellationToken).ConfigureAwait(false))
614614
{

Sherweb.Apis.ServiceProvider.OpenAPI.json

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,7 @@
506506
"content": {
507507
"application/json": {
508508
"schema": {
509-
"type": "string",
510-
"format": "uuid"
509+
"$ref": "#/components/schemas/SubscriptionsCancellation"
511510
}
512511
}
513512
}
@@ -1410,6 +1409,9 @@
14101409
"additionalProperties": false
14111410
},
14121411
"SubscriptionsAmendment": {
1412+
"required": [
1413+
"subscriptionsAmendmentId"
1414+
],
14131415
"type": "object",
14141416
"properties": {
14151417
"subscriptionsAmendmentId": {
@@ -1449,6 +1451,19 @@
14491451
],
14501452
"type": "string"
14511453
},
1454+
"SubscriptionsCancellation": {
1455+
"required": [
1456+
"subscriptionsCancellationId"
1457+
],
1458+
"type": "object",
1459+
"properties": {
1460+
"subscriptionsCancellationId": {
1461+
"type": "string",
1462+
"format": "uuid"
1463+
}
1464+
},
1465+
"additionalProperties": false
1466+
},
14521467
"SubscriptionsCancellationRequest": {
14531468
"required": [
14541469
"subscriptionIds"

0 commit comments

Comments
 (0)