Skip to content

Commit 7fad34a

Browse files
committed
Add support for ProductData on SessionLineItemPriceDataOptions
1 parent 2fd1293 commit 7fad34a

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

src/Stripe.net/Services/Checkout/Sessions/SessionLineItemPriceDataOptions.cs

+6
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ public class SessionLineItemPriceDataOptions : INestedOptions
1818
[JsonProperty("product")]
1919
public string Product { get; set; }
2020

21+
/// <summary>
22+
/// Data used to generate a new product object inline.
23+
/// </summary>
24+
[JsonProperty("product_data")]
25+
public SessionLineItemPriceDataProductDataOptions ProductData { get; set; }
26+
2127
/// <summary>
2228
/// The recurring components of a price such as its interval.
2329
/// </summary>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
namespace Stripe
2+
{
3+
using System.Collections.Generic;
4+
using Newtonsoft.Json;
5+
6+
public class SessionLineItemPriceDataProductDataOptions : INestedOptions, IHasId, IHasMetadata
7+
{
8+
/// <summary>
9+
/// Set of key-value pairs that you can attach to an object. This can be useful for storing
10+
/// additional information about the object in a structured format.
11+
/// </summary>
12+
[JsonProperty("description")]
13+
public Dictionary<string, string> Description { get; set; }
14+
15+
/// <summary>
16+
/// A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
17+
/// </summary>
18+
[JsonProperty("images")]
19+
public List<string> Images { get; set; }
20+
21+
/// <summary>
22+
/// Set of key-value pairs that you can attach to an object. This can be useful for storing
23+
/// additional information about the object in a structured format.
24+
/// </summary>
25+
[JsonProperty("metadata")]
26+
public Dictionary<string, string> Metadata { get; set; }
27+
28+
/// <summary>
29+
/// The product’s name, meant to be displayable to the customer. Whenever this product is
30+
/// sold via a subscription, name will show up on associated invoice line item descriptions.
31+
/// </summary>
32+
[JsonProperty("name")]
33+
public string Name { get; set; }
34+
}
35+
}

0 commit comments

Comments
 (0)