Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ProductData on SessionLineItemPriceDataOptions #2057

Merged
merged 1 commit into from
May 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ public class SessionLineItemPriceDataOptions : INestedOptions
[JsonProperty("product")]
public string Product { get; set; }

/// <summary>
/// Data used to generate a new product object inline.
/// </summary>
[JsonProperty("product_data")]
public SessionLineItemPriceDataProductDataOptions ProductData { get; set; }

/// <summary>
/// The recurring components of a price such as its interval.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;

public class SessionLineItemPriceDataProductDataOptions : INestedOptions, IHasMetadata
{
/// <summary>
/// Set of key-value pairs that you can attach to an object. This can be useful for storing
/// additional information about the object in a structured format.
/// </summary>
[JsonProperty("description")]
public string Description { get; set; }

/// <summary>
/// A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
/// </summary>
[JsonProperty("images")]
public List<string> Images { get; set; }

/// <summary>
/// Set of key-value pairs that you can attach to an object. This can be useful for storing
/// additional information about the object in a structured format.
/// </summary>
[JsonProperty("metadata")]
public Dictionary<string, string> Metadata { get; set; }

/// <summary>
/// The product’s name, meant to be displayable to the customer. Whenever this product is
/// sold via a subscription, name will show up on associated invoice line item descriptions.
/// </summary>
[JsonProperty("name")]
public string Name { get; set; }
}
}