Skip to content

Commit

Permalink
Remove multiple deprecated features (#1713)
Browse files Browse the repository at this point in the history
Many features were marked as obsolete and are now being removed:
* AccountBalance on Customer, use Balance instead
* Billing on Subscription/Invoice/SubscriptionSchedule, use CollectionMethod instead
* TaxInfo and TaxInfoVerification on Customer, use TaxId instead
* AllowedSourceTypes on PaymentIntent, use PaymentMethodTypes instead
* Start on Subscription, use StartDate instead
* ApplicationFee on Charge, use ApplicationFeeAmount instead
* Date when listing Invoices, use Created instead
* OperatorAccount on all Terminal APIs
  • Loading branch information
remi-stripe authored and ob-stripe committed Aug 16, 2019
1 parent 18ccf00 commit 5212153
Show file tree
Hide file tree
Showing 24 changed files with 0 additions and 226 deletions.
18 changes: 0 additions & 18 deletions src/Stripe.net/Entities/Customers/Customer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ public class Customer : StripeEntity<Customer>, IHasId, IHasMetadata, IHasObject
[JsonProperty("object")]
public string Object { get; set; }

[Obsolete("Use Balance")]
[JsonProperty("account_balance")]
public long AccountBalance { get; set; }

/// <summary>
/// The customer’s address.
/// </summary>
Expand Down Expand Up @@ -181,19 +177,5 @@ public IPaymentSource DefaultSource
/// </summary>
[JsonProperty("tax_ids")]
public StripeList<TaxId> TaxIds { get; set; }

/// <summary>
/// The customer’s tax information. Appears on invoices emailed to this customer.
/// </summary>
[Obsolete("Use TaxIds")]
[JsonProperty("tax_info")]
public CustomerTaxInfo TaxInfo { get; set; }

/// <summary>
/// Describes the status of looking up the tax ID provided in <c>tax_info</c>.
/// </summary>
[Obsolete("Use TaxIds")]
[JsonProperty("tax_info_verification")]
public CustomerTaxInfoVerification TaxInfoVerification { get; set; }
}
}
15 changes: 0 additions & 15 deletions src/Stripe.net/Entities/Customers/CustomerTaxInfo.cs

This file was deleted.

15 changes: 0 additions & 15 deletions src/Stripe.net/Entities/Customers/CustomerTaxInfoVerification.cs

This file was deleted.

8 changes: 0 additions & 8 deletions src/Stripe.net/Entities/Invoices/Invoice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,6 @@ public class Invoice : StripeEntity<Invoice>, IHasId, IHasMetadata, IHasObject
[JsonProperty("auto_advance")]
public bool AutoAdvance { get; set; }

/// <summary>
/// This field has been renamed to <c>CollectionMethod</c> and will be removed
/// in a future API version.
/// </summary>
[Obsolete("Use CollectionMethod")]
[JsonProperty("billing")]
public Billing? Billing { get; set; }

[JsonProperty("billing_reason")]
public string BillingReason { get; set; }

Expand Down
4 changes: 0 additions & 4 deletions src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,5 @@ public IPaymentSource Source
/// </summary>
[JsonProperty("transfer_group")]
public string TransferGroup { get; set; }

[Obsolete("Use PaymentMethodTypes")]
[JsonProperty("allowed_source_types")]
public List<string> AllowedSourceTypes { get; set; }
}
}
13 changes: 0 additions & 13 deletions src/Stripe.net/Entities/Subscriptions/Subscription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ public class Subscription : StripeEntity<Subscription>, IHasId, IHasMetadata, IH
[JsonProperty("application_fee_percent")]
public decimal? ApplicationFeePercent { get; set; }

/// <summary>
/// This field has been renamed to <c>CollectionMethod</c> and will be removed
/// in a future API version.
/// </summary>
[Obsolete("Use CollectionMethod")]
[JsonProperty("billing")]
public Billing? Billing { get; set; }

[JsonProperty("billing_cycle_anchor")]
[JsonConverter(typeof(DateTimeConverter))]
public DateTime? BillingCycleAnchor { get; set; }
Expand Down Expand Up @@ -216,11 +208,6 @@ public SetupIntent PendingSetupIntent
[JsonProperty("quantity")]
public long? Quantity { get; set; }

[Obsolete("Use StartDate")]
[JsonProperty("start")]
[JsonConverter(typeof(DateTimeConverter))]
public DateTime? Start { get; set; }

