Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into sdk-release/next-major
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-stripe committed Apr 9, 2024
2 parents 5bf62be + 5b0d0ef commit 0c1549d
Show file tree
Hide file tree
Showing 31 changed files with 597 additions and 9 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 43.23.0 - 2024-04-09
* [#2887](https://github.com/stripe/stripe-dotnet/pull/2887) Update generated code
* Add support for new resources `Entitlements.ActiveEntitlement` and `Entitlements.Feature`
* Add support for `Get` and `List` methods on resource `ActiveEntitlement`
* Add support for `Create`, `Get`, `List`, and `Update` methods on resource `Feature`
* Add support for `Controller` on `AccountCreateOptions`
* Add support for `Fees`, `Losses`, `RequirementCollection`, and `StripeDashboard` on `AccountController`
* Add support for `EventName` on `Billing.MeterEventAdjustmentCreateOptions` and `BillingMeterEventAdjustment`
* Add support for `Cancel` and `Type` on `BillingMeterEventAdjustment`

## 43.22.0 - 2024-04-04
* [#2881](https://github.com/stripe/stripe-dotnet/pull/2881) Update generated code
* Change type of `CheckoutSessionPaymentMethodOptionsSwishReferenceOptions` from `emptyable(string)` to `string`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v932
v938
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
43.22.0
43.23.0
2 changes: 2 additions & 0 deletions src/Stripe.net/Constants/AccountType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ public static class AccountType

public const string Express = "express";

public const string None = "none";

public const string Standard = "standard";
}
}
2 changes: 1 addition & 1 deletion src/Stripe.net/Entities/Accounts/Account.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public class Account : StripeEntity<Account>, IHasId, IHasMetadata, IHasObject,

/// <summary>
/// The Stripe account type. Can be <c>standard</c>, <c>express</c>, or <c>custom</c>.
/// One of: <c>custom</c>, <c>express</c>, or <c>standard</c>.
/// One of: <c>custom</c>, <c>express</c>, <c>none</c>, or <c>standard</c>.
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
Expand Down
17 changes: 17 additions & 0 deletions src/Stripe.net/Entities/Accounts/AccountController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ namespace Stripe

