11using FikaAmazonAPI . AmazonSpApiSDK . Models . Exceptions ;
22using FikaAmazonAPI . Services ;
33using FikaAmazonAPI . Utils ;
4+ using Microsoft . Extensions . Logging ;
45using System ;
56using System . Globalization ;
67using System . Threading ;
7- using Microsoft . Extensions . Logging ;
88
99namespace FikaAmazonAPI
1010{
1111 public class AmazonConnection
1212 {
1313 private readonly ILoggerFactory _loggerFactory ;
1414 private AmazonCredential Credentials { get ; set ; }
15-
16- private IRateLimitingHandler RateLimitingHandler { get ; }
17-
1815 public AppIntegrationsServiceV20240401 AppIntegrationsServiceV20240401 => this . _AppIntegrationsServiceV20240401 ?? throw _NoCredentials ;
1916 public OrderService Orders => this . _Orders ?? throw _NoCredentials ;
2017 public ReportService Reports => this . _Reports ?? throw _NoCredentials ;
@@ -95,12 +92,11 @@ public class AmazonConnection
9592 private UnauthorizedAccessException _NoCredentials = new UnauthorizedAccessException ( $ "Error, you cannot make calls to Amazon without credentials!") ;
9693
9794 public string RefNumber { get ; set ; }
98- public AmazonConnection ( AmazonCredential Credentials , IRateLimitingHandler rateLimitingHandler = null , string RefNumber = null , CultureInfo ? cultureInfo = null , ILoggerFactory ? loggerFactory = null )
95+ public AmazonConnection ( AmazonCredential Credentials , string RefNumber = null , CultureInfo ? cultureInfo = null , ILoggerFactory ? loggerFactory = null )
9996 {
10097 _loggerFactory = loggerFactory ;
10198 this . Authenticate ( Credentials ) ;
10299 this . RefNumber = RefNumber ;
103- this . RateLimitingHandler = rateLimitingHandler ?? new RateLimitingHandler ( ) ;
104100 Thread . CurrentThread . CurrentCulture = cultureInfo ?? CultureInfo . CurrentCulture ;
105101 }
106102
@@ -127,35 +123,35 @@ private void Init(AmazonCredential Credentials)
127123 this . _CatalogItems = new CatalogItemService ( this . Credentials , _loggerFactory ) ;
128124 this . _ProductPricing = new ProductPricingService ( this . Credentials , _loggerFactory ) ;
129125
130- this . _FbaInbound = new FbaInboundService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
131- this . _FbaInventory = new FbaInventoryService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
132- this . _FbaOutbound = new FbaOutboundService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
133- this . _FbaSmallandLight = new FbaSmallandLightService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
134- this . _FbaInboundEligibility = new FbaInboundEligibilityService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
135- this . _EasyShip20220323 = new EasyShip20220323Service ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
136- this . _AplusContent = new AplusContentService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
137- this . _Feed = new FeedService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
138- this . _ListingsItem = new ListingsItemService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
139- this . _Restrictions = new RestrictionService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
140- this . _MerchantFulfillment = new MerchantFulfillmentService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
141- this . _Messaging = new MessagingService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
142- this . _Notification = new NotificationService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
143- this . _ProductFee = new ProductFeeService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
144- this . _ProductType = new ProductTypeService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
145- this . _Sales = new SalesService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
146- this . _Seller = new SellerService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
147- this . _Services = new ServicesService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
148- this . _ShipmentInvoicing = new ShipmentInvoicingService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
149- this . _Shipping = new ShippingService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
150- this . _ShippingV2 = new ShippingServiceV2 ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
151- this . _Upload = new UploadService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
152- this . _Tokens = new TokenService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
153- this . _FulFillmentInbound = new FulFillmentInboundService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
154- this . _FulFillmentInboundv20240320 = new FulFillmentInboundServicev20240320 ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
155- this . _FulFillmentOutbound = new FulFillmentOutboundService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
156- this . _VendorDirectFulfillmentOrders = new VendorDirectFulfillmentOrderService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
157- this . _VendorOrders = new VendorOrderService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
158- this . _VendorTransactionStatus = new VendorTransactionStatusService ( this . Credentials , _loggerFactory , this . RateLimitingHandler ) ;
126+ this . _FbaInbound = new FbaInboundService ( this . Credentials , _loggerFactory ) ;
127+ this . _FbaInventory = new FbaInventoryService ( this . Credentials , _loggerFactory ) ;
128+ this . _FbaOutbound = new FbaOutboundService ( this . Credentials , _loggerFactory ) ;
129+ this . _FbaSmallandLight = new FbaSmallandLightService ( this . Credentials , _loggerFactory ) ;
130+ this . _FbaInboundEligibility = new FbaInboundEligibilityService ( this . Credentials , _loggerFactory ) ;
131+ this . _EasyShip20220323 = new EasyShip20220323Service ( this . Credentials , _loggerFactory ) ;
132+ this . _AplusContent = new AplusContentService ( this . Credentials , _loggerFactory ) ;
133+ this . _Feed = new FeedService ( this . Credentials , _loggerFactory ) ;
134+ this . _ListingsItem = new ListingsItemService ( this . Credentials , _loggerFactory ) ;
135+ this . _Restrictions = new RestrictionService ( this . Credentials , _loggerFactory ) ;
136+ this . _MerchantFulfillment = new MerchantFulfillmentService ( this . Credentials , _loggerFactory ) ;
137+ this . _Messaging = new MessagingService ( this . Credentials , _loggerFactory ) ;
138+ this . _Notification = new NotificationService ( this . Credentials , _loggerFactory ) ;
139+ this . _ProductFee = new ProductFeeService ( this . Credentials , _loggerFactory ) ;
140+ this . _ProductType = new ProductTypeService ( this . Credentials , _loggerFactory ) ;
141+ this . _Sales = new SalesService ( this . Credentials , _loggerFactory ) ;
142+ this . _Seller = new SellerService ( this . Credentials , _loggerFactory ) ;
143+ this . _Services = new ServicesService ( this . Credentials , _loggerFactory ) ;
144+ this . _ShipmentInvoicing = new ShipmentInvoicingService ( this . Credentials , _loggerFactory ) ;
145+ this . _Shipping = new ShippingService ( this . Credentials , _loggerFactory ) ;
146+ this . _ShippingV2 = new ShippingServiceV2 ( this . Credentials , _loggerFactory ) ;
147+ this . _Upload = new UploadService ( this . Credentials , _loggerFactory ) ;
148+ this . _Tokens = new TokenService ( this . Credentials , _loggerFactory ) ;
149+ this . _FulFillmentInbound = new FulFillmentInboundService ( this . Credentials , _loggerFactory ) ;
150+ this . _FulFillmentInboundv20240320 = new FulFillmentInboundServicev20240320 ( this . Credentials , _loggerFactory ) ;
151+ this . _FulFillmentOutbound = new FulFillmentOutboundService ( this . Credentials , _loggerFactory ) ;
152+ this . _VendorDirectFulfillmentOrders = new VendorDirectFulfillmentOrderService ( this . Credentials , _loggerFactory ) ;
153+ this . _VendorOrders = new VendorOrderService ( this . Credentials , _loggerFactory ) ;
154+ this . _VendorTransactionStatus = new VendorTransactionStatusService ( this . Credentials , _loggerFactory ) ;
159155
160156 AmazonCredential . DebugMode = this . Credentials . IsDebugMode ;
161157 }
0 commit comments