/// <summary>
/// Date when the subscription was first created. The date might differ from the
/// <c>created</c> date due to backdating.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ public class SubscriptionSchedule : StripeEntity<SubscriptionSchedule>, IHasId,
[JsonProperty("object")]
public string Object { get; set; }

/// <summary>
/// This field has been renamed to <c>CollectionMethod</c> and will be removed
/// in a future API version.
/// </summary>
[Obsolete("Use CollectionMethod")]
[JsonProperty("billing")]
public Billing? Billing { get; set; }

/// <summary>
/// Define thresholds at which an invoice will be sent, and the subscription advanced to a
/// new billing period
Expand Down
30 changes: 0 additions & 30 deletions src/Stripe.net/Enums/Billing.cs

This file was deleted.

4 changes: 0 additions & 4 deletions src/Stripe.net/Services/Charges/ChargeCreateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ public class ChargeCreateOptions : BaseOptions, IHasMetadata
[JsonProperty("currency")]
public string Currency { get; set; }

[Obsolete("Use ApplicationFeeAmount")]
[JsonProperty("application_fee")]
public long? ApplicationFee { get; set; }

/// <summary>
/// A fee in cents that will be applied to the charge and transferred to the application owner's Stripe account. To use an application fee, the request must be made on behalf of another account (using RequestOptions available on all service methods), using the Stripe-Account header, an OAuth key, or the destination parameter. For more information, see the application fees documentation.
/// </summary>
Expand Down
8 changes: 0 additions & 8 deletions src/Stripe.net/Services/Customers/CustomerCreateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ namespace Stripe