public class AccountController : StripeEntity<AccountController>
{
[JsonProperty("fees")]
public AccountControllerFees Fees { get; set; }

/// <summary>
/// <c>true</c> if the Connect application retrieving the resource controls the account and
/// can therefore exercise <a
Expand All @@ -14,6 +17,20 @@ public class AccountController : StripeEntity<AccountController>
[JsonProperty("is_controller")]
public bool IsController { get; set; }

[JsonProperty("losses")]
public AccountControllerLosses Losses { get; set; }

/// <summary>
/// A value indicating responsibility for collecting requirements on this account. Only
/// returned when the Connect application retrieving the resource controls the account.
/// One of: <c>application</c>, or <c>stripe</c>.
/// </summary>
[JsonProperty("requirement_collection")]
public string RequirementCollection { get; set; }

[JsonProperty("stripe_dashboard")]
public AccountControllerStripeDashboard StripeDashboard { get; set; }

/// <summary>
/// The controller type. Can be <c>application</c>, if a Connect application controls the
/// account, or <c>account</c>, if the account controls itself.
Expand Down
17 changes: 17 additions & 0 deletions src/Stripe.net/Entities/Accounts/AccountControllerFees.cs
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;

public class AccountControllerFees : StripeEntity<AccountControllerFees>
{
/// <summary>
/// A value indicating the responsible payer of a bundle of Stripe fees for pricing-control
/// eligible products on this account.
/// One of: <c>account</c>, <c>application</c>, <c>application_custom</c>, or
/// <c>application_express</c>.
/// </summary>
[JsonProperty("payer")]
public string Payer { get; set; }
}
}
16 changes: 16 additions & 0 deletions src/Stripe.net/Entities/Accounts/AccountControllerLosses.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class AccountControllerLosses : StripeEntity<AccountControllerLosses>
{
/// <summary>
/// A value indicating who is liable when this account can't pay back negative balances from
/// payments.
/// One of: <c>application</c>, or <c>stripe</c>.
/// </summary>
[JsonProperty("payments")]
public string Payments { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class AccountControllerStripeDashboard : StripeEntity<AccountControllerStripeDashboard>
{
/// <summary>
/// A value indicating the Stripe dashboard this account has access to independent of the
/// Connect application.
/// One of: <c>express</c>, <c>full</c>, or <c>none</c>.
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ public class MeterEventAdjustment : StripeEntity<MeterEventAdjustment>, IHasObje
[JsonProperty("object")]
public string Object { get; set; }

[JsonProperty("cancel")]
public MeterEventAdjustmentCancel Cancel { get; set; }

/// <summary>
/// The name of the meter event. Corresponds with the <c>event_name</c> field on a meter.
/// </summary>
[JsonProperty("event_name")]
public string EventName { get; set; }

/// <summary>
/// Has the value <c>true</c> if the object exists in live mode or the value <c>false</c> if
/// the object exists in test mode.
Expand All @@ -27,5 +36,11 @@ public class MeterEventAdjustment : StripeEntity<MeterEventAdjustment>, IHasObje
/// </summary>
[JsonProperty("status")]
public string Status { get; set; }

/// <summary>
/// Specifies whether to cancel a single event or a range of events for a time period.
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// File generated from our OpenAPI spec
namespace Stripe.Billing
{
using Newtonsoft.Json;

public class MeterEventAdjustmentCancel : StripeEntity<MeterEventAdjustmentCancel>
{
/// <summary>
/// Unique identifier for the event.
/// </summary>
[JsonProperty("identifier")]
public string Identifier { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// File generated from our OpenAPI spec
namespace Stripe.Entitlements
{
using Newtonsoft.Json;

/// <summary>
/// An active entitlement describes access to a feature for a customer.
/// </summary>
public class ActiveEntitlement : StripeEntity<ActiveEntitlement>, IHasId, IHasObject
{
/// <summary>
/// Unique identifier for the object.
/// </summary>
[JsonProperty("id")]
public string Id { get; set; }

/// <summary>
/// String representing the object's type. Objects of the same type share the same value.
/// </summary>
[JsonProperty("object")]
public string Object { get; set; }

/// <summary>
/// The feature that the customer is entitled to.
/// </summary>
[JsonProperty("feature")]
public string Feature { get; set; }

/// <summary>
/// Has the value <c>true</c> if the object exists in live mode or the value <c>false</c> if
/// the object exists in test mode.
/// </summary>
[JsonProperty("livemode")]
public bool Livemode { get; set; }

/// <summary>
/// A unique key you provide as your own system identifier. This may be up to 80 characters.
/// </summary>
[JsonProperty("lookup_key")]
public string LookupKey { get; set; }
}
}
59 changes: 59 additions & 0 deletions src/Stripe.net/Entities/Entitlements/Features/Feature.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// File generated from our OpenAPI spec
namespace Stripe.Entitlements
{
using System.Collections.Generic;
using Newtonsoft.Json;

/// <summary>
/// A feature represents a monetizable ability or functionality in your system. Features can
/// be assigned to products, and when those products are purchased, Stripe will create an
/// entitlement to the feature for the purchasing customer.
/// </summary>
public class Feature : StripeEntity<Feature>, IHasId, IHasMetadata, IHasObject
{
/// <summary>
/// Unique identifier for the object.
/// </summary>
[JsonProperty("id")]
public string Id { get; set; }

/// <summary>
/// String representing the object's type. Objects of the same type share the same value.
/// </summary>
[JsonProperty("object")]
public string Object { get; set; }

/// <summary>
/// Inactive features cannot be attached to new products and will not be returned from the
/// features list endpoint.
/// </summary>
[JsonProperty("active")]
public bool Active { get; set; }

/// <summary>
/// Has the value <c>true</c> if the object exists in live mode or the value <c>false</c> if
/// the object exists in test mode.
/// </summary>
[JsonProperty("livemode")]
public bool Livemode { get; set; }

/// <summary>
/// A unique key you provide as your own system identifier. This may be up to 80 characters.
/// </summary>
[JsonProperty("lookup_key")]
public string LookupKey { get; set; }

/// <summary>
/// Set of key-value pairs that you can attach to an object. This can be useful for storing
/// additional information about the object in a structured format.
/// </summary>
[JsonProperty("metadata")]
public Dictionary<string, string> Metadata { get; set; }

/// <summary>
/// The feature's name, for your own purpose, not meant to be displayable to the customer.
/// </summary>
[JsonProperty("name")]
public string Name { get; set; }
}
}
5 changes: 5 additions & 0 deletions src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ public static class StripeTypeRegistry
{ "customer_session", typeof(CustomerSession) },
{ "discount", typeof(Discount) },
{ "dispute", typeof(Dispute) },
{
"entitlements.active_entitlement", typeof(
Entitlements.ActiveEntitlement)
},
{ "entitlements.feature", typeof(Entitlements.Feature) },
{ "ephemeral_key", typeof(EphemeralKey) },
{ "event", typeof(Event) },
{ "fee_refund", typeof(ApplicationFeeRefund) },
Expand Down
16 changes: 16 additions & 0 deletions src/Stripe.net/Services/Accounts/AccountControllerFeesOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class AccountControllerFeesOptions : INestedOptions
{
/// <summary>
/// A value indicating the responsible payer of Stripe fees on this account. Defaults to
/// <c>account</c>.
/// One of: <c>account</c>, or <c>application</c>.
/// </summary>
[JsonProperty("payer")]
public string Payer { get; set; }
}
}
16 changes: 16 additions & 0 deletions src/Stripe.net/Services/Accounts/AccountControllerLossesOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class AccountControllerLossesOptions : INestedOptions
{
/// <summary>
/// A value indicating who is liable when this account can't pay back negative balances
/// resulting from payments. Defaults to <c>stripe</c>.
/// One of: <c>application</c>, or <c>stripe</c>.
/// </summary>
[JsonProperty("payments")]
public string Payments { get; set; }
}
}
35 changes: 35 additions & 0 deletions src/Stripe.net/Services/Accounts/AccountControllerOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class AccountControllerOptions : INestedOptions
{
/// <summary>
/// A hash of configuration for who pays Stripe fees for product usage on this account.
/// </summary>
[JsonProperty("fees")]
public AccountControllerFeesOptions Fees { get; set; }

/// <summary>
/// A hash of configuration for products that have negative balance liability, and whether
/// Stripe or a Connect application is responsible for them.
/// </summary>
[JsonProperty("losses")]
public AccountControllerLossesOptions Losses { get; set; }

/// <summary>
/// A value indicating responsibility for collecting updated information when requirements
/// on the account are due or change. Defaults to <c>stripe</c>.
/// One of: <c>application</c>, or <c>stripe</c>.
/// </summary>
[JsonProperty("requirement_collection")]
public string RequirementCollection { get; set; }

/// <summary>
/// A hash of configuration for Stripe-hosted dashboards.
/// </summary>
[JsonProperty("stripe_dashboard")]
public AccountControllerStripeDashboardOptions StripeDashboard { 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;

public class AccountControllerStripeDashboardOptions : INestedOptions
{
/// <summary>
/// Whether this account should have access to the full Stripe Dashboard (<c>full</c>), to
/// the Express Dashboard (<c>express</c>), or to no Stripe-hosted dashboard (<c>none</c>).
/// Defaults to <c>full</c>.
/// One of: <c>express</c>, <c>full</c>, or <c>none</c>.
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
}
}
6 changes: 6 additions & 0 deletions src/Stripe.net/Services/Accounts/AccountCreateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ public class AccountCreateOptions : BaseOptions, IHasMetadata
[JsonProperty("company")]
public AccountCompanyOptions Company { get; set; }

/// <summary>
/// A hash of configuration describing the account controller's attributes.
/// </summary>
[JsonProperty("controller")]
public AccountControllerOptions Controller { get; set; }

/// <summary>
/// The country in which the account holder resides, or in which the business is legally
/// established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ namespace Stripe.Billing
public class MeterEventAdjustmentCancelOptions : INestedOptions
{
/// <summary>
/// Unique identifier for the event.
/// Unique identifier for the event. You can only cancel events within 24 hours of Stripe
/// receiving them.
/// </summary>
[JsonProperty("identifier")]
public string Identifier { get; set; }
Expand Down
Loading

0 comments on commit 0c1549d

Please sign in to comment.