Пример #1
0
 public CustomerHealthCheck(
     ILogger <CustomerHealthCheck> logger,
     ICustomerClient client)
 {
     _logger = logger;
     _client = client;
 }
Пример #2
0
 public CustomerService(ICustomerClient customerClient, ILocalStorageService storage,
                        AuthenticationStateProvider authenticationStateProvider, NavigationManager navigation)
 {
     _customerClient = customerClient;
     _storage        = storage;
     _authenticationStateProvider = authenticationStateProvider;
     _navigation = navigation;
 }
Пример #3
0
 public CustomerOrderService(
     ILogger <CustomerOrderService> logger,
     ICustomerClient customerClient,
     IOrderClient orderClient)
 {
     _logger         = logger;
     _customerClient = customerClient;
     _orderClient    = orderClient;
 }
 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);
 }
Пример #5
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);
        }
Пример #6
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);
        }
Пример #7
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);
        }
Пример #8
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);
        }
Пример #9
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 AccountCore(IAccountDataAccess accountDataAccess, ICustomerClient customerClient, ITransactionClient transactionClient)
 {
     this.accountDataAccess = accountDataAccess;
     this.customerClient    = customerClient;
     this.transactionClient = transactionClient;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CustomerStorageClient"/> class.
 /// </summary>
 /// <param name="customerClient">The customer client.</param>
 /// <param name="mapper">The mapper.</param>
 /// <autogeneratedoc />
 public CustomerStorageClient(ICustomerClient customerClient, IMapper mapper)
 {
     _customerClient = customerClient;
     _mapper         = mapper;
 }
 public void Init()
 {
     _stripe = Substitute.For <IStripeClient>();
     _client = new CustomerClient(_stripe);
 }
        public CustomerService(IOptionsMonitor <WorkModuleOptions> optionsAccessor, ITokenService tokenService) : base(optionsAccessor, tokenService)
        {
            AccessTokenType = AccessTokenType.Customer;

            _customerClient = RestService.For <ICustomerClient>(BaseUrl);
        }
Пример #14
0
 public CustomerOverviewClient(IMapper mapper, ICustomerClient customerClient) : base(mapper)
 {
     _customerClient = customerClient;
 }
 public void Init()
 {
     _stripe = Substitute.For<IStripeClient>();
     _client = new CustomerClient(_stripe);
 }
Пример #16
0
 public CustomerController()
 {
     this._customerClient = new CustomerClient(AppSettings.MollieApiKey);
 }
Пример #17
0
 public CustomerController() {
     this._mollieClient = new MollieClient(AppSettings.MollieApiKey);
 }