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

1607 lines
110 KiB
C#

/*
* Selling Partner API for Notifications
*
* The Selling Partner API for Notifications lets you subscribe to notifications that are relevant to a selling partner's business. Using this API you can create a destination to receive notifications, subscribe to notifications, delete notification subscriptions, and more.
*
* OpenAPI spec version: v1
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
using FikaAmazonAPI.AmazonSpApiSDK.Clients;
using FikaAmazonAPI.AmazonSpApiSDK.Models.Notifications;
using RestSharp;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
namespace FikaAmazonAPI.AmazonSpApiSDK.Api.Notifications
{
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public interface INotificationsApi : IApiAccessor
{
#region Synchronous Operations
/// <summary>
///
/// </summary>
/// <remarks>
/// Creates a destination resource to receive notifications. The createDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="body"></param>
/// <returns>CreateDestinationResponse</returns>
CreateDestinationResponse CreateDestination(CreateDestinationRequest body);
/// <summary>
///
/// </summary>
/// <remarks>
/// Creates a destination resource to receive notifications. The createDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="body"></param>
/// <returns>ApiResponse of CreateDestinationResponse</returns>
ApiResponse<CreateDestinationResponse> CreateDestinationWithHttpInfo(CreateDestinationRequest body);
/// <summary>
///
/// </summary>
/// <remarks>
/// Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the createDestination operation. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="body"></param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>CreateSubscriptionResponse</returns>
CreateSubscriptionResponse CreateSubscription(CreateSubscriptionRequest body, string notificationType);
/// <summary>
///
/// </summary>
/// <remarks>
/// Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the createDestination operation. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="body"></param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>ApiResponse of CreateSubscriptionResponse</returns>
ApiResponse<CreateSubscriptionResponse> CreateSubscriptionWithHttpInfo(CreateSubscriptionRequest body, string notificationType);
/// <summary>
///
/// </summary>
/// <remarks>
/// Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="destinationId">The identifier for the destination that you want to delete.</param>
/// <returns>DeleteDestinationResponse</returns>
DeleteDestinationResponse DeleteDestination(string destinationId);
/// <summary>
///
/// </summary>
/// <remarks>
/// Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="destinationId">The identifier for the destination that you want to delete.</param>
/// <returns>ApiResponse of DeleteDestinationResponse</returns>
ApiResponse<DeleteDestinationResponse> DeleteDestinationWithHttpInfo(string destinationId);
/// <summary>
///
/// </summary>
/// <remarks>
/// Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The deleteSubscriptionById API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="subscriptionId">The identifier for the subscription that you want to delete.</param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>DeleteSubscriptionByIdResponse</returns>
DeleteSubscriptionByIdResponse DeleteSubscriptionById(string subscriptionId, string notificationType);
/// <summary>
///
/// </summary>
/// <remarks>
/// Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The deleteSubscriptionById API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="subscriptionId">The identifier for the subscription that you want to delete.</param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>ApiResponse of DeleteSubscriptionByIdResponse</returns>
ApiResponse<DeleteSubscriptionByIdResponse> DeleteSubscriptionByIdWithHttpInfo(string subscriptionId, string notificationType);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns information about the destination that you specify. The getDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="destinationId">The identifier generated when you created the destination.</param>
/// <returns>GetDestinationResponse</returns>
GetDestinationResponse GetDestination(string destinationId);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns information about the destination that you specify. The getDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="destinationId">The identifier generated when you created the destination.</param>
/// <returns>ApiResponse of GetDestinationResponse</returns>
ApiResponse<GetDestinationResponse> GetDestinationWithHttpInfo(string destinationId);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns information about all destinations. The getDestinations API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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>
/// <returns>GetDestinationsResponse</returns>
GetDestinationsResponse GetDestinations();
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns information about all destinations. The getDestinations API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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>
/// <returns>ApiResponse of GetDestinationsResponse</returns>
ApiResponse<GetDestinationsResponse> GetDestinationsWithHttpInfo();
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns information about subscriptions of the specified notification type. You can use this API to get subscription information when you do not have a subscription identifier. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>GetSubscriptionResponse</returns>
GetSubscriptionResponse GetSubscription(string notificationType);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns information about subscriptions of the specified notification type. You can use this API to get subscription information when you do not have a subscription identifier. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>ApiResponse of GetSubscriptionResponse</returns>
ApiResponse<GetSubscriptionResponse> GetSubscriptionWithHttpInfo(string notificationType);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns information about a subscription for the specified notification type. The getSubscriptionById API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="subscriptionId">The identifier for the subscription that you want to get.</param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>GetSubscriptionByIdResponse</returns>
GetSubscriptionByIdResponse GetSubscriptionById(string subscriptionId, string notificationType);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns information about a subscription for the specified notification type. The getSubscriptionById API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="subscriptionId">The identifier for the subscription that you want to get.</param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>ApiResponse of GetSubscriptionByIdResponse</returns>
ApiResponse<GetSubscriptionByIdResponse> GetSubscriptionByIdWithHttpInfo(string subscriptionId, string notificationType);
#endregion Synchronous Operations
#region Asynchronous Operations
/// <summary>
///
/// </summary>
/// <remarks>
/// Creates a destination resource to receive notifications. The createDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="body"></param>
/// <returns>Task of CreateDestinationResponse</returns>
System.Threading.Tasks.Task<CreateDestinationResponse> CreateDestinationAsync(CreateDestinationRequest body);
/// <summary>
///
/// </summary>
/// <remarks>
/// Creates a destination resource to receive notifications. The createDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="body"></param>
/// <returns>Task of ApiResponse (CreateDestinationResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<CreateDestinationResponse>> CreateDestinationAsyncWithHttpInfo(CreateDestinationRequest body);
/// <summary>
///
/// </summary>
/// <remarks>
/// Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the createDestination operation. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="body"></param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>Task of CreateSubscriptionResponse</returns>
System.Threading.Tasks.Task<CreateSubscriptionResponse> CreateSubscriptionAsync(CreateSubscriptionRequest body, string notificationType);
/// <summary>
///
/// </summary>
/// <remarks>
/// Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the createDestination operation. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="body"></param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>Task of ApiResponse (CreateSubscriptionResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<CreateSubscriptionResponse>> CreateSubscriptionAsyncWithHttpInfo(CreateSubscriptionRequest body, string notificationType);
/// <summary>
///
/// </summary>
/// <remarks>
/// Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="destinationId">The identifier for the destination that you want to delete.</param>
/// <returns>Task of DeleteDestinationResponse</returns>
System.Threading.Tasks.Task<DeleteDestinationResponse> DeleteDestinationAsync(string destinationId);
/// <summary>
///
/// </summary>
/// <remarks>
/// Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="destinationId">The identifier for the destination that you want to delete.</param>
/// <returns>Task of ApiResponse (DeleteDestinationResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<DeleteDestinationResponse>> DeleteDestinationAsyncWithHttpInfo(string destinationId);
/// <summary>
///
/// </summary>
/// <remarks>
/// Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The deleteSubscriptionById API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="subscriptionId">The identifier for the subscription that you want to delete.</param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>Task of DeleteSubscriptionByIdResponse</returns>
System.Threading.Tasks.Task<DeleteSubscriptionByIdResponse> DeleteSubscriptionByIdAsync(string subscriptionId, string notificationType);
/// <summary>
///
/// </summary>
/// <remarks>
/// Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The deleteSubscriptionById API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="subscriptionId">The identifier for the subscription that you want to delete.</param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>Task of ApiResponse (DeleteSubscriptionByIdResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<DeleteSubscriptionByIdResponse>> DeleteSubscriptionByIdAsyncWithHttpInfo(string subscriptionId, string notificationType);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns information about the destination that you specify. The getDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="destinationId">The identifier generated when you created the destination.</param>
/// <returns>Task of GetDestinationResponse</returns>
System.Threading.Tasks.Task<GetDestinationResponse> GetDestinationAsync(string destinationId);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns information about the destination that you specify. The getDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="destinationId">The identifier generated when you created the destination.</param>
/// <returns>Task of ApiResponse (GetDestinationResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<GetDestinationResponse>> GetDestinationAsyncWithHttpInfo(string destinationId);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns information about all destinations. The getDestinations API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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>
/// <returns>Task of GetDestinationsResponse</returns>
System.Threading.Tasks.Task<GetDestinationsResponse> GetDestinationsAsync();
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns information about all destinations. The getDestinations API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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>
/// <returns>Task of ApiResponse (GetDestinationsResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<GetDestinationsResponse>> GetDestinationsAsyncWithHttpInfo();
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns information about subscriptions of the specified notification type. You can use this API to get subscription information when you do not have a subscription identifier. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>Task of GetSubscriptionResponse</returns>
System.Threading.Tasks.Task<GetSubscriptionResponse> GetSubscriptionAsync(string notificationType);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns information about subscriptions of the specified notification type. You can use this API to get subscription information when you do not have a subscription identifier. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>Task of ApiResponse (GetSubscriptionResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<GetSubscriptionResponse>> GetSubscriptionAsyncWithHttpInfo(string notificationType);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns information about a subscription for the specified notification type. The getSubscriptionById API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="subscriptionId">The identifier for the subscription that you want to get.</param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>Task of GetSubscriptionByIdResponse</returns>
System.Threading.Tasks.Task<GetSubscriptionByIdResponse> GetSubscriptionByIdAsync(string subscriptionId, string notificationType);
/// <summary>
///
/// </summary>
/// <remarks>
/// Returns information about a subscription for the specified notification type. The getSubscriptionById API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="subscriptionId">The identifier for the subscription that you want to get.</param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>Task of ApiResponse (GetSubscriptionByIdResponse)</returns>
System.Threading.Tasks.Task<ApiResponse<GetSubscriptionByIdResponse>> GetSubscriptionByIdAsyncWithHttpInfo(string subscriptionId, string notificationType);
#endregion Asynchronous Operations
}
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public partial class NotificationsApi : INotificationsApi
{
private ExceptionFactory _exceptionFactory = (name, response) => null;
/// <summary>
/// Initializes a new instance of the <see cref="NotificationsApi"/> class.
/// </summary>
/// <returns></returns>
public NotificationsApi(string basePath)
{
Configuration = new Configuration { BasePath = basePath };
ExceptionFactory = Configuration.DefaultExceptionFactory;
}
/// <summary>
/// Initializes a new instance of the <see cref="NotificationsApi"/> class
/// using Configuration object
/// </summary>
/// <param name="configuration">An instance of Configuration</param>
/// <returns></returns>
public NotificationsApi(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>
/// Creates a destination resource to receive notifications. The createDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="body"></param>
/// <returns>CreateDestinationResponse</returns>
public CreateDestinationResponse CreateDestination(CreateDestinationRequest body)
{
ApiResponse<CreateDestinationResponse> localVarResponse = CreateDestinationWithHttpInfo(body);
return localVarResponse.Data;
}
/// <summary>
/// Creates a destination resource to receive notifications. The createDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="body"></param>
/// <returns>ApiResponse of CreateDestinationResponse</returns>
public ApiResponse<CreateDestinationResponse> CreateDestinationWithHttpInfo(CreateDestinationRequest body)
{
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling NotificationsApi->CreateDestination");
var localVarPath = "/notifications/v1/destinations";
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("CreateDestination", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<CreateDestinationResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(CreateDestinationResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateDestinationResponse)));
}
/// <summary>
/// Creates a destination resource to receive notifications. The createDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="body"></param>
/// <returns>Task of CreateDestinationResponse</returns>
public async System.Threading.Tasks.Task<CreateDestinationResponse> CreateDestinationAsync(CreateDestinationRequest body)
{
ApiResponse<CreateDestinationResponse> localVarResponse = await CreateDestinationAsyncWithHttpInfo(body);
return localVarResponse.Data;
}
/// <summary>
/// Creates a destination resource to receive notifications. The createDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="body"></param>
/// <returns>Task of ApiResponse (CreateDestinationResponse)</returns>
public async System.Threading.Tasks.Task<ApiResponse<CreateDestinationResponse>> CreateDestinationAsyncWithHttpInfo(CreateDestinationRequest body)
{
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling NotificationsApi->CreateDestination");
var localVarPath = "/notifications/v1/destinations";
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("CreateDestination", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<CreateDestinationResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(CreateDestinationResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateDestinationResponse)));
}
/// <summary>
/// Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the createDestination operation. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="body"></param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>CreateSubscriptionResponse</returns>
public CreateSubscriptionResponse CreateSubscription(CreateSubscriptionRequest body, string notificationType)
{
ApiResponse<CreateSubscriptionResponse> localVarResponse = CreateSubscriptionWithHttpInfo(body, notificationType);
return localVarResponse.Data;
}
/// <summary>
/// Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the createDestination operation. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="body"></param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>ApiResponse of CreateSubscriptionResponse</returns>
public ApiResponse<CreateSubscriptionResponse> CreateSubscriptionWithHttpInfo(CreateSubscriptionRequest body, string notificationType)
{
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling NotificationsApi->CreateSubscription");
// verify the required parameter 'notificationType' is set
if (notificationType == null)
throw new ApiException(400, "Missing required parameter 'notificationType' when calling NotificationsApi->CreateSubscription");
var localVarPath = "/notifications/v1/subscriptions/{notificationType}";
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 (notificationType != null) localVarPathParams.Add("notificationType", Configuration.ApiClient.ParameterToString(notificationType)); // path parameter
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("CreateSubscription", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<CreateSubscriptionResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(CreateSubscriptionResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse)));
}
/// <summary>
/// Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the createDestination operation. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="body"></param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>Task of CreateSubscriptionResponse</returns>
public async System.Threading.Tasks.Task<CreateSubscriptionResponse> CreateSubscriptionAsync(CreateSubscriptionRequest body, string notificationType)
{
ApiResponse<CreateSubscriptionResponse> localVarResponse = await CreateSubscriptionAsyncWithHttpInfo(body, notificationType);
return localVarResponse.Data;
}
/// <summary>
/// Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the createDestination operation. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="body"></param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>Task of ApiResponse (CreateSubscriptionResponse)</returns>
public async System.Threading.Tasks.Task<ApiResponse<CreateSubscriptionResponse>> CreateSubscriptionAsyncWithHttpInfo(CreateSubscriptionRequest body, string notificationType)
{
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling NotificationsApi->CreateSubscription");
// verify the required parameter 'notificationType' is set
if (notificationType == null)
throw new ApiException(400, "Missing required parameter 'notificationType' when calling NotificationsApi->CreateSubscription");
var localVarPath = "/notifications/v1/subscriptions/{notificationType}";
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 (notificationType != null) localVarPathParams.Add("notificationType", Configuration.ApiClient.ParameterToString(notificationType)); // path parameter
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("CreateSubscription", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<CreateSubscriptionResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(CreateSubscriptionResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse)));
}
/// <summary>
/// Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="destinationId">The identifier for the destination that you want to delete.</param>
/// <returns>DeleteDestinationResponse</returns>
public DeleteDestinationResponse DeleteDestination(string destinationId)
{
ApiResponse<DeleteDestinationResponse> localVarResponse = DeleteDestinationWithHttpInfo(destinationId);
return localVarResponse.Data;
}
/// <summary>
/// Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="destinationId">The identifier for the destination that you want to delete.</param>
/// <returns>ApiResponse of DeleteDestinationResponse</returns>
public ApiResponse<DeleteDestinationResponse> DeleteDestinationWithHttpInfo(string destinationId)
{
// verify the required parameter 'destinationId' is set
if (destinationId == null)
throw new ApiException(400, "Missing required parameter 'destinationId' when calling NotificationsApi->DeleteDestination");
var localVarPath = "/notifications/v1/destinations/{destinationId}";
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 (destinationId != null) localVarPathParams.Add("destinationId", Configuration.ApiClient.ParameterToString(destinationId)); // 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("DeleteDestination", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<DeleteDestinationResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(DeleteDestinationResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(DeleteDestinationResponse)));
}
/// <summary>
/// Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="destinationId">The identifier for the destination that you want to delete.</param>
/// <returns>Task of DeleteDestinationResponse</returns>
public async System.Threading.Tasks.Task<DeleteDestinationResponse> DeleteDestinationAsync(string destinationId)
{
ApiResponse<DeleteDestinationResponse> localVarResponse = await DeleteDestinationAsyncWithHttpInfo(destinationId);
return localVarResponse.Data;
}
/// <summary>
/// Deletes the destination that you specify. The deleteDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="destinationId">The identifier for the destination that you want to delete.</param>
/// <returns>Task of ApiResponse (DeleteDestinationResponse)</returns>
public async System.Threading.Tasks.Task<ApiResponse<DeleteDestinationResponse>> DeleteDestinationAsyncWithHttpInfo(string destinationId)
{
// verify the required parameter 'destinationId' is set
if (destinationId == null)
throw new ApiException(400, "Missing required parameter 'destinationId' when calling NotificationsApi->DeleteDestination");
var localVarPath = "/notifications/v1/destinations/{destinationId}";
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 (destinationId != null) localVarPathParams.Add("destinationId", Configuration.ApiClient.ParameterToString(destinationId)); // 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("DeleteDestination", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<DeleteDestinationResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(DeleteDestinationResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(DeleteDestinationResponse)));
}
/// <summary>
/// Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The deleteSubscriptionById API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="subscriptionId">The identifier for the subscription that you want to delete.</param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>DeleteSubscriptionByIdResponse</returns>
public DeleteSubscriptionByIdResponse DeleteSubscriptionById(string subscriptionId, string notificationType)
{
ApiResponse<DeleteSubscriptionByIdResponse> localVarResponse = DeleteSubscriptionByIdWithHttpInfo(subscriptionId, notificationType);
return localVarResponse.Data;
}
/// <summary>
/// Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The deleteSubscriptionById API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="subscriptionId">The identifier for the subscription that you want to delete.</param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>ApiResponse of DeleteSubscriptionByIdResponse</returns>
public ApiResponse<DeleteSubscriptionByIdResponse> DeleteSubscriptionByIdWithHttpInfo(string subscriptionId, string notificationType)
{
// verify the required parameter 'subscriptionId' is set
if (subscriptionId == null)
throw new ApiException(400, "Missing required parameter 'subscriptionId' when calling NotificationsApi->DeleteSubscriptionById");
// verify the required parameter 'notificationType' is set
if (notificationType == null)
throw new ApiException(400, "Missing required parameter 'notificationType' when calling NotificationsApi->DeleteSubscriptionById");
var localVarPath = "/notifications/v1/subscriptions/{notificationType}/{subscriptionId}";
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 (subscriptionId != null) localVarPathParams.Add("subscriptionId", Configuration.ApiClient.ParameterToString(subscriptionId)); // path parameter
if (notificationType != null) localVarPathParams.Add("notificationType", Configuration.ApiClient.ParameterToString(notificationType)); // 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("DeleteSubscriptionById", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<DeleteSubscriptionByIdResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(DeleteSubscriptionByIdResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(DeleteSubscriptionByIdResponse)));
}
/// <summary>
/// Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The deleteSubscriptionById API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="subscriptionId">The identifier for the subscription that you want to delete.</param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>Task of DeleteSubscriptionByIdResponse</returns>
public async System.Threading.Tasks.Task<DeleteSubscriptionByIdResponse> DeleteSubscriptionByIdAsync(string subscriptionId, string notificationType)
{
ApiResponse<DeleteSubscriptionByIdResponse> localVarResponse = await DeleteSubscriptionByIdAsyncWithHttpInfo(subscriptionId, notificationType);
return localVarResponse.Data;
}
/// <summary>
/// Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The deleteSubscriptionById API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="subscriptionId">The identifier for the subscription that you want to delete.</param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>Task of ApiResponse (DeleteSubscriptionByIdResponse)</returns>
public async System.Threading.Tasks.Task<ApiResponse<DeleteSubscriptionByIdResponse>> DeleteSubscriptionByIdAsyncWithHttpInfo(string subscriptionId, string notificationType)
{
// verify the required parameter 'subscriptionId' is set
if (subscriptionId == null)
throw new ApiException(400, "Missing required parameter 'subscriptionId' when calling NotificationsApi->DeleteSubscriptionById");
// verify the required parameter 'notificationType' is set
if (notificationType == null)
throw new ApiException(400, "Missing required parameter 'notificationType' when calling NotificationsApi->DeleteSubscriptionById");
var localVarPath = "/notifications/v1/subscriptions/{notificationType}/{subscriptionId}";
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 (subscriptionId != null) localVarPathParams.Add("subscriptionId", Configuration.ApiClient.ParameterToString(subscriptionId)); // path parameter
if (notificationType != null) localVarPathParams.Add("notificationType", Configuration.ApiClient.ParameterToString(notificationType)); // 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("DeleteSubscriptionById", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<DeleteSubscriptionByIdResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(DeleteSubscriptionByIdResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(DeleteSubscriptionByIdResponse)));
}
/// <summary>
/// Returns information about the destination that you specify. The getDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="destinationId">The identifier generated when you created the destination.</param>
/// <returns>GetDestinationResponse</returns>
public GetDestinationResponse GetDestination(string destinationId)
{
ApiResponse<GetDestinationResponse> localVarResponse = GetDestinationWithHttpInfo(destinationId);
return localVarResponse.Data;
}
/// <summary>
/// Returns information about the destination that you specify. The getDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="destinationId">The identifier generated when you created the destination.</param>
/// <returns>ApiResponse of GetDestinationResponse</returns>
public ApiResponse<GetDestinationResponse> GetDestinationWithHttpInfo(string destinationId)
{
// verify the required parameter 'destinationId' is set
if (destinationId == null)
throw new ApiException(400, "Missing required parameter 'destinationId' when calling NotificationsApi->GetDestination");
var localVarPath = "/notifications/v1/destinations/{destinationId}";
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 (destinationId != null) localVarPathParams.Add("destinationId", Configuration.ApiClient.ParameterToString(destinationId)); // 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("GetDestination", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<GetDestinationResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(GetDestinationResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetDestinationResponse)));
}
/// <summary>
/// Returns information about the destination that you specify. The getDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="destinationId">The identifier generated when you created the destination.</param>
/// <returns>Task of GetDestinationResponse</returns>
public async System.Threading.Tasks.Task<GetDestinationResponse> GetDestinationAsync(string destinationId)
{
ApiResponse<GetDestinationResponse> localVarResponse = await GetDestinationAsyncWithHttpInfo(destinationId);
return localVarResponse.Data;
}
/// <summary>
/// Returns information about the destination that you specify. The getDestination API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="destinationId">The identifier generated when you created the destination.</param>
/// <returns>Task of ApiResponse (GetDestinationResponse)</returns>
public async System.Threading.Tasks.Task<ApiResponse<GetDestinationResponse>> GetDestinationAsyncWithHttpInfo(string destinationId)
{
// verify the required parameter 'destinationId' is set
if (destinationId == null)
throw new ApiException(400, "Missing required parameter 'destinationId' when calling NotificationsApi->GetDestination");
var localVarPath = "/notifications/v1/destinations/{destinationId}";
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 (destinationId != null) localVarPathParams.Add("destinationId", Configuration.ApiClient.ParameterToString(destinationId)); // 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("GetDestination", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<GetDestinationResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(GetDestinationResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetDestinationResponse)));
}
/// <summary>
/// Returns information about all destinations. The getDestinations API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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>
/// <returns>GetDestinationsResponse</returns>
public GetDestinationsResponse GetDestinations()
{
ApiResponse<GetDestinationsResponse> localVarResponse = GetDestinationsWithHttpInfo();
return localVarResponse.Data;
}
/// <summary>
/// Returns information about all destinations. The getDestinations API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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>
/// <returns>ApiResponse of GetDestinationsResponse</returns>
public ApiResponse<GetDestinationsResponse> GetDestinationsWithHttpInfo()
{
var localVarPath = "/notifications/v1/destinations";
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);
// 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("GetDestinations", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<GetDestinationsResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(GetDestinationsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetDestinationsResponse)));
}
/// <summary>
/// Returns information about all destinations. The getDestinations API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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>
/// <returns>Task of GetDestinationsResponse</returns>
public async System.Threading.Tasks.Task<GetDestinationsResponse> GetDestinationsAsync()
{
ApiResponse<GetDestinationsResponse> localVarResponse = await GetDestinationsAsyncWithHttpInfo();
return localVarResponse.Data;
}
/// <summary>
/// Returns information about all destinations. The getDestinations API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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>
/// <returns>Task of ApiResponse (GetDestinationsResponse)</returns>
public async System.Threading.Tasks.Task<ApiResponse<GetDestinationsResponse>> GetDestinationsAsyncWithHttpInfo()
{
var localVarPath = "/notifications/v1/destinations";
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);
// 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("GetDestinations", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<GetDestinationsResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(GetDestinationsResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetDestinationsResponse)));
}
/// <summary>
/// Returns information about subscriptions of the specified notification type. You can use this API to get subscription information when you do not have a subscription identifier. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>GetSubscriptionResponse</returns>
public GetSubscriptionResponse GetSubscription(string notificationType)
{
ApiResponse<GetSubscriptionResponse> localVarResponse = GetSubscriptionWithHttpInfo(notificationType);
return localVarResponse.Data;
}
/// <summary>
/// Returns information about subscriptions of the specified notification type. You can use this API to get subscription information when you do not have a subscription identifier. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>ApiResponse of GetSubscriptionResponse</returns>
public ApiResponse<GetSubscriptionResponse> GetSubscriptionWithHttpInfo(string notificationType)
{
// verify the required parameter 'notificationType' is set
if (notificationType == null)
throw new ApiException(400, "Missing required parameter 'notificationType' when calling NotificationsApi->GetSubscription");
var localVarPath = "/notifications/v1/subscriptions/{notificationType}";
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 (notificationType != null) localVarPathParams.Add("notificationType", Configuration.ApiClient.ParameterToString(notificationType)); // 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("GetSubscription", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<GetSubscriptionResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(GetSubscriptionResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse)));
}
/// <summary>
/// Returns information about subscriptions of the specified notification type. You can use this API to get subscription information when you do not have a subscription identifier. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>Task of GetSubscriptionResponse</returns>
public async System.Threading.Tasks.Task<GetSubscriptionResponse> GetSubscriptionAsync(string notificationType)
{
ApiResponse<GetSubscriptionResponse> localVarResponse = await GetSubscriptionAsyncWithHttpInfo(notificationType);
return localVarResponse.Data;
}
/// <summary>
/// Returns information about subscriptions of the specified notification type. You can use this API to get subscription information when you do not have a subscription identifier. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>Task of ApiResponse (GetSubscriptionResponse)</returns>
public async System.Threading.Tasks.Task<ApiResponse<GetSubscriptionResponse>> GetSubscriptionAsyncWithHttpInfo(string notificationType)
{
// verify the required parameter 'notificationType' is set
if (notificationType == null)
throw new ApiException(400, "Missing required parameter 'notificationType' when calling NotificationsApi->GetSubscription");
var localVarPath = "/notifications/v1/subscriptions/{notificationType}";
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 (notificationType != null) localVarPathParams.Add("notificationType", Configuration.ApiClient.ParameterToString(notificationType)); // 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("GetSubscription", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<GetSubscriptionResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(GetSubscriptionResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse)));
}
/// <summary>
/// Returns information about a subscription for the specified notification type. The getSubscriptionById API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="subscriptionId">The identifier for the subscription that you want to get.</param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>GetSubscriptionByIdResponse</returns>
public GetSubscriptionByIdResponse GetSubscriptionById(string subscriptionId, string notificationType)
{
ApiResponse<GetSubscriptionByIdResponse> localVarResponse = GetSubscriptionByIdWithHttpInfo(subscriptionId, notificationType);
return localVarResponse.Data;
}
/// <summary>
/// Returns information about a subscription for the specified notification type. The getSubscriptionById API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="subscriptionId">The identifier for the subscription that you want to get.</param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>ApiResponse of GetSubscriptionByIdResponse</returns>
public ApiResponse<GetSubscriptionByIdResponse> GetSubscriptionByIdWithHttpInfo(string subscriptionId, string notificationType)
{
// verify the required parameter 'subscriptionId' is set
if (subscriptionId == null)
throw new ApiException(400, "Missing required parameter 'subscriptionId' when calling NotificationsApi->GetSubscriptionById");
// verify the required parameter 'notificationType' is set
if (notificationType == null)
throw new ApiException(400, "Missing required parameter 'notificationType' when calling NotificationsApi->GetSubscriptionById");
var localVarPath = "/notifications/v1/subscriptions/{notificationType}/{subscriptionId}";
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 (subscriptionId != null) localVarPathParams.Add("subscriptionId", Configuration.ApiClient.ParameterToString(subscriptionId)); // path parameter
if (notificationType != null) localVarPathParams.Add("notificationType", Configuration.ApiClient.ParameterToString(notificationType)); // 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("GetSubscriptionById", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<GetSubscriptionByIdResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(GetSubscriptionByIdResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionByIdResponse)));
}
/// <summary>
/// Returns information about a subscription for the specified notification type. The getSubscriptionById API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="subscriptionId">The identifier for the subscription that you want to get.</param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>Task of GetSubscriptionByIdResponse</returns>
public async System.Threading.Tasks.Task<GetSubscriptionByIdResponse> GetSubscriptionByIdAsync(string subscriptionId, string notificationType)
{
ApiResponse<GetSubscriptionByIdResponse> localVarResponse = await GetSubscriptionByIdAsyncWithHttpInfo(subscriptionId, notificationType);
return localVarResponse.Data;
}
/// <summary>
/// Returns information about a subscription for the specified notification type. The getSubscriptionById API is grantless. For more information, see \&quot;Grantless operations\&quot; in the Selling Partner API Developer Guide. **Usage Plan:** | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 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="subscriptionId">The identifier for the subscription that you want to get.</param>
/// <param name="notificationType">The type of notification to which you want to subscribe. For more information about notification types, see the Notifications API Use Case Guide.</param>
/// <returns>Task of ApiResponse (GetSubscriptionByIdResponse)</returns>
public async System.Threading.Tasks.Task<ApiResponse<GetSubscriptionByIdResponse>> GetSubscriptionByIdAsyncWithHttpInfo(string subscriptionId, string notificationType)
{
// verify the required parameter 'subscriptionId' is set
if (subscriptionId == null)
throw new ApiException(400, "Missing required parameter 'subscriptionId' when calling NotificationsApi->GetSubscriptionById");
// verify the required parameter 'notificationType' is set
if (notificationType == null)
throw new ApiException(400, "Missing required parameter 'notificationType' when calling NotificationsApi->GetSubscriptionById");
var localVarPath = "/notifications/v1/subscriptions/{notificationType}/{subscriptionId}";
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 (subscriptionId != null) localVarPathParams.Add("subscriptionId", Configuration.ApiClient.ParameterToString(subscriptionId)); // path parameter
if (notificationType != null) localVarPathParams.Add("notificationType", Configuration.ApiClient.ParameterToString(notificationType)); // 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("GetSubscriptionById", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<GetSubscriptionByIdResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(GetSubscriptionByIdResponse)Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionByIdResponse)));
}
}
}