Skip to content

Commit

Permalink
Merge pull request #1105 from slimCODE/pr/paramless-ctor
Browse files Browse the repository at this point in the history
#1104: Added real parameterless constructors to all services
  • Loading branch information
ob-stripe authored Feb 22, 2018
2 parents 6184cdc + 19e6215 commit d666da5
Show file tree
Hide file tree
Showing 37 changed files with 89 additions and 37 deletions.
5 changes: 4 additions & 1 deletion src/Stripe.net/Services/3DSecure/Stripe3DSecureService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ namespace Stripe
[Obsolete("Use the StripeSourceService instead.")]
public class Stripe3DSecureService : StripeBasicService<Stripe3DSecure>
{
public Stripe3DSecureService(string apiKey = null) : base(apiKey) { }
public Stripe3DSecureService() : base(null) { }
public Stripe3DSecureService(string apiKey) : base(apiKey) { }



// Sync
public virtual Stripe3DSecure Create(Stripe3DSecureCreateOptions createOptions, StripeRequestOptions requestOptions = null)
Expand Down
4 changes: 3 additions & 1 deletion src/Stripe.net/Services/Account/StripeAccountService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ namespace Stripe
{
public class StripeAccountService : StripeService
{
public StripeAccountService(string apiKey = null) : base(apiKey) { }
public StripeAccountService() : base(null) { }
public StripeAccountService(string apiKey) : base(apiKey) { }



//Sync
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace Stripe
{
public class StripeApplePayDomainService : StripeBasicService<StripeApplePayDomain>
{
public StripeApplePayDomainService(string apiKey = null) : base(apiKey) { }
public StripeApplePayDomainService() : base(null) { }
public StripeApplePayDomainService(string apiKey) : base(apiKey) { }



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace Stripe
{
public class StripeApplicationFeeRefundService : StripeBasicService<StripeApplicationFeeRefund>
{
public StripeApplicationFeeRefundService(string apiKey = null) : base(apiKey) { }
public StripeApplicationFeeRefundService() : base(null) { }
public StripeApplicationFeeRefundService(string apiKey) : base(apiKey) { }

// Sync
public virtual StripeApplicationFeeRefund Create(string applicationFeeId, StripeApplicationFeeRefundCreateOptions createOptions = null, StripeRequestOptions requestOptions = null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace Stripe
{
public class StripeApplicationFeeService : StripeService
{
public StripeApplicationFeeService(string apiKey = null) : base(apiKey) { }
public StripeApplicationFeeService() : base(null) { }
public StripeApplicationFeeService(string apiKey) : base(apiKey) { }

public bool ExpandAccount { get; set; }
public bool ExpandApplication { get; set; }
Expand Down
5 changes: 4 additions & 1 deletion src/Stripe.net/Services/Balance/StripeBalanceService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ namespace Stripe
{
public class StripeBalanceService : StripeService
{
public StripeBalanceService(string apiKey = null) : base(apiKey) { }
public StripeBalanceService() : base(null) { }
public StripeBalanceService(string apiKey) : base(apiKey) { }

public bool ExpandSource { get; set; }



//Sync
public virtual StripeBalance Get(StripeRequestOptions requestOptions = null)
{
Expand Down
3 changes: 2 additions & 1 deletion src/Stripe.net/Services/BankAccounts/BankAccountService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace Stripe
{
public class BankAccountService : StripeService
{
public BankAccountService(string apiKey = null) : base(apiKey) { }
public BankAccountService() : base(null) { }
public BankAccountService(string apiKey) : base(apiKey) { }

public bool ExpandCustomer { get; set; }

Expand Down
3 changes: 2 additions & 1 deletion src/Stripe.net/Services/Cards/StripeCardService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ namespace Stripe
{
public class StripeCardService : StripeService
{
public StripeCardService(string apiKey = null) : base(apiKey) { }
public StripeCardService() : base(null) { }
public StripeCardService(string apiKey) : base(apiKey) { }

public bool ExpandCustomer { get; set; }
public bool ExpandRecipient { get; set; }
Expand Down
4 changes: 3 additions & 1 deletion src/Stripe.net/Services/Charges/StripeChargeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ namespace Stripe
{
public class StripeChargeService : StripeService
{
public StripeChargeService(string apiKey = null) : base(apiKey) { }
public StripeChargeService() : base(null) { }
public StripeChargeService(string apiKey) : base(apiKey) { }

public bool ExpandApplication { get; set; }
public bool ExpandApplicationFee { get; set; }
Expand All @@ -22,6 +23,7 @@ public StripeChargeService(string apiKey = null) : base(apiKey) { }
public bool ExpandOutcome { get; set; }



//Sync
public virtual StripeCharge Create(StripeChargeCreateOptions createOptions, StripeRequestOptions requestOptions = null)
{
Expand Down
3 changes: 2 additions & 1 deletion src/Stripe.net/Services/CountrySpecs/CountrySpecService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace Stripe
{
public class CountrySpecService : StripeService
{
public CountrySpecService(string apiKey = null) : base(apiKey) { }
public CountrySpecService() : base(null) { }
public CountrySpecService(string apiKey) : base(apiKey) { }



Expand Down
3 changes: 2 additions & 1 deletion src/Stripe.net/Services/Coupons/StripeCouponService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ namespace Stripe
{
public class StripeCouponService : StripeService
{
public StripeCouponService(string apiKey = null) : base(apiKey) { }
public StripeCouponService() : base(null) { }
public StripeCouponService(string apiKey) : base(apiKey) { }



Expand Down
3 changes: 2 additions & 1 deletion src/Stripe.net/Services/Customers/StripeCustomerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace Stripe
{
public class StripeCustomerService : StripeService
{
public StripeCustomerService(string apiKey = null) : base(apiKey) { }
public StripeCustomerService() : base(null) { }
public StripeCustomerService(string apiKey) : base(apiKey) { }

public bool ExpandDefaultSource { get; set; }
public bool ExpandDefaultCustomerBankAccount { get; set; }
Expand Down
5 changes: 4 additions & 1 deletion src/Stripe.net/Services/Discounts/StripeDiscountService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ namespace Stripe
{
public class StripeDiscountService : StripeBasicService<StripeDiscount>
{
public StripeDiscountService(string apiKey = null) : base(apiKey) { }
public StripeDiscountService() : base(null) { }
public StripeDiscountService(string apiKey) : base(apiKey) { }



// Sync
public virtual StripeDeleted DeleteCustomerDiscount(string customerId, StripeRequestOptions requestOptions = null)
Expand Down
5 changes: 4 additions & 1 deletion src/Stripe.net/Services/Disputes/StripeDisputeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ namespace Stripe
{
public class StripeDisputeService : StripeBasicService<StripeDispute>
{
public StripeDisputeService(string apiKey = null) : base(apiKey) { }
public StripeDisputeService() : base(null) { }
public StripeDisputeService(string apiKey) : base(apiKey) { }

public bool ExpandCharge { get; set; }



// Sync
public virtual StripeDispute Get(string disputeId, StripeRequestOptions requestOptions = null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ namespace Stripe
{
public class StripeEphemeralKeyService : StripeBasicService<StripeEphemeralKey>
{
public StripeEphemeralKeyService(string apiKey = null) : base(apiKey) { }
public StripeEphemeralKeyService() : base(null) { }
public StripeEphemeralKeyService(string apiKey) : base(apiKey) { }



// Sync
public virtual StripeEphemeralKey Create(StripeEphemeralKeyCreateOptions createOptions, StripeRequestOptions requestOptions = null)
Expand Down
3 changes: 2 additions & 1 deletion src/Stripe.net/Services/Events/StripeEventService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace Stripe
{
public class StripeEventService : StripeService
{
public StripeEventService(string apiKey = null) : base(apiKey) { }
public StripeEventService() : base(null) { }
public StripeEventService(string apiKey) : base(apiKey) { }



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace Stripe
{
public class StripeExchangeRateService : StripeService
{
public StripeExchangeRateService(string apiKey = null) : base(apiKey) { }
public StripeExchangeRateService() : base(null) { }
public StripeExchangeRateService(string apiKey) : base(apiKey) { }



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace Stripe
{
public class StripeExternalAccountService : StripeBasicService<StripeExternalAccount>
{
public StripeExternalAccountService(string apiKey = null) : base(apiKey) { }
public StripeExternalAccountService() : base(null) { }
public StripeExternalAccountService(string apiKey) : base(apiKey) { }



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ namespace Stripe
{
public class StripeFileUploadService : StripeService
{
public StripeFileUploadService(string apiKey = null) : base(apiKey) { }
public StripeFileUploadService() : base(null) { }
public StripeFileUploadService(string apiKey) : base(apiKey) { }



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace Stripe
{
public class StripeInvoiceItemService : StripeService
{
public StripeInvoiceItemService(string apiKey = null) : base(apiKey) { }
public StripeInvoiceItemService() : base(null) { }
public StripeInvoiceItemService(string apiKey) : base(apiKey) { }

public bool ExpandCustomer { get; set; }
public bool ExpandInvoice { get; set; }
Expand Down
3 changes: 2 additions & 1 deletion src/Stripe.net/Services/Invoices/StripeInvoiceService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace Stripe
{
public class StripeInvoiceService : StripeService
{
public StripeInvoiceService(string apiKey = null) : base(apiKey) { }
public StripeInvoiceService() : base(null) { }
public StripeInvoiceService(string apiKey) : base(apiKey) { }

public bool ExpandCharge { get; set; }
public bool ExpandCustomer { get; set; }
Expand Down
5 changes: 4 additions & 1 deletion src/Stripe.net/Services/LoginLink/StripeLoginLinkService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ namespace Stripe
{
public class StripeLoginLinkService : StripeBasicService<StripeLoginLink>
{
public StripeLoginLinkService(string apiKey = null) : base(apiKey) { }
public StripeLoginLinkService() : base(null) { }
public StripeLoginLinkService(string apiKey) : base(apiKey) { }



//Sync
public virtual StripeLoginLink Create(string accountId, StripeRequestOptions requestOptions = null)
Expand Down
3 changes: 2 additions & 1 deletion src/Stripe.net/Services/OAuth/StripeOAuthTokenService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ namespace Stripe
{
public class StripeOAuthTokenService : StripeService
{
public StripeOAuthTokenService(string apiKey = null) : base(apiKey) { }
public StripeOAuthTokenService() : base(null) { }
public StripeOAuthTokenService(string apiKey) : base(apiKey) { }



Expand Down
3 changes: 2 additions & 1 deletion src/Stripe.net/Services/Orders/StripeOrderService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace Stripe
{
public class StripeOrderService : StripeBasicService<StripeOrder>
{
public StripeOrderService(string apiKey = null) : base(apiKey) { }
public StripeOrderService() : base(null) { }
public StripeOrderService(string apiKey) : base(apiKey) { }



Expand Down
3 changes: 2 additions & 1 deletion src/Stripe.net/Services/Payouts/StripePayoutService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace Stripe
{
public class StripePayoutService : StripeBasicService<StripePayout>
{
public StripePayoutService(string apiKey = null) : base(apiKey) { }
public StripePayoutService() : base(null) { }
public StripePayoutService(string apiKey) : base(apiKey) { }

public bool ExpandBalanceTransaction { get; set; }
public bool ExpandFailureBalanceTransaction { get; set; }
Expand Down
3 changes: 2 additions & 1 deletion src/Stripe.net/Services/Plans/StripePlanService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ namespace Stripe
{
public class StripePlanService : StripeService
{
public StripePlanService(string apiKey = null) : base(apiKey) { }
public StripePlanService() : base(null) { }
public StripePlanService(string apiKey) : base(apiKey) { }

public bool ExpandProduct { get; set; }

Expand Down
3 changes: 2 additions & 1 deletion src/Stripe.net/Services/Products/StripeProductService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace Stripe
{
public class StripeProductService : StripeBasicService<StripeProduct>
{
public StripeProductService(string apiKey = null) : base(apiKey) { }
public StripeProductService() : base(null) { }
public StripeProductService(string apiKey) : base(apiKey) { }



Expand Down
4 changes: 3 additions & 1 deletion src/Stripe.net/Services/Refunds/StripeRefundService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ namespace Stripe
{
public class StripeRefundService : StripeService
{
public StripeRefundService(string apiKey = null) : base(apiKey) { }
public StripeRefundService() : base(null) { }
public StripeRefundService(string apiKey) : base(apiKey) { }

public bool ExpandBalanceTransaction { get; set; }
public bool ExpandCharge { get; set; }



//Sync
public virtual StripeRefund Create(string chargeId, StripeRefundCreateOptions createOptions = null, StripeRequestOptions requestOptions = null)
{
Expand Down
3 changes: 2 additions & 1 deletion src/Stripe.net/Services/Skus/StripeSkuService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace Stripe
{
public class StripeSkuService : StripeBasicService<StripeSku>
{
public StripeSkuService(string apiKey = null) : base(apiKey) { }
public StripeSkuService() : base(null) { }
public StripeSkuService(string apiKey) : base(apiKey) { }



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ namespace Stripe
{
public class StripeSourceTransactionService : StripeBasicService<StripeSourceTransaction>
{
public StripeSourceTransactionService(string apiKey = null) : base(apiKey) { }
public StripeSourceTransactionService() : base(null) { }
public StripeSourceTransactionService(string apiKey) : base(apiKey) { }



Expand Down
3 changes: 2 additions & 1 deletion src/Stripe.net/Services/Sources/StripeSourceService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ namespace Stripe
{
public class StripeSourceService : StripeBasicService<StripeSource>
{
public StripeSourceService(string apiKey = null) : base(apiKey) { }
public StripeSourceService() : base(null) { }
public StripeSourceService(string apiKey) : base(apiKey) { }



Expand Down
3 changes: 2 additions & 1 deletion src/Stripe.net/Services/StripeBasicService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace Stripe
{
public abstract class StripeBasicService<EntityReturned> : StripeService
{
protected StripeBasicService(string apiKey = null) : base(apiKey) { }
protected StripeBasicService() : base(null) { }
protected StripeBasicService(string apiKey) : base(apiKey) { }

// ************************************************************************************
// this will replace StripeService altogether some day and steal it's name, but for now
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace Stripe
{
public class StripeSubscriptionItemService : StripeBasicService<StripeSubscriptionItem>
{
public StripeSubscriptionItemService(string apiKey = null) : base(apiKey) { }
public StripeSubscriptionItemService() : base(null) { }
public StripeSubscriptionItemService(string apiKey) : base(apiKey) { }



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace Stripe
{
public partial class StripeSubscriptionService : StripeService
{
public StripeSubscriptionService(string apiKey = null) : base(apiKey) { }
public StripeSubscriptionService() : base(null) { }
public StripeSubscriptionService(string apiKey) : base(apiKey) { }

public bool ExpandCustomer { get; set; }

Expand Down
3 changes: 2 additions & 1 deletion src/Stripe.net/Services/Tokens/StripeTokenService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ namespace Stripe
{
public class StripeTokenService : StripeService
{
public StripeTokenService(string apiKey = null) : base(apiKey) { }
public StripeTokenService() : base(null) { }
public StripeTokenService(string apiKey) : base(apiKey) { }



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace Stripe
{
public class StripeTransferReversalService : StripeBasicService<StripeTransferReversal>
{
public StripeTransferReversalService(string apiKey = null) : base(apiKey) { }
public StripeTransferReversalService() : base(null) { }
public StripeTransferReversalService(string apiKey) : base(apiKey) { }

public bool ExpandBalanceTransaction { get; set; }
public bool ExpandTransfer { get; set; }
Expand Down
Loading

0 comments on commit d666da5

Please sign in to comment.