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 for beta branch #2550

Merged
merged 11 commits into from
Aug 3, 2022
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Changelog

## 40.0.0 - 2022-08-02

Major version release for API version 2022-08-01. Default API version changed to "2022-08-01".

Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the SDK, read more detailed description at https://github.com/stripe/stripe-dotnet/wiki/Migration-guide-for-v40. For changes to the Stripe products, read more at https://stripe.com/docs/upgrades#2022-08-01.

"⚠️" symbol highlights breaking changes.

* [#2549](https://github.com/stripe/stripe-dotnet/pull/2549) API Updates
* [#2547](https://github.com/stripe/stripe-dotnet/pull/2547) Next major release changes

## 39.126.0 - 2022-07-26
* [#2544](https://github.com/stripe/stripe-dotnet/pull/2544) API Updates
* Add support for `CustomerBalance` on `CheckoutSessionPaymentMethodOptionsOptions` and `CheckoutSessionPaymentMethodOptions`

## 39.125.0 - 2022-07-25
* [#2543](https://github.com/stripe/stripe-dotnet/pull/2543) API Updates
* Add support for `Installments` on `CheckoutSessionPaymentMethodOptionsCardOptions`, `CheckoutSessionPaymentMethodOptionsCard`, `InvoicePaymentSettingsPaymentMethodOptionsCardOptions`, and `InvoicePaymentSettingsPaymentMethodOptionsCard`
* Add support for `DefaultCurrency` and `InvoiceCreditBalance` on `Customer`
* Add support for `Currency` on `InvoiceCreateOptions`
* Add support for `DefaultMandate` on `InvoicePaymentSettingsOptions` and `InvoicePaymentSettings`
* Add support for `Mandate` on `InvoicePayOptions`

## 39.125.0-beta.1 - 2022-07-22
* [#2542](https://github.com/stripe/stripe-dotnet/pull/2542) API Updates for beta branch
- Updated stable APIs to the latest version
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v172
v175
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 = "2020-08-27; server_side_confirmation_beta=v1";
public const string Current = "2022-08-01; server_side_confirmation_beta=v1; orders_beta=v4";
}
}
15 changes: 0 additions & 15 deletions src/Stripe.net/Constants/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -502,21 +502,6 @@ public static class Events
/// </summary>
public const string OrderPaymentFailed = "order.payment_failed";

/// <summary>
/// Occurs whenever payment is attempted on an order, and the payment succeeds.
/// </summary>
public const string OrderPaymentSucceeded = "order.payment_succeeded";

/// <summary>
/// Occurs whenever an order is updated.
/// </summary>
public const string OrderUpdated = "order.updated";

/// <summary>
/// Occurs whenever an order return is created.
/// </summary>
public const string OrderReturnCreated = "order_return.created";

/// <summary>
/// Occurs whenever a payment is created.
/// </summary>
Expand Down
8 changes: 0 additions & 8 deletions src/Stripe.net/Constants/FilePurpose.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,8 @@ public static class FilePurpose

public const string IdentityDocumentDownloadable = "identity_document_downloadable";

public const string IncorporationArticle = "incorporation_article";

public const string IncorporationDocument = "incorporation_document";

public const string PaymentProviderTransfer = "payment_provider_transfer";

public const string PciDocument = "pci_document";

public const string ProductFeed = "product_feed";

public const string Selfie = "selfie";

public const string SigmaScheduledQuery = "sigma_scheduled_query";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ public class AccountFutureRequirementsError : StripeEntity<AccountFutureRequirem
/// <summary>
/// The code for the type of error.
/// One of: <c>invalid_address_city_state_postal_code</c>, <c>invalid_street_address</c>,
/// <c>invalid_value_other</c>, <c>verification_document_address_mismatch</c>,
/// <c>invalid_tos_acceptance</c>, <c>invalid_value_other</c>,
/// <c>verification_document_address_mismatch</c>,
/// <c>verification_document_address_missing</c>, <c>verification_document_corrupt</c>,
/// <c>verification_document_country_not_supported</c>,
/// <c>verification_document_dob_mismatch</c>, <c>verification_document_duplicate_type</c>,
Expand Down
3 changes: 2 additions & 1 deletion src/Stripe.net/Entities/Accounts/AccountRequirementsError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ public class AccountRequirementsError : StripeEntity<AccountRequirementsError>
/// <summary>
/// The code for the type of error.
/// One of: <c>invalid_address_city_state_postal_code</c>, <c>invalid_street_address</c>,
/// <c>invalid_value_other</c>, <c>verification_document_address_mismatch</c>,
/// <c>invalid_tos_acceptance</c>, <c>invalid_value_other</c>,
/// <c>verification_document_address_mismatch</c>,
/// <c>verification_document_address_missing</c>, <c>verification_document_corrupt</c>,
/// <c>verification_document_country_not_supported</c>,
/// <c>verification_document_dob_mismatch</c>, <c>verification_document_duplicate_type</c>,
Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.net/Entities/Balance/Balance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class Balance : StripeEntity<Balance>, IHasObject
public List<BalanceInstantAvailable> InstantAvailable { get; set; }

[JsonProperty("issuing")]
public BalanceDetails Issuing { get; set; }
public BalanceIssuing Issuing { get; set; }

/// <summary>
/// Has the value <c>true</c> if the object exists in live mode or the value <c>false</c> if
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;

public class BalanceDetails : StripeEntity<BalanceDetails>
public class BalanceIssuing : StripeEntity<BalanceIssuing>
{
/// <summary>
/// Funds that are available for use.
/// </summary>
[JsonProperty("available")]
public List<BalanceAmount> Available { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,36 @@ public class Configuration : StripeEntity<Configuration>, IHasId, IHasMetadata,
[JsonProperty("active")]
public bool Active { get; set; }

#region Expandable Application

/// <summary>
/// (ID of the Application)
/// ID of the Connect Application that created the configuration.
/// </summary>
[JsonIgnore]
public string ApplicationId
{
get => this.InternalApplication?.Id;
set => this.InternalApplication = SetExpandableFieldId(value, this.InternalApplication);
}

/// <summary>
/// (Expanded)
/// ID of the Connect Application that created the configuration.
///
/// For more information, see the <a href="https://stripe.com/docs/expand">expand documentation</a>.
/// </summary>
[JsonIgnore]
public Application Application
{
get => this.InternalApplication?.ExpandedObject;
set => this.InternalApplication = SetExpandableFieldObject(value, this.InternalApplication);
}

[JsonProperty("application")]
public string Application { get; set; }
[JsonConverter(typeof(ExpandableFieldConverter<Application>))]
internal ExpandableField<Application> InternalApplication { get; set; }
#endregion

[JsonProperty("business_profile")]
public ConfigurationBusinessProfile BusinessProfile { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ public class CapabilityFutureRequirementsError : StripeEntity<CapabilityFutureRe
/// <summary>
/// The code for the type of error.
/// One of: <c>invalid_address_city_state_postal_code</c>, <c>invalid_street_address</c>,
/// <c>invalid_value_other</c>, <c>verification_document_address_mismatch</c>,
/// <c>invalid_tos_acceptance</c>, <c>invalid_value_other</c>,
/// <c>verification_document_address_mismatch</c>,
/// <c>verification_document_address_missing</c>, <c>verification_document_corrupt</c>,
/// <c>verification_document_country_not_supported</c>,
/// <c>verification_document_dob_mismatch</c>, <c>verification_document_duplicate_type</c>,
Expand Down
21 changes: 0 additions & 21 deletions src/Stripe.net/Entities/Charges/Charge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -444,27 +444,6 @@ public Account OnBehalfOf
internal ExpandableField<Account> InternalOnBehalfOf { get; set; }
#endregion

#region Expandable Order

[JsonIgnore]
public string OrderId
{
get => this.InternalOrder?.Id;
set => this.InternalOrder = SetExpandableFieldId(value, this.InternalOrder);
}

[JsonIgnore]
public Order Order
{
get => this.InternalOrder?.ExpandedObject;
set => this.InternalOrder = SetExpandableFieldObject(value, this.InternalOrder);
}

[JsonProperty("order")]
[JsonConverter(typeof(ExpandableFieldConverter<Order>))]
internal ExpandableField<Order> InternalOrder { get; set; }
#endregion

/// <summary>
/// Details about whether the payment was accepted, and why. See <a
/// href="https://stripe.com/docs/declines">understanding declines</a> for details.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public class ChargePaymentMethodDetailsCardThreeDSecure : StripeEntity<ChargePay

/// <summary>
/// Indicates the outcome of 3D Secure authentication.
/// One of: <c>attempt_acknowledged</c>, <c>authenticated</c>, <c>failed</c>,
/// <c>not_supported</c>, or <c>processing_error</c>.
/// One of: <c>attempt_acknowledged</c>, <c>authenticated</c>, <c>exempted</c>,
/// <c>failed</c>, <c>not_supported</c>, or <c>processing_error</c>.
/// </summary>
[JsonProperty("result")]
public string Result { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public class ChargePaymentMethodDetailsKlarna : StripeEntity<ChargePaymentMethod
/// <c>de-DE</c>, <c>en-DE</c>, <c>da-DK</c>, <c>en-DK</c>, <c>es-ES</c>, <c>en-ES</c>,
/// <c>fi-FI</c>, <c>sv-FI</c>, <c>en-FI</c>, <c>en-GB</c>, <c>en-IE</c>, <c>it-IT</c>,
/// <c>en-IT</c>, <c>nl-NL</c>, <c>en-NL</c>, <c>nb-NO</c>, <c>en-NO</c>, <c>sv-SE</c>,
/// <c>en-SE</c>, <c>en-US</c>, <c>es-US</c>, <c>fr-FR</c>, <c>en-FR</c>, <c>en-AU</c>, or
/// <c>en-NZ</c>.
/// <c>en-SE</c>, <c>en-US</c>, <c>es-US</c>, <c>fr-FR</c>, <c>en-FR</c>, <c>en-AU</c>,
/// <c>en-NZ</c>, <c>en-CA</c>, or <c>fr-CA</c>.
/// </summary>
[JsonProperty("preferred_locale")]
public string PreferredLocale { get; set; }
Expand Down
44 changes: 10 additions & 34 deletions src/Stripe.net/Entities/Checkout/Sessions/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,6 @@ public SetupIntent SetupIntent
internal ExpandableField<SetupIntent> InternalSetupIntent { get; set; }
#endregion

/// <summary>
/// Shipping information for this Checkout Session.
/// </summary>
[JsonProperty("shipping")]
public Shipping Shipping { get; set; }

/// <summary>
/// When set, provides configuration for Checkout to collect a shipping address from a
/// customer.
Expand All @@ -356,41 +350,23 @@ public SetupIntent SetupIntent
public SessionShippingAddressCollection ShippingAddressCollection { get; set; }

/// <summary>
/// The shipping rate options applied to this Session.
/// The details of the customer cost of shipping, including the customer chosen
/// ShippingRate.
/// </summary>
[JsonProperty("shipping_options")]
public List<SessionShippingOption> ShippingOptions { get; set; }

#region Expandable ShippingRate
[JsonProperty("shipping_cost")]
public SessionShippingCost ShippingCost { get; set; }

/// <summary>
/// (ID of the ShippingRate)
/// The ID of the ShippingRate for Checkout Sessions in <c>payment</c> mode.
/// Shipping information for this Checkout Session.
/// </summary>
[JsonIgnore]
public string ShippingRateId
{
get => this.InternalShippingRate?.Id;
set => this.InternalShippingRate = SetExpandableFieldId(value, this.InternalShippingRate);
}
[JsonProperty("shipping_details")]
public SessionShippingDetails ShippingDetails { get; set; }

/// <summary>
/// (Expanded)
/// The ID of the ShippingRate for Checkout Sessions in <c>payment</c> mode.
///
/// For more information, see the <a href="https://stripe.com/docs/expand">expand documentation</a>.
/// The shipping rate options applied to this Session.
/// </summary>
[JsonIgnore]
public ShippingRate ShippingRate
{
get => this.InternalShippingRate?.ExpandedObject;
set => this.InternalShippingRate = SetExpandableFieldObject(value, this.InternalShippingRate);
}

[JsonProperty("shipping_rate")]
[JsonConverter(typeof(ExpandableFieldConverter<ShippingRate>))]
internal ExpandableField<ShippingRate> InternalShippingRate { get; set; }
#endregion
[JsonProperty("shipping_options")]
public List<SessionShippingOption> ShippingOptions { get; set; }

/// <summary>
/// The status of the Checkout Session, one of <c>open</c>, <c>complete</c>, or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public class SessionPaymentMethodOptions : StripeEntity<SessionPaymentMethodOpti
[JsonProperty("card")]
public SessionPaymentMethodOptionsCard Card { get; set; }

[JsonProperty("customer_balance")]
public SessionPaymentMethodOptionsCustomerBalance CustomerBalance { get; set; }

[JsonProperty("eps")]
public SessionPaymentMethodOptionsEps Eps { get; set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// File generated from our OpenAPI spec
namespace Stripe.Checkout
{
using Newtonsoft.Json;

public class SessionPaymentMethodOptionsCustomerBalance : StripeEntity<SessionPaymentMethodOptionsCustomerBalance>
{
[JsonProperty("bank_transfer")]
public SessionPaymentMethodOptionsCustomerBalanceBankTransfer BankTransfer { get; set; }

/// <summary>
/// The funding method type to be used when there are not enough funds in the customer
/// balance. Permitted values include: <c>bank_transfer</c>.
/// </summary>
[JsonProperty("funding_type")]
public string FundingType { get; set; }

/// <summary>
/// Indicates that you intend to make future payments with this PaymentIntent's payment
/// method.
///
/// Providing this parameter will <a
/// href="https://stripe.com/docs/payments/save-during-payment">attach the payment
/// method</a> to the PaymentIntent's Customer, if present, after the PaymentIntent is
/// confirmed and any required actions from the user are complete. If no Customer was
/// provided, the payment method can still be <a
/// href="https://stripe.com/docs/api/payment_methods/attach">attached</a> to a Customer
/// after the transaction completes.
///
/// When processing card payments, Stripe also uses <c>setup_future_usage</c> to dynamically
/// optimize your payment flow and comply with regional legislation and network rules, such
/// as <a href="https://stripe.com/docs/strong-customer-authentication">SCA</a>.
/// </summary>
[JsonProperty("setup_future_usage")]
public string SetupFutureUsage { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// File generated from our OpenAPI spec
namespace Stripe.Checkout
{
using System.Collections.Generic;
using Newtonsoft.Json;

public class SessionPaymentMethodOptionsCustomerBalanceBankTransfer : StripeEntity<SessionPaymentMethodOptionsCustomerBalanceBankTransfer>
{
[JsonProperty("eu_bank_transfer")]
public SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer EuBankTransfer { get; set; }

/// <summary>
/// List of address types that should be returned in the financial_addresses response. If
/// not specified, all valid types will be returned.
///
/// Permitted values include: <c>sort_code</c>, <c>zengin</c>, <c>iban</c>, or <c>spei</c>.
/// </summary>
[JsonProperty("requested_address_types")]
public List<string> RequestedAddressTypes { get; set; }

/// <summary>
/// The bank transfer type that this PaymentIntent is allowed to use for funding Permitted
/// values include: <c>eu_bank_transfer</c>, <c>gb_bank_transfer</c>,
/// <c>jp_bank_transfer</c>, or <c>mx_bank_transfer</c>.
/// One of: <c>eu_bank_transfer</c>, <c>gb_bank_transfer</c>, <c>jp_bank_transfer</c>, or
/// <c>mx_bank_transfer</c>.
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// File generated from our OpenAPI spec
namespace Stripe.Checkout
{
using Newtonsoft.Json;

public class SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer : StripeEntity<SessionPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer>
{
/// <summary>
/// The desired country code of the bank account information. Permitted values include:
/// <c>DE</c>, <c>ES</c>, <c>FR</c>, <c>IE</c>, or <c>NL</c>.
/// One of: <c>DE</c>, <c>ES</c>, <c>FR</c>, <c>IE</c>, or <c>NL</c>.
/// </summary>
[JsonProperty("country")]
public string Country { get; set; }
}
}
Loading