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

Next major release changes #2547

Merged
merged 9 commits into from Aug 1, 2022
15 changes: 0 additions & 15 deletions src/Stripe.net/Constants/Events.cs
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
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
2 changes: 1 addition & 1 deletion src/Stripe.net/Entities/Balance/Balance.cs
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
@@ -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
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
21 changes: 0 additions & 21 deletions src/Stripe.net/Entities/Charges/Charge.cs
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
8 changes: 1 addition & 7 deletions src/Stripe.net/Entities/Customers/Customer.cs
Expand Up @@ -112,12 +112,6 @@ public IPaymentSource DefaultSource
internal ExpandableField<IPaymentSource> InternalDefaultSource { get; set; }
#endregion

/// <summary>
/// Warning: this is not in the documentation.
/// </summary>
[JsonProperty("default_source_type")]
public string DefaultSourceType { get; set; }

/// <summary>
/// Whether this object is deleted or not.
/// </summary>
Expand All @@ -135,7 +129,7 @@ public IPaymentSource DefaultSource
/// <c>delinquent</c> doesn't get reset to <c>false</c>.
/// </summary>
[JsonProperty("delinquent")]
public bool Delinquent { get; set; }
public bool? Delinquent { get; set; }

/// <summary>
/// An arbitrary string attached to the object. Often useful for displaying to users.
Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.net/Entities/Disputes/Dispute.cs
Expand Up @@ -33,7 +33,7 @@ public class Dispute : StripeEntity<Dispute>, IHasId, IHasMetadata, IHasObject,
/// currency fluctuation or because only part of the order is disputed).
/// </summary>
[JsonProperty("amount")]
public long? Amount { get; set; }
public long Amount { get; set; }

/// <summary>
/// List of zero, one, or two balance transactions that show funds withdrawn and reinstated
Expand Down
4 changes: 0 additions & 4 deletions src/Stripe.net/Entities/EphemeralKeys/EphemeralKey.cs
Expand Up @@ -2,7 +2,6 @@
namespace Stripe
{
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Stripe.Infrastructure;

Expand All @@ -20,9 +19,6 @@ public class EphemeralKey : StripeEntity<EphemeralKey>, IHasId, IHasObject
[JsonProperty("object")]
public string Object { get; set; }

[JsonProperty("associated_objects")]
public List<EphemeralKeyAssociatedObject> AssociatedObjects { get; set; }

/// <summary>
/// Time at which the object was created. Measured in seconds since the Unix epoch.
/// </summary>
Expand Down

This file was deleted.

8 changes: 6 additions & 2 deletions src/Stripe.net/Entities/InvoiceItems/InvoiceItemPeriod.cs
@@ -1,20 +1,24 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;

public class InvoiceItemPeriod : StripeEntity<InvoiceItemPeriod>
{
/// <summary>
/// The end of the period, which must be greater than or equal to the start.
/// </summary>
[JsonProperty("end")]
public long End { get; set; }
[JsonConverter(typeof(UnixDateTimeConverter))]
public DateTime End { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;

/// <summary>
/// The start of the period.
/// </summary>
[JsonProperty("start")]
public long Start { get; set; }
[JsonConverter(typeof(UnixDateTimeConverter))]
public DateTime Start { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
}
}
@@ -1,20 +1,24 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using System;
using Newtonsoft.Json;
using Stripe.Infrastructure;

public class InvoiceLineItemPeriod : StripeEntity<InvoiceLineItemPeriod>
{
/// <summary>
/// The end of the period, which must be greater than or equal to the start.
/// </summary>
[JsonProperty("end")]
public long End { get; set; }
[JsonConverter(typeof(UnixDateTimeConverter))]
public DateTime End { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;

/// <summary>
/// The start of the period.
/// </summary>
[JsonProperty("start")]
public long Start { get; set; }
[JsonConverter(typeof(UnixDateTimeConverter))]
public DateTime Start { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch;
}
}
4 changes: 2 additions & 2 deletions src/Stripe.net/Entities/LineItems/LineItem.cs
Expand Up @@ -32,7 +32,7 @@ public class LineItem : StripeEntity<LineItem>, IHasId, IHasObject
/// Total before any discounts or taxes are applied.
/// </summary>
[JsonProperty("amount_subtotal")]
public long? AmountSubtotal { get; set; }
public long AmountSubtotal { get; set; }

/// <summary>
/// Total tax amount applied. If no tax was applied, defaults to 0.
Expand All @@ -44,7 +44,7 @@ public class LineItem : StripeEntity<LineItem>, IHasId, IHasObject
/// Total after discounts and taxes.
/// </summary>
[JsonProperty("amount_total")]
public long? AmountTotal { get; set; }
public long AmountTotal { get; set; }

/// <summary>
/// Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency
Expand Down
129 changes: 0 additions & 129 deletions src/Stripe.net/Entities/OrderReturns/OrderReturn.cs

This file was deleted.