public void InitClass() { this.EnsureTestApiKey(); this._paymentClient = new PaymentClient(this.ApiTestKey); this._paymentMethodClient = new PaymentMethodClient(this.ApiTestKey); this._refundClient = new RefundClient(this.ApiTestKey); this._subscriptionClient = new SubscriptionClient(this.ApiTestKey); this._mandateClient = new MandateClient(this.ApiTestKey); this._customerClient = new CustomerClient(this.ApiTestKey); this._profileClient = new ProfileClient(this.ApiTestKey); }
public BaseApiTestFixture() { EnsureTestApiKey(); PaymentClient = new PaymentClient(this.ApiTestKey); PaymentMethodClient = new PaymentMethodClient(this.ApiTestKey); RefundClient = new RefundClient(this.ApiTestKey); IssuerClient = new IssuerClient(this.ApiTestKey); SubscriptionClient = new SubscriptionClient(this.ApiTestKey); MandateClient = new MandateClient(this.ApiTestKey); CustomerClient = new CustomerClient(this.ApiTestKey); ProfileClient = new ProfileClient(this.ApiTestKey); }
public BaseApiTestFixture() { EnsureTestApiKey(); ClientService = new ClientService(ApiTestKey); PaymentClient = new PaymentClient(ClientService); PaymentMethodClient = new PaymentMethodClient(ClientService); RefundClient = new RefundClient(ClientService); SubscriptionClient = new SubscriptionClient(ClientService); MandateClient = new MandateClient(ClientService); CustomerClient = new CustomerClient(ClientService); ProfileClient = new ProfileClient(ClientService); OrderClient = new OrderClient(ClientService); }
public MollieClient(string apiKey) { if (string.IsNullOrEmpty(apiKey)) { throw new ArgumentException("Mollie API key cannot be empty"); } this._paymentClient = new PaymentClient(apiKey); this._paymentMethodClient = new PaymentMethodClient(apiKey); this._refundClient = new RefundClient(apiKey); this._issuerClient = new IssuerClient(apiKey); this._subscriptionClient = new SubscriptionClient(apiKey); this._mandateClient = new MandateClient(apiKey); this._customerClient = new CustomerClient(apiKey); }
public void InitClass() { string apiKey = this.GetApiKeyFromConfiguration(); this.EnsureTestApiKey(apiKey); this._paymentClient = new PaymentClient(apiKey); this._paymentMethodClient = new PaymentMethodClient(apiKey); this._refundClient = new RefundClient(apiKey); this._subscriptionClient = new SubscriptionClient(apiKey); this._mandateClient = new MandateClient(apiKey); this._customerClient = new CustomerClient(apiKey); this._profileClient = new ProfileClient(apiKey); this._orderClient = new OrderClient(apiKey); this._shipmentClient = new ShipmentClient(apiKey); }
public BaseApiTestFixture() { var builder = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true); Configuration = builder.Build(); var services = new ServiceCollection(); services.Configure <AppSettings>(Configuration.GetSection(nameof(AppSettings))); var appSettings = new AppSettings(); Configuration.GetSection(nameof(AppSettings)).Bind(appSettings); services.AddHttpClient(); services.AddSingleton <IClientService, ClientService>(); services.AddSingleton <IJsonConverterService, JsonConverterService>(); services.AddSingleton <IValidatorService, ValidatorService>(); // Register all available forms services.AddTransient <PaymentClient>(); services.AddTransient <PaymentMethodClient>(); services.AddTransient <RefundClient>(); services.AddTransient <SubscriptionClient>(); services.AddTransient <MandateClient>(); services.AddTransient <CustomerClient>(); services.AddTransient <CustomerClient>(); services.AddTransient <ProfileClient>(); services.AddTransient <OrderClient>(); ServiceProvider = services.BuildServiceProvider(); ClientService = ServiceProvider.GetRequiredService <IClientService>(); PaymentClient = ServiceProvider.GetRequiredService <PaymentClient>(); PaymentMethodClient = ServiceProvider.GetRequiredService <PaymentMethodClient>(); RefundClient = ServiceProvider.GetRequiredService <RefundClient>(); SubscriptionClient = ServiceProvider.GetRequiredService <SubscriptionClient>(); MandateClient = ServiceProvider.GetRequiredService <MandateClient>(); CustomerClient = ServiceProvider.GetRequiredService <CustomerClient>(); CustomerClient = ServiceProvider.GetRequiredService <CustomerClient>(); ProfileClient = ServiceProvider.GetRequiredService <ProfileClient>(); OrderClient = ServiceProvider.GetRequiredService <OrderClient>(); EnsureTestApiKey(); }
public RefundPaymentClient(IRefundClient refundClient, IPaymentClient paymentClient) { _refundClient = refundClient; _paymentClient = paymentClient; }
public RefundController() { this._refundClient = new RefundClient(AppSettings.MollieApiKey); }
public void Init() { _stripe = Substitute.For <IStripeClient>(); _client = new RefundClient(_stripe); }
public void Init() { _stripe = Substitute.For<IStripeClient>(); _client = new RefundClient(_stripe); }
public BalancedService(string key, IBalancedRest rest) { this.accountClient = new AccountClient(this, rest); this.bankClient = new BankAccountClient(this, rest); this.cardClient = new CardClient(this, rest); this.holdClient = new HoldClient(this, rest); this.creditClient = new CreditClient(this, rest); this.debitClient = new DebitClient(this, rest); this.refundClient = new RefundClient(this, rest); this.eventClient = new EventClient(this, rest); this.verificationClient = new VerificationClient(this, rest); this.marketplaceClient = new MarketplaceClient(this, rest); this.key = key; }
public RefundController() { this._mollieClient = new MollieClient(AppSettings.MollieApiKey); }
public RefundPaymentClient(IRefundClient refundClient, IPaymentClient paymentClient) { this._refundClient = refundClient; this._paymentClient = paymentClient; }