Skip to content
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 CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2feaeea9e3c2b01dd5b7e4092d8364af4bf1e740
9e950cbf7b5a814a98f27d1a94b72cd6f1df2078
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2190
v2202
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
[![Build Status](https://github.com/stripe/stripe-dotnet/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-dotnet/actions?query=branch%3Amaster)
[![Coverage Status](https://coveralls.io/repos/github/stripe/stripe-dotnet/badge.svg?branch=master)](https://coveralls.io/github/stripe/stripe-dotnet?branch=master)

> [!TIP]
> Want to chat live with Stripe engineers? Join us on our [Discord server](https://stripe.com/go/discord/dotnet).

The official [Stripe][stripe] .NET library, supporting .NET Standard 2.0+, .NET Core 5+, and .NET Framework 4.6.2+.

## Installation
Expand Down
26 changes: 26 additions & 0 deletions src/Stripe.net/Entities/Checkout/Sessions/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,22 @@ public class Session : StripeEntity<Session>, IHasId, IHasMetadata, IHasObject
#endif
public long? AmountTotal { get; set; }

/// <summary>
/// Determines whether the customer's attempt to pay must be manually approved.
///
/// Default is <c>auto</c>, when the customer's attempt to pay is approved automatically
/// with no action required on your server.
///
/// When set to <c>manual</c>, you must approve the customer's attempt to pay by calling <a
/// href="api/checkout/sessions/approve">approve</a> from your server.
/// One of: <c>auto</c>, or <c>manual</c>.
/// </summary>
[JsonProperty("approval_method")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("approval_method")]
#endif
public string ApprovalMethod { get; set; }

[JsonProperty("automatic_tax")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("automatic_tax")]
Expand Down Expand Up @@ -220,6 +236,16 @@ public class Session : StripeEntity<Session>, IHasId, IHasMetadata, IHasObject
#endif
public SessionCurrencyConversion CurrencyConversion { get; set; }

/// <summary>
/// The customer's pending attempt to pay that requires your approval. Contains information
/// about the customer and their payment details.
/// </summary>
[JsonProperty("current_attempt")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("current_attempt")]
#endif
public SessionCurrentAttempt CurrentAttempt { get; set; }

/// <summary>
/// Collect additional information from your customer using custom fields. Up to 3 fields
/// are supported. You can't set this parameter if <c>ui_mode</c> is <c>custom</c>.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// File generated from our OpenAPI spec
namespace Stripe.Checkout
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class SessionCurrentAttempt : StripeEntity<SessionCurrentAttempt>, IHasId
{
/// <summary>
/// The customer's billing information, if provided.
/// </summary>
[JsonProperty("billing_details")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("billing_details")]
#endif
public SessionCurrentAttemptBillingDetails BillingDetails { get; set; }

/// <summary>
/// The customer's email.
/// </summary>
[JsonProperty("email")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("email")]
#endif
public string Email { get; set; }

/// <summary>
/// The attempt ID you will pass to the <a href="api/checkout/sessions/approve">Checkout
/// Session approve</a> endpoint to approve the attempt.
/// </summary>
[JsonProperty("id")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("id")]
#endif
public string Id { get; set; }

/// <summary>
/// Information about the payment method the customer is attempting to pay with.
/// </summary>
[JsonProperty("payment_method_details")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("payment_method_details")]
#endif
public SessionCurrentAttemptPaymentMethodDetails PaymentMethodDetails { get; set; }

/// <summary>
/// The customer's phone number.
/// </summary>
[JsonProperty("phone")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("phone")]
#endif
public string Phone { get; set; }

/// <summary>
/// The customer's shipping information, if provided.
/// </summary>
[JsonProperty("shipping_details")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("shipping_details")]
#endif
public SessionCurrentAttemptShippingDetails ShippingDetails { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// File generated from our OpenAPI spec
namespace Stripe.Checkout
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class SessionCurrentAttemptBillingDetails : StripeEntity<SessionCurrentAttemptBillingDetails>
{
[JsonProperty("address")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("address")]
#endif
public Address Address { get; set; }

/// <summary>
/// Customer name.
/// </summary>
[JsonProperty("name")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("name")]
#endif
public string Name { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// File generated from our OpenAPI spec
namespace Stripe.Checkout
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class SessionCurrentAttemptPaymentMethodDetails : StripeEntity<SessionCurrentAttemptPaymentMethodDetails>
{
/// <summary>
/// Indicates whether this payment method can be shown again to its customer in a checkout
/// flow.
/// One of: <c>always</c>, <c>limited</c>, or <c>unspecified</c>.
/// </summary>
[JsonProperty("allow_redisplay")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("allow_redisplay")]
#endif
public string AllowRedisplay { get; set; }

[JsonProperty("card")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("card")]
#endif
public SessionCurrentAttemptPaymentMethodDetailsCard Card { get; set; }

/// <summary>
/// The type of payment method the customer is attempting to pay with. An additional hash is
/// included in the payment method details with a name matching this value. It contains
/// additional information specific to the payment method type.
/// </summary>
[JsonProperty("type")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("type")]
#endif
public string Type { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
// File generated from our OpenAPI spec
namespace Stripe.Checkout
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class SessionCurrentAttemptPaymentMethodDetailsCard : StripeEntity<SessionCurrentAttemptPaymentMethodDetailsCard>
{
/// <summary>
/// The brand of the card, accounting for customer's brand choice on dual-branded cards.
/// One of: <c>accel</c>, <c>amex</c>, <c>carnet</c>, <c>cartes_bancaires</c>,
/// <c>conecs</c>, <c>diners</c>, <c>discover</c>, <c>eftpos_au</c>, <c>elo</c>,
/// <c>girocard</c>, <c>interac</c>, <c>jcb</c>, <c>link</c>, <c>maestro</c>,
/// <c>mastercard</c>, <c>nyce</c>, <c>pulse</c>, <c>rupay</c>, <c>star</c>,
/// <c>unionpay</c>, <c>unknown</c>, or <c>visa</c>.
/// </summary>
[JsonProperty("brand")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("brand")]
#endif
public string Brand { get; set; }

/// <summary>
/// Two-letter ISO code representing the country of the card. You could use this attribute
/// to get a sense of the international breakdown of cards you've collected.
/// </summary>
[JsonProperty("country")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("country")]
#endif
public string Country { get; set; }

/// <summary>
/// Two-digit number representing the card's expiration month.
/// </summary>
[JsonProperty("exp_month")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("exp_month")]
#endif
public long ExpMonth { get; set; }

/// <summary>
/// Four-digit number representing the card's expiration year.
/// </summary>
[JsonProperty("exp_year")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("exp_year")]
#endif
public long ExpYear { get; set; }

/// <summary>
/// Uniquely identifies this particular card number. You can use this attribute to check
/// whether two customers who’ve signed up with you are using the same card number, for
/// example. For payment methods that tokenize card information (Apple Pay, Google Pay), the
/// tokenized number might be provided instead of the underlying card number.
///
/// <em>As of May 1, 2021, card fingerprint in India for Connect changed to allow two
/// fingerprints for the same card---one for India and one for the rest of the world.</em>.
/// </summary>
[JsonProperty("fingerprint")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("fingerprint")]
#endif
public string Fingerprint { get; set; }

/// <summary>
/// Card funding type. Can be <c>credit</c>, <c>debit</c>, <c>prepaid</c>, or
/// <c>unknown</c>.
/// One of: <c>credit</c>, <c>debit</c>, <c>prepaid</c>, or <c>unknown</c>.
/// </summary>
[JsonProperty("funding")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("funding")]
#endif
public string Funding { get; set; }

/// <summary>
/// Issuer identification number of the card. (For internal use only and not typically
/// available in standard API requests.).
/// </summary>
[JsonProperty("iin")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("iin")]
#endif
public string Iin { get; set; }

/// <summary>
/// The last four digits of the card.
/// </summary>
[JsonProperty("last4")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("last4")]
#endif
public string Last4 { get; set; }

/// <summary>
/// If this Card is part of a card wallet, this contains the details of the card wallet.
/// </summary>
[JsonProperty("wallet")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("wallet")]
#endif
public SessionCurrentAttemptPaymentMethodDetailsCardWallet Wallet { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// File generated from our OpenAPI spec
namespace Stripe.Checkout
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class SessionCurrentAttemptPaymentMethodDetailsCardWallet : StripeEntity<SessionCurrentAttemptPaymentMethodDetailsCardWallet>
{
/// <summary>
/// The type of the wallet, one of <c>amex_express_checkout</c>, <c>apple_pay</c>,
/// <c>google_pay</c>, <c>masterpass</c>, <c>samsung_pay</c>, <c>visa_checkout</c>,
/// <c>meta_pay</c>, or <c>link</c>.
/// One of: <c>amex_express_checkout</c>, <c>apple_pay</c>, <c>google_pay</c>, <c>link</c>,
/// <c>masterpass</c>, <c>meta_pay</c>, <c>samsung_pay</c>, or <c>visa_checkout</c>.
/// </summary>
[JsonProperty("type")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("type")]
#endif
public string Type { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// File generated from our OpenAPI spec
namespace Stripe.Checkout
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class SessionCurrentAttemptShippingDetails : StripeEntity<SessionCurrentAttemptShippingDetails>
{
[JsonProperty("address")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("address")]
#endif
public Address Address { get; set; }

/// <summary>
/// Customer name.
/// </summary>
[JsonProperty("name")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("name")]
#endif
public string Name { get; set; }
}
}
2 changes: 1 addition & 1 deletion src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public List<Discount> Discounts
/// <summary>
/// Array of field names that can't be modified. Attempting to update a frozen field returns
/// an error.
/// One of: <c>pricing</c>, or <c>quantity</c>.
/// One of: <c>discounts</c>, <c>pricing</c>, or <c>quantity</c>.
/// </summary>
[JsonProperty("frozen_fields")]
#if NET6_0_OR_GREATER
Expand Down
Loading
Loading