/// <summary> /// Gets the instance. /// </summary> /// <returns>The instance.</returns> private BalanceService GetInstance() { var config = new MonzoConfiguration() { httpService = this.httpService.Object, logger = this.logger.Object, jsonService = this.jsonService.Object, authService = this.authService.Object }; return(new BalanceService(config)); }
/// <summary> /// Initializes a new instance of the <see cref="T:Monzo.Framework.Services.BaseService"/> class. /// </summary> /// <param name="configuration">Library configurations</param> protected BaseService(MonzoConfiguration configuration) { this.httpService = configuration.httpService ?? throw new ArgumentNullException(nameof(httpService)); this.logger = configuration.logger ?? throw new ArgumentNullException(nameof(logger)); this.jsonService = configuration.jsonService ?? throw new ArgumentNullException(nameof(jsonService)); this.authetication = configuration.GetAuth(); if (string.IsNullOrWhiteSpace(authetication.AccessToken)) { throw new ArgumentNullException(nameof(authetication.AccessToken)); } }
/// <summary> /// Initializes a new instance of the <see cref="T:Monzo.Framework.Services.BalanceService"/> class. /// </summary> ///<param name="configuration">library configuration</param> public TransactionService( MonzoConfiguration configuration) : base(configuration) { }
/// <summary> /// Initializes a new instance of the <see cref="T:Monzo.Framework.Services.BalanceService"/> class. /// </summary> ///<param name="configuration">library configuration</param> public BalanceService(MonzoConfiguration configuration) : base(configuration) { }
/// <summary> /// Initializes a new instance of the <see cref="T:Monzo.Framework.Services.AccountService"/> class. /// </summary> /// <param name="config">Library configurations</param> public AccountService(MonzoConfiguration config) : base(config) { }
/// <summary> /// Initializes a new instance of the <see cref="T:Monzo.Framework.Services.PotService"/> class. /// </summary> ///<param name="configuration">library configuration</param> public PotService( MonzoConfiguration configuration) : base(configuration) { }