Skip to content

Commit aaaee86

Browse files
authored
Merge pull request #44 from jaspirot/beta/service-provider
v1.0-beta12
2 parents 940e74b + 41a4f40 commit aaaee86

32 files changed

+4248
-2792
lines changed

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

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,50 @@ public partial interface IServiceProviderService : System.IDisposable
135135
/// </param>
136136
Task<HttpOperationResponse> ConfigurePlatformsWithHttpMessagesAsync(System.Guid customerId, ConfigurePlatformsRequest body = default(ConfigurePlatformsRequest), string acceptLanguage = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
137137

138+
/// <summary>
139+
/// GetCustomerPlatformDetails (beta)
140+
/// </summary>
141+
/// <remarks>
142+
/// Get platform details for a given customer.
143+
/// </remarks>
144+
/// <param name='customerId'>
145+
/// </param>
146+
/// <param name='platformId'>
147+
/// </param>
148+
/// <param name='acceptLanguage'>
149+
/// Specify language (and culture) following [RFC 7231, section 5.3.5:
150+
/// Accept-Language].
151+
/// </param>
152+
/// <param name='customHeaders'>
153+
/// The headers that will be added to request.
154+
/// </param>
155+
/// <param name='cancellationToken'>
156+
/// The cancellation token.
157+
/// </param>
158+
Task<HttpOperationResponse<CustomerPlatformDetailsDto>> GetCustomerPlatformDetailsWithHttpMessagesAsync(System.Guid customerId, System.Guid platformId, string acceptLanguage = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
159+
160+
/// <summary>
161+
/// GetCustomerMeterUsages (beta)
162+
/// </summary>
163+
/// <remarks>
164+
/// Get meter usages for a given customer/platform.
165+
/// </remarks>
166+
/// <param name='customerId'>
167+
/// </param>
168+
/// <param name='platformId'>
169+
/// </param>
170+
/// <param name='acceptLanguage'>
171+
/// Specify language (and culture) following [RFC 7231, section 5.3.5:
172+
/// Accept-Language].
173+
/// </param>
174+
/// <param name='customHeaders'>
175+
/// The headers that will be added to request.
176+
/// </param>
177+
/// <param name='cancellationToken'>
178+
/// The cancellation token.
179+
/// </param>
180+
Task<HttpOperationResponse<CustomerPlatformMeterUsagesDto>> GetCustomerMeterUsagesWithHttpMessagesAsync(System.Guid customerId, System.Guid platformId, string acceptLanguage = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
181+
138182
/// <summary>
139183
/// GetCustomers (beta)
140184
/// </summary>
@@ -326,6 +370,28 @@ public partial interface IServiceProviderService : System.IDisposable
326370
/// </param>
327371
Task<HttpOperationResponse<Subscriptions>> GetCustomerSubscriptionsWithHttpMessagesAsync(System.Guid customerId, string acceptLanguage = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
328372

373+
/// <summary>
374+
/// GetCustomerSubscriptionMeters
375+
/// </summary>
376+
/// <remarks>
377+
/// Get the list of subscriptions meters for one of your customers.
378+
/// </remarks>
379+
/// <param name='customerId'>
380+
/// </param>
381+
/// <param name='platformId'>
382+
/// </param>
383+
/// <param name='acceptLanguage'>
384+
/// Specify language (and culture) following [RFC 7231, section 5.3.5:
385+
/// Accept-Language].
386+
/// </param>
387+
/// <param name='customHeaders'>
388+
/// The headers that will be added to request.
389+
/// </param>
390+
/// <param name='cancellationToken'>
391+
/// The cancellation token.
392+
/// </param>
393+
Task<HttpOperationResponse<CustomerSubscriptionMetersDto>> GetCustomerSubscriptionMetersWithHttpMessagesAsync(System.Guid customerId, System.Guid platformId, string acceptLanguage = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
394+
329395
/// <summary>
330396
/// GetCustomerSubscriptionsDetails (beta)
331397
/// </summary>

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public CartItemsCannotBeEmptyProblemDetails()
4646
/// information if dereferenced.</param>
4747
/// <param name="extensions">Gets the
4848
/// System.Collections.Generic.IDictionary`2 for extension members.
49-
/// &lt;br&gt;
49+
///
50+
///
5051
/// Problem type definitions MAY extend the problem details object with
5152
/// additional members.
5253
/// Extension members appear in the same namespace as other members of
@@ -113,7 +114,8 @@ public CartItemsCannotBeEmptyProblemDetails()
113114
/// <summary>
114115
/// Gets the System.Collections.Generic.IDictionary`2 for extension
115116
/// members.
116-
/// &amp;lt;br&amp;gt;
117+
///
118+
///
117119
/// Problem type definitions MAY extend the problem details object with
118120
/// additional members.
119121
/// Extension members appear in the same namespace as other members of

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

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,11 @@ public CatalogItem()
3535
/// An open commitment term means it is not tied to a commitment
3636
/// period.
3737
/// 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)
38+
public CatalogItem(string sku, IList<Translation> name, IList<Translation> description, string billingCycle, string commitmentTerm)
3939
{
4040
Sku = sku;
4141
Name = name;
4242
Description = description;
43-
Vendor = vendor;
4443
BillingCycle = billingCycle;
4544
CommitmentTerm = commitmentTerm;
4645
CustomInit();
@@ -66,11 +65,6 @@ public CatalogItem(string sku, IList<Translation> name, IList<Translation> descr
6665
[JsonProperty(PropertyName = "description")]
6766
public IList<Translation> Description { get; set; }
6867

69-
/// <summary>
70-
/// </summary>
71-
[JsonProperty(PropertyName = "vendor")]
72-
public string Vendor { get; set; }
73-
7468
/// <summary>
7569
/// Gets or sets a billing cycle, also referred to as a billing period,
7670
/// is the interval of time between billing statements.
@@ -111,10 +105,6 @@ public virtual void Validate()
111105
{
112106
throw new ValidationException(ValidationRules.CannotBeNull, "Description");
113107
}
114-
if (Vendor == null)
115-
{
116-
throw new ValidationException(ValidationRules.CannotBeNull, "Vendor");
117-
}
118108
if (BillingCycle == null)
119109
{
120110
throw new ValidationException(ValidationRules.CannotBeNull, "BillingCycle");

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ public CommitmentTermViolationsProblemDetails()
5050
/// information if dereferenced.</param>
5151
/// <param name="extensions">Gets the
5252
/// System.Collections.Generic.IDictionary`2 for extension members.
53-
/// &lt;br&gt;
53+
///
54+
///
5455
/// Problem type definitions MAY extend the problem details object with
5556
/// additional members.
5657
/// Extension members appear in the same namespace as other members of
@@ -117,7 +118,8 @@ public CommitmentTermViolationsProblemDetails()
117118
/// <summary>
118119
/// Gets the System.Collections.Generic.IDictionary`2 for extension
119120
/// members.
120-
/// &amp;lt;br&amp;gt;
121+
///
122+
///
121123
/// Problem type definitions MAY extend the problem details object with
122124
/// additional members.
123125
/// Extension members appear in the same namespace as other members of

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public CustomerFreeTrialAlreadyExpiredProblemDetails()
4646
/// information if dereferenced.</param>
4747
/// <param name="extensions">Gets the
4848
/// System.Collections.Generic.IDictionary`2 for extension members.
49-
/// &lt;br&gt;
49+
///
50+
///
5051
/// Problem type definitions MAY extend the problem details object with
5152
/// additional members.
5253
/// Extension members appear in the same namespace as other members of
@@ -113,7 +114,8 @@ public CustomerFreeTrialAlreadyExpiredProblemDetails()
113114
/// <summary>
114115
/// Gets the System.Collections.Generic.IDictionary`2 for extension
115116
/// members.
116-
/// &amp;lt;br&amp;gt;
117+
///
118+
///
117119
/// Problem type definitions MAY extend the problem details object with
118120
/// additional members.
119121
/// Extension members appear in the same namespace as other members of

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public CustomerNotFoundProblemDetails()
4646
/// information if dereferenced.</param>
4747
/// <param name="extensions">Gets the
4848
/// System.Collections.Generic.IDictionary`2 for extension members.
49-
/// &lt;br&gt;
49+
///
50+
///
5051
/// Problem type definitions MAY extend the problem details object with
5152
/// additional members.
5253
/// Extension members appear in the same namespace as other members of
@@ -113,7 +114,8 @@ public CustomerNotFoundProblemDetails()
113114
/// <summary>
114115
/// Gets the System.Collections.Generic.IDictionary`2 for extension
115116
/// members.
116-
/// &amp;lt;br&amp;gt;
117+
///
118+
///
117119
/// Problem type definitions MAY extend the problem details object with
118120
/// additional members.
119121
/// Extension members appear in the same namespace as other members of
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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.Linq;
12+
13+
public partial class CustomerPlatformDetailsDto
14+
{
15+
/// <summary>
16+
/// Initializes a new instance of the CustomerPlatformDetailsDto class.
17+
/// </summary>
18+
public CustomerPlatformDetailsDto()
19+
{
20+
CustomInit();
21+
}
22+
23+
/// <summary>
24+
/// Initializes a new instance of the CustomerPlatformDetailsDto class.
25+
/// </summary>
26+
public CustomerPlatformDetailsDto(System.Guid customerId, PlatformDetailsDto platformDetails)
27+
{
28+
CustomerId = customerId;
29+
PlatformDetails = platformDetails;
30+
CustomInit();
31+
}
32+
33+
/// <summary>
34+
/// An initialization method that performs custom operations like setting defaults
35+
/// </summary>
36+
partial void CustomInit();
37+
38+
/// <summary>
39+
/// </summary>
40+
[JsonProperty(PropertyName = "customerId")]
41+
public System.Guid CustomerId { get; set; }
42+
43+
/// <summary>
44+
/// </summary>
45+
[JsonProperty(PropertyName = "platformDetails")]
46+
public PlatformDetailsDto PlatformDetails { get; set; }
47+
48+
/// <summary>
49+
/// Validate the object.
50+
/// </summary>
51+
/// <exception cref="ValidationException">
52+
/// Thrown if validation fails
53+
/// </exception>
54+
public virtual void Validate()
55+
{
56+
if (PlatformDetails == null)
57+
{
58+
throw new ValidationException(ValidationRules.CannotBeNull, "PlatformDetails");
59+
}
60+
if (PlatformDetails != null)
61+
{
62+
PlatformDetails.Validate();
63+
}
64+
}
65+
}
66+
}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
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 CustomerPlatformMeterUsagesDto
16+
{
17+
/// <summary>
18+
/// Initializes a new instance of the CustomerPlatformMeterUsagesDto
19+
/// class.
20+
/// </summary>
21+
public CustomerPlatformMeterUsagesDto()
22+
{
23+
CustomInit();
24+
}
25+
26+
/// <summary>
27+
/// Initializes a new instance of the CustomerPlatformMeterUsagesDto
28+
/// class.
29+
/// </summary>
30+
public CustomerPlatformMeterUsagesDto(System.Guid customerId, System.Guid platformId, IList<MeterUsageDto> meterUsages)
31+
{
32+
CustomerId = customerId;
33+
PlatformId = platformId;
34+
MeterUsages = meterUsages;
35+
CustomInit();
36+
}
37+
38+
/// <summary>
39+
/// An initialization method that performs custom operations like setting defaults
40+
/// </summary>
41+
partial void CustomInit();
42+
43+
/// <summary>
44+
/// </summary>
45+
[JsonProperty(PropertyName = "customerId")]
46+
public System.Guid CustomerId { get; set; }
47+
48+
/// <summary>
49+
/// </summary>
50+
[JsonProperty(PropertyName = "platformId")]
51+
public System.Guid PlatformId { get; set; }
52+
53+
/// <summary>
54+
/// </summary>
55+
[JsonProperty(PropertyName = "meterUsages")]
56+
public IList<MeterUsageDto> MeterUsages { get; set; }
57+
58+
/// <summary>
59+
/// Validate the object.
60+
/// </summary>
61+
/// <exception cref="ValidationException">
62+
/// Thrown if validation fails
63+
/// </exception>
64+
public virtual void Validate()
65+
{
66+
if (MeterUsages == null)
67+
{
68+
throw new ValidationException(ValidationRules.CannotBeNull, "MeterUsages");
69+
}
70+
if (MeterUsages != null)
71+
{
72+
foreach (var element in MeterUsages)
73+
{
74+
if (element != null)
75+
{
76+
element.Validate();
77+
}
78+
}
79+
}
80+
}
81+
}
82+
}

0 commit comments

Comments
 (0)