Skip to content

Commit

Permalink
Merge pull request #3043 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] authored Jan 18, 2025
2 parents e3e66da + fcefb56 commit 28177c8
Show file tree
Hide file tree
Showing 76 changed files with 1,171 additions and 96 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
build:
name: Build and test

runs-on: ubuntu-latest
# TODO: this step is not compatible with ubuntu 24 LTS, so we pin the version here instead of using ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: extractions/setup-just@v2
Expand Down
25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

# Contributing

We welcome bug reports, feature requests, and code contributions in a pull request.

For most pull requests, we request that you identify or create an associated issue that has the necessary context. We use these issues to reach agreement on an approach and save the PR author from having to redo work. Fixing typos or documentation issues likely do not need an issue; for any issue that introduces substantial code changes, changes the public interface, or if you aren't sure, please find or [create an issue](https://www.github.com/stripe/stripe-dotnet/issues/new/choose).

## Contributor License Agreement

All contributors must sign the Contributor License Agreement (CLA) before we can accept their contribution. If you have not yet signed the agreement, you will be given an option to do so when you open a pull request. You can then sign by clicking on the badge in the comment from @CLAassistant.

## Generated code

This project has a combination of manually maintained code and code generated from our private code generator. If your contribution involves changes to generated code, please call this out in the issue or pull request as we will likely need to make a change to our code generator before accepting the contribution.

To identify files with purely generated code, look for the comment `File generated from our OpenAPI spec.` at the start of the file. Generated blocks of code within hand-written files will be between comments that say `The beginning of the section generated from our OpenAPI spec` and `The end of the section generated from our OpenAPI spec`.

## Compatibility with supported language and runtime versions

