Skip to content

Commit

Permalink
Make client in services readonly (#1639)
Browse files Browse the repository at this point in the history
  • Loading branch information
ob-stripe committed Jun 6, 2019
1 parent feaeff3 commit ecaa5a3
Show file tree
Hide file tree
Showing 144 changed files with 255 additions and 240 deletions.
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/Account/AccountService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public AccountService()
{
}

public AccountService(string apiKey)
: base(apiKey)
public AccountService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/AccountLinks/AccountLinkService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public AccountLinkService()
{
}

public AccountLinkService(string apiKey)
: base(apiKey)
public AccountLinkService(IStripeClient client)
: base(client)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public ApplePayDomainService()
{
}

public ApplePayDomainService(string apiKey)
: base(apiKey)
public ApplePayDomainService(IStripeClient client)
: base(client)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public ApplicationFeeRefundService()
{
}

public ApplicationFeeRefundService(string apiKey)
: base(apiKey)
public ApplicationFeeRefundService(IStripeClient client)
: base(client)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public ApplicationFeeService()
{
}

public ApplicationFeeService(string apiKey)
: base(apiKey)
public ApplicationFeeService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/Balance/BalanceService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public BalanceService()
{
}

public BalanceService(string apiKey)
: base(apiKey)
public BalanceService(IStripeClient client)
: base(client)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public BalanceTransactionService()
{
}

public BalanceTransactionService(string apiKey)
: base(apiKey)
public BalanceTransactionService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/BankAccounts/BankAccountService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public BankAccountService()
{
}

public BankAccountService(string apiKey)
: base(apiKey)
public BankAccountService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/Capabilities/CapabilityService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public CapabilityService()
{
}

public CapabilityService(string apiKey)
: base(apiKey)
public CapabilityService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/Cards/CardService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public CardService()
{
}

public CardService(string apiKey)
: base(apiKey)
public CardService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/Charges/ChargeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public ChargeService()
{
}

public ChargeService(string apiKey)
: base(apiKey)
public ChargeService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/Checkout/SessionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public SessionService()
{
}

public SessionService(string apiKey)
: base(apiKey)
public SessionService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/CountrySpecs/CountrySpecService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public CountrySpecService()
{
}

public CountrySpecService(string apiKey)
: base(apiKey)
public CountrySpecService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/Coupons/CouponService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public CouponService()
{
}

public CouponService(string apiKey)
: base(apiKey)
public CouponService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/CreditNotes/CreditNoteService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public CreditNoteService()
{
}

public CreditNoteService(string apiKey)
: base(apiKey)
public CreditNoteService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/Customers/CustomerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public CustomerService()
{
}

public CustomerService(string apiKey)
: base(apiKey)
public CustomerService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/Discounts/DiscountService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ public DiscountService()
{
}

public DiscountService(string apiKey)
: base(apiKey)
public DiscountService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/Disputes/DisputeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public DisputeService()
{
}

public DisputeService(string apiKey)
: base(apiKey)
public DisputeService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/EphemeralKeys/EphemeralKeyService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public EphemeralKeyService()
{
}

public EphemeralKeyService(string apiKey)
: base(apiKey)
public EphemeralKeyService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/Events/EventService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public EventService()
{
}

public EventService(string apiKey)
: base(apiKey)
public EventService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/ExchangeRates/ExchangeRateService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public ExchangeRateService()
{
}

public ExchangeRateService(string apiKey)
: base(apiKey)
public ExchangeRateService(IStripeClient client)
: base(client)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public ExternalAccountService()
{
}

public ExternalAccountService(string apiKey)
: base(apiKey)
public ExternalAccountService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/FileLinks/FileLinkService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public FileLinkService()
{
}

public FileLinkService(string apiKey)
: base(apiKey)
public FileLinkService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/Files/FileService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public FileService()
{
}

public FileService(string apiKey)
: base(apiKey)
public FileService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/InvoiceItems/InvoiceItemService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public InvoiceItemService()
{
}

public InvoiceItemService(string apiKey)
: base(apiKey)
public InvoiceItemService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/Invoices/InvoiceService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public InvoiceService()
{
}

public InvoiceService(string apiKey)
: base(apiKey)
public InvoiceService(IStripeClient client)
: base(client)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public AuthorizationService()
{
}

public AuthorizationService(string apiKey)
: base(apiKey)
public AuthorizationService(IStripeClient client)
: base(client)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public CardholderService()
{
}

public CardholderService(string apiKey)
: base(apiKey)
public CardholderService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/Issuing/Cards/CardService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public CardService()
{
}

public CardService(string apiKey)
: base(apiKey)
public CardService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/Issuing/Disputes/DisputeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public DisputeService()
{
}

public DisputeService(string apiKey)
: base(apiKey)
public DisputeService(IStripeClient client)
: base(client)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public TransactionService()
{
}

public TransactionService(string apiKey)
: base(apiKey)
public TransactionService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/LoginLink/LoginLinkService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public LoginLinkService()
{
}

public LoginLinkService(string apiKey)
: base(apiKey)
public LoginLinkService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/OAuth/OAuthTokenService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public OAuthTokenService()
{
}

public OAuthTokenService(string apiKey)
: base(apiKey)
public OAuthTokenService(IStripeClient client)
: base(client)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Services/Orders/OrderService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public OrderService()
{
}

public OrderService(string apiKey)
: base(apiKey)
public OrderService(IStripeClient client)
: base(client)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public PaymentIntentService()
{
}

public PaymentIntentService(string apiKey)
: base(apiKey)
public PaymentIntentService(IStripeClient client)
: base(client)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public PaymentMethodService()
{
}

public PaymentMethodService(string apiKey)
: base(apiKey)
public PaymentMethodService(IStripeClient client)
: base(client)
{
}

Expand Down
Loading

0 comments on commit ecaa5a3

Please sign in to comment.