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

Remove various deprecated parameters and properties #1713

Merged
merged 1 commit into from
Jul 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -394,9 +394,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
[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
{
[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
[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
{
[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
[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
[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 @@ -189,9 +189,5 @@ public class PaymentIntentCreateOptions : BaseOptions
/// </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 @@ -130,13 +130,5 @@ public class PaymentIntentUpdateOptions : BaseOptions
/// </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
{
/// <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
[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; }
}
}