Skip to content

Commit

Permalink
Merge pull request #44 from jaspirot/beta/service-provider
Browse files Browse the repository at this point in the history
v1.0-beta12
  • Loading branch information
RaphCayou authored Nov 4, 2024
2 parents 940e74b + 41a4f40 commit aaaee86
Show file tree
Hide file tree
Showing 32 changed files with 4,248 additions and 2,792 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,50 @@ public partial interface IServiceProviderService : System.IDisposable
/// </param>
Task<HttpOperationResponse> ConfigurePlatformsWithHttpMessagesAsync(System.Guid customerId, ConfigurePlatformsRequest body = default(ConfigurePlatformsRequest), string acceptLanguage = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// GetCustomerPlatformDetails (beta)
/// </summary>
/// <remarks>
/// Get platform details for a given customer.
/// </remarks>
/// <param name='customerId'>
/// </param>
/// <param name='platformId'>
/// </param>
/// <param name='acceptLanguage'>
/// Specify language (and culture) following [RFC 7231, section 5.3.5:
/// Accept-Language].
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
Task<HttpOperationResponse<CustomerPlatformDetailsDto>> GetCustomerPlatformDetailsWithHttpMessagesAsync(System.Guid customerId, System.Guid platformId, string acceptLanguage = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// GetCustomerMeterUsages (beta)
/// </summary>
/// <remarks>
/// Get meter usages for a given customer/platform.
/// </remarks>
/// <param name='customerId'>
/// </param>
/// <param name='platformId'>
/// </param>
/// <param name='acceptLanguage'>
/// Specify language (and culture) following [RFC 7231, section 5.3.5:
/// Accept-Language].
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
Task<HttpOperationResponse<CustomerPlatformMeterUsagesDto>> GetCustomerMeterUsagesWithHttpMessagesAsync(System.Guid customerId, System.Guid platformId, string acceptLanguage = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// GetCustomers (beta)
/// </summary>
Expand Down Expand Up @@ -326,6 +370,28 @@ public partial interface IServiceProviderService : System.IDisposable
/// </param>
Task<HttpOperationResponse<Subscriptions>> GetCustomerSubscriptionsWithHttpMessagesAsync(System.Guid customerId, string acceptLanguage = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// GetCustomerSubscriptionMeters
/// </summary>
/// <remarks>
/// Get the list of subscriptions meters for one of your customers.
/// </remarks>
/// <param name='customerId'>
/// </param>
/// <param name='platformId'>
/// </param>
/// <param name='acceptLanguage'>
/// Specify language (and culture) following [RFC 7231, section 5.3.5:
/// Accept-Language].
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
Task<HttpOperationResponse<CustomerSubscriptionMetersDto>> GetCustomerSubscriptionMetersWithHttpMessagesAsync(System.Guid customerId, System.Guid platformId, string acceptLanguage = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// GetCustomerSubscriptionsDetails (beta)
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public CartItemsCannotBeEmptyProblemDetails()
/// information if dereferenced.</param>
/// <param name="extensions">Gets the
/// System.Collections.Generic.IDictionary`2 for extension members.
/// &lt;br&gt;
///
///
/// Problem type definitions MAY extend the problem details object with
/// additional members.
/// Extension members appear in the same namespace as other members of
Expand Down Expand Up @@ -113,7 +114,8 @@ public CartItemsCannotBeEmptyProblemDetails()
/// <summary>
/// Gets the System.Collections.Generic.IDictionary`2 for extension
/// members.
/// &amp;lt;br&amp;gt;
///
///
/// Problem type definitions MAY extend the problem details object with
/// additional members.
/// Extension members appear in the same namespace as other members of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ public CatalogItem()
/// An open commitment term means it is not tied to a commitment
/// period.
/// Possible values: monthly, yearly, biennial, triennial, open</param>
public CatalogItem(string sku, IList<Translation> name, IList<Translation> description, string vendor, string billingCycle, string commitmentTerm)
public CatalogItem(string sku, IList<Translation> name, IList<Translation> description, string billingCycle, string commitmentTerm)
{
Sku = sku;
Name = name;
Description = description;
Vendor = vendor;
BillingCycle = billingCycle;
CommitmentTerm = commitmentTerm;
CustomInit();
Expand All @@ -66,11 +65,6 @@ public CatalogItem(string sku, IList<Translation> name, IList<Translation> descr
[JsonProperty(PropertyName = "description")]
public IList<Translation> Description { get; set; }

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "vendor")]
public string Vendor { get; set; }

/// <summary>
/// Gets or sets a billing cycle, also referred to as a billing period,
/// is the interval of time between billing statements.
Expand Down Expand Up @@ -111,10 +105,6 @@ public virtual void Validate()
{
throw new ValidationException(ValidationRules.CannotBeNull, "Description");
}
if (Vendor == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Vendor");
}
if (BillingCycle == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "BillingCycle");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public CommitmentTermViolationsProblemDetails()
/// information if dereferenced.</param>
/// <param name="extensions">Gets the
/// System.Collections.Generic.IDictionary`2 for extension members.
/// &lt;br&gt;
///
///
/// Problem type definitions MAY extend the problem details object with
/// additional members.
/// Extension members appear in the same namespace as other members of
Expand Down Expand Up @@ -117,7 +118,8 @@ public CommitmentTermViolationsProblemDetails()
/// <summary>
/// Gets the System.Collections.Generic.IDictionary`2 for extension
/// members.
/// &amp;lt;br&amp;gt;
///
///
/// Problem type definitions MAY extend the problem details object with
/// additional members.
/// Extension members appear in the same namespace as other members of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public CustomerFreeTrialAlreadyExpiredProblemDetails()
/// information if dereferenced.</param>
/// <param name="extensions">Gets the
/// System.Collections.Generic.IDictionary`2 for extension members.
/// &lt;br&gt;
///
///
/// Problem type definitions MAY extend the problem details object with
/// additional members.
/// Extension members appear in the same namespace as other members of
Expand Down Expand Up @@ -113,7 +114,8 @@ public CustomerFreeTrialAlreadyExpiredProblemDetails()
/// <summary>
/// Gets the System.Collections.Generic.IDictionary`2 for extension
/// members.
/// &amp;lt;br&amp;gt;
///
///
/// Problem type definitions MAY extend the problem details object with
/// additional members.
/// Extension members appear in the same namespace as other members of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public CustomerNotFoundProblemDetails()
/// information if dereferenced.</param>
/// <param name="extensions">Gets the
/// System.Collections.Generic.IDictionary`2 for extension members.
/// &lt;br&gt;
///
///
/// Problem type definitions MAY extend the problem details object with
/// additional members.
/// Extension members appear in the same namespace as other members of
Expand Down Expand Up @@ -113,7 +114,8 @@ public CustomerNotFoundProblemDetails()
/// <summary>
/// Gets the System.Collections.Generic.IDictionary`2 for extension
/// members.
/// &amp;lt;br&amp;gt;
///
///
/// Problem type definitions MAY extend the problem details object with
/// additional members.
/// Extension members appear in the same namespace as other members of
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Sherweb.Apis.ServiceProvider.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;

public partial class CustomerPlatformDetailsDto
{
/// <summary>
/// Initializes a new instance of the CustomerPlatformDetailsDto class.
/// </summary>
public CustomerPlatformDetailsDto()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the CustomerPlatformDetailsDto class.
/// </summary>
public CustomerPlatformDetailsDto(System.Guid customerId, PlatformDetailsDto platformDetails)
{
CustomerId = customerId;
PlatformDetails = platformDetails;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "customerId")]
public System.Guid CustomerId { get; set; }

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "platformDetails")]
public PlatformDetailsDto PlatformDetails { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (PlatformDetails == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "PlatformDetails");
}
if (PlatformDetails != null)
{
PlatformDetails.Validate();
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Sherweb.Apis.ServiceProvider.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

public partial class CustomerPlatformMeterUsagesDto
{
/// <summary>
/// Initializes a new instance of the CustomerPlatformMeterUsagesDto
/// class.
/// </summary>
public CustomerPlatformMeterUsagesDto()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the CustomerPlatformMeterUsagesDto
/// class.
/// </summary>
public CustomerPlatformMeterUsagesDto(System.Guid customerId, System.Guid platformId, IList<MeterUsageDto> meterUsages)
{
CustomerId = customerId;
PlatformId = platformId;
MeterUsages = meterUsages;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "customerId")]
public System.Guid CustomerId { get; set; }

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "platformId")]
public System.Guid PlatformId { get; set; }

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "meterUsages")]
public IList<MeterUsageDto> MeterUsages { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (MeterUsages == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "MeterUsages");
}
if (MeterUsages != null)
{
foreach (var element in MeterUsages)
{
if (element != null)
{
element.Validate();
}
}
}
}
}
}
Loading

0 comments on commit aaaee86

Please sign in to comment.