public BaseTest() { var config = this.LoadTestSettings <SquareCredentials>(@"\..\..\credentials.csv"); this.Config = new SquareConfig(config.ApplicationId, config.ApplicationSecret); this.Credentials = new SquareMerchantCredentials(config.AccessToken, config.RefreshToken); }
public ISquareOrdersService CreateOrdersService(SquareMerchantCredentials credentials) { var locationsService = new SquareLocationsService(this._config, credentials); var itemsService = new SquareItemsService(this._config, credentials, locationsService); return(new SquareOrdersService(this._config, credentials, locationsService, itemsService)); }
public SquareItemsService(SquareConfig config, SquareMerchantCredentials credentials, ISquareLocationsService locationsService) : base(config, credentials) { Condition.Requires(locationsService, "locationsService").IsNotNull(); this._catalogApi = new CatalogApi(base.ApiConfiguration); this._inventoryApi = new InventoryApi(base.ApiConfiguration); this._locationsService = locationsService; }
public SquareOrdersService(SquareConfig config, SquareMerchantCredentials credentials, ISquareLocationsService locationsService, ISquareItemsService itemsService) : base(config, credentials) { Condition.Requires(locationsService, "locationsService").IsNotNull(); Condition.Requires(itemsService, "itemsService").IsNotNull(); _locationsService = locationsService; _itemsService = itemsService; _ordersApi = new OrdersApi(base.ApiConfiguration); }
public AuthorizedBaseService(SquareConfig config, SquareMerchantCredentials credentials) : base(config) { Condition.Requires(credentials, "credentials").IsNotNull(); this.Credentials = credentials; this.ApiConfiguration = new Square.Connect.Client.Configuration() { AccessToken = this.Credentials.AccessToken }; }
public ISquareItemsService CreateItemsService(SquareMerchantCredentials credentials) { return(new SquareItemsService(this._config, credentials, new SquareLocationsService(this._config, credentials))); }
public SquareLocationsService(SquareConfig config, SquareMerchantCredentials credentials) : base(config, credentials) { _locationsApi = new LocationsApi(base.ApiConfiguration); }
public SquareCustomersService(SquareConfig config, SquareMerchantCredentials credentials) : base(config, credentials) { _customersApi = new CustomersApi(base.ApiConfiguration); }