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

API Updates #2528

Merged
merged 1 commit into from
Jul 7, 2022
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
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v162
v163
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,43 @@ namespace Stripe.Checkout
public class SessionCustomerDetails : StripeEntity<SessionCustomerDetails>
{
/// <summary>
/// The customer's address at the time of checkout. Note: This property is populated only
/// for sessions on or after March 30, 2022.
/// The customer's address after a completed Checkout Session. Note: This property is
/// populated only for sessions on or after March 30, 2022.
/// </summary>
[JsonProperty("address")]
public Address Address { get; set; }

/// <summary>
/// The email associated with the Customer, if one exists, on the Checkout Session at the
/// time of checkout or at time of session expiry. Otherwise, if the customer has consented
/// to promotional content, this value is the most recent valid email provided by the
/// customer on the Checkout form.
/// The email associated with the Customer, if one exists, on the Checkout Session after a
/// completed Checkout Session or at time of session expiry. Otherwise, if the customer has
/// consented to promotional content, this value is the most recent valid email provided by
/// the customer on the Checkout form.
/// </summary>
[JsonProperty("email")]
public string Email { get; set; }

/// <summary>
/// The customer's name at the time of checkout. Note: This property is populated only for
/// sessions on or after March 30, 2022.
/// The customer's name after a completed Checkout Session. Note: This property is populated
/// only for sessions on or after March 30, 2022.
/// </summary>
[JsonProperty("name")]
public string Name { get; set; }

/// <summary>
/// The customer's phone number at the time of checkout.
/// The customer's phone number after a completed Checkout Session.
/// </summary>
[JsonProperty("phone")]
public string Phone { get; set; }

/// <summary>
/// The customer’s tax exempt status at time of checkout.
/// The customer’s tax exempt status after a completed Checkout Session.
/// One of: <c>exempt</c>, <c>none</c>, or <c>reverse</c>.
/// </summary>
[JsonProperty("tax_exempt")]
public string TaxExempt { get; set; }

/// <summary>
/// The customer’s tax IDs at time of checkout.
/// The customer’s tax IDs after a completed Checkout Session.
/// </summary>
[JsonProperty("tax_ids")]
public List<SessionCustomerDetailsTaxId> TaxIds { get; set; }
Expand Down
8 changes: 8 additions & 0 deletions src/Stripe.net/Entities/Coupons/Coupon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ public class Coupon : StripeEntity<Coupon>, IHasId, IHasMetadata, IHasObject
[JsonProperty("currency")]
public string Currency { get; set; }

/// <summary>
/// Coupons defined in each available currency option. Each key must be a three-letter <a
/// href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a> and a <a
/// href="https://stripe.com/docs/currencies">supported currency</a>.
/// </summary>
[JsonProperty("currency_options")]
public Dictionary<string, CouponCurrencyOptions> CurrencyOptions { get; set; }

/// <summary>
/// Whether this object is deleted or not.
/// </summary>
Expand Down
15 changes: 15 additions & 0 deletions src/Stripe.net/Entities/Coupons/CouponCurrencyOptions.cs
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 CouponCurrencyOptions : StripeEntity<CouponCurrencyOptions>
{
/// <summary>
/// Amount (in the <c>currency</c> specified) that will be taken off the subtotal of any
/// invoices for this customer.
/// </summary>
[JsonProperty("amount_off")]
public long AmountOff { get; set; }
}
}
8 changes: 8 additions & 0 deletions src/Stripe.net/Entities/Prices/Price.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ public class Price : StripeEntity<Price>, IHasId, IHasMetadata, IHasObject
[JsonProperty("currency")]
public string Currency { get; set; }

/// <summary>
/// Prices defined in each available currency option. Each key must be a three-letter <a
/// href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a> and a <a
/// href="https://stripe.com/docs/currencies">supported currency</a>.
/// </summary>
[JsonProperty("currency_options")]
public Dictionary<string, PriceCurrencyOptions> CurrencyOptions { get; set; }

/// <summary>
/// When set, provides configuration for the amount to be adjusted by the customer during
/// Checkout Sessions and Payment Links.
Expand Down
46 changes: 46 additions & 0 deletions src/Stripe.net/Entities/Prices/PriceCurrencyOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;