public class CustomerCreateOptions : BaseOptions, IHasMetadata
{
[Obsolete("Use Balance")]
[JsonProperty("account_balance")]
public long? AccountBalance { get; set; }

/// <summary>
/// The customer’s address.
/// </summary>
Expand Down Expand Up @@ -106,10 +102,6 @@ public class CustomerCreateOptions : BaseOptions, IHasMetadata
[JsonProperty("tax_id_data")]
public List<CustomerTaxIdDataOptions> TaxIdData { get; set; }

[Obsolete("Use TaxIdData")]
[JsonProperty("tax_info")]
public CustomerTaxInfoOptions TaxInfo { get; set; }

[JsonProperty("tax_percent")]
public decimal? TaxPercent { get; set; }

Expand Down
15 changes: 0 additions & 15 deletions src/Stripe.net/Services/Customers/CustomerTaxInfoOptions.cs

This file was deleted.

8 changes: 0 additions & 8 deletions src/Stripe.net/Services/Customers/CustomerUpdateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ namespace Stripe

public class CustomerUpdateOptions : BaseOptions, IHasMetadata
{
[Obsolete("Use Balance")]
[JsonProperty("account_balance")]
public long? AccountBalance { get; set; }

/// <summary>
/// The customer’s address.
/// </summary>
Expand Down Expand Up @@ -89,10 +85,6 @@ public class CustomerUpdateOptions : BaseOptions, IHasMetadata
[JsonProperty("tax_exempt")]
public string TaxExempt { get; set; }

[Obsolete("Use TaxIdService.Create() instead")]
[JsonProperty("tax_info")]
public CustomerTaxInfoOptions TaxInfo { get; set; }

[JsonProperty("validate")]
public bool? Validate { get; set; }
}
Expand Down
8 changes: 0 additions & 8 deletions src/Stripe.net/Services/Invoices/InvoiceCreateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ public class InvoiceCreateOptions : BaseOptions, IHasMetadata
[JsonProperty("auto_advance")]
public bool? AutoAdvance { get; set; }

/// <summary>
/// This field has been renamed to collection_method and will be removed
/// in a future API version.
/// </summary>
[Obsolete("Use CollectionMethod")]
[JsonProperty("billing")]
public Billing? Billing { get; set; }

/// <summary>
/// Either <c>charge_automatically</c>, or <c>send_invoice</c>. When
/// charging automatically, Stripe will attempt to pay this invoice
Expand Down
17 changes: 0 additions & 17 deletions src/Stripe.net/Services/Invoices/InvoiceListOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ namespace Stripe

public class InvoiceListOptions : ListOptions
{
/// <summary>
/// This field has been renamed to <c>CollectionMethod</c> and will be removed
/// in a future API version.
/// </summary>
[Obsolete("Use CollectionMethod")]
[JsonProperty("billing")]
public Billing? Billing { get; set; }

/// <summary>
/// Either <c>charge_automatically</c>, or <c>send_invoice</c>.
/// </summary>
Expand All @@ -34,15 +26,6 @@ public class InvoiceListOptions : ListOptions
[JsonProperty("customer")]
public string CustomerId { get; set; }

/// <summary>
/// A filter on the list based on the object <c>date</c> field. The value can be a
/// <see cref="DateTime"/> or a <see cref="DateRangeOptions"/>.
/// </summary>
[Obsolete("Use Created instead")]
[JsonProperty("date")]
[JsonConverter(typeof(AnyOfConverter))]
public AnyOf<DateTime?, DateRangeOptions> Date { get; set; }

/// <summary>
/// A filter on the list based on the object <c>due_date</c> field. The value can be a
/// <see cref="DateTime"/> or a <see cref="DateRangeOptions"/>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,5 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata
/// </summary>
[JsonProperty("transfer_group")]
public string TransferGroup { get; set; }

[Obsolete("Use PaymentMethodTypes")]
[JsonProperty("allowed_source_types")]
public List<string> AllowedSourceTypes { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,5 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata
/// </summary>
[JsonProperty("transfer_group")]
public string TransferGroup { get; set; }

[Obsolete("Use PaymentMethodTypes")]
[JsonProperty("allowed_source_types")]
public List<string> AllowedSourceTypes { get; set; }

[Obsolete("This field was never supported in the API so marking as deprecated/")]
[JsonProperty("on_behalf_of")]
public string OnBehalfOf { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ namespace Stripe

public abstract class SubscriptionScheduleSharedOptions : BaseOptions, IHasMetadata
{
/// <summary>
/// This field has been renamed to <c>CollectionMethod</c> and will be removed
/// in a future API version.
/// </summary>
[Obsolete("Use CollectionMethod")]
[JsonProperty("billing")]
public Billing? Billing { get; set; }

/// <summary>
/// Define thresholds at which an invoice will be sent, and the subscription advanced to a
/// new billing period. Pass an empty string to remove previously-defined thresholds.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ namespace Stripe

public class SubscriptionListOptions : ListOptionsWithCreated
{
/// <summary>
/// This field has been renamed to <c>CollectionMethod</c> and will be removed
/// in a future API version.
/// </summary>
[Obsolete("Use CollectionMethod")]
[JsonProperty("billing")]
public Billing? Billing { get; set; }

/// <summary>
/// A filter on the list based on the collection method for
/// subscriptions. Either <c>charge_automatically</c>, or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ public abstract class SubscriptionSharedOptions : BaseOptions, IHasMetadata
[JsonProperty("application_fee_percent")]
public decimal? ApplicationFeePercent { get; set; }

/// <summary>
/// This field has been renamed to <c>CollectionMethod</c> and will be removed
/// in a future API version.
/// </summary>
[Obsolete("Use CollectionMethod")]
[JsonProperty("billing")]
public Billing? Billing { get; set; }

/// <summary>
/// Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,5 @@ public class ConnectionTokenCreateOptions : BaseOptions
{
[JsonProperty("location")]
public string LocationId { get; set; }

[Obsolete("This feature has been deprecated and should not be used moving forward.")]
[JsonProperty("operator_account")]
public string OperatorAccount { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@ namespace Stripe.Terminal

public class LocationListOptions : ListOptions
{
[Obsolete("This feature has been deprecated and should not be used moving forward.")]
[JsonProperty("operator_account")]
public string OperatorAccount { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,5 @@ public class LocationSharedOptions : BaseOptions

[JsonProperty("display_name")]
public string DisplayName { get; set; }

[Obsolete("This feature has been deprecated and should not be used moving forward.")]
[JsonProperty("operator_account")]
public string OperatorAccount { get; set; }
}
}
4 changes: 0 additions & 4 deletions src/Stripe.net/Services/Terminal/Readers/ReaderListOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,5 @@ public class ReaderListOptions : ListOptions
{
[JsonProperty("location")]
public string Location { get; set; }

[Obsolete("This feature has been deprecated and should not be used moving forward.")]
[JsonProperty("operator_account")]
public string OperatorAccount { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,5 @@ public class ReaderSharedOptions : BaseOptions
{
[JsonProperty("label")]
public string Label { get; set; }

[Obsolete("This feature has been deprecated and should not be used moving forward.")]
[JsonProperty("operator_account")]
public string OperatorAccount { get; set; }
}
}

0 comments on commit 5212153

Please sign in to comment.