Skip to content

Commit

Permalink
Added new() constraint to options generic types. (#1890)
Browse files Browse the repository at this point in the history
  • Loading branch information
clement911 authored and ob-stripe committed Dec 24, 2019
1 parent e31b359 commit e881806
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Stripe.net/Services/_interfaces/ICreatable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Stripe

public interface ICreatable<TEntity, TOptions>
where TEntity : IStripeEntity
where TOptions : BaseOptions
where TOptions : BaseOptions, new()
{
TEntity Create(TOptions createOptions, RequestOptions requestOptions = null);

Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.net/Services/_interfaces/IListable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Stripe

public interface IListable<TEntity, TOptions>
where TEntity : IStripeEntity, IHasId
where TOptions : ListOptions
where TOptions : ListOptions, new()
{
StripeList<TEntity> List(TOptions listOptions = null, RequestOptions requestOptions = null);

Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.net/Services/_interfaces/INestedCreatable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Stripe

public interface INestedCreatable<TEntity, TOptions>
where TEntity : IStripeEntity
where TOptions : BaseOptions
where TOptions : BaseOptions, new()
{
TEntity Create(string parentId, TOptions createOptions, RequestOptions requestOptions = null);

Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.net/Services/_interfaces/INestedListable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Stripe

public interface INestedListable<TEntity, TOptions>
where TEntity : IStripeEntity, IHasId
where TOptions : ListOptions
where TOptions : ListOptions, new()
{
StripeList<TEntity> List(string parentId, TOptions listOptions = null, RequestOptions requestOptions = null);

Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.net/Services/_interfaces/INestedRetrievable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Stripe

public interface INestedRetrievable<TEntity, TOptions>
where TEntity : IStripeEntity, IHasId
where TOptions : BaseOptions
where TOptions : BaseOptions, new()
{
TEntity Get(string parentId, string id, TOptions retrieveOptions, RequestOptions requestOptions = null);

Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.net/Services/_interfaces/INestedUpdatable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Stripe

public interface INestedUpdatable<TEntity, TOptions>
where TEntity : IStripeEntity, IHasId
where TOptions : BaseOptions
where TOptions : BaseOptions, new()
{
TEntity Update(string parentId, string id, TOptions updateOptions, RequestOptions requestOptions = null);

Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.net/Services/_interfaces/IRetrievable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Stripe

public interface IRetrievable<TEntity, TOptions>
where TEntity : IStripeEntity, IHasId
where TOptions : BaseOptions
where TOptions : BaseOptions, new()
{
TEntity Get(string id, TOptions retrieveOptions, RequestOptions requestOptions = null);

Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.net/Services/_interfaces/IUpdatable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Stripe

public interface IUpdatable<TEntity, TOptions>
where TEntity : IStripeEntity, IHasId
where TOptions : BaseOptions
where TOptions : BaseOptions, new()
{
TEntity Update(string id, TOptions updateOptions, RequestOptions requestOptions = null);

Expand Down

0 comments on commit e881806

Please sign in to comment.