/*
* Selling Partner API for Merchant Fulfillment
*
* The Selling Partner API for Merchant Fulfillment helps you build applications that let sellers purchase shipping for non-Prime and Prime orders using Amazon’s Buy Shipping Services.
*
* OpenAPI spec version: v0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
using FikaAmazonAPI.AmazonSpApiSDK.Clients;
using FikaAmazonAPI.AmazonSpApiSDK.Models.MerchantFulfillment;
using RestSharp;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
namespace FikaAmazonAPI.AmazonSpApiSDK.Api.MerchantFulfillment
{
///
/// Represents a collection of functions to interact with the API endpoints
///
public interface IMerchantFulfillmentApi : IApiAccessor
{
#region Synchronous Operations
///
///
///
///
/// Cancel the shipment indicated by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment to cancel.
/// CancelShipmentResponse
CancelShipmentResponse CancelShipment(string shipmentId);
///
///
///
///
/// Cancel the shipment indicated by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment to cancel.
/// ApiResponse of CancelShipmentResponse
ApiResponse CancelShipmentWithHttpInfo(string shipmentId);
///
///
///
///
/// Cancel the shipment indicated by the specified shipment identifer. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment to cancel.
/// CancelShipmentResponse
CancelShipmentResponse CancelShipmentOld(string shipmentId);
///
///
///
///
/// Cancel the shipment indicated by the specified shipment identifer. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment to cancel.
/// ApiResponse of CancelShipmentResponse
ApiResponse CancelShipmentOldWithHttpInfo(string shipmentId);
///
///
///
///
/// Create a shipment with the information provided. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// CreateShipmentResponse
CreateShipmentResponse CreateShipment(CreateShipmentRequest body);
///
///
///
///
/// Create a shipment with the information provided. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// ApiResponse of CreateShipmentResponse
ApiResponse CreateShipmentWithHttpInfo(CreateShipmentRequest body);
///
///
///
///
/// Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// GetAdditionalSellerInputsResponse
GetAdditionalSellerInputsResponse GetAdditionalSellerInputs(GetAdditionalSellerInputsRequest body);
///
///
///
///
/// Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// ApiResponse of GetAdditionalSellerInputsResponse
ApiResponse GetAdditionalSellerInputsWithHttpInfo(GetAdditionalSellerInputsRequest body);
///
///
///
///
/// Get a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// GetAdditionalSellerInputsResponse
GetAdditionalSellerInputsResponse GetAdditionalSellerInputsOld(GetAdditionalSellerInputsRequest body);
///
///
///
///
/// Get a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// ApiResponse of GetAdditionalSellerInputsResponse
ApiResponse GetAdditionalSellerInputsOldWithHttpInfo(GetAdditionalSellerInputsRequest body);
///
///
///
///
/// Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// GetEligibleShipmentServicesResponse
GetEligibleShipmentServicesResponse GetEligibleShipmentServices(GetEligibleShipmentServicesRequest body);
///
///
///
///
/// Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// ApiResponse of GetEligibleShipmentServicesResponse
ApiResponse GetEligibleShipmentServicesWithHttpInfo(GetEligibleShipmentServicesRequest body);
///
///
///
///
/// Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// GetEligibleShipmentServicesResponse
GetEligibleShipmentServicesResponse GetEligibleShipmentServicesOld(GetEligibleShipmentServicesRequest body);
///
///
///
///
/// Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// ApiResponse of GetEligibleShipmentServicesResponse
ApiResponse GetEligibleShipmentServicesOldWithHttpInfo(GetEligibleShipmentServicesRequest body);
///
///
///
///
/// Returns the shipment information for an existing shipment. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment.
/// GetShipmentResponse
GetShipmentResponse GetShipment(string shipmentId);
///
///
///
///
/// Returns the shipment information for an existing shipment. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment.
/// ApiResponse of GetShipmentResponse
ApiResponse GetShipmentWithHttpInfo(string shipmentId);
#endregion Synchronous Operations
#region Asynchronous Operations
///
///
///
///
/// Cancel the shipment indicated by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment to cancel.
/// Task of CancelShipmentResponse
System.Threading.Tasks.Task CancelShipmentAsync(string shipmentId);
///
///
///
///
/// Cancel the shipment indicated by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment to cancel.
/// Task of ApiResponse (CancelShipmentResponse)
System.Threading.Tasks.Task> CancelShipmentAsyncWithHttpInfo(string shipmentId);
///
///
///
///
/// Cancel the shipment indicated by the specified shipment identifer. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment to cancel.
/// Task of CancelShipmentResponse
System.Threading.Tasks.Task CancelShipmentOldAsync(string shipmentId);
///
///
///
///
/// Cancel the shipment indicated by the specified shipment identifer. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment to cancel.
/// Task of ApiResponse (CancelShipmentResponse)
System.Threading.Tasks.Task> CancelShipmentOldAsyncWithHttpInfo(string shipmentId);
///
///
///
///
/// Create a shipment with the information provided. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// Task of CreateShipmentResponse
System.Threading.Tasks.Task CreateShipmentAsync(CreateShipmentRequest body);
///
///
///
///
/// Create a shipment with the information provided. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse (CreateShipmentResponse)
System.Threading.Tasks.Task> CreateShipmentAsyncWithHttpInfo(CreateShipmentRequest body);
///
///
///
///
/// Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// Task of GetAdditionalSellerInputsResponse
System.Threading.Tasks.Task GetAdditionalSellerInputsAsync(GetAdditionalSellerInputsRequest body);
///
///
///
///
/// Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse (GetAdditionalSellerInputsResponse)
System.Threading.Tasks.Task> GetAdditionalSellerInputsAsyncWithHttpInfo(GetAdditionalSellerInputsRequest body);
///
///
///
///
/// Get a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// Task of GetAdditionalSellerInputsResponse
System.Threading.Tasks.Task GetAdditionalSellerInputsOldAsync(GetAdditionalSellerInputsRequest body);
///
///
///
///
/// Get a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse (GetAdditionalSellerInputsResponse)
System.Threading.Tasks.Task> GetAdditionalSellerInputsOldAsyncWithHttpInfo(GetAdditionalSellerInputsRequest body);
///
///
///
///
/// Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// Task of GetEligibleShipmentServicesResponse
System.Threading.Tasks.Task GetEligibleShipmentServicesAsync(GetEligibleShipmentServicesRequest body);
///
///
///
///
/// Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse (GetEligibleShipmentServicesResponse)
System.Threading.Tasks.Task> GetEligibleShipmentServicesAsyncWithHttpInfo(GetEligibleShipmentServicesRequest body);
///
///
///
///
/// Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// Task of GetEligibleShipmentServicesResponse
System.Threading.Tasks.Task GetEligibleShipmentServicesOldAsync(GetEligibleShipmentServicesRequest body);
///
///
///
///
/// Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse (GetEligibleShipmentServicesResponse)
System.Threading.Tasks.Task> GetEligibleShipmentServicesOldAsyncWithHttpInfo(GetEligibleShipmentServicesRequest body);
///
///
///
///
/// Returns the shipment information for an existing shipment. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment.
/// Task of GetShipmentResponse
System.Threading.Tasks.Task GetShipmentAsync(string shipmentId);
///
///
///
///
/// Returns the shipment information for an existing shipment. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment.
/// Task of ApiResponse (GetShipmentResponse)
System.Threading.Tasks.Task> GetShipmentAsyncWithHttpInfo(string shipmentId);
#endregion Asynchronous Operations
}
///
/// Represents a collection of functions to interact with the API endpoints
///
public partial class MerchantFulfillmentApi : IMerchantFulfillmentApi
{
private ExceptionFactory _exceptionFactory = (name, response) => null;
///
/// Initializes a new instance of the class.
///
///
public MerchantFulfillmentApi(string basePath)
{
Configuration = new Configuration { BasePath = basePath };
ExceptionFactory = Configuration.DefaultExceptionFactory;
}
///
/// Initializes a new instance of the class
/// using Configuration object
///
/// An instance of Configuration
///
public MerchantFulfillmentApi(Configuration configuration = null)
{
if (configuration == null) // use the default one in Configuration
Configuration = Configuration.Default;
else
Configuration = configuration;
ExceptionFactory = Configuration.DefaultExceptionFactory;
}
///
/// Gets the base path of the API client.
///
/// The base path
public string GetBasePath()
{
return Configuration.ApiClient.RestClient.BaseUrl.ToString();
}
///
/// Sets the base path of the API client.
///
/// The base path
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
public void SetBasePath(string basePath)
{
// do nothing
}
///
/// Gets or sets the configuration object
///
/// An instance of the Configuration
public Configuration Configuration { get; set; }
///
/// Provides a factory method hook for the creation of exceptions.
///
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; }
}
///
/// Gets the default header.
///
/// Dictionary of HTTP header
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
public IDictionary DefaultHeader()
{
return new ReadOnlyDictionary(Configuration.DefaultHeader);
}
///
/// Add default header.
///
/// Header field name.
/// Header field value.
///
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
public void AddDefaultHeader(string key, string value)
{
Configuration.AddDefaultHeader(key, value);
}
///
/// Cancel the shipment indicated by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment to cancel.
/// CancelShipmentResponse
public CancelShipmentResponse CancelShipment(string shipmentId)
{
ApiResponse localVarResponse = CancelShipmentWithHttpInfo(shipmentId);
return localVarResponse.Data;
}
///
/// Cancel the shipment indicated by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment to cancel.
/// ApiResponse of CancelShipmentResponse
public ApiResponse CancelShipmentWithHttpInfo(string shipmentId)
{
// verify the required parameter 'shipmentId' is set
if (shipmentId == null)
throw new ApiException(400, "Missing required parameter 'shipmentId' when calling MerchantFulfillmentApi->CancelShipment");
var localVarPath = "/mfn/v0/shipments/{shipmentId}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
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 (shipmentId != null) localVarPathParams.Add("shipmentId", Configuration.ApiClient.ParameterToString(shipmentId)); // path 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("CancelShipment", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(CancelShipmentResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(CancelShipmentResponse)));
}
///
/// Cancel the shipment indicated by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment to cancel.
/// Task of CancelShipmentResponse
public async System.Threading.Tasks.Task CancelShipmentAsync(string shipmentId)
{
ApiResponse localVarResponse = await CancelShipmentAsyncWithHttpInfo(shipmentId);
return localVarResponse.Data;
}
///
/// Cancel the shipment indicated by the specified shipment identifier. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment to cancel.
/// Task of ApiResponse (CancelShipmentResponse)
public async System.Threading.Tasks.Task> CancelShipmentAsyncWithHttpInfo(string shipmentId)
{
// verify the required parameter 'shipmentId' is set
if (shipmentId == null)
throw new ApiException(400, "Missing required parameter 'shipmentId' when calling MerchantFulfillmentApi->CancelShipment");
var localVarPath = "/mfn/v0/shipments/{shipmentId}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
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 (shipmentId != null) localVarPathParams.Add("shipmentId", Configuration.ApiClient.ParameterToString(shipmentId)); // path 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("CancelShipment", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(CancelShipmentResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(CancelShipmentResponse)));
}
///
/// Cancel the shipment indicated by the specified shipment identifer. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment to cancel.
/// CancelShipmentResponse
public CancelShipmentResponse CancelShipmentOld(string shipmentId)
{
ApiResponse localVarResponse = CancelShipmentOldWithHttpInfo(shipmentId);
return localVarResponse.Data;
}
///
/// Cancel the shipment indicated by the specified shipment identifer. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment to cancel.
/// ApiResponse of CancelShipmentResponse
public ApiResponse CancelShipmentOldWithHttpInfo(string shipmentId)
{
// verify the required parameter 'shipmentId' is set
if (shipmentId == null)
throw new ApiException(400, "Missing required parameter 'shipmentId' when calling MerchantFulfillmentApi->CancelShipmentOld");
var localVarPath = "/mfn/v0/shipments/{shipmentId}/cancel";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
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 (shipmentId != null) localVarPathParams.Add("shipmentId", Configuration.ApiClient.ParameterToString(shipmentId)); // path 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("CancelShipmentOld", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(CancelShipmentResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(CancelShipmentResponse)));
}
///
/// Cancel the shipment indicated by the specified shipment identifer. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment to cancel.
/// Task of CancelShipmentResponse
public async System.Threading.Tasks.Task CancelShipmentOldAsync(string shipmentId)
{
ApiResponse localVarResponse = await CancelShipmentOldAsyncWithHttpInfo(shipmentId);
return localVarResponse.Data;
}
///
/// Cancel the shipment indicated by the specified shipment identifer. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment to cancel.
/// Task of ApiResponse (CancelShipmentResponse)
public async System.Threading.Tasks.Task> CancelShipmentOldAsyncWithHttpInfo(string shipmentId)
{
// verify the required parameter 'shipmentId' is set
if (shipmentId == null)
throw new ApiException(400, "Missing required parameter 'shipmentId' when calling MerchantFulfillmentApi->CancelShipmentOld");
var localVarPath = "/mfn/v0/shipments/{shipmentId}/cancel";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
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 (shipmentId != null) localVarPathParams.Add("shipmentId", Configuration.ApiClient.ParameterToString(shipmentId)); // path 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("CancelShipmentOld", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(CancelShipmentResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(CancelShipmentResponse)));
}
///
/// Create a shipment with the information provided. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// CreateShipmentResponse
public CreateShipmentResponse CreateShipment(CreateShipmentRequest body)
{
ApiResponse localVarResponse = CreateShipmentWithHttpInfo(body);
return localVarResponse.Data;
}
///
/// Create a shipment with the information provided. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// ApiResponse of CreateShipmentResponse
public ApiResponse CreateShipmentWithHttpInfo(CreateShipmentRequest body)
{
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling MerchantFulfillmentApi->CreateShipment");
var localVarPath = "/mfn/v0/shipments";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
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("CreateShipment", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(CreateShipmentResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateShipmentResponse)));
}
///
/// Create a shipment with the information provided. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// Task of CreateShipmentResponse
public async System.Threading.Tasks.Task CreateShipmentAsync(CreateShipmentRequest body)
{
ApiResponse localVarResponse = await CreateShipmentAsyncWithHttpInfo(body);
return localVarResponse.Data;
}
///
/// Create a shipment with the information provided. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse (CreateShipmentResponse)
public async System.Threading.Tasks.Task> CreateShipmentAsyncWithHttpInfo(CreateShipmentRequest body)
{
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling MerchantFulfillmentApi->CreateShipment");
var localVarPath = "/mfn/v0/shipments";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
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("CreateShipment", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(CreateShipmentResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateShipmentResponse)));
}
///
/// Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// GetAdditionalSellerInputsResponse
public GetAdditionalSellerInputsResponse GetAdditionalSellerInputs(GetAdditionalSellerInputsRequest body)
{
ApiResponse localVarResponse = GetAdditionalSellerInputsWithHttpInfo(body);
return localVarResponse.Data;
}
///
/// Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// ApiResponse of GetAdditionalSellerInputsResponse
public ApiResponse GetAdditionalSellerInputsWithHttpInfo(GetAdditionalSellerInputsRequest body)
{
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling MerchantFulfillmentApi->GetAdditionalSellerInputs");
var localVarPath = "/mfn/v0/additionalSellerInputs";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
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("GetAdditionalSellerInputs", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(GetAdditionalSellerInputsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAdditionalSellerInputsResponse)));
}
///
/// Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// Task of GetAdditionalSellerInputsResponse
public async System.Threading.Tasks.Task GetAdditionalSellerInputsAsync(GetAdditionalSellerInputsRequest body)
{
ApiResponse localVarResponse = await GetAdditionalSellerInputsAsyncWithHttpInfo(body);
return localVarResponse.Data;
}
///
/// Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse (GetAdditionalSellerInputsResponse)
public async System.Threading.Tasks.Task> GetAdditionalSellerInputsAsyncWithHttpInfo(GetAdditionalSellerInputsRequest body)
{
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling MerchantFulfillmentApi->GetAdditionalSellerInputs");
var localVarPath = "/mfn/v0/additionalSellerInputs";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
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("GetAdditionalSellerInputs", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(GetAdditionalSellerInputsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAdditionalSellerInputsResponse)));
}
///
/// Get a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// GetAdditionalSellerInputsResponse
public GetAdditionalSellerInputsResponse GetAdditionalSellerInputsOld(GetAdditionalSellerInputsRequest body)
{
ApiResponse localVarResponse = GetAdditionalSellerInputsOldWithHttpInfo(body);
return localVarResponse.Data;
}
///
/// Get a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// ApiResponse of GetAdditionalSellerInputsResponse
public ApiResponse GetAdditionalSellerInputsOldWithHttpInfo(GetAdditionalSellerInputsRequest body)
{
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling MerchantFulfillmentApi->GetAdditionalSellerInputsOld");
var localVarPath = "/mfn/v0/sellerInputs";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
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("GetAdditionalSellerInputsOld", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(GetAdditionalSellerInputsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAdditionalSellerInputsResponse)));
}
///
/// Get a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// Task of GetAdditionalSellerInputsResponse
public async System.Threading.Tasks.Task GetAdditionalSellerInputsOldAsync(GetAdditionalSellerInputsRequest body)
{
ApiResponse localVarResponse = await GetAdditionalSellerInputsOldAsyncWithHttpInfo(body);
return localVarResponse.Data;
}
///
/// Get a list of additional seller inputs required for a ship method. This is generally used for international shipping. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse (GetAdditionalSellerInputsResponse)
public async System.Threading.Tasks.Task> GetAdditionalSellerInputsOldAsyncWithHttpInfo(GetAdditionalSellerInputsRequest body)
{
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling MerchantFulfillmentApi->GetAdditionalSellerInputsOld");
var localVarPath = "/mfn/v0/sellerInputs";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
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("GetAdditionalSellerInputsOld", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(GetAdditionalSellerInputsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetAdditionalSellerInputsResponse)));
}
///
/// Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// GetEligibleShipmentServicesResponse
public GetEligibleShipmentServicesResponse GetEligibleShipmentServices(GetEligibleShipmentServicesRequest body)
{
ApiResponse localVarResponse = GetEligibleShipmentServicesWithHttpInfo(body);
return localVarResponse.Data;
}
///
/// Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// ApiResponse of GetEligibleShipmentServicesResponse
public ApiResponse GetEligibleShipmentServicesWithHttpInfo(GetEligibleShipmentServicesRequest body)
{
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling MerchantFulfillmentApi->GetEligibleShipmentServices");
var localVarPath = "/mfn/v0/eligibleShippingServices";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
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("GetEligibleShipmentServices", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(GetEligibleShipmentServicesResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetEligibleShipmentServicesResponse)));
}
///
/// Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// Task of GetEligibleShipmentServicesResponse
public async System.Threading.Tasks.Task GetEligibleShipmentServicesAsync(GetEligibleShipmentServicesRequest body)
{
ApiResponse localVarResponse = await GetEligibleShipmentServicesAsyncWithHttpInfo(body);
return localVarResponse.Data;
}
///
/// Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse (GetEligibleShipmentServicesResponse)
public async System.Threading.Tasks.Task> GetEligibleShipmentServicesAsyncWithHttpInfo(GetEligibleShipmentServicesRequest body)
{
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling MerchantFulfillmentApi->GetEligibleShipmentServices");
var localVarPath = "/mfn/v0/eligibleShippingServices";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
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("GetEligibleShipmentServices", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(GetEligibleShipmentServicesResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetEligibleShipmentServicesResponse)));
}
///
/// Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// GetEligibleShipmentServicesResponse
public GetEligibleShipmentServicesResponse GetEligibleShipmentServicesOld(GetEligibleShipmentServicesRequest body)
{
ApiResponse localVarResponse = GetEligibleShipmentServicesOldWithHttpInfo(body);
return localVarResponse.Data;
}
///
/// Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// ApiResponse of GetEligibleShipmentServicesResponse
public ApiResponse GetEligibleShipmentServicesOldWithHttpInfo(GetEligibleShipmentServicesRequest body)
{
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling MerchantFulfillmentApi->GetEligibleShipmentServicesOld");
var localVarPath = "/mfn/v0/eligibleServices";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
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("GetEligibleShipmentServicesOld", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(GetEligibleShipmentServicesResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetEligibleShipmentServicesResponse)));
}
///
/// Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// Task of GetEligibleShipmentServicesResponse
public async System.Threading.Tasks.Task GetEligibleShipmentServicesOldAsync(GetEligibleShipmentServicesRequest body)
{
ApiResponse localVarResponse = await GetEligibleShipmentServicesOldAsyncWithHttpInfo(body);
return localVarResponse.Data;
}
///
/// Returns a list of shipping service offers that satisfy the specified shipment request details. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse (GetEligibleShipmentServicesResponse)
public async System.Threading.Tasks.Task> GetEligibleShipmentServicesOldAsyncWithHttpInfo(GetEligibleShipmentServicesRequest body)
{
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling MerchantFulfillmentApi->GetEligibleShipmentServicesOld");
var localVarPath = "/mfn/v0/eligibleServices";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
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("GetEligibleShipmentServicesOld", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(GetEligibleShipmentServicesResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetEligibleShipmentServicesResponse)));
}
///
/// Returns the shipment information for an existing shipment. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment.
/// GetShipmentResponse
public GetShipmentResponse GetShipment(string shipmentId)
{
ApiResponse localVarResponse = GetShipmentWithHttpInfo(shipmentId);
return localVarResponse.Data;
}
///
/// Returns the shipment information for an existing shipment. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment.
/// ApiResponse of GetShipmentResponse
public ApiResponse GetShipmentWithHttpInfo(string shipmentId)
{
// verify the required parameter 'shipmentId' is set
if (shipmentId == null)
throw new ApiException(400, "Missing required parameter 'shipmentId' when calling MerchantFulfillmentApi->GetShipment");
var localVarPath = "/mfn/v0/shipments/{shipmentId}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
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 (shipmentId != null) localVarPathParams.Add("shipmentId", Configuration.ApiClient.ParameterToString(shipmentId)); // path 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("GetShipment", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(GetShipmentResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetShipmentResponse)));
}
///
/// Returns the shipment information for an existing shipment. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment.
/// Task of GetShipmentResponse
public async System.Threading.Tasks.Task GetShipmentAsync(string shipmentId)
{
ApiResponse localVarResponse = await GetShipmentAsyncWithHttpInfo(shipmentId);
return localVarResponse.Data;
}
///
/// Returns the shipment information for an existing shipment. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
///
/// Thrown when fails to make API call
/// The Amazon-defined shipment identifier for the shipment.
/// Task of ApiResponse (GetShipmentResponse)
public async System.Threading.Tasks.Task> GetShipmentAsyncWithHttpInfo(string shipmentId)
{
// verify the required parameter 'shipmentId' is set
if (shipmentId == null)
throw new ApiException(400, "Missing required parameter 'shipmentId' when calling MerchantFulfillmentApi->GetShipment");
var localVarPath = "/mfn/v0/shipments/{shipmentId}";
var localVarPathParams = new Dictionary();
var localVarQueryParams = new List>();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
var localVarFileParams = new Dictionary();
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 (shipmentId != null) localVarPathParams.Add("shipmentId", Configuration.ApiClient.ParameterToString(shipmentId)); // path 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("GetShipment", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(GetShipmentResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetShipmentResponse)));
}
}
}