Skip to content

Commit

Permalink
Remove all Expand* fields (#1715)
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-stripe authored and ob-stripe committed Aug 16, 2019
1 parent 5212153 commit 99c738b
Show file tree
Hide file tree
Showing 32 changed files with 3 additions and 245 deletions.
1 change: 0 additions & 1 deletion src/Stripe.net/Entities/Charges/Charge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ public Invoice Invoice

/// <summary>
/// The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the Connect documentation for details.
/// <para>To populate the OnBehalfOf entity, you need to set ExpandOnBehalfOf to true on your service before invoking a service method.</para>
/// </summary>
[JsonIgnore]
public string OnBehalfOfId
Expand Down
1 change: 0 additions & 1 deletion src/Stripe.net/Entities/Plans/Plan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public class Plan : StripeEntity<Plan>, IHasId, IHasMetadata, IHasObject

/// <summary>
/// ID of the product linked to this plan
/// <para>You can expand the Product by setting the ExpandProduct property on the service to true</para>
/// </summary>
[JsonIgnore]
public string ProductId
Expand Down
3 changes: 0 additions & 3 deletions src/Stripe.net/Services/Account/AccountService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
15 changes: 0 additions & 15 deletions src/Stripe.net/Services/ApplicationFees/ApplicationFeeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 0 additions & 3 deletions src/Stripe.net/Services/BankAccounts/BankAccountService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 0 additions & 3 deletions src/Stripe.net/Services/Capabilities/CapabilityService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 0 additions & 6 deletions src/Stripe.net/Services/Cards/CardService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
39 changes: 0 additions & 39 deletions src/Stripe.net/Services/Charges/ChargeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 0 additions & 5 deletions src/Stripe.net/Services/Customers/CustomerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 0 additions & 3 deletions src/Stripe.net/Services/Disputes/DisputeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 0 additions & 9 deletions src/Stripe.net/Services/InvoiceItems/InvoiceItemService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 0 additions & 12 deletions src/Stripe.net/Services/Invoices/InvoiceService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 0 additions & 6 deletions src/Stripe.net/Services/Orders/OrderService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
18 changes: 0 additions & 18 deletions src/Stripe.net/Services/PaymentIntents/PaymentIntentService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 0 additions & 9 deletions src/Stripe.net/Services/Payouts/PayoutService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 0 additions & 6 deletions src/Stripe.net/Services/Persons/PersonService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 0 additions & 3 deletions src/Stripe.net/Services/Plans/PlanService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 0 additions & 9 deletions src/Stripe.net/Services/Refunds/RefundService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 0 additions & 3 deletions src/Stripe.net/Services/Skus/SkuService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 0 additions & 12 deletions src/Stripe.net/Services/Subscriptions/SubscriptionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 0 additions & 3 deletions src/Stripe.net/Services/TaxIds/TaxIdService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 0 additions & 3 deletions src/Stripe.net/Services/TaxRates/TaxRateService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 0 additions & 6 deletions src/Stripe.net/Services/Topups/TopupService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading

0 comments on commit 99c738b

Please sign in to comment.