Files
bnhtrade/src/Amazon-SP-API-CSharp/Source/FikaAmazonAPI/AmazonSpApiSDK/Api/FbaSmallandLight/SmallAndLightApi.cs
2024-04-11 12:26:13 +01:00

1092 lines
74 KiB
C#

/*
* Selling Partner API for FBA Small And Light
*
* The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program.
*
* OpenAPI spec version: v1
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
using FikaAmazonAPI.AmazonSpApiSDK.Clients;
using FikaAmazonAPI.AmazonSpApiSDK.Models.FbaSmallandLight;
using RestSharp;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
namespace FikaAmazonAPI.AmazonSpApiSDK.Api.FbaSmallandLight
{
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public interface ISmallAndLightApi : IApiAccessor
{
#region Synchronous Operations
/// <summary>
///
/// </summary>
/// <remarks>
/// Removes the item indicated by the specified seller SKU from the Small and Light program in the specified marketplace. If the item is not eligible for disenrollment, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 5 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace in which to remove the item from the Small and Light program. Note: Accepts a single marketplace only.</param>
/// <returns></returns>
void DeleteSmallAndLightEnrollmentBySellerSKU(string sellerSKU, List<string> marketplaceIds);
/// <summary>
///
/// </summary>
/// <remarks>
/// Removes the item indicated by the specified seller SKU from the Small and Light program in the specified marketplace. If the item is not eligible for disenrollment, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 5 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace in which to remove the item from the Small and Light program. Note: Accepts a single marketplace only.</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<object> DeleteSmallAndLightEnrollmentBySellerSKUWithHttpInfo(string sellerSKU, List<string> marketplaceIds);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns the Small and Light program eligibility status of the item indicated by the specified seller SKU in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 10 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace for which the eligibility status is retrieved. NOTE: Accepts a single marketplace only.</param>
/// <returns>SmallAndLightEligibility</returns>
SmallAndLightEligibility GetSmallAndLightEligibilityBySellerSKU(string sellerSKU, List<string> marketplaceIds);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns the Small and Light program eligibility status of the item indicated by the specified seller SKU in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 10 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace for which the eligibility status is retrieved. NOTE: Accepts a single marketplace only.</param>
/// <returns>ApiResponse of SmallAndLightEligibility</returns>
ApiResponse<SmallAndLightEligibility> GetSmallAndLightEligibilityBySellerSKUWithHttpInfo(string sellerSKU, List<string> marketplaceIds);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns the Small and Light enrollment status for the item indicated by the specified seller SKU in the specified marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 10 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace for which the enrollment status is retrieved. Note: Accepts a single marketplace only.</param>
/// <returns>SmallAndLightEnrollment</returns>
SmallAndLightEnrollment GetSmallAndLightEnrollmentBySellerSKU(string sellerSKU, List<string> marketplaceIds);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns the Small and Light enrollment status for the item indicated by the specified seller SKU in the specified marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 10 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace for which the enrollment status is retrieved. Note: Accepts a single marketplace only.</param>
/// <returns>ApiResponse of SmallAndLightEnrollment</returns>
ApiResponse<SmallAndLightEnrollment> GetSmallAndLightEnrollmentBySellerSKUWithHttpInfo(string sellerSKU, List<string> marketplaceIds);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns the Small and Light fee estimates for the specified items. You must include a marketplaceId parameter to retrieve the proper fee estimates for items to be sold in that marketplace. The ordering of items in the response will mirror the order of the items in the request. Duplicate ASIN/price combinations are removed. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 3 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="body"></param>
/// <returns>SmallAndLightFeePreviews</returns>
SmallAndLightFeePreviews GetSmallAndLightFeePreview(SmallAndLightFeePreviewRequest body);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns the Small and Light fee estimates for the specified items. You must include a marketplaceId parameter to retrieve the proper fee estimates for items to be sold in that marketplace. The ordering of items in the response will mirror the order of the items in the request. Duplicate ASIN/price combinations are removed. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 3 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="body"></param>
/// <returns>ApiResponse of SmallAndLightFeePreviews</returns>
ApiResponse<SmallAndLightFeePreviews> GetSmallAndLightFeePreviewWithHttpInfo(SmallAndLightFeePreviewRequest body);
/// <summary>
///
/// </summary>
/// <remarks>
/// Enrolls the item indicated by the specified seller SKU in the Small and Light program in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 5 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace in which to enroll the item. Note: Accepts a single marketplace only.</param>
/// <returns>SmallAndLightEnrollment</returns>
SmallAndLightEnrollment PutSmallAndLightEnrollmentBySellerSKU(string sellerSKU, List<string> marketplaceIds);
/// <summary>
///
/// </summary>
/// <remarks>
/// Enrolls the item indicated by the specified seller SKU in the Small and Light program in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 5 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace in which to enroll the item. Note: Accepts a single marketplace only.</param>
/// <returns>ApiResponse of SmallAndLightEnrollment</returns>
ApiResponse<SmallAndLightEnrollment> PutSmallAndLightEnrollmentBySellerSKUWithHttpInfo(string sellerSKU, List<string> marketplaceIds);
#endregion Synchronous Operations
#region Asynchronous Operations
/// <summary>
///
/// </summary>
/// <remarks>
/// Removes the item indicated by the specified seller SKU from the Small and Light program in the specified marketplace. If the item is not eligible for disenrollment, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 5 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace in which to remove the item from the Small and Light program. Note: Accepts a single marketplace only.</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task DeleteSmallAndLightEnrollmentBySellerSKUAsync(string sellerSKU, List<string> marketplaceIds);
/// <summary>
///
/// </summary>
/// <remarks>
/// Removes the item indicated by the specified seller SKU from the Small and Light program in the specified marketplace. If the item is not eligible for disenrollment, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 5 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace in which to remove the item from the Small and Light program. Note: Accepts a single marketplace only.</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<object>> DeleteSmallAndLightEnrollmentBySellerSKUAsyncWithHttpInfo(string sellerSKU, List<string> marketplaceIds);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns the Small and Light program eligibility status of the item indicated by the specified seller SKU in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 10 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace for which the eligibility status is retrieved. NOTE: Accepts a single marketplace only.</param>
/// <returns>Task of SmallAndLightEligibility</returns>
System.Threading.Tasks.Task<SmallAndLightEligibility> GetSmallAndLightEligibilityBySellerSKUAsync(string sellerSKU, List<string> marketplaceIds);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns the Small and Light program eligibility status of the item indicated by the specified seller SKU in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 10 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace for which the eligibility status is retrieved. NOTE: Accepts a single marketplace only.</param>
/// <returns>Task of ApiResponse (SmallAndLightEligibility)</returns>
System.Threading.Tasks.Task<ApiResponse<SmallAndLightEligibility>> GetSmallAndLightEligibilityBySellerSKUAsyncWithHttpInfo(string sellerSKU, List<string> marketplaceIds);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns the Small and Light enrollment status for the item indicated by the specified seller SKU in the specified marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 10 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace for which the enrollment status is retrieved. Note: Accepts a single marketplace only.</param>
/// <returns>Task of SmallAndLightEnrollment</returns>
System.Threading.Tasks.Task<SmallAndLightEnrollment> GetSmallAndLightEnrollmentBySellerSKUAsync(string sellerSKU, List<string> marketplaceIds);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns the Small and Light enrollment status for the item indicated by the specified seller SKU in the specified marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 10 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace for which the enrollment status is retrieved. Note: Accepts a single marketplace only.</param>
/// <returns>Task of ApiResponse (SmallAndLightEnrollment)</returns>
System.Threading.Tasks.Task<ApiResponse<SmallAndLightEnrollment>> GetSmallAndLightEnrollmentBySellerSKUAsyncWithHttpInfo(string sellerSKU, List<string> marketplaceIds);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns the Small and Light fee estimates for the specified items. You must include a marketplaceId parameter to retrieve the proper fee estimates for items to be sold in that marketplace. The ordering of items in the response will mirror the order of the items in the request. Duplicate ASIN/price combinations are removed. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 3 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="body"></param>
/// <returns>Task of SmallAndLightFeePreviews</returns>
System.Threading.Tasks.Task<SmallAndLightFeePreviews> GetSmallAndLightFeePreviewAsync(SmallAndLightFeePreviewRequest body);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns the Small and Light fee estimates for the specified items. You must include a marketplaceId parameter to retrieve the proper fee estimates for items to be sold in that marketplace. The ordering of items in the response will mirror the order of the items in the request. Duplicate ASIN/price combinations are removed. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 3 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="body"></param>
/// <returns>Task of ApiResponse (SmallAndLightFeePreviews)</returns>
System.Threading.Tasks.Task<ApiResponse<SmallAndLightFeePreviews>> GetSmallAndLightFeePreviewAsyncWithHttpInfo(SmallAndLightFeePreviewRequest body);
/// <summary>
///
/// </summary>
/// <remarks>
/// Enrolls the item indicated by the specified seller SKU in the Small and Light program in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 5 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace in which to enroll the item. Note: Accepts a single marketplace only.</param>
/// <returns>Task of SmallAndLightEnrollment</returns>
System.Threading.Tasks.Task<SmallAndLightEnrollment> PutSmallAndLightEnrollmentBySellerSKUAsync(string sellerSKU, List<string> marketplaceIds);
/// <summary>
///
/// </summary>
/// <remarks>
/// Enrolls the item indicated by the specified seller SKU in the Small and Light program in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 5 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace in which to enroll the item. Note: Accepts a single marketplace only.</param>
/// <returns>Task of ApiResponse (SmallAndLightEnrollment)</returns>
System.Threading.Tasks.Task<ApiResponse<SmallAndLightEnrollment>> PutSmallAndLightEnrollmentBySellerSKUAsyncWithHttpInfo(string sellerSKU, List<string> marketplaceIds);
#endregion Asynchronous Operations
}
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public partial class SmallAndLightApi : ISmallAndLightApi
{
private ExceptionFactory _exceptionFactory = (name, response) => null;
/// <summary>
/// Initializes a new instance of the <see cref="SmallAndLightApi"/> class.
/// </summary>
/// <returns></returns>
public SmallAndLightApi(string basePath)
{
Configuration = new Configuration { BasePath = basePath };
ExceptionFactory = Configuration.DefaultExceptionFactory;
}
/// <summary>
/// Initializes a new instance of the <see cref="SmallAndLightApi"/> class
/// using Configuration object
/// </summary>
/// <param name="configuration">An instance of Configuration</param>
/// <returns></returns>
public SmallAndLightApi(Configuration configuration = null)
{
if (configuration == null) // use the default one in Configuration
Configuration = Configuration.Default;
else
Configuration = configuration;
ExceptionFactory = Configuration.DefaultExceptionFactory;
}
/// <summary>
/// Gets the base path of the API client.
/// </summary>
/// <value>The base path</value>
public string GetBasePath()
{
return Configuration.ApiClient.RestClient.BaseUrl.ToString();
}
/// <summary>
/// Sets the base path of the API client.
/// </summary>
/// <value>The base path</value>
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
public void SetBasePath(string basePath)
{
// do nothing
}
/// <summary>
/// Gets or sets the configuration object
/// </summary>
/// <value>An instance of the Configuration</value>
public Configuration Configuration { get; set; }
/// <summary>
/// Provides a factory method hook for the creation of exceptions.
/// </summary>
public ExceptionFactory ExceptionFactory
{
get
{
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
{
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
}
return _exceptionFactory;
}
set { _exceptionFactory = value; }
}
/// <summary>
/// Gets the default header.
/// </summary>
/// <returns>Dictionary of HTTP header</returns>
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
public IDictionary<string, string> DefaultHeader()
{
return new ReadOnlyDictionary<string, string>(Configuration.DefaultHeader);
}
/// <summary>
/// Add default header.
/// </summary>
/// <param name="key">Header field name.</param>
/// <param name="value">Header field value.</param>
/// <returns></returns>
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
public void AddDefaultHeader(string key, string value)
{
Configuration.AddDefaultHeader(key, value);
}
/// <summary>
/// Removes the item indicated by the specified seller SKU from the Small and Light program in the specified marketplace. If the item is not eligible for disenrollment, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 5 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace in which to remove the item from the Small and Light program. Note: Accepts a single marketplace only.</param>
/// <returns></returns>
public void DeleteSmallAndLightEnrollmentBySellerSKU(string sellerSKU, List<string> marketplaceIds)
{
DeleteSmallAndLightEnrollmentBySellerSKUWithHttpInfo(sellerSKU, marketplaceIds);
}
/// <summary>
/// Removes the item indicated by the specified seller SKU from the Small and Light program in the specified marketplace. If the item is not eligible for disenrollment, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 5 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace in which to remove the item from the Small and Light program. Note: Accepts a single marketplace only.</param>
/// <returns>ApiResponse of Object(void)</returns>
public ApiResponse<object> DeleteSmallAndLightEnrollmentBySellerSKUWithHttpInfo(string sellerSKU, List<string> marketplaceIds)
{
// verify the required parameter 'sellerSKU' is set
if (sellerSKU == null)
throw new ApiException(400, "Missing required parameter 'sellerSKU' when calling SmallAndLightApi->DeleteSmallAndLightEnrollmentBySellerSKU");
// verify the required parameter 'marketplaceIds' is set
if (marketplaceIds == null)
throw new ApiException(400, "Missing required parameter 'marketplaceIds' when calling SmallAndLightApi->DeleteSmallAndLightEnrollmentBySellerSKU");
var localVarPath = "/fba/smallAndLight/v1/enrollments/{sellerSKU}";
var localVarPathParams = new Dictionary<string, string>();
var localVarQueryParams = new List<KeyValuePair<string, string>>();
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<string, string>();
var localVarFileParams = new Dictionary<string, FileParameter>();
object localVarPostBody = null;
// to determine the Content-Type header
string[] localVarHttpContentTypes = new string[] {
"application/json"
};
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
string[] localVarHttpHeaderAccepts = new string[] {
"application/json"
};
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (sellerSKU != null) localVarPathParams.Add("sellerSKU", Configuration.ApiClient.ParameterToString(sellerSKU)); // path parameter
if (marketplaceIds != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("DeleteSmallAndLightEnrollmentBySellerSKU", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
null);
}
/// <summary>
/// Removes the item indicated by the specified seller SKU from the Small and Light program in the specified marketplace. If the item is not eligible for disenrollment, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 5 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace in which to remove the item from the Small and Light program. Note: Accepts a single marketplace only.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task DeleteSmallAndLightEnrollmentBySellerSKUAsync(string sellerSKU, List<string> marketplaceIds)
{
await DeleteSmallAndLightEnrollmentBySellerSKUAsyncWithHttpInfo(sellerSKU, marketplaceIds);
}
/// <summary>
/// Removes the item indicated by the specified seller SKU from the Small and Light program in the specified marketplace. If the item is not eligible for disenrollment, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 5 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace in which to remove the item from the Small and Light program. Note: Accepts a single marketplace only.</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<ApiResponse<object>> DeleteSmallAndLightEnrollmentBySellerSKUAsyncWithHttpInfo(string sellerSKU, List<string> marketplaceIds)
{
// verify the required parameter 'sellerSKU' is set
if (sellerSKU == null)
throw new ApiException(400, "Missing required parameter 'sellerSKU' when calling SmallAndLightApi->DeleteSmallAndLightEnrollmentBySellerSKU");
// verify the required parameter 'marketplaceIds' is set
if (marketplaceIds == null)
throw new ApiException(400, "Missing required parameter 'marketplaceIds' when calling SmallAndLightApi->DeleteSmallAndLightEnrollmentBySellerSKU");
var localVarPath = "/fba/smallAndLight/v1/enrollments/{sellerSKU}";
var localVarPathParams = new Dictionary<string, string>();
var localVarQueryParams = new List<KeyValuePair<string, string>>();
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<string, string>();
var localVarFileParams = new Dictionary<string, FileParameter>();
object localVarPostBody = null;
// to determine the Content-Type header
string[] localVarHttpContentTypes = new string[] {
"application/json"
};
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
string[] localVarHttpHeaderAccepts = new string[] {
"application/json"
};
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (sellerSKU != null) localVarPathParams.Add("sellerSKU", Configuration.ApiClient.ParameterToString(sellerSKU)); // path parameter
if (marketplaceIds != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("DeleteSmallAndLightEnrollmentBySellerSKU", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
null);
}
/// <summary>
/// Returns the Small and Light program eligibility status of the item indicated by the specified seller SKU in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 10 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace for which the eligibility status is retrieved. NOTE: Accepts a single marketplace only.</param>
/// <returns>SmallAndLightEligibility</returns>
public SmallAndLightEligibility GetSmallAndLightEligibilityBySellerSKU(string sellerSKU, List<string> marketplaceIds)
{
ApiResponse<SmallAndLightEligibility> localVarResponse = GetSmallAndLightEligibilityBySellerSKUWithHttpInfo(sellerSKU, marketplaceIds);
return localVarResponse.Data;
}
/// <summary>
/// Returns the Small and Light program eligibility status of the item indicated by the specified seller SKU in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 10 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace for which the eligibility status is retrieved. NOTE: Accepts a single marketplace only.</param>
/// <returns>ApiResponse of SmallAndLightEligibility</returns>
public ApiResponse<SmallAndLightEligibility> GetSmallAndLightEligibilityBySellerSKUWithHttpInfo(string sellerSKU, List<string> marketplaceIds)
{
// verify the required parameter 'sellerSKU' is set
if (sellerSKU == null)
throw new ApiException(400, "Missing required parameter 'sellerSKU' when calling SmallAndLightApi->GetSmallAndLightEligibilityBySellerSKU");
// verify the required parameter 'marketplaceIds' is set
if (marketplaceIds == null)
throw new ApiException(400, "Missing required parameter 'marketplaceIds' when calling SmallAndLightApi->GetSmallAndLightEligibilityBySellerSKU");
var localVarPath = "/fba/smallAndLight/v1/eligibilities/{sellerSKU}";
var localVarPathParams = new Dictionary<string, string>();
var localVarQueryParams = new List<KeyValuePair<string, string>>();
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<string, string>();
var localVarFileParams = new Dictionary<string, FileParameter>();
object localVarPostBody = null;
// to determine the Content-Type header
string[] localVarHttpContentTypes = new string[] {
"application/json"
};
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
string[] localVarHttpHeaderAccepts = new string[] {
"application/json"
};
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (sellerSKU != null) localVarPathParams.Add("sellerSKU", Configuration.ApiClient.ParameterToString(sellerSKU)); // path parameter
if (marketplaceIds != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetSmallAndLightEligibilityBySellerSKU", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<SmallAndLightEligibility>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(SmallAndLightEligibility)Configuration.ApiClient.Deserialize(localVarResponse, typeof(SmallAndLightEligibility)));
}
/// <summary>
/// Returns the Small and Light program eligibility status of the item indicated by the specified seller SKU in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 10 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace for which the eligibility status is retrieved. NOTE: Accepts a single marketplace only.</param>
/// <returns>Task of SmallAndLightEligibility</returns>
public async System.Threading.Tasks.Task<SmallAndLightEligibility> GetSmallAndLightEligibilityBySellerSKUAsync(string sellerSKU, List<string> marketplaceIds)
{
ApiResponse<SmallAndLightEligibility> localVarResponse = await GetSmallAndLightEligibilityBySellerSKUAsyncWithHttpInfo(sellerSKU, marketplaceIds);
return localVarResponse.Data;
}
/// <summary>
/// Returns the Small and Light program eligibility status of the item indicated by the specified seller SKU in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 10 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace for which the eligibility status is retrieved. NOTE: Accepts a single marketplace only.</param>
/// <returns>Task of ApiResponse (SmallAndLightEligibility)</returns>
public async System.Threading.Tasks.Task<ApiResponse<SmallAndLightEligibility>> GetSmallAndLightEligibilityBySellerSKUAsyncWithHttpInfo(string sellerSKU, List<string> marketplaceIds)
{
// verify the required parameter 'sellerSKU' is set
if (sellerSKU == null)
throw new ApiException(400, "Missing required parameter 'sellerSKU' when calling SmallAndLightApi->GetSmallAndLightEligibilityBySellerSKU");
// verify the required parameter 'marketplaceIds' is set
if (marketplaceIds == null)
throw new ApiException(400, "Missing required parameter 'marketplaceIds' when calling SmallAndLightApi->GetSmallAndLightEligibilityBySellerSKU");
var localVarPath = "/fba/smallAndLight/v1/eligibilities/{sellerSKU}";
var localVarPathParams = new Dictionary<string, string>();
var localVarQueryParams = new List<KeyValuePair<string, string>>();
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<string, string>();
var localVarFileParams = new Dictionary<string, FileParameter>();
object localVarPostBody = null;
// to determine the Content-Type header
string[] localVarHttpContentTypes = new string[] {
"application/json"
};
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
string[] localVarHttpHeaderAccepts = new string[] {
"application/json"
};
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (sellerSKU != null) localVarPathParams.Add("sellerSKU", Configuration.ApiClient.ParameterToString(sellerSKU)); // path parameter
if (marketplaceIds != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetSmallAndLightEligibilityBySellerSKU", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<SmallAndLightEligibility>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(SmallAndLightEligibility)Configuration.ApiClient.Deserialize(localVarResponse, typeof(SmallAndLightEligibility)));
}
/// <summary>
/// Returns the Small and Light enrollment status for the item indicated by the specified seller SKU in the specified marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 10 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace for which the enrollment status is retrieved. Note: Accepts a single marketplace only.</param>
/// <returns>SmallAndLightEnrollment</returns>
public SmallAndLightEnrollment GetSmallAndLightEnrollmentBySellerSKU(string sellerSKU, List<string> marketplaceIds)
{
ApiResponse<SmallAndLightEnrollment> localVarResponse = GetSmallAndLightEnrollmentBySellerSKUWithHttpInfo(sellerSKU, marketplaceIds);
return localVarResponse.Data;
}
/// <summary>
/// Returns the Small and Light enrollment status for the item indicated by the specified seller SKU in the specified marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 10 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace for which the enrollment status is retrieved. Note: Accepts a single marketplace only.</param>
/// <returns>ApiResponse of SmallAndLightEnrollment</returns>
public ApiResponse<SmallAndLightEnrollment> GetSmallAndLightEnrollmentBySellerSKUWithHttpInfo(string sellerSKU, List<string> marketplaceIds)
{
// verify the required parameter 'sellerSKU' is set
if (sellerSKU == null)
throw new ApiException(400, "Missing required parameter 'sellerSKU' when calling SmallAndLightApi->GetSmallAndLightEnrollmentBySellerSKU");
// verify the required parameter 'marketplaceIds' is set
if (marketplaceIds == null)
throw new ApiException(400, "Missing required parameter 'marketplaceIds' when calling SmallAndLightApi->GetSmallAndLightEnrollmentBySellerSKU");
var localVarPath = "/fba/smallAndLight/v1/enrollments/{sellerSKU}";
var localVarPathParams = new Dictionary<string, string>();
var localVarQueryParams = new List<KeyValuePair<string, string>>();
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<string, string>();
var localVarFileParams = new Dictionary<string, FileParameter>();
object localVarPostBody = null;
// to determine the Content-Type header
string[] localVarHttpContentTypes = new string[] {
"application/json"
};
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
string[] localVarHttpHeaderAccepts = new string[] {
"application/json"
};
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (sellerSKU != null) localVarPathParams.Add("sellerSKU", Configuration.ApiClient.ParameterToString(sellerSKU)); // path parameter
if (marketplaceIds != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetSmallAndLightEnrollmentBySellerSKU", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<SmallAndLightEnrollment>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(SmallAndLightEnrollment)Configuration.ApiClient.Deserialize(localVarResponse, typeof(SmallAndLightEnrollment)));
}
/// <summary>
/// Returns the Small and Light enrollment status for the item indicated by the specified seller SKU in the specified marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 10 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace for which the enrollment status is retrieved. Note: Accepts a single marketplace only.</param>
/// <returns>Task of SmallAndLightEnrollment</returns>
public async System.Threading.Tasks.Task<SmallAndLightEnrollment> GetSmallAndLightEnrollmentBySellerSKUAsync(string sellerSKU, List<string> marketplaceIds)
{
ApiResponse<SmallAndLightEnrollment> localVarResponse = await GetSmallAndLightEnrollmentBySellerSKUAsyncWithHttpInfo(sellerSKU, marketplaceIds);
return localVarResponse.Data;
}
/// <summary>
/// Returns the Small and Light enrollment status for the item indicated by the specified seller SKU in the specified marketplace. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 10 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace for which the enrollment status is retrieved. Note: Accepts a single marketplace only.</param>
/// <returns>Task of ApiResponse (SmallAndLightEnrollment)</returns>
public async System.Threading.Tasks.Task<ApiResponse<SmallAndLightEnrollment>> GetSmallAndLightEnrollmentBySellerSKUAsyncWithHttpInfo(string sellerSKU, List<string> marketplaceIds)
{
// verify the required parameter 'sellerSKU' is set
if (sellerSKU == null)
throw new ApiException(400, "Missing required parameter 'sellerSKU' when calling SmallAndLightApi->GetSmallAndLightEnrollmentBySellerSKU");
// verify the required parameter 'marketplaceIds' is set
if (marketplaceIds == null)
throw new ApiException(400, "Missing required parameter 'marketplaceIds' when calling SmallAndLightApi->GetSmallAndLightEnrollmentBySellerSKU");
var localVarPath = "/fba/smallAndLight/v1/enrollments/{sellerSKU}";
var localVarPathParams = new Dictionary<string, string>();
var localVarQueryParams = new List<KeyValuePair<string, string>>();
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<string, string>();
var localVarFileParams = new Dictionary<string, FileParameter>();
object localVarPostBody = null;
// to determine the Content-Type header
string[] localVarHttpContentTypes = new string[] {
"application/json"
};
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
string[] localVarHttpHeaderAccepts = new string[] {
"application/json"
};
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (sellerSKU != null) localVarPathParams.Add("sellerSKU", Configuration.ApiClient.ParameterToString(sellerSKU)); // path parameter
if (marketplaceIds != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetSmallAndLightEnrollmentBySellerSKU", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<SmallAndLightEnrollment>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(SmallAndLightEnrollment)Configuration.ApiClient.Deserialize(localVarResponse, typeof(SmallAndLightEnrollment)));
}
/// <summary>
/// Returns the Small and Light fee estimates for the specified items. You must include a marketplaceId parameter to retrieve the proper fee estimates for items to be sold in that marketplace. The ordering of items in the response will mirror the order of the items in the request. Duplicate ASIN/price combinations are removed. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 3 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="body"></param>
/// <returns>SmallAndLightFeePreviews</returns>
public SmallAndLightFeePreviews GetSmallAndLightFeePreview(SmallAndLightFeePreviewRequest body)
{
ApiResponse<SmallAndLightFeePreviews> localVarResponse = GetSmallAndLightFeePreviewWithHttpInfo(body);
return localVarResponse.Data;
}
/// <summary>
/// Returns the Small and Light fee estimates for the specified items. You must include a marketplaceId parameter to retrieve the proper fee estimates for items to be sold in that marketplace. The ordering of items in the response will mirror the order of the items in the request. Duplicate ASIN/price combinations are removed. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 3 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="body"></param>
/// <returns>ApiResponse of SmallAndLightFeePreviews</returns>
public ApiResponse<SmallAndLightFeePreviews> GetSmallAndLightFeePreviewWithHttpInfo(SmallAndLightFeePreviewRequest body)
{
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling SmallAndLightApi->GetSmallAndLightFeePreview");
var localVarPath = "/fba/smallAndLight/v1/feePreviews";
var localVarPathParams = new Dictionary<string, string>();
var localVarQueryParams = new List<KeyValuePair<string, string>>();
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<string, string>();
var localVarFileParams = new Dictionary<string, FileParameter>();
object localVarPostBody = null;
// to determine the Content-Type header
string[] localVarHttpContentTypes = new string[] {
"application/json"
};
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
string[] localVarHttpHeaderAccepts = new string[] {
"application/json"
};
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetSmallAndLightFeePreview", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<SmallAndLightFeePreviews>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(SmallAndLightFeePreviews)Configuration.ApiClient.Deserialize(localVarResponse, typeof(SmallAndLightFeePreviews)));
}
/// <summary>
/// Returns the Small and Light fee estimates for the specified items. You must include a marketplaceId parameter to retrieve the proper fee estimates for items to be sold in that marketplace. The ordering of items in the response will mirror the order of the items in the request. Duplicate ASIN/price combinations are removed. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 3 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="body"></param>
/// <returns>Task of SmallAndLightFeePreviews</returns>
public async System.Threading.Tasks.Task<SmallAndLightFeePreviews> GetSmallAndLightFeePreviewAsync(SmallAndLightFeePreviewRequest body)
{
ApiResponse<SmallAndLightFeePreviews> localVarResponse = await GetSmallAndLightFeePreviewAsyncWithHttpInfo(body);
return localVarResponse.Data;
}
/// <summary>
/// Returns the Small and Light fee estimates for the specified items. You must include a marketplaceId parameter to retrieve the proper fee estimates for items to be sold in that marketplace. The ordering of items in the response will mirror the order of the items in the request. Duplicate ASIN/price combinations are removed. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 3 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="body"></param>
/// <returns>Task of ApiResponse (SmallAndLightFeePreviews)</returns>
public async System.Threading.Tasks.Task<ApiResponse<SmallAndLightFeePreviews>> GetSmallAndLightFeePreviewAsyncWithHttpInfo(SmallAndLightFeePreviewRequest body)
{
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling SmallAndLightApi->GetSmallAndLightFeePreview");
var localVarPath = "/fba/smallAndLight/v1/feePreviews";
var localVarPathParams = new Dictionary<string, string>();
var localVarQueryParams = new List<KeyValuePair<string, string>>();
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<string, string>();
var localVarFileParams = new Dictionary<string, FileParameter>();
object localVarPostBody = null;
// to determine the Content-Type header
string[] localVarHttpContentTypes = new string[] {
"application/json"
};
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
string[] localVarHttpHeaderAccepts = new string[] {
"application/json"
};
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetSmallAndLightFeePreview", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<SmallAndLightFeePreviews>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(SmallAndLightFeePreviews)Configuration.ApiClient.Deserialize(localVarResponse, typeof(SmallAndLightFeePreviews)));
}
/// <summary>
/// Enrolls the item indicated by the specified seller SKU in the Small and Light program in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 5 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace in which to enroll the item. Note: Accepts a single marketplace only.</param>
/// <returns>SmallAndLightEnrollment</returns>
public SmallAndLightEnrollment PutSmallAndLightEnrollmentBySellerSKU(string sellerSKU, List<string> marketplaceIds)
{
ApiResponse<SmallAndLightEnrollment> localVarResponse = PutSmallAndLightEnrollmentBySellerSKUWithHttpInfo(sellerSKU, marketplaceIds);
return localVarResponse.Data;
}
/// <summary>
/// Enrolls the item indicated by the specified seller SKU in the Small and Light program in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 5 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace in which to enroll the item. Note: Accepts a single marketplace only.</param>
/// <returns>ApiResponse of SmallAndLightEnrollment</returns>
public ApiResponse<SmallAndLightEnrollment> PutSmallAndLightEnrollmentBySellerSKUWithHttpInfo(string sellerSKU, List<string> marketplaceIds)
{
// verify the required parameter 'sellerSKU' is set
if (sellerSKU == null)
throw new ApiException(400, "Missing required parameter 'sellerSKU' when calling SmallAndLightApi->PutSmallAndLightEnrollmentBySellerSKU");
// verify the required parameter 'marketplaceIds' is set
if (marketplaceIds == null)
throw new ApiException(400, "Missing required parameter 'marketplaceIds' when calling SmallAndLightApi->PutSmallAndLightEnrollmentBySellerSKU");
var localVarPath = "/fba/smallAndLight/v1/enrollments/{sellerSKU}";
var localVarPathParams = new Dictionary<string, string>();
var localVarQueryParams = new List<KeyValuePair<string, string>>();
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<string, string>();
var localVarFileParams = new Dictionary<string, FileParameter>();
object localVarPostBody = null;
// to determine the Content-Type header
string[] localVarHttpContentTypes = new string[] {
"application/json"
};
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
string[] localVarHttpHeaderAccepts = new string[] {
"application/json"
};
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (sellerSKU != null) localVarPathParams.Add("sellerSKU", Configuration.ApiClient.ParameterToString(sellerSKU)); // path parameter
if (marketplaceIds != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse)Configuration.ApiClient.CallApi(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("PutSmallAndLightEnrollmentBySellerSKU", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<SmallAndLightEnrollment>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(SmallAndLightEnrollment)Configuration.ApiClient.Deserialize(localVarResponse, typeof(SmallAndLightEnrollment)));
}
/// <summary>
/// Enrolls the item indicated by the specified seller SKU in the Small and Light program in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 5 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace in which to enroll the item. Note: Accepts a single marketplace only.</param>
/// <returns>Task of SmallAndLightEnrollment</returns>
public async System.Threading.Tasks.Task<SmallAndLightEnrollment> PutSmallAndLightEnrollmentBySellerSKUAsync(string sellerSKU, List<string> marketplaceIds)
{
ApiResponse<SmallAndLightEnrollment> localVarResponse = await PutSmallAndLightEnrollmentBySellerSKUAsyncWithHttpInfo(sellerSKU, marketplaceIds);
return localVarResponse.Data;
}
/// <summary>
/// Enrolls the item indicated by the specified seller SKU in the Small and Light program in the specified marketplace. If the item is not eligible, the ineligibility reasons are returned. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 2 | 5 | For more information, see \&quot;Usage Plans and Rate Limits\&quot; in the Selling Partner API documentation.
/// </summary>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <param name="sellerSKU">The seller SKU that identifies the item.</param>
/// <param name="marketplaceIds">The marketplace in which to enroll the item. Note: Accepts a single marketplace only.</param>
/// <returns>Task of ApiResponse (SmallAndLightEnrollment)</returns>
public async System.Threading.Tasks.Task<ApiResponse<SmallAndLightEnrollment>> PutSmallAndLightEnrollmentBySellerSKUAsyncWithHttpInfo(string sellerSKU, List<string> marketplaceIds)
{
// verify the required parameter 'sellerSKU' is set
if (sellerSKU == null)
throw new ApiException(400, "Missing required parameter 'sellerSKU' when calling SmallAndLightApi->PutSmallAndLightEnrollmentBySellerSKU");
// verify the required parameter 'marketplaceIds' is set
if (marketplaceIds == null)
throw new ApiException(400, "Missing required parameter 'marketplaceIds' when calling SmallAndLightApi->PutSmallAndLightEnrollmentBySellerSKU");
var localVarPath = "/fba/smallAndLight/v1/enrollments/{sellerSKU}";
var localVarPathParams = new Dictionary<string, string>();
var localVarQueryParams = new List<KeyValuePair<string, string>>();
var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<string, string>();
var localVarFileParams = new Dictionary<string, FileParameter>();
object localVarPostBody = null;
// to determine the Content-Type header
string[] localVarHttpContentTypes = new string[] {
"application/json"
};
string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
string[] localVarHttpHeaderAccepts = new string[] {
"application/json"
};
string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (sellerSKU != null) localVarPathParams.Add("sellerSKU", Configuration.ApiClient.ParameterToString(sellerSKU)); // path parameter
if (marketplaceIds != null) localVarQueryParams.AddRange(Configuration.ApiClient.ParameterToKeyValuePairs("csv", "marketplaceIds", marketplaceIds)); // query parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int)localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("PutSmallAndLightEnrollmentBySellerSKU", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<SmallAndLightEnrollment>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(SmallAndLightEnrollment)Configuration.ApiClient.Deserialize(localVarResponse, typeof(SmallAndLightEnrollment)));
}
}
}