Skip to content

Commit

Permalink
Merge pull request #2908 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] committed May 16, 2024
2 parents 164269b + 1e0c37f commit 8d85a5f
Show file tree
Hide file tree
Showing 42 changed files with 470 additions and 24 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
# Changelog

## 44.7.0 - 2024-05-09
* [#2907](https://github.com/stripe/stripe-dotnet/pull/2907) Update generated code
* Remove support for `PendingInvoiceItemsBehavior` on `SubscriptionCreateOptions` that was prematurely added in the previous release on the same day

## 44.7.0-beta.1 - 2024-05-09
* [#2905](https://github.com/stripe/stripe-dotnet/pull/2905) Update generated code for beta
* No new beta features. Merging changes from the main branch.

## 44.6.0 - 2024-05-09
* [#2906](https://github.com/stripe/stripe-dotnet/pull/2906) Update generated code
* Add support for `Update` test helper method on resources `Treasury.OutboundPayment` and `Treasury.OutboundTransfer`
* Add support for `AllowRedisplay` on `ConfirmationTokenPaymentMethodPreview` and `PaymentMethod`
* Change type of `EntitlementsFeatureMetadataOptions` from `map(string: string)` to `emptyable(map(string: string))`
* Add support for `PreviewMode` on `InvoiceCreatePreviewOptions`, `InvoiceUpcomingLinesOptions`, and `InvoiceUpcomingOptions`
* Add support for `TrackingDetails` on `TreasuryOutboundPayment` and `TreasuryOutboundTransfer`

## 44.6.0-beta.1 - 2024-05-02
* [#2901](https://github.com/stripe/stripe-dotnet/pull/2901) Update generated code for beta
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1020
v1039
4 changes: 2 additions & 2 deletions src/Stripe.net/Entities/Accounts/AccountCapabilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ public class AccountCapabilities : StripeEntity<AccountCapabilities>
public string Treasury { get; set; }

/// <summary>
/// The status of the Twint capability of the account, or whether the account can directly
/// process Twint charges.
/// The status of the TWINT capability of the account, or whether the account can directly
/// process TWINT charges.
/// One of: <c>active</c>, <c>inactive</c>, or <c>pending</c>.
/// </summary>
[JsonProperty("twint_payments")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ namespace Stripe

public class AccountRiskControlsCharges : StripeEntity<AccountRiskControlsCharges>
{
/// <summary>
/// Whether a pause of the risk control has been requested.
/// </summary>
[JsonProperty("pause_requested")]
public bool PauseRequested { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ namespace Stripe

public class AccountRiskControlsPayouts : StripeEntity<AccountRiskControlsPayouts>
{
/// <summary>
/// Whether a pause of the risk control has been requested.
/// </summary>
[JsonProperty("pause_requested")]
public bool PauseRequested { get; set; }
}
Expand Down
7 changes: 7 additions & 0 deletions src/Stripe.net/Entities/ApplicationFees/ApplicationFee.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,13 @@ public Charge Charge
[JsonProperty("currency")]
public string Currency { get; set; }

/// <summary>
/// Polymorphic source of the application fee. Includes the ID of the object the application
/// fee was created from.
/// </summary>
[JsonProperty("fee_source")]
public ApplicationFeeFeeSource FeeSource { 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 Down
27 changes: 27 additions & 0 deletions src/Stripe.net/Entities/ApplicationFees/ApplicationFeeFeeSource.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class ApplicationFeeFeeSource : StripeEntity<ApplicationFeeFeeSource>
{
/// <summary>
/// Charge ID that created this application fee.
/// </summary>
[JsonProperty("charge")]
public string Charge { get; set; }

/// <summary>
/// Payout ID that created this application fee.
/// </summary>
[JsonProperty("payout")]
public string Payout { get; set; }

/// <summary>
/// Type of object that created the application fee, either <c>charge</c> or <c>payout</c>.
/// One of: <c>charge</c>, or <c>payout</c>.
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
}
}
7 changes: 7 additions & 0 deletions src/Stripe.net/Entities/Balances/BalanceInstantAvailable.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;

public class BalanceInstantAvailable : StripeEntity<BalanceInstantAvailable>
Expand All @@ -19,6 +20,12 @@ public class BalanceInstantAvailable : StripeEntity<BalanceInstantAvailable>
[JsonProperty("currency")]
public string Currency { get; set; }

/// <summary>
/// Breakdown of balance by destination.
/// </summary>
[JsonProperty("net_available")]
public List<BalanceInstantAvailableNetAvailable> NetAvailable { get; set; }

[JsonProperty("source_types")]
public BalanceInstantAvailableSourceTypes SourceTypes { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class BalanceInstantAvailableNetAvailable : StripeEntity<BalanceInstantAvailableNetAvailable>
{
/// <summary>
/// Net balance amount, subtracting fees from platform-set pricing.
/// </summary>
[JsonProperty("amount")]
public long Amount { get; set; }

/// <summary>
/// ID of the external account for this net balance (not expandable).
/// </summary>
[JsonProperty("destination")]
public string Destination { get; set; }

[JsonProperty("source_types")]
public BalanceInstantAvailableNetAvailableSourceTypes SourceTypes { 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;

public class BalanceInstantAvailableNetAvailableSourceTypes : StripeEntity<BalanceInstantAvailableNetAvailableSourceTypes>
{
/// <summary>
/// Amount for bank account.
/// </summary>
[JsonProperty("bank_account")]
public long BankAccount { get; set; }

/// <summary>
/// Amount for card.
/// </summary>
[JsonProperty("card")]
public long Card { get; set; }

/// <summary>
/// Amount for FPX.
/// </summary>
[JsonProperty("fpx")]
public long Fpx { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace Stripe
{
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Stripe.Infrastructure;

Expand Down Expand Up @@ -147,6 +148,12 @@ public class ChargePaymentMethodDetailsCardPresent : StripeEntity<ChargePaymentM
[JsonProperty("overcapture_supported")]
public bool OvercaptureSupported { get; set; }

/// <summary>
/// EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
/// </summary>
[JsonProperty("preferred_locales")]
public List<string> PreferredLocales { get; set; }

/// <summary>
/// How card details were read in this transaction.
/// One of: <c>contact_emv</c>, <c>contactless_emv</c>, <c>contactless_magstripe_mode</c>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ namespace Stripe.Checkout
public class SessionSavedPaymentMethodOptions : StripeEntity<SessionSavedPaymentMethodOptions>
{
/// <summary>
/// Controls which payment methods are eligible to be redisplayed to returning customers.
/// Corresponds to <c>allow_redisplay</c> on the payment method.
/// Uses the <c>allow_redisplay</c> value of each saved payment method to filter the set
/// presented to a returning customer. By default, only saved payment methods with
/// ’allow_redisplay: ‘always’ are shown in Checkout.
/// One of: <c>always</c>, <c>limited</c>, or <c>unspecified</c>.
/// </summary>
[JsonProperty("allow_redisplay_filters")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System.Collections.Generic;
using Newtonsoft.Json;

public class ConfirmationTokenPaymentMethodPreviewCardPresent : StripeEntity<ConfirmationTokenPaymentMethodPreviewCardPresent>
Expand Down Expand Up @@ -94,6 +95,12 @@ public class ConfirmationTokenPaymentMethodPreviewCardPresent : StripeEntity<Con
[JsonProperty("networks")]
public ConfirmationTokenPaymentMethodPreviewCardPresentNetworks Networks { get; set; }

/// <summary>
/// EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
/// </summary>
[JsonProperty("preferred_locales")]
public List<string> PreferredLocales { get; set; }

/// <summary>
/// How card details were read in this transaction.
/// One of: <c>contact_emv</c>, <c>contactless_emv</c>, <c>contactless_magstripe_mode</c>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ public class CustomerSessionComponentsPaymentElementFeatures : StripeEntity<Cust
{
/// <summary>
/// Controls whether the Payment Element displays the option to remove a saved payment
/// method.
/// method.".
///
/// Allowing buyers to remove their saved payment methods impacts subscriptions that depend
/// on that payment method. Removing the payment method detaches the <a
/// href="https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer"><c>customer</c>
/// object</a> from that <a
/// href="https://docs.stripe.com/api/payment_methods">PaymentMethod</a>.
/// One of: <c>disabled</c>, or <c>enabled</c>.
/// </summary>
[JsonProperty("payment_method_remove")]
Expand All @@ -16,6 +22,13 @@ public class CustomerSessionComponentsPaymentElementFeatures : StripeEntity<Cust
/// <summary>
/// Controls whether the Payment Element displays a checkbox offering to save a new payment
/// method.
///
/// If a customer checks the box, the <a
/// href="https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay"><c>allow_redisplay</c></a>
/// value on the PaymentMethod is set to <c>'always'</c> at confirmation time. For
/// PaymentIntents, the <a
/// href="https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage"><c>setup_future_usage</c></a>
/// value is also set to the value defined in <c>payment_method_save_usage</c>.
/// One of: <c>disabled</c>, or <c>enabled</c>.
/// </summary>
[JsonProperty("payment_method_save")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ public class DisputePaymentMethodDetails : StripeEntity<DisputePaymentMethodDeta
[JsonProperty("card")]
public DisputePaymentMethodDetailsCard Card { get; set; }

[JsonProperty("klarna")]
public DisputePaymentMethodDetailsKlarna Klarna { get; set; }

[JsonProperty("paypal")]
public DisputePaymentMethodDetailsPaypal Paypal { get; set; }

/// <summary>
/// Payment method type.
/// One of: <c>card</c>, or <c>paypal</c>.
/// One of: <c>card</c>, <c>klarna</c>, or <c>paypal</c>.
/// </summary>
[JsonProperty("type")]
public string Type { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class DisputePaymentMethodDetailsKlarna : StripeEntity<DisputePaymentMethodDetailsKlarna>
{
/// <summary>
/// The reason for the dispute as defined by Klarna.
/// </summary>
[JsonProperty("reason_code")]
public string ReasonCode { get; set; }
}
}
6 changes: 5 additions & 1 deletion src/Stripe.net/Entities/Invoices/Invoice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,11 @@ public Application Application
/// Number of payment attempts made for this invoice, from the perspective of the payment
/// retry schedule. Any payment attempt counts as the first attempt, and subsequently only
/// automatic retries increment the attempt count. In other words, manual payment attempts
/// after the first attempt do not affect the retry schedule.
/// after the first attempt do not affect the retry schedule. If a failure is returned with
/// a non-retryable return code, the invoice can no longer be retried unless a new payment
/// method is obtained. Retries will continue to be scheduled, and attempt_count will
/// continue to increment, but retries will only be executed if a new payment method is
/// obtained.
/// </summary>
[JsonProperty("attempt_count")]
public long AttemptCount { get; set; }
Expand Down
20 changes: 20 additions & 0 deletions src/Stripe.net/Entities/Issuing/Disputes/Dispute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,26 @@ public class Dispute : StripeEntity<Dispute>, IHasId, IHasMetadata, IHasObject,
[JsonProperty("livemode")]
public bool Livemode { get; set; }

/// <summary>
/// The enum that describes the dispute loss outcome. If the dispute is not lost, this field
/// will be absent. New enum values may be added in the future, so be sure to handle unknown
/// values.
/// One of: <c>cardholder_authentication_issuer_liability</c>,
/// <c>eci5_token_transaction_with_tavv</c>, <c>excess_disputes_in_timeframe</c>,
/// <c>has_not_met_the_minimum_dispute_amount_requirements</c>,
/// <c>invalid_duplicate_dispute</c>, <c>invalid_incorrect_amount_dispute</c>,
/// <c>invalid_no_authorization</c>, <c>invalid_use_of_disputes</c>,
/// <c>merchandise_delivered_or_shipped</c>, <c>merchandise_or_service_as_described</c>,
/// <c>not_cancelled</c>, <c>other</c>, <c>refund_issued</c>,
/// <c>submitted_beyond_allowable_time_limit</c>, <c>transaction_3ds_required</c>,
/// <c>transaction_approved_after_prior_fraud_dispute</c>, <c>transaction_authorized</c>,
/// <c>transaction_electronically_read</c>,
/// <c>transaction_qualifies_for_visa_easy_payment_service</c>, or
/// <c>transaction_unattended</c>.
/// </summary>
[JsonProperty("loss_reason")]
public string LossReason { get; set; }

/// <summary>
/// Set of <a href="https://stripe.com/docs/api/metadata">key-value pairs</a> that you can
/// attach to an object. This can be useful for storing additional information about the
Expand Down
7 changes: 5 additions & 2 deletions src/Stripe.net/Entities/Issuing/Disputes/DisputeEvidence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public class DisputeEvidence : StripeEntity<DisputeEvidence>
[JsonProperty("merchandise_not_as_described")]
public DisputeEvidenceMerchandiseNotAsDescribed MerchandiseNotAsDescribed { get; set; }

[JsonProperty("no_valid_authorization")]
public DisputeEvidenceNoValidAuthorization NoValidAuthorization { get; set; }

[JsonProperty("not_received")]
public DisputeEvidenceNotReceived NotReceived { get; set; }

Expand All @@ -27,8 +30,8 @@ public class DisputeEvidence : StripeEntity<DisputeEvidence>
/// The reason for filing the dispute. Its value will match the field containing the
/// evidence.
/// One of: <c>canceled</c>, <c>duplicate</c>, <c>fraudulent</c>,
/// <c>merchandise_not_as_described</c>, <c>not_received</c>, <c>other</c>, or
/// <c>service_not_as_described</c>.
/// <c>merchandise_not_as_described</c>, <c>no_valid_authorization</c>, <c>not_received</c>,
/// <c>other</c>, or <c>service_not_as_described</c>.
/// </summary>
[JsonProperty("reason")]
public string Reason { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// File generated from our OpenAPI spec
namespace Stripe.Issuing
{
using Newtonsoft.Json;
using Stripe.Infrastructure;

public class DisputeEvidenceNoValidAuthorization : StripeEntity<DisputeEvidenceNoValidAuthorization>
{
#region Expandable AdditionalDocumentation

/// <summary>
/// (ID of the File)
/// (ID of a <a href="https://stripe.com/docs/guides/file-upload">file upload</a>)
/// Additional documentation supporting the dispute.
/// </summary>
[JsonIgnore]
public string AdditionalDocumentationId
{
get => this.InternalAdditionalDocumentation?.Id;
set => this.InternalAdditionalDocumentation = SetExpandableFieldId(value, this.InternalAdditionalDocumentation);
}

/// <summary>
/// (Expanded)
/// (ID of a <a href="https://stripe.com/docs/guides/file-upload">file upload</a>)
/// Additional documentation supporting the dispute.
///
/// For more information, see the <a href="https://stripe.com/docs/expand">expand documentation</a>.
/// </summary>
[JsonIgnore]
public File AdditionalDocumentation
{
get => this.InternalAdditionalDocumentation?.ExpandedObject;
set => this.InternalAdditionalDocumentation = SetExpandableFieldObject(value, this.InternalAdditionalDocumentation);
}

[JsonProperty("additional_documentation")]
[JsonConverter(typeof(ExpandableFieldConverter<File>))]
internal ExpandableField<File> InternalAdditionalDocumentation { get; set; }
#endregion

/// <summary>
/// Explanation of why the cardholder is disputing this transaction.
/// </summary>
[JsonProperty("explanation")]
public string Explanation { get; set; }
}
}

0 comments on commit 8d85a5f

Please sign in to comment.