/// <summary> /// Update the status of an operation /// </summary> /// <remarks> /// Update the status of an operation to indicate success or failure with the /// provided values. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> /// <param name='subscriptionId'> /// </param> /// <param name='operationId'> /// </param> /// <param name='apiVersion'> /// Version of the API. Possible values include: '2018-08-31', '2018-09-15' /// </param> /// <param name='xMsRequestid'> /// A unique string value for tracking the request from the client, preferably /// a GUID. If this value isn't provided, one will be generated and provided in /// the response headers. /// </param> /// <param name='xMsCorrelationid'> /// A unique string value for operation on the client. This parameter /// correlates all events from client operation with events on the server side. /// If this value isn't provided, one will be generated and provided in the /// response headers. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Error> UpdateOperationAsync(this ISaaSFulfillment operations, object body, System.Guid subscriptionId, System.Guid operationId, string apiVersion, System.Guid?xMsRequestid = default(System.Guid?), System.Guid?xMsCorrelationid = default(System.Guid?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateOperationWithHttpMessagesAsync(body, subscriptionId, operationId, apiVersion, xMsRequestid, xMsCorrelationid, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List subscriptions /// </summary> /// <remarks> /// Lists all the SaaS subscriptions for a publisher. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='xMsRequestid'> /// A unique string value for tracking the request from the client, preferably /// a GUID. If this value isn't provided, one will be generated and provided in /// the response headers. /// </param> /// <param name='xMsCorrelationid'> /// A unique string value for operation on the client. This parameter /// correlates all events from client operation with events on the server side. /// If this value isn't provided, one will be generated and provided in the /// response headers. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> GetAllOperationsAsync(this ISaaSFulfillment operations, System.Guid?xMsRequestid = default(System.Guid?), System.Guid?xMsCorrelationid = default(System.Guid?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetAllOperationsWithHttpMessagesAsync(xMsRequestid, xMsCorrelationid, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Update the status of an operation /// </summary> /// <remarks> /// Update the status of an operation to indicate success or failure with the /// provided values. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> /// <param name='subscriptionId'> /// </param> /// <param name='operationId'> /// </param> /// <param name='apiVersion'> /// Version of the API. Possible values include: '2018-08-31', '2018-09-15' /// </param> /// <param name='xMsRequestid'> /// A unique string value for tracking the request from the client, preferably /// a GUID. If this value isn't provided, one will be generated and provided in /// the response headers. /// </param> /// <param name='xMsCorrelationid'> /// A unique string value for operation on the client. This parameter /// correlates all events from client operation with events on the server side. /// If this value isn't provided, one will be generated and provided in the /// response headers. /// </param> public static Error UpdateOperation(this ISaaSFulfillment operations, object body, System.Guid subscriptionId, System.Guid operationId, string apiVersion, System.Guid?xMsRequestid = default(System.Guid?), System.Guid?xMsCorrelationid = default(System.Guid?)) { return(operations.UpdateOperationAsync(body, subscriptionId, operationId, apiVersion, xMsRequestid, xMsCorrelationid).GetAwaiter().GetResult()); }
/// <summary> /// Get operation status /// </summary> /// <remarks> /// Enables the publisher to track the status of the specified triggered async /// operation (such as Subscribe, Unsubscribe, ChangePlan, or ChangeQuantity). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// </param> /// <param name='operationId'> /// </param> /// <param name='xMsRequestid'> /// A unique string value for tracking the request from the client, preferably /// a GUID. If this value isn't provided, one will be generated and provided in /// the response headers. /// </param> /// <param name='xMsCorrelationid'> /// A unique string value for operation on the client. This parameter /// correlates all events from client operation with events on the server side. /// If this value isn't provided, one will be generated and provided in the /// response headers. /// </param> public static object GetSubscriptionOperation(this ISaaSFulfillment operations, System.Guid subscriptionId, System.Guid operationId, System.Guid?xMsRequestid = default(System.Guid?), System.Guid?xMsCorrelationid = default(System.Guid?)) { return(operations.GetSubscriptionOperationAsync(subscriptionId, operationId, xMsRequestid, xMsCorrelationid).GetAwaiter().GetResult()); }
/// <summary> /// Activate a subscription /// </summary> /// <remarks> /// Use this call to activate a subscription. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> /// <param name='subscriptionId'> /// </param> /// <param name='xMsRequestid'> /// A unique string value for tracking the request from the client, preferably /// a GUID. If this value isn't provided, one will be generated and provided in /// the response headers. /// </param> /// <param name='xMsCorrelationid'> /// A unique string value for operation on the client. This parameter /// correlates all events from client operation with events on the server side. /// If this value isn't provided, one will be generated and provided in the /// response headers. /// </param> public static Error ActivateSubscription(this ISaaSFulfillment operations, object body, System.Guid subscriptionId, System.Guid?xMsRequestid = default(System.Guid?), System.Guid?xMsCorrelationid = default(System.Guid?)) { return(operations.ActivateSubscriptionAsync(body, subscriptionId, xMsRequestid, xMsCorrelationid).GetAwaiter().GetResult()); }
/// <summary> /// List subscriptions /// </summary> /// <remarks> /// Lists all the SaaS subscriptions for a publisher. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='xMsRequestid'> /// A unique string value for tracking the request from the client, preferably /// a GUID. If this value isn't provided, one will be generated and provided in /// the response headers. /// </param> /// <param name='xMsCorrelationid'> /// A unique string value for operation on the client. This parameter /// correlates all events from client operation with events on the server side. /// If this value isn't provided, one will be generated and provided in the /// response headers. /// </param> public static object GetAllOperations(this ISaaSFulfillment operations, System.Guid?xMsRequestid = default(System.Guid?), System.Guid?xMsCorrelationid = default(System.Guid?)) { return(operations.GetAllOperationsAsync(xMsRequestid, xMsCorrelationid).GetAwaiter().GetResult()); }
/// <summary> /// Delete a subscription /// </summary> /// <remarks> /// Unsubscribe and delete the specified subscription. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='subscriptionId'> /// </param> /// <param name='apiVersion'> /// Version of the API. Possible values include: '2018-08-31', '2018-09-15' /// </param> /// <param name='xMsRequestid'> /// A unique string value for tracking the request from the client, preferably /// a GUID. If this value isn't provided, one will be generated and provided in /// the response headers. /// </param> /// <param name='xMsCorrelationid'> /// A unique string value for operation on the client. This parameter /// correlates all events from client operation with events on the server side. /// If this value isn't provided, one will be generated and provided in the /// response headers. /// </param> public static Error DeleteSubscription(this ISaaSFulfillment operations, System.Guid subscriptionId, string apiVersion, System.Guid?xMsRequestid = default(System.Guid?), System.Guid?xMsCorrelationid = default(System.Guid?)) { return(operations.DeleteSubscriptionAsync(subscriptionId, apiVersion, xMsRequestid, xMsCorrelationid).GetAwaiter().GetResult()); }
/// <summary> /// Resolve a subscription /// </summary> /// <remarks> /// The resolve endpoint enables the publisher to resolve a marketplace token /// to a persistent resource ID. The resource ID is the unique identifier for a /// SaaS subscription. When a user is redirected to a partner's website, the /// URL contains a token in the query parameters. The partner is expected to /// use this token and make a request to resolve it. The response contains the /// unique SaaS subscription ID, name, offer ID, and plan for the resource. /// This token is valid for one hour only. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='xMsRequestid'> /// A unique string value for tracking the request from the client, preferably /// a GUID. If this value isn't provided, one will be generated and provided in /// the response headers. /// </param> /// <param name='xMsCorrelationid'> /// A unique string value for operation on the client. This parameter /// correlates all events from client operation with events on the server side. /// If this value isn't provided, one will be generated and provided in the /// response headers. /// </param> /// <param name='xMsMarketplaceToken'> /// The token query parameter in the URL when the user is redirected to the /// SaaS partner's website from Azure (for example, /// https://contoso.com/signup?token=..). Note, The URL decodes the token value /// from the browser before using it. /// </param> public static object Resolve(this ISaaSFulfillment operations, System.Guid?xMsRequestid = default(System.Guid?), System.Guid?xMsCorrelationid = default(System.Guid?), string xMsMarketplaceToken = default(string)) { return(operations.ResolveAsync(xMsRequestid, xMsCorrelationid, xMsMarketplaceToken).GetAwaiter().GetResult()); }