Skip to content

Commit 80e85fb

Browse files
committed
Prepare beta10. Updating OpenAPI spec + nuget package source
1 parent 1cd7475 commit 80e85fb

10 files changed

+1202
-87
lines changed

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

Lines changed: 64 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,23 @@ public partial interface IServiceProviderService : System.IDisposable
4040
ServiceClientCredentials Credentials { get; }
4141

4242

43+
/// <summary>
44+
/// GetCustomerCatalog (beta)
45+
/// </summary>
46+
/// <param name='customerId'>
47+
/// </param>
48+
/// <param name='acceptLanguage'>
49+
/// Specify language (and culture) following [RFC 7231, section 5.3.5:
50+
/// Accept-Language].
51+
/// </param>
52+
/// <param name='customHeaders'>
53+
/// The headers that will be added to request.
54+
/// </param>
55+
/// <param name='cancellationToken'>
56+
/// The cancellation token.
57+
/// </param>
58+
Task<HttpOperationResponse<CustomerCatalog>> GetCustomerCatalogWithHttpMessagesAsync(System.Guid customerId, string acceptLanguage = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
59+
4360
/// <summary>
4461
/// GetCustomerCatalogItemsPricingInformation (beta)
4562
/// </summary>
@@ -200,10 +217,11 @@ public partial interface IServiceProviderService : System.IDisposable
200217
/// 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8
201218
/// 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1
202219
/// 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"
203-
/// /&gt;&lt;/svg&gt; For the time being, you cannot use the Service
204-
/// Provider API rebilling feature
205-
/// (&lt;i&gt;GetReceivableCharges&lt;/i&gt; endpoint) while having a
206-
/// PSA integration enabled.&lt;/div&gt;
220+
/// /&gt;&lt;/svg&gt;
221+
/// For the time being, you cannot use the Service Provider API
222+
/// rebilling feature (&lt;i&gt;GetReceivableCharges&lt;/i&gt;
223+
/// endpoint) while having a PSA integration enabled.
224+
/// &lt;/div&gt;
207225
/// </remarks>
208226
/// <param name='customerId'>
209227
/// </param>
@@ -267,6 +285,28 @@ public partial interface IServiceProviderService : System.IDisposable
267285
/// </param>
268286
Task<HttpOperationResponse<SubscriptionsAmendment>> CreateSubscriptionsAmendmentWithHttpMessagesAsync(System.Guid customerId, CreateSubscriptionsAmendmentParameters body = default(CreateSubscriptionsAmendmentParameters), string acceptLanguage = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
269287

288+
/// <summary>
289+
/// CancelSubscriptions (beta)
290+
/// </summary>
291+
/// <remarks>
292+
/// Cancel subscriptions for one of your customers.
293+
/// </remarks>
294+
/// <param name='body'>
295+
/// </param>
296+
/// <param name='customerId'>
297+
/// </param>
298+
/// <param name='acceptLanguage'>
299+
/// Specify language (and culture) following [RFC 7231, section 5.3.5:
300+
/// Accept-Language].
301+
/// </param>
302+
/// <param name='customHeaders'>
303+
/// The headers that will be added to request.
304+
/// </param>
305+
/// <param name='cancellationToken'>
306+
/// The cancellation token.
307+
/// </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));
309+
270310
/// <summary>
271311
/// GetSubscriptionsAmendmentStatus (beta)
272312
/// </summary>
@@ -287,5 +327,25 @@ public partial interface IServiceProviderService : System.IDisposable
287327
/// </param>
288328
Task<HttpOperationResponse<string>> GetSubscriptionsAmendmentStatusWithHttpMessagesAsync(System.Guid subscriptionsAmendmentId, string acceptLanguage = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
289329

330+
/// <summary>
331+
/// GetSubscriptionsCancellationStatus (beta)
332+
/// </summary>
333+
/// <remarks>
334+
/// Get the status of a subscriptions cancellation.
335+
/// </remarks>
336+
/// <param name='subscriptionsCancellationId'>
337+
/// </param>
338+
/// <param name='acceptLanguage'>
339+
/// Specify language (and culture) following [RFC 7231, section 5.3.5:
340+
/// Accept-Language].
341+
/// </param>
342+
/// <param name='customHeaders'>
343+
/// The headers that will be added to request.
344+
/// </param>
345+
/// <param name='cancellationToken'>
346+
/// The cancellation token.
347+
/// </param>
348+
Task<HttpOperationResponse<string>> GetSubscriptionsCancellationStatusWithHttpMessagesAsync(System.Guid subscriptionsCancellationId, string acceptLanguage = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
349+
290350
}
291351
}
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
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 Microsoft.Rest;
10+
using Newtonsoft.Json;
11+
using System.Collections;
12+
using System.Collections.Generic;
13+
using System.Linq;
14+
15+
public partial class CatalogItem
16+
{
17+
/// <summary>
18+
/// Initializes a new instance of the CatalogItem class.
19+
/// </summary>
20+
public CatalogItem()
21+
{
22+
CustomInit();
23+
}
24+
25+
/// <summary>
26+
/// Initializes a new instance of the CatalogItem class.
27+
/// </summary>
28+
/// <param name="billingCycle">A billing cycle, also referred to as a
29+
/// billing period, is the interval of time between billing statements.
30+
/// Although billing cycles are most often set at one month, or one
31+
/// year, they may vary in length depending on the SKU.
32+
/// Possible values: monthly, yearly, once</param>
33+
/// <param name="commitmentTerm">The duration for which the catalog
34+
/// item must be kept and paid for once purchased.
35+
/// An open commitment term means it is not tied to a commitment
36+
/// period.
37+
/// Possible values: monthly, yearly, biennial, triennial, open</param>
38+
public CatalogItem(string sku, IList<Translation> name, IList<Translation> description, string vendor, string billingCycle, string commitmentTerm)
39+
{
40+
Sku = sku;
41+
Name = name;
42+
Description = description;
43+
Vendor = vendor;
44+
BillingCycle = billingCycle;
45+
CommitmentTerm = commitmentTerm;
46+
CustomInit();
47+
}
48+
49+
/// <summary>
50+
/// An initialization method that performs custom operations like setting defaults
51+
/// </summary>
52+
partial void CustomInit();
53+
54+
/// <summary>
55+
/// </summary>
56+
[JsonProperty(PropertyName = "sku")]
57+
public string Sku { get; set; }
58+
59+
/// <summary>
60+
/// </summary>
61+
[JsonProperty(PropertyName = "name")]
62+
public IList<Translation> Name { get; set; }
63+
64+
/// <summary>
65+
/// </summary>
66+
[JsonProperty(PropertyName = "description")]
67+
public IList<Translation> Description { get; set; }
68+
69+
/// <summary>
70+
/// </summary>
71+
[JsonProperty(PropertyName = "vendor")]
72+
public string Vendor { get; set; }
73+
74+
/// <summary>
75+
/// Gets or sets a billing cycle, also referred to as a billing period,
76+
/// is the interval of time between billing statements.
77+
/// Although billing cycles are most often set at one month, or one
78+
/// year, they may vary in length depending on the SKU.
79+
/// Possible values: monthly, yearly, once
80+
/// </summary>
81+
[JsonProperty(PropertyName = "billingCycle")]
82+
public string BillingCycle { get; set; }
83+
84+
/// <summary>
85+
/// Gets or sets the duration for which the catalog item must be kept
86+
/// and paid for once purchased.
87+
/// An open commitment term means it is not tied to a commitment
88+
/// period.
89+
/// Possible values: monthly, yearly, biennial, triennial, open
90+
/// </summary>
91+
[JsonProperty(PropertyName = "commitmentTerm")]
92+
public string CommitmentTerm { get; set; }
93+
94+
/// <summary>
95+
/// Validate the object.
96+
/// </summary>
97+
/// <exception cref="ValidationException">
98+
/// Thrown if validation fails
99+
/// </exception>
100+
public virtual void Validate()
101+
{
102+
if (Sku == null)
103+
{
104+
throw new ValidationException(ValidationRules.CannotBeNull, "Sku");
105+
}
106+
if (Name == null)
107+
{
108+
throw new ValidationException(ValidationRules.CannotBeNull, "Name");
109+
}
110+
if (Description == null)
111+
{
112+
throw new ValidationException(ValidationRules.CannotBeNull, "Description");
113+
}
114+
if (Vendor == null)
115+
{
116+
throw new ValidationException(ValidationRules.CannotBeNull, "Vendor");
117+
}
118+
if (BillingCycle == null)
119+
{
120+
throw new ValidationException(ValidationRules.CannotBeNull, "BillingCycle");
121+
}
122+
if (CommitmentTerm == null)
123+
{
124+
throw new ValidationException(ValidationRules.CannotBeNull, "CommitmentTerm");
125+
}
126+
if (Name != null)
127+
{
128+
foreach (var element in Name)
129+
{
130+
if (element != null)
131+
{
132+
element.Validate();
133+
}
134+
}
135+
}
136+
if (Description != null)
137+
{
138+
foreach (var element1 in Description)
139+
{
140+
if (element1 != null)
141+
{
142+
element1.Validate();
143+
}
144+
}
145+
}
146+
}
147+
}
148+
}

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ public CatalogItemPricingInformationDto()
2525
/// Initializes a new instance of the CatalogItemPricingInformationDto
2626
/// class.
2727
/// </summary>
28-
public CatalogItemPricingInformationDto(System.Guid catalogItemId, string sku, PricingInformationDto pricingInformation)
28+
public CatalogItemPricingInformationDto(string sku, PricingInformationDto pricingInformation)
2929
{
30-
CatalogItemId = catalogItemId;
3130
Sku = sku;
3231
PricingInformation = pricingInformation;
3332
CustomInit();
@@ -38,11 +37,6 @@ public CatalogItemPricingInformationDto(System.Guid catalogItemId, string sku, P
3837
/// </summary>
3938
partial void CustomInit();
4039

41-
/// <summary>
42-
/// </summary>
43-
[JsonProperty(PropertyName = "catalogItemId")]
44-
public System.Guid CatalogItemId { get; set; }
45-
4640
/// <summary>
4741
/// </summary>
4842
[JsonProperty(PropertyName = "sku")]
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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.Collections;
11+
using System.Collections.Generic;
12+
using System.Linq;
13+
14+
public partial class CustomerCatalog
15+
{
16+
/// <summary>
17+
/// Initializes a new instance of the CustomerCatalog class.
18+
/// </summary>
19+
public CustomerCatalog()
20+
{
21+
CustomInit();
22+
}
23+
24+
/// <summary>
25+
/// Initializes a new instance of the CustomerCatalog class.
26+
/// </summary>
27+
public CustomerCatalog(System.Guid customerId, IList<CatalogItem> catalogItems = default(IList<CatalogItem>))
28+
{
29+
CustomerId = customerId;
30+
CatalogItems = catalogItems;
31+
CustomInit();
32+
}
33+
34+
/// <summary>
35+
/// An initialization method that performs custom operations like setting defaults
36+
/// </summary>
37+
partial void CustomInit();
38+
39+
/// <summary>
40+
/// </summary>
41+
[JsonProperty(PropertyName = "customerId")]
42+
public System.Guid CustomerId { get; set; }
43+
44+
/// <summary>
45+
/// </summary>
46+
[JsonProperty(PropertyName = "catalogItems")]
47+
public IList<CatalogItem> CatalogItems { get; set; }
48+
49+
/// <summary>
50+
/// Validate the object.
51+
/// </summary>
52+
/// <exception cref="Microsoft.Rest.ValidationException">
53+
/// Thrown if validation fails
54+
/// </exception>
55+
public virtual void Validate()
56+
{
57+
if (CatalogItems != null)
58+
{
59+
foreach (var element in CatalogItems)
60+
{
61+
if (element != null)
62+
{
63+
element.Validate();
64+
}
65+
}
66+
}
67+
}
68+
}
69+
}

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ public PricingInformationDto()
2929
/// first cycle</param>
3030
/// <param name="currency">Possible values include: 'Undefined', 'Cad',
3131
/// 'Usd', 'Eur', 'Gbp'</param>
32-
/// <param name="billingCycle">Possible values include: 'Daily',
33-
/// 'Weekly', 'Monthly', 'Yearly'</param>
34-
/// <param name="commitmentTerm">Possible values include: 'Monthly',
35-
/// 'Annual', 'Biennial', 'Triennial'</param>
36-
public PricingInformationDto(double recurringFee, double setupFee, string currency, string billingCycle = default(string), string commitmentTerm = default(string))
32+
/// <param name="billingCycle">A billing cycle, also referred to as a
33+
/// billing period, is the interval of time between billing statements.
34+
/// Although billing cycles are most often set at one month, or one
35+
/// year, they may vary in length depending on the SKU.
36+
/// Possible values: monthly, yearly, once</param>
37+
public PricingInformationDto(double recurringFee, double setupFee, string currency, string billingCycle)
3738
{
3839
RecurringFee = recurringFee;
3940
SetupFee = setupFee;
4041
Currency = currency;
4142
BillingCycle = billingCycle;
42-
CommitmentTerm = commitmentTerm;
4343
CustomInit();
4444
}
4545

@@ -69,19 +69,15 @@ public PricingInformationDto()
6969
public string Currency { get; set; }
7070

7171
/// <summary>
72-
/// Gets or sets possible values include: 'Daily', 'Weekly', 'Monthly',
73-
/// 'Yearly'
72+
/// Gets or sets a billing cycle, also referred to as a billing period,
73+
/// is the interval of time between billing statements.
74+
/// Although billing cycles are most often set at one month, or one
75+
/// year, they may vary in length depending on the SKU.
76+
/// Possible values: monthly, yearly, once
7477
/// </summary>
7578
[JsonProperty(PropertyName = "billingCycle")]
7679
public string BillingCycle { get; set; }
7780

78-
/// <summary>
79-
/// Gets or sets possible values include: 'Monthly', 'Annual',
80-
/// 'Biennial', 'Triennial'
81-
/// </summary>
82-
[JsonProperty(PropertyName = "commitmentTerm")]
83-
public string CommitmentTerm { get; set; }
84-
8581
/// <summary>
8682
/// Validate the object.
8783
/// </summary>
@@ -94,6 +90,10 @@ public virtual void Validate()
9490
{
9591
throw new ValidationException(ValidationRules.CannotBeNull, "Currency");
9692
}
93+
if (BillingCycle == null)
94+
{
95+
throw new ValidationException(ValidationRules.CannotBeNull, "BillingCycle");
96+
}
9797
}
9898
}
9999
}

0 commit comments

Comments
 (0)