-
Notifications
You must be signed in to change notification settings - Fork 566
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update generated code using latest spec
- Loading branch information
1 parent
0c1549d
commit d466310
Showing
20 changed files
with
221 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v938 | ||
v940 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
src/Stripe.net/Entities/Invoices/InvoiceRenderingOptions.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// File generated from our OpenAPI spec | ||
namespace Stripe | ||
{ | ||
using Newtonsoft.Json; | ||
|
||
/// <summary> | ||
/// A product_feature represents an attachment between a feature and a product. When a | ||
/// product is purchased that has a feature attached, Stripe will create an entitlement to | ||
/// the feature for the purchasing customer. | ||
/// </summary> | ||
public class ProductFeature : StripeEntity<ProductFeature>, IHasId, IHasObject | ||
{ | ||
/// <summary> | ||
/// Unique identifier for the object. | ||
/// </summary> | ||
[JsonProperty("id")] | ||
public string Id { get; set; } | ||
|
||
/// <summary> | ||
/// String representing the object's type. Objects of the same type share the same value. | ||
/// </summary> | ||
[JsonProperty("object")] | ||
public string Object { get; set; } | ||
|
||
/// <summary> | ||
/// Whether this object is deleted or not. | ||
/// </summary> | ||
[JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)] | ||
public bool? Deleted { get; set; } | ||
|
||
/// <summary> | ||
/// A feature represents a monetizable ability or functionality in your system. Features can | ||
/// be assigned to products, and when those products are purchased, Stripe will create an | ||
/// entitlement to the feature for the purchasing customer. | ||
/// </summary> | ||
[JsonProperty("entitlement_feature")] | ||
public Entitlements.Feature EntitlementFeature { get; set; } | ||
|
||
/// <summary> | ||
/// Has the value <c>true</c> if the object exists in live mode or the value <c>false</c> if | ||
/// the object exists in test mode. | ||
/// </summary> | ||
[JsonProperty("livemode")] | ||
public bool Livemode { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/Stripe.net/Services/ProductFeatures/ProductFeatureCreateOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// File generated from our OpenAPI spec | ||
namespace Stripe | ||
{ | ||
using Newtonsoft.Json; | ||
|
||
public class ProductFeatureCreateOptions : BaseOptions | ||
{ | ||
/// <summary> | ||
/// The ID of the <a href="docs/api/entitlements/feature">Feature</a> object attached to | ||
/// this product. | ||
/// </summary> | ||
[JsonProperty("entitlement_feature")] | ||
public string EntitlementFeature { get; set; } | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/Stripe.net/Services/ProductFeatures/ProductFeatureDeleteOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// File generated from our OpenAPI spec | ||
namespace Stripe | ||
{ | ||
public class ProductFeatureDeleteOptions : BaseOptions | ||
{ | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/Stripe.net/Services/ProductFeatures/ProductFeatureGetOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// File generated from our OpenAPI spec | ||
namespace Stripe | ||
{ | ||
public class ProductFeatureGetOptions : BaseOptions | ||
{ | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/Stripe.net/Services/ProductFeatures/ProductFeatureListOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// File generated from our OpenAPI spec | ||
namespace Stripe | ||
{ | ||
public class ProductFeatureListOptions : ListOptions | ||
{ | ||
} | ||
} |
108 changes: 108 additions & 0 deletions
108
src/Stripe.net/Services/ProductFeatures/ProductFeatureService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
// File generated from our OpenAPI spec | ||
namespace Stripe | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Net.Http; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
public class ProductFeatureService : ServiceNested<ProductFeature>, | ||
INestedCreatable<ProductFeature, ProductFeatureCreateOptions>, | ||
INestedDeletable<ProductFeature, ProductFeatureDeleteOptions>, | ||
INestedListable<ProductFeature, ProductFeatureListOptions>, | ||
INestedRetrievable<ProductFeature, ProductFeatureGetOptions> | ||
{ | ||
public ProductFeatureService() | ||
{ | ||
} | ||
|
||
public ProductFeatureService(IStripeClient client) | ||
: base(client) | ||
{ | ||
} | ||
|
||
[Obsolete("This member is deprecated and will be removed in a future release")] | ||
public override string BasePath => "/v1/products/{PARENT_ID}/features"; | ||
|
||
/// <summary> | ||
/// <p>Creates a product_feature, which represents a feature attachment to a product</p>. | ||
/// </summary> | ||
public virtual ProductFeature Create(string parentId, ProductFeatureCreateOptions options = null, RequestOptions requestOptions = null) | ||
{ | ||
return this.Request<ProductFeature>(HttpMethod.Post, $"/v1/products/{parentId}/features", options, requestOptions); | ||
} | ||
|
||
/// <summary> | ||
/// <p>Creates a product_feature, which represents a feature attachment to a product</p>. | ||
/// </summary> | ||
public virtual Task<ProductFeature> CreateAsync(string parentId, ProductFeatureCreateOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) | ||
{ | ||
return this.RequestAsync<ProductFeature>(HttpMethod.Post, $"/v1/products/{parentId}/features", options, requestOptions, cancellationToken); | ||
} | ||
|
||
/// <summary> | ||
/// <p>Deletes the feature attachment to a product</p>. | ||
/// </summary> | ||
public virtual ProductFeature Delete(string parentId, string id, ProductFeatureDeleteOptions options = null, RequestOptions requestOptions = null) | ||
{ | ||
return this.Request<ProductFeature>(HttpMethod.Delete, $"/v1/products/{parentId}/features/{id}", options, requestOptions); | ||
} | ||
|
||
/// <summary> | ||
/// <p>Deletes the feature attachment to a product</p>. | ||
/// </summary> | ||
public virtual Task<ProductFeature> DeleteAsync(string parentId, string id, ProductFeatureDeleteOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) | ||
{ | ||
return this.RequestAsync<ProductFeature>(HttpMethod.Delete, $"/v1/products/{parentId}/features/{id}", options, requestOptions, cancellationToken); | ||
} | ||
|
||
/// <summary> | ||
/// <p>Retrieves a product_feature, which represents a feature attachment to a product</p>. | ||
/// </summary> | ||
public virtual ProductFeature Get(string parentId, string id, ProductFeatureGetOptions options = null, RequestOptions requestOptions = null) | ||
{ | ||
return this.Request<ProductFeature>(HttpMethod.Get, $"/v1/products/{parentId}/features/{id}", options, requestOptions); | ||
} | ||
|
||
/// <summary> | ||
/// <p>Retrieves a product_feature, which represents a feature attachment to a product</p>. | ||
/// </summary> | ||
public virtual Task<ProductFeature> GetAsync(string parentId, string id, ProductFeatureGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) | ||
{ | ||
return this.RequestAsync<ProductFeature>(HttpMethod.Get, $"/v1/products/{parentId}/features/{id}", options, requestOptions, cancellationToken); | ||
} | ||
|
||
/// <summary> | ||
/// <p>Retrieve a list of features for a product</p>. | ||
/// </summary> | ||
public virtual StripeList<ProductFeature> List(string parentId, ProductFeatureListOptions options = null, RequestOptions requestOptions = null) | ||
{ | ||
return this.Request<StripeList<ProductFeature>>(HttpMethod.Get, $"/v1/products/{parentId}/features", options, requestOptions); | ||
} | ||
|
||
/// <summary> | ||
/// <p>Retrieve a list of features for a product</p>. | ||
/// </summary> | ||
public virtual Task<StripeList<ProductFeature>> ListAsync(string parentId, ProductFeatureListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) | ||
{ | ||
return this.RequestAsync<StripeList<ProductFeature>>(HttpMethod.Get, $"/v1/products/{parentId}/features", options, requestOptions, cancellationToken); | ||
} | ||
|
||
/// <summary> | ||
/// <p>Retrieve a list of features for a product</p>. | ||
/// </summary> | ||
public virtual IEnumerable<ProductFeature> ListAutoPaging(string parentId, ProductFeatureListOptions options = null, RequestOptions requestOptions = null) | ||
{ | ||
return this.ListRequestAutoPaging<ProductFeature>($"/v1/products/{parentId}/features", options, requestOptions); | ||
} | ||
|
||
/// <summary> | ||
/// <p>Retrieve a list of features for a product</p>. | ||
/// </summary> | ||
public virtual IAsyncEnumerable<ProductFeature> ListAutoPagingAsync(string parentId, ProductFeatureListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) | ||
{ | ||
return this.ListRequestAutoPagingAsync<ProductFeature>($"/v1/products/{parentId}/features", options, requestOptions, cancellationToken); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.