diff --git a/src/Stripe.net/Entities/Charges/Charge.cs b/src/Stripe.net/Entities/Charges/Charge.cs index 94e2c340b9..479c5ae855 100644 --- a/src/Stripe.net/Entities/Charges/Charge.cs +++ b/src/Stripe.net/Entities/Charges/Charge.cs @@ -248,7 +248,6 @@ public Invoice Invoice /// /// The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the Connect documentation for details. - /// To populate the OnBehalfOf entity, you need to set ExpandOnBehalfOf to true on your service before invoking a service method. /// [JsonIgnore] public string OnBehalfOfId diff --git a/src/Stripe.net/Entities/Plans/Plan.cs b/src/Stripe.net/Entities/Plans/Plan.cs index e05364f663..a81645fa9c 100644 --- a/src/Stripe.net/Entities/Plans/Plan.cs +++ b/src/Stripe.net/Entities/Plans/Plan.cs @@ -57,7 +57,6 @@ public class Plan : StripeEntity, IHasId, IHasMetadata, IHasObject /// /// ID of the product linked to this plan - /// You can expand the Product by setting the ExpandProduct property on the service to true /// [JsonIgnore] public string ProductId diff --git a/src/Stripe.net/Services/Account/AccountService.cs b/src/Stripe.net/Services/Account/AccountService.cs index f5c439ea4b..2311ea16b0 100644 --- a/src/Stripe.net/Services/Account/AccountService.cs +++ b/src/Stripe.net/Services/Account/AccountService.cs @@ -25,9 +25,6 @@ public AccountService(IStripeClient client) public override string BasePath => "/v1/accounts"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandBusinessLogo { get; set; } - public virtual Account Create(AccountCreateOptions options, RequestOptions requestOptions = null) { return this.CreateEntity(options, requestOptions); diff --git a/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundService.cs b/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundService.cs index a732e0fb4c..73d6db973b 100644 --- a/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundService.cs +++ b/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundService.cs @@ -23,12 +23,6 @@ public ApplicationFeeRefundService(IStripeClient client) public override string BasePath => "/v1/application_fees/{PARENT_ID}/refunds"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandBalanceTransaction { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandFee { get; set; } - public virtual ApplicationFeeRefund Create(string applicationFeeId, ApplicationFeeRefundCreateOptions options = null, RequestOptions requestOptions = null) { return this.CreateNestedEntity(applicationFeeId, options, requestOptions); diff --git a/src/Stripe.net/Services/ApplicationFees/ApplicationFeeService.cs b/src/Stripe.net/Services/ApplicationFees/ApplicationFeeService.cs index ce3505593c..99a226b1a9 100644 --- a/src/Stripe.net/Services/ApplicationFees/ApplicationFeeService.cs +++ b/src/Stripe.net/Services/ApplicationFees/ApplicationFeeService.cs @@ -21,21 +21,6 @@ public ApplicationFeeService(IStripeClient client) public override string BasePath => "/v1/application_fees"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandAccount { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandApplication { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandBalanceTransaction { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandCharge { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandOriginatingTransaction { get; set; } - public virtual ApplicationFee Get(string applicationFeeId, ApplicationFeeGetOptions options = null, RequestOptions requestOptions = null) { return this.GetEntity(applicationFeeId, options, requestOptions); diff --git a/src/Stripe.net/Services/BalanceTransactions/BalanceTransactionService.cs b/src/Stripe.net/Services/BalanceTransactions/BalanceTransactionService.cs index 352ffece2b..23ccab04e6 100644 --- a/src/Stripe.net/Services/BalanceTransactions/BalanceTransactionService.cs +++ b/src/Stripe.net/Services/BalanceTransactions/BalanceTransactionService.cs @@ -21,9 +21,6 @@ public BalanceTransactionService(IStripeClient client) public override string BasePath => "/v1/balance_transactions"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandSource { get; set; } - public virtual BalanceTransaction Get(string balanceTransactionId, BalanceTransactionGetOptions options = null, RequestOptions requestOptions = null) { return this.GetEntity(balanceTransactionId, options, requestOptions); diff --git a/src/Stripe.net/Services/BankAccounts/BankAccountService.cs b/src/Stripe.net/Services/BankAccounts/BankAccountService.cs index 1206f64405..8e7c44b493 100644 --- a/src/Stripe.net/Services/BankAccounts/BankAccountService.cs +++ b/src/Stripe.net/Services/BankAccounts/BankAccountService.cs @@ -25,9 +25,6 @@ public BankAccountService(IStripeClient client) public override string BasePath => "/v1/customers/{PARENT_ID}/sources"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandCustomer { get; set; } - public virtual BankAccount Create(string customerId, BankAccountCreateOptions options, RequestOptions requestOptions = null) { return this.CreateNestedEntity(customerId, options, requestOptions); diff --git a/src/Stripe.net/Services/Capabilities/CapabilityService.cs b/src/Stripe.net/Services/Capabilities/CapabilityService.cs index efdd031da4..1ad4566e20 100644 --- a/src/Stripe.net/Services/Capabilities/CapabilityService.cs +++ b/src/Stripe.net/Services/Capabilities/CapabilityService.cs @@ -22,9 +22,6 @@ public CapabilityService(IStripeClient client) public override string BasePath => "/v1/accounts/{PARENT_ID}/capabilities"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandAccount { get; set; } - public virtual Capability Get(string accountId, string capabilityId, CapabilityGetOptions options = null, RequestOptions requestOptions = null) { return this.GetNestedEntity(accountId, capabilityId, options, requestOptions); diff --git a/src/Stripe.net/Services/Cards/CardService.cs b/src/Stripe.net/Services/Cards/CardService.cs index 6a59afe18c..b6b5c13f59 100644 --- a/src/Stripe.net/Services/Cards/CardService.cs +++ b/src/Stripe.net/Services/Cards/CardService.cs @@ -24,12 +24,6 @@ public CardService(IStripeClient client) public override string BasePath => "/v1/customers/{PARENT_ID}/sources"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandCustomer { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandRecipient { get; set; } - public virtual Card Create(string customerId, CardCreateOptions options, RequestOptions requestOptions = null) { return this.CreateNestedEntity(customerId, options, requestOptions); diff --git a/src/Stripe.net/Services/Charges/ChargeService.cs b/src/Stripe.net/Services/Charges/ChargeService.cs index 36f7c7c278..c99a784131 100644 --- a/src/Stripe.net/Services/Charges/ChargeService.cs +++ b/src/Stripe.net/Services/Charges/ChargeService.cs @@ -24,45 +24,6 @@ public ChargeService(IStripeClient client) public override string BasePath => "/v1/charges"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandApplication { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandApplicationFee { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandBalanceTransaction { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandCustomer { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandDestination { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandDispute { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandInvoice { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandOnBehalfOf { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandOrder { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandReview { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandSourceTransfer { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandTransfer { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandBusinessLogo { get; set; } - public virtual Charge Capture(string chargeId, ChargeCaptureOptions options, RequestOptions requestOptions = null) { return this.Request(HttpMethod.Post, $"{this.InstanceUrl(chargeId)}/capture", options, requestOptions); diff --git a/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionService.cs b/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionService.cs index 9d35f97685..4575386fae 100644 --- a/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionService.cs +++ b/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionService.cs @@ -22,8 +22,6 @@ public CustomerBalanceTransactionService(IStripeClient client) public override string BasePath => "/v1/customers/{PARENT_ID}/balance_transactions"; - public bool ExpandCustomer { get; set; } - public virtual CustomerBalanceTransaction Create(string customerId, CustomerBalanceTransactionCreateOptions options = null, RequestOptions requestOptions = null) { return this.CreateNestedEntity(customerId, options, requestOptions); diff --git a/src/Stripe.net/Services/Customers/CustomerService.cs b/src/Stripe.net/Services/Customers/CustomerService.cs index 382951571f..a1419695d2 100644 --- a/src/Stripe.net/Services/Customers/CustomerService.cs +++ b/src/Stripe.net/Services/Customers/CustomerService.cs @@ -24,11 +24,6 @@ public CustomerService(IStripeClient client) public override string BasePath => "/v1/customers"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandDefaultSource { get; set; } - - public bool ExpandDefaultCustomerBankAccount { get; set; } // TODO: remove in next major version - public virtual Customer Create(CustomerCreateOptions options, RequestOptions requestOptions = null) { return this.CreateEntity(options, requestOptions); diff --git a/src/Stripe.net/Services/Disputes/DisputeService.cs b/src/Stripe.net/Services/Disputes/DisputeService.cs index 622cb490fe..8c287106b0 100644 --- a/src/Stripe.net/Services/Disputes/DisputeService.cs +++ b/src/Stripe.net/Services/Disputes/DisputeService.cs @@ -23,9 +23,6 @@ public DisputeService(IStripeClient client) public override string BasePath => "/v1/disputes"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandCharge { get; set; } - public virtual Dispute Close(string disputeId, RequestOptions requestOptions = null) { return this.Request(HttpMethod.Post, $"{this.InstanceUrl(disputeId)}/close", null, requestOptions); diff --git a/src/Stripe.net/Services/InvoiceItems/InvoiceItemService.cs b/src/Stripe.net/Services/InvoiceItems/InvoiceItemService.cs index 4241f75a93..c36db41908 100644 --- a/src/Stripe.net/Services/InvoiceItems/InvoiceItemService.cs +++ b/src/Stripe.net/Services/InvoiceItems/InvoiceItemService.cs @@ -24,15 +24,6 @@ public InvoiceItemService(IStripeClient client) public override string BasePath => "/v1/invoiceitems"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandCustomer { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandInvoice { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandSubscription { get; set; } - public virtual InvoiceItem Create(InvoiceItemCreateOptions options, RequestOptions requestOptions = null) { return this.CreateEntity(options, requestOptions); diff --git a/src/Stripe.net/Services/Invoices/InvoiceService.cs b/src/Stripe.net/Services/Invoices/InvoiceService.cs index 8efce400d4..a694495405 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceService.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceService.cs @@ -24,18 +24,6 @@ public InvoiceService(IStripeClient client) public override string BasePath => "/v1/invoices"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandCharge { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandCustomer { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandDefaultPaymentMethod { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandSubscription { get; set; } - public virtual Invoice Create(InvoiceCreateOptions options, RequestOptions requestOptions = null) { return this.CreateEntity(options, requestOptions); diff --git a/src/Stripe.net/Services/Orders/OrderService.cs b/src/Stripe.net/Services/Orders/OrderService.cs index 00a4ca5d10..119b1adb4d 100644 --- a/src/Stripe.net/Services/Orders/OrderService.cs +++ b/src/Stripe.net/Services/Orders/OrderService.cs @@ -24,12 +24,6 @@ public OrderService(IStripeClient client) public override string BasePath => "/v1/orders"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandCharge { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandCustomer { get; set; } - public virtual Order Create(OrderCreateOptions options, RequestOptions requestOptions = null) { return this.CreateEntity(options, requestOptions); diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentService.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentService.cs index 01ce1cc007..4dd979877c 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentService.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentService.cs @@ -24,24 +24,6 @@ public PaymentIntentService(IStripeClient client) public override string BasePath => "/v1/payment_intents"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandApplication { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandCustomer { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandOnBehalfOf { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandPaymentMethod { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandReview { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandSource { get; set; } - public virtual PaymentIntent Cancel(string paymentIntentId, PaymentIntentCancelOptions options, RequestOptions requestOptions = null) { return this.Request(HttpMethod.Post, $"{this.InstanceUrl(paymentIntentId)}/cancel", options, requestOptions); diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodService.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodService.cs index 9f5525d290..385f888fff 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodService.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodService.cs @@ -24,9 +24,6 @@ public PaymentMethodService(IStripeClient client) public override string BasePath => "/v1/payment_methods"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandCustomer { get; set; } - public virtual PaymentMethod Attach(string paymentMethodId, PaymentMethodAttachOptions options, RequestOptions requestOptions = null) { return this.Request(HttpMethod.Post, $"{this.InstanceUrl(paymentMethodId)}/attach", options, requestOptions); diff --git a/src/Stripe.net/Services/Payouts/PayoutService.cs b/src/Stripe.net/Services/Payouts/PayoutService.cs index f5372a04ae..9769fd0945 100644 --- a/src/Stripe.net/Services/Payouts/PayoutService.cs +++ b/src/Stripe.net/Services/Payouts/PayoutService.cs @@ -24,15 +24,6 @@ public PayoutService(IStripeClient client) public override string BasePath => "/v1/payouts"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandBalanceTransaction { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandDestination { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandFailureBalanceTransaction { get; set; } - public virtual Payout Cancel(string payoutId, RequestOptions requestOptions = null) { return this.Request(HttpMethod.Post, $"{this.InstanceUrl(payoutId)}/cancel", null, requestOptions); diff --git a/src/Stripe.net/Services/Persons/PersonService.cs b/src/Stripe.net/Services/Persons/PersonService.cs index c8b42dee01..f523da3c1e 100644 --- a/src/Stripe.net/Services/Persons/PersonService.cs +++ b/src/Stripe.net/Services/Persons/PersonService.cs @@ -23,12 +23,6 @@ public PersonService(IStripeClient client) public override string BasePath => "/v1/accounts/{PARENT_ID}/persons"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandBalanceTransaction { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandTransfer { get; set; } - public virtual Person Create(string accountId, PersonCreateOptions options = null, RequestOptions requestOptions = null) { return this.CreateNestedEntity(accountId, options, requestOptions); diff --git a/src/Stripe.net/Services/Plans/PlanService.cs b/src/Stripe.net/Services/Plans/PlanService.cs index c74b2404eb..86ebfacfff 100644 --- a/src/Stripe.net/Services/Plans/PlanService.cs +++ b/src/Stripe.net/Services/Plans/PlanService.cs @@ -24,9 +24,6 @@ public PlanService(IStripeClient client) public override string BasePath => "/v1/plans"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandProduct { get; set; } - public virtual Plan Create(PlanCreateOptions options, RequestOptions requestOptions = null) { return this.CreateEntity(options, requestOptions); diff --git a/src/Stripe.net/Services/Refunds/RefundService.cs b/src/Stripe.net/Services/Refunds/RefundService.cs index 7813ed4222..da6400d5bb 100644 --- a/src/Stripe.net/Services/Refunds/RefundService.cs +++ b/src/Stripe.net/Services/Refunds/RefundService.cs @@ -23,15 +23,6 @@ public RefundService(IStripeClient client) public override string BasePath => "/v1/refunds"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandBalanceTransaction { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandCharge { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandFailureBalanceTransaction { get; set; } - public virtual Refund Create(RefundCreateOptions options, RequestOptions requestOptions = null) { return this.CreateEntity(options, requestOptions); diff --git a/src/Stripe.net/Services/Skus/SkuService.cs b/src/Stripe.net/Services/Skus/SkuService.cs index 6831506f54..e297b09489 100644 --- a/src/Stripe.net/Services/Skus/SkuService.cs +++ b/src/Stripe.net/Services/Skus/SkuService.cs @@ -24,9 +24,6 @@ public SkuService(IStripeClient client) public override string BasePath => "/v1/skus"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandProduct { get; set; } - public virtual Sku Create(SkuCreateOptions options, RequestOptions requestOptions = null) { return this.CreateEntity(options, requestOptions); diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionService.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionService.cs index d9ea1a5b7d..9e708cbaa8 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionService.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionService.cs @@ -23,18 +23,6 @@ public SubscriptionService(IStripeClient client) public override string BasePath => "/v1/subscriptions"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandCustomer { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandDefaultPaymentMethod { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandDefaultSource { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandLatestInvoice { get; set; } - public virtual Subscription Cancel(string subscriptionId, SubscriptionCancelOptions options, RequestOptions requestOptions = null) { return this.DeleteEntity(subscriptionId, options, requestOptions); diff --git a/src/Stripe.net/Services/TaxIds/TaxIdService.cs b/src/Stripe.net/Services/TaxIds/TaxIdService.cs index 01dd318e5f..e4dfc3262e 100644 --- a/src/Stripe.net/Services/TaxIds/TaxIdService.cs +++ b/src/Stripe.net/Services/TaxIds/TaxIdService.cs @@ -22,9 +22,6 @@ public TaxIdService(IStripeClient client) public override string BasePath => "/v1/customers/{PARENT_ID}/tax_ids"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandCustomer { get; set; } - public virtual TaxId Create(string customerId, TaxIdCreateOptions options = null, RequestOptions requestOptions = null) { return this.CreateNestedEntity(customerId, options, requestOptions); diff --git a/src/Stripe.net/Services/TaxRates/TaxRateService.cs b/src/Stripe.net/Services/TaxRates/TaxRateService.cs index f09c50caec..664c151f2d 100644 --- a/src/Stripe.net/Services/TaxRates/TaxRateService.cs +++ b/src/Stripe.net/Services/TaxRates/TaxRateService.cs @@ -23,9 +23,6 @@ public TaxRateService(IStripeClient client) public override string BasePath => "/v1/tax_rates"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandCustomer { get; set; } - public virtual TaxRate Create(TaxRateCreateOptions options, RequestOptions requestOptions = null) { return this.CreateEntity(options, requestOptions); diff --git a/src/Stripe.net/Services/Topups/TopupService.cs b/src/Stripe.net/Services/Topups/TopupService.cs index a1a378a550..049612b300 100644 --- a/src/Stripe.net/Services/Topups/TopupService.cs +++ b/src/Stripe.net/Services/Topups/TopupService.cs @@ -24,12 +24,6 @@ public TopupService(IStripeClient client) public override string BasePath => "/v1/topups"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandBalanceTransaction { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandSource { get; set; } - public virtual Topup Cancel(string topupId, RequestOptions requestOptions = null) { return this.Request(HttpMethod.Post, $"{this.InstanceUrl(topupId)}/cancel", null, requestOptions); diff --git a/src/Stripe.net/Services/TransferReversals/TransferReversalService.cs b/src/Stripe.net/Services/TransferReversals/TransferReversalService.cs index 3f39eef6ec..7b903dd3c3 100644 --- a/src/Stripe.net/Services/TransferReversals/TransferReversalService.cs +++ b/src/Stripe.net/Services/TransferReversals/TransferReversalService.cs @@ -23,12 +23,6 @@ public TransferReversalService(IStripeClient client) public override string BasePath => "/v1/transfers/{PARENT_ID}/reversals"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandBalanceTransaction { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandTransfer { get; set; } - public virtual TransferReversal Create(string transferId, TransferReversalCreateOptions options = null, RequestOptions requestOptions = null) { return this.CreateNestedEntity(transferId, options, requestOptions); diff --git a/src/Stripe.net/Services/Transfers/TransferService.cs b/src/Stripe.net/Services/Transfers/TransferService.cs index 44f40f1b5f..870ebff716 100644 --- a/src/Stripe.net/Services/Transfers/TransferService.cs +++ b/src/Stripe.net/Services/Transfers/TransferService.cs @@ -23,18 +23,6 @@ public TransferService(IStripeClient client) public override string BasePath => "/v1/transfers"; - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandBalanceTransaction { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandDestination { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandDestinationPayment { get; set; } - - [Obsolete("Use BaseOptions.AddExpand instead.")] - public bool ExpandSourceTransaction { get; set; } - public virtual Transfer Create(TransferCreateOptions options, RequestOptions requestOptions = null) { return this.CreateEntity(options, requestOptions); diff --git a/src/StripeTests/Infrastructure/TestData/TestService.cs b/src/StripeTests/Infrastructure/TestData/TestService.cs index 34b49e7884..dfe3712c01 100644 --- a/src/StripeTests/Infrastructure/TestData/TestService.cs +++ b/src/StripeTests/Infrastructure/TestData/TestService.cs @@ -10,9 +10,5 @@ public TestService() } public override string BasePath => "/charges"; - - public bool ExpandSimple { get; set; } - - public bool ExpandMultiWordProperty { get; set; } } } diff --git a/src/StripeTests/Services/Customers/CustomerServiceTest.cs b/src/StripeTests/Services/Customers/CustomerServiceTest.cs index e86cf7a2f1..7b4511b9a6 100644 --- a/src/StripeTests/Services/Customers/CustomerServiceTest.cs +++ b/src/StripeTests/Services/Customers/CustomerServiceTest.cs @@ -99,7 +99,6 @@ public async Task GetAsync() [Fact] public void List() { - this.service.ExpandDefaultSource = true; var customers = this.service.List(this.listOptions); this.AssertRequest(HttpMethod.Get, "/v1/customers"); Assert.NotNull(customers); @@ -111,7 +110,6 @@ public void List() [Fact] public async Task ListAsync() { - this.service.ExpandDefaultSource = true; var customers = await this.service.ListAsync(this.listOptions); this.AssertRequest(HttpMethod.Get, "/v1/customers"); Assert.NotNull(customers); @@ -123,7 +121,6 @@ public async Task ListAsync() [Fact] public void ListAutoPaging() { - this.service.ExpandDefaultSource = true; var customers = this.service.ListAutoPaging(this.listOptions).ToList(); Assert.NotNull(customers); Assert.Equal("customer", customers[0].Object); diff --git a/src/StripeTests/Services/_base/ServiceTest.cs b/src/StripeTests/Services/_base/ServiceTest.cs index 4ecf64cb58..b9eb0ee754 100644 --- a/src/StripeTests/Services/_base/ServiceTest.cs +++ b/src/StripeTests/Services/_base/ServiceTest.cs @@ -12,6 +12,7 @@ namespace StripeTests public class ServiceTest : BaseStripeTest { [Fact] +<<<<<<< HEAD public void Get_ExpandProperties() { var client = new TestClient(); @@ -27,6 +28,8 @@ public void Get_ExpandProperties() } [Fact] +======= +>>>>>>> Remove all Expand* fields (#1715) public void Get_ThrowsIfIdIsNull() { var client = new TestClient(); @@ -53,30 +56,6 @@ public void Get_ThrowsIfIdIsWhitespace() Assert.Throws(() => service.Get(" ")); } - [Fact] - public void List_ExpandProperties() - { - var client = new TestClient(); - var service = new TestService(client); - - service.ExpandSimple = true; - service.ExpandMultiWordProperty = true; - var options = new ListOptions(); - - service.List(options); - - Assert.Equal(2, client.LastOptions.Expand.Count); - Assert.Contains("data.simple", client.LastOptions.Expand); - Assert.Contains("data.multi_word_property", client.LastOptions.Expand); - - // Do a second request to check that expand properties are not duplicated - service.List(options); - - Assert.Equal(2, client.LastOptions.Expand.Count); - Assert.Contains("data.simple", client.LastOptions.Expand); - Assert.Contains("data.multi_word_property", client.LastOptions.Expand); - } - private class TestClient : IStripeClient { public string ApiBase { get; } @@ -121,10 +100,6 @@ public TestService(IStripeClient client) public override string BasePath => "/v1/test_entities"; - public bool ExpandSimple { get; set; } - - public bool ExpandMultiWordProperty { get; set; } - public virtual TestEntity Get(string id, BaseOptions options = null, RequestOptions requestOptions = null) { return this.GetEntity(id, options, requestOptions);