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);
 }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }
Пример #4
0
        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);
        }
Пример #5
0
        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);
        }
Пример #6
0
        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 PaymentMethodOverviewClient(IMapper mapper, IPaymentMethodClient paymentMethodClient) : base(mapper)
 {
     this._paymentMethodClient = paymentMethodClient;
 }