public class PriceCurrencyOptions : StripeEntity<PriceCurrencyOptions>
{
/// <summary>
/// When set, provides configuration for the amount to be adjusted by the customer during
/// Checkout Sessions and Payment Links.
/// </summary>
[JsonProperty("custom_unit_amount")]
public PriceCurrencyOptionsCustomUnitAmount CustomUnitAmount { get; set; }

/// <summary>
/// Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One
/// of <c>inclusive</c>, <c>exclusive</c>, or <c>unspecified</c>. Once specified as either
/// <c>inclusive</c> or <c>exclusive</c>, it cannot be changed.
/// One of: <c>exclusive</c>, <c>inclusive</c>, or <c>unspecified</c>.
/// </summary>
[JsonProperty("tax_behavior")]
public string TaxBehavior { get; set; }

/// <summary>
/// Each element represents a pricing tier. This parameter requires <c>billing_scheme</c> to
/// be set to <c>tiered</c>. See also the documentation for <c>billing_scheme</c>.
/// </summary>
[JsonProperty("tiers")]
public List<PriceCurrencyOptionsTier> Tiers { get; set; }

/// <summary>
/// The unit amount in %s to be charged, represented as a whole integer if possible. Only
/// set if <c>billing_scheme=per_unit</c>.
/// </summary>
[JsonProperty("unit_amount")]
public long? UnitAmount { get; set; }

/// <summary>
/// The unit amount in %s to be charged, represented as a decimal string with at most 12
/// decimal places. Only set if <c>billing_scheme=per_unit</c>.
/// </summary>
[JsonProperty("unit_amount_decimal")]
public decimal? UnitAmountDecimal { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class PriceCurrencyOptionsCustomUnitAmount : StripeEntity<PriceCurrencyOptionsCustomUnitAmount>
{
/// <summary>
/// The maximum unit amount the customer can specify for this item.
/// </summary>
[JsonProperty("maximum")]
public long? Maximum { get; set; }

/// <summary>
/// The minimum unit amount the customer can specify for this item. Must be at least the
/// minimum charge amount.
/// </summary>
[JsonProperty("minimum")]
public long? Minimum { get; set; }

/// <summary>
/// The starting unit amount which can be updated by the customer.
/// </summary>
[JsonProperty("preset")]
public long? Preset { get; set; }
}
}
38 changes: 38 additions & 0 deletions src/Stripe.net/Entities/Prices/PriceCurrencyOptionsTier.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class PriceCurrencyOptionsTier : StripeEntity<PriceCurrencyOptionsTier>
{
/// <summary>
/// Price for the entire tier.
/// </summary>
[JsonProperty("flat_amount")]
public long? FlatAmount { get; set; }

/// <summary>
/// Same as <c>flat_amount</c>, but contains a decimal value with at most 12 decimal places.
/// </summary>
[JsonProperty("flat_amount_decimal")]
public decimal? FlatAmountDecimal { get; set; }

/// <summary>
/// Per unit price for units relevant to the tier.
/// </summary>
[JsonProperty("unit_amount")]
public long? UnitAmount { get; set; }

/// <summary>
/// Same as <c>unit_amount</c>, but contains a decimal value with at most 12 decimal places.
/// </summary>
[JsonProperty("unit_amount_decimal")]
public decimal? UnitAmountDecimal { get; set; }

/// <summary>
/// Up to and including to this quantity will be contained in the tier.
/// </summary>
[JsonProperty("up_to")]
public long? UpTo { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;

public class PromotionCodeRestrictions : StripeEntity<PromotionCodeRestrictions>
{
/// <summary>
/// Promotion code restrictions defined in each available currency option. Each key must be
/// a three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
/// code</a> and a <a href="https://stripe.com/docs/currencies">supported currency</a>.
/// </summary>
[JsonProperty("currency_options")]
public Dictionary<string, PromotionCodeRestrictionsCurrencyOptions> CurrencyOptions { get; set; }

/// <summary>
/// A Boolean indicating if the Promotion Code should only be redeemed for Customers without
/// any successful payments or invoices.
Expand Down
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 PromotionCodeRestrictionsCurrencyOptions : StripeEntity<PromotionCodeRestrictionsCurrencyOptions>
{
/// <summary>
/// Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase
/// must be $100 or more to work).
/// </summary>
[JsonProperty("minimum_amount")]
public long MinimumAmount { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;

public class ShippingRateFixedAmount : StripeEntity<ShippingRateFixedAmount>
Expand All @@ -18,5 +19,13 @@ public class ShippingRateFixedAmount : StripeEntity<ShippingRateFixedAmount>
/// </summary>
[JsonProperty("currency")]
public string Currency { get; set; }

/// <summary>
/// Shipping rates defined in each available currency option. Each key must be a
/// three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
/// code</a> and a <a href="https://stripe.com/docs/currencies">supported currency</a>.
/// </summary>
[JsonProperty("currency_options")]
public Dictionary<string, ShippingRateFixedAmountCurrencyOptions> CurrencyOptions { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class ShippingRateFixedAmountCurrencyOptions : StripeEntity<ShippingRateFixedAmountCurrencyOptions>
{
/// <summary>
/// A non-negative integer in cents representing how much to charge.
/// </summary>
[JsonProperty("amount")]
public long Amount { get; set; }

/// <summary>
/// Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One
/// of <c>inclusive</c>, <c>exclusive</c>, or <c>unspecified</c>.
/// One of: <c>exclusive</c>, <c>inclusive</c>, or <c>unspecified</c>.
/// </summary>
[JsonProperty("tax_behavior")]
public string TaxBehavior { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ public Coupon Coupon
internal ExpandableField<Coupon> InternalCoupon { get; set; }
#endregion

/// <summary>
/// Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
/// code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
/// currency</a>.
/// </summary>
[JsonProperty("currency")]
public string Currency { get; set; }

#region Expandable DefaultPaymentMethod

/// <summary>
Expand Down
8 changes: 8 additions & 0 deletions src/Stripe.net/Entities/Subscriptions/Subscription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ public Application Application
[JsonConverter(typeof(UnixDateTimeConverter))]
public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;

/// <summary>
/// Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
/// code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
/// currency</a>.
/// </summary>
[JsonProperty("currency")]
public string Currency { get; set; }

/// <summary>
/// End of the current period that the subscription has been invoiced for. At the end of
/// this period, a new invoice will be created.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata
[JsonProperty("consent_collection")]
public SessionConsentCollectionOptions ConsentCollection { get; set; }

/// <summary>
/// Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
/// code</a>, in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported
/// currency</a>.
/// </summary>
[JsonProperty("currency")]
public string Currency { get; set; }

/// <summary>
/// ID of an existing Customer, if one exists. In <c>payment</c> mode, the customer’s most
/// recent card payment method will be used to prefill the email, name, card details, and
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// File generated from our OpenAPI spec
namespace Stripe.Checkout
{
using Newtonsoft.Json;

public class SessionShippingOptionShippingRateDataFixedAmountCurrencyOptionsOptions : INestedOptions
{
/// <summary>
/// A non-negative integer in cents representing how much to charge.
/// </summary>
[JsonProperty("amount")]
public long? Amount { get; set; }

/// <summary>
/// Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One
/// of <c>inclusive</c>, <c>exclusive</c>, or <c>unspecified</c>.
/// One of: <c>exclusive</c>, <c>inclusive</c>, or <c>unspecified</c>.
/// </summary>
[JsonProperty("tax_behavior")]
public string TaxBehavior { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// File generated from our OpenAPI spec
namespace Stripe.Checkout
{
using System.Collections.Generic;
using Newtonsoft.Json;

public class SessionShippingOptionShippingRateDataFixedAmountOptions : INestedOptions
Expand All @@ -18,5 +19,13 @@ public class SessionShippingOptionShippingRateDataFixedAmountOptions : INestedOp
/// </summary>
[JsonProperty("currency")]
public string Currency { get; set; }

/// <summary>
/// Shipping rates defined in each available currency option. Each key must be a
/// three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
/// code</a> and a <a href="https://stripe.com/docs/currencies">supported currency</a>.
/// </summary>
[JsonProperty("currency_options")]
public Dictionary<string, SessionShippingOptionShippingRateDataFixedAmountCurrencyOptionsOptions> CurrencyOptions { get; set; }
}
}
Loading