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 OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2202
v2203
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,11 @@ public class PaymentIntentNextAction : StripeEntity<PaymentIntentNextAction>
[STJS.JsonPropertyName("wechat_pay_redirect_to_ios_app")]
#endif
public PaymentIntentNextActionWechatPayRedirectToIosApp WechatPayRedirectToIosApp { get; set; }

[JsonProperty("crypto_display_details")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("crypto_display_details")]
#endif
public PaymentIntentNextActionCryptoDisplayDetails CryptoDisplayDetails { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class PaymentIntentNextActionCryptoDisplayDetails : StripeEntity<PaymentIntentNextActionCryptoDisplayDetails>
{
[JsonProperty("deposit_addresses")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("deposit_addresses")]
#endif
public PaymentIntentNextActionCryptoDisplayDetailsDepositAddresses DepositAddresses { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class PaymentIntentNextActionCryptoDisplayDetailsDepositAddresses : StripeEntity<PaymentIntentNextActionCryptoDisplayDetailsDepositAddresses>
{
[JsonProperty("base")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("base")]
#endif
public PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesBase Base { get; set; }

[JsonProperty("solana")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("solana")]
#endif
public PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesSolana Solana { get; set; }

[JsonProperty("tempo")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("tempo")]
#endif
public PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesTempo Tempo { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesBase : StripeEntity<PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesBase>
{
/// <summary>
/// Address of the deposit address.
/// </summary>
[JsonProperty("address")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("address")]
#endif
public string Address { get; set; }

/// <summary>
/// The token currencies supported on this network.
/// </summary>
[JsonProperty("supported_tokens")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("supported_tokens")]
#endif
public List<PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesBaseSupportedToken> SupportedTokens { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesBaseSupportedToken : StripeEntity<PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesBaseSupportedToken>
{
/// <summary>
/// The on-chain contract address for the supported token currency on this specific network.
/// </summary>
[JsonProperty("token_contract_address")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("token_contract_address")]
#endif
public string TokenContractAddress { get; set; }

/// <summary>
/// The supported token currency. Supported token currencies include: <c>usdc</c>.
/// </summary>
[JsonProperty("token_currency")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("token_currency")]
#endif
public string TokenCurrency { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesSolana : StripeEntity<PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesSolana>
{
/// <summary>
/// Address of the deposit address.
/// </summary>
[JsonProperty("address")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("address")]
#endif
public string Address { get; set; }

/// <summary>
/// The token currencies supported on this network.
/// </summary>
[JsonProperty("supported_tokens")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("supported_tokens")]
#endif
public List<PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesSolanaSupportedToken> SupportedTokens { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesSolanaSupportedToken : StripeEntity<PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesSolanaSupportedToken>
{
/// <summary>
/// The on-chain contract address for the supported token currency on this specific network.
/// </summary>
[JsonProperty("token_contract_address")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("token_contract_address")]
#endif
public string TokenContractAddress { get; set; }

/// <summary>
/// The supported token currency. Supported token currencies include: <c>usdc</c>.
/// </summary>
[JsonProperty("token_currency")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("token_currency")]
#endif
public string TokenCurrency { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesTempo : StripeEntity<PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesTempo>
{
/// <summary>
/// Address of the deposit address.
/// </summary>
[JsonProperty("address")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("address")]
#endif
public string Address { get; set; }

/// <summary>
/// The token currencies supported on this network.
/// </summary>
[JsonProperty("supported_tokens")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("supported_tokens")]
#endif
public List<PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesTempoSupportedToken> SupportedTokens { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesTempoSupportedToken : StripeEntity<PaymentIntentNextActionCryptoDisplayDetailsDepositAddressesTempoSupportedToken>
{
/// <summary>
/// The on-chain contract address for the supported token currency on this specific network.
/// </summary>
[JsonProperty("token_contract_address")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("token_contract_address")]
#endif
public string TokenContractAddress { get; set; }

/// <summary>
/// The supported token currency. Supported token currencies include: <c>usdc</c>.
/// </summary>
[JsonProperty("token_currency")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("token_currency")]
#endif
public string TokenCurrency { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,21 @@ public class PaymentIntentPaymentMethodOptionsCrypto : StripeEntity<PaymentInten
[STJS.JsonPropertyName("setup_future_usage")]
#endif
public string SetupFutureUsage { get; set; }

[JsonProperty("deposit_options")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("deposit_options")]
#endif
public PaymentIntentPaymentMethodOptionsCryptoDepositOptions DepositOptions { get; set; }

/// <summary>
/// The mode of the crypto payment.
/// One of: <c>default</c>, or <c>deposit</c>.
/// </summary>
[JsonProperty("mode")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("mode")]
#endif
public string Mode { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class PaymentIntentPaymentMethodOptionsCryptoDepositOptions : StripeEntity<PaymentIntentPaymentMethodOptionsCryptoDepositOptions>
{
/// <summary>
/// The blockchain networks to support for deposits. Learn more about <a
/// href="https://docs.stripe.com/payments/deposit-mode-stablecoin-payments#token-and-network-support">supported
/// networks and tokens</a>.
/// One of: <c>base</c>, <c>solana</c>, or <c>tempo</c>.
/// </summary>
[JsonProperty("networks")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("networks")]
#endif
public List<string> Networks { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;
#if NET6_0_OR_GREATER
using STJS = System.Text.Json.Serialization;
#endif

public class PaymentIntentPaymentMethodOptionsCryptoDepositOptionsOptions : INestedOptions
{
/// <summary>
/// The blockchain networks to support for deposits. Learn more about <a
/// href="https://docs.stripe.com/payments/deposit-mode-stablecoin-payments#token-and-network-support">supported
/// networks and tokens</a>.
/// One of: <c>base</c>, <c>solana</c>, or <c>tempo</c>.
/// </summary>
[JsonProperty("networks")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("networks")]
#endif
public List<string> Networks { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@ namespace Stripe

public class PaymentIntentPaymentMethodOptionsCryptoOptions : INestedOptions
{
/// <summary>
/// Specific configuration for this PaymentIntent when the mode is <c>deposit</c>.
/// </summary>
[JsonProperty("deposit_options")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("deposit_options")]
#endif
public PaymentIntentPaymentMethodOptionsCryptoDepositOptionsOptions DepositOptions { get; set; }

/// <summary>
/// The mode of the crypto payment.
/// One of: <c>default</c>, or <c>deposit</c>.
/// </summary>
[JsonProperty("mode")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("mode")]
#endif
public string Mode { get; set; }

/// <summary>
/// Indicates that you intend to make future payments with this PaymentIntent's payment
/// method.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// File generated from our OpenAPI spec
namespace Stripe.TestHelpers
{
using System;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;

public class PaymentIntentService : Service
{
public PaymentIntentService()
{
}

internal PaymentIntentService(ApiRequestor requestor)
: base(requestor)
{
}

public PaymentIntentService(IStripeClient client)
: base(client)
{
}

/// <summary>
/// <p>Simulate an incoming crypto deposit for a testmode PaymentIntent with
/// <c>payment_method_options[crypto][mode]=deposit</c>. The <c>transaction_hash</c>
/// parameter determines whether the simulated deposit succeeds or fails. Learn more about
/// <a
/// href="https://stripe.com/docs/payments/deposit-mode-stablecoin-payments#test-your-integration">testing
/// your integration</a>.</p>.
/// </summary>
public virtual PaymentIntent SimulateCryptoDeposit(string id, PaymentIntentSimulateCryptoDepositOptions options = null, RequestOptions requestOptions = null)
{
return this.Request<PaymentIntent>(BaseAddress.Api, HttpMethod.Post, $"/v1/test_helpers/payment_intents/{WebUtility.UrlEncode(id)}/simulate_crypto_deposit", options, requestOptions);
}

/// <summary>
/// <p>Simulate an incoming crypto deposit for a testmode PaymentIntent with
/// <c>payment_method_options[crypto][mode]=deposit</c>. The <c>transaction_hash</c>
/// parameter determines whether the simulated deposit succeeds or fails. Learn more about
/// <a
/// href="https://stripe.com/docs/payments/deposit-mode-stablecoin-payments#test-your-integration">testing
/// your integration</a>.</p>.
/// </summary>
public virtual Task<PaymentIntent> SimulateCryptoDepositAsync(string id, PaymentIntentSimulateCryptoDepositOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
{
return this.RequestAsync<PaymentIntent>(BaseAddress.Api, HttpMethod.Post, $"/v1/test_helpers/payment_intents/{WebUtility.UrlEncode(id)}/simulate_crypto_deposit", options, requestOptions, cancellationToken);
}
}
}
Loading
Loading