This project supports [many different langauge and runtime versions](README.md#requirements) and we are unable to accept any contribution that does not work on _all_ supported versions. If, after discussing the approach in the associated issue, your change must use an API / feature that isn't available in all supported versions, please call this out explicitly in the issue or pull request so we can help figure out the best way forward.

## Set up your dev environment

Please refer to this project's [README.md](README.md#development) for instructions on how to set up your development environment.

2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1438
v1454
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ New features and bug fixes are released on the latest major version of the Strip

## Development

[Contribution guidelines for this project](CONTRIBUTING.md)

.NET 8 is required to build and test Stripe.net SDK, you can install it from [get.dot.net](https://get.dot.net/).
The test suite depends on [stripe-mock][stripe-mock], so make sure to fetch
Expand Down
6 changes: 1 addition & 5 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set quiet

import? '../sdk-codegen/justfile'
import? '../sdk-codegen/utils.just'

_default:
just --list --unsorted
Expand All @@ -22,10 +22,6 @@ format *args:
# This sets TargetFramework because of a race condition in dotnet format when it tries to format to multiple targets at a time, which could lead to code with compiler errors after it completes
TargetFramework=net5.0 dotnet format src/Stripe.net/Stripe.net.csproj --severity warn {{args}}

# for backwards compatibility; ideally removed later
[private]
alias codegen-format := format

# verify, but don't modify, the project's formatting
format-check: (format "--verify-no-changes")

Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.net/Constants/ApiVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ namespace Stripe
{
internal class ApiVersion
{
public const string Current = "2024-12-18.acacia";
public const string Current = "2025-01-27.acacia";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,30 @@ public class AccountSessionComponents : StripeEntity<AccountSessionComponents>
#endif
public AccountSessionComponentsDocuments Documents { get; set; }

[JsonProperty("financial_account")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("financial_account")]
#endif
public AccountSessionComponentsFinancialAccount FinancialAccount { get; set; }

[JsonProperty("financial_account_transactions")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("financial_account_transactions")]
#endif
public AccountSessionComponentsFinancialAccountTransactions FinancialAccountTransactions { get; set; }

[JsonProperty("issuing_card")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("issuing_card")]
#endif
public AccountSessionComponentsIssuingCard IssuingCard { get; set; }

[JsonProperty("issuing_cards_list")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("issuing_cards_list")]
#endif
public AccountSessionComponentsIssuingCardsList IssuingCardsList { get; set; }

[JsonProperty("notification_banner")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("notification_banner")]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// 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 AccountSessionComponentsFinancialAccount : StripeEntity<AccountSessionComponentsFinancialAccount>
{
/// <summary>
/// Whether the embedded component is enabled.
/// </summary>
[JsonProperty("enabled")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("enabled")]
#endif
public bool Enabled { get; set; }

[JsonProperty("features")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("features")]
#endif
public AccountSessionComponentsFinancialAccountFeatures Features { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// 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 AccountSessionComponentsFinancialAccountFeatures : StripeEntity<AccountSessionComponentsFinancialAccountFeatures>
{
/// <summary>
/// Disables Stripe user authentication for this embedded component. This value can only be
/// true for accounts where <c>controller.requirement_collection</c> is <c>application</c>.
/// The default value is the opposite of the <c>external_account_collection</c> value. For
/// example, if you don’t set <c>external_account_collection</c>, it defaults to true and
/// <c>disable_stripe_user_authentication</c> defaults to false.
/// </summary>
[JsonProperty("disable_stripe_user_authentication")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("disable_stripe_user_authentication")]
#endif
public bool DisableStripeUserAuthentication { get; set; }

/// <summary>
/// Whether to allow external accounts to be linked for money transfer.
/// </summary>
[JsonProperty("external_account_collection")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("external_account_collection")]
#endif
public bool ExternalAccountCollection { get; set; }

/// <summary>
/// Whether to allow sending money.
/// </summary>
[JsonProperty("send_money")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("send_money")]
#endif
public bool SendMoney { get; set; }

/// <summary>
/// Whether to allow transferring balance.
/// </summary>
[JsonProperty("transfer_balance")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("transfer_balance")]
#endif
public bool TransferBalance { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// 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 AccountSessionComponentsFinancialAccountTransactions : StripeEntity<AccountSessionComponentsFinancialAccountTransactions>
{
/// <summary>
/// Whether the embedded component is enabled.
/// </summary>
[JsonProperty("enabled")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("enabled")]
#endif
public bool Enabled { get; set; }

[JsonProperty("features")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("features")]
#endif
public AccountSessionComponentsFinancialAccountTransactionsFeatures Features { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// 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 AccountSessionComponentsFinancialAccountTransactionsFeatures : StripeEntity<AccountSessionComponentsFinancialAccountTransactionsFeatures>
{
/// <summary>
/// Whether to allow card spend dispute management features.
/// </summary>
[JsonProperty("card_spend_dispute_management")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("card_spend_dispute_management")]
#endif
public bool CardSpendDisputeManagement { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// 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 AccountSessionComponentsIssuingCard : StripeEntity<AccountSessionComponentsIssuingCard>
{
/// <summary>
/// Whether the embedded component is enabled.
/// </summary>
[JsonProperty("enabled")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("enabled")]
#endif
public bool Enabled { get; set; }

[JsonProperty("features")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("features")]
#endif
public AccountSessionComponentsIssuingCardFeatures Features { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// 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 AccountSessionComponentsIssuingCardFeatures : StripeEntity<AccountSessionComponentsIssuingCardFeatures>
{
/// <summary>
/// Whether to allow card management features.
/// </summary>
[JsonProperty("card_management")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("card_management")]
#endif
public bool CardManagement { get; set; }

/// <summary>
/// Whether to allow card spend dispute management features.
/// </summary>
[JsonProperty("card_spend_dispute_management")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("card_spend_dispute_management")]
#endif
public bool CardSpendDisputeManagement { get; set; }

/// <summary>
/// Whether to allow cardholder management features.
/// </summary>
[JsonProperty("cardholder_management")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("cardholder_management")]
#endif
public bool CardholderManagement { get; set; }

/// <summary>
/// Whether to allow spend control management features.
/// </summary>
[JsonProperty("spend_control_management")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("spend_control_management")]
#endif
public bool SpendControlManagement { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// 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 AccountSessionComponentsIssuingCardsList : StripeEntity<AccountSessionComponentsIssuingCardsList>
{
/// <summary>
/// Whether the embedded component is enabled.
/// </summary>
[JsonProperty("enabled")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("enabled")]
#endif
public bool Enabled { get; set; }

[JsonProperty("features")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("features")]
#endif
public AccountSessionComponentsIssuingCardsListFeatures Features { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// 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 AccountSessionComponentsIssuingCardsListFeatures : StripeEntity<AccountSessionComponentsIssuingCardsListFeatures>
{
/// <summary>
/// Whether to allow card management features.
/// </summary>
[JsonProperty("card_management")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("card_management")]
#endif
public bool CardManagement { get; set; }

/// <summary>
/// Whether to allow card spend dispute management features.
/// </summary>
[JsonProperty("card_spend_dispute_management")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("card_spend_dispute_management")]
#endif
public bool CardSpendDisputeManagement { get; set; }

/// <summary>
/// Whether to allow cardholder management features.
/// </summary>
[JsonProperty("cardholder_management")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("cardholder_management")]
#endif
public bool CardholderManagement { get; set; }

/// <summary>
/// Disables Stripe user authentication for this embedded component. This feature can only
/// be false for accounts where you’re responsible for collecting updated information when
/// requirements are due or change, like custom accounts.
/// </summary>
[JsonProperty("disable_stripe_user_authentication")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("disable_stripe_user_authentication")]
#endif
public bool DisableStripeUserAuthentication { get; set; }

/// <summary>
/// Whether to allow spend control management features.
/// </summary>
[JsonProperty("spend_control_management")]
#if NET6_0_OR_GREATER
[STJS.JsonPropertyName("spend_control_management")]
#endif
public bool SpendControlManagement { get; set; }
}
}
Loading

0 comments on commit 28177c8

Please sign in to comment.