Пример #1
0
 public virtual Response ActivateSubscription(Guid subscriptionId, SubscriberPlan body, Guid?requestId = null, Guid?correlationId = null, CancellationToken cancellationToken = default)
 {
     using var scope = _clientDiagnostics.CreateScope("FulfillmentOperations.ActivateSubscription");
     scope.Start();
     try
     {
         return(RestClient.ActivateSubscription(subscriptionId, body, requestId, correlationId, cancellationToken));
     }
     catch (Exception e)
     {
         scope.Failed(e);
         throw;
     }
 }
 /// <summary> Use this call to update the plan, the user count (quantity), or both. </summary>
 /// <param name="subscriptionId"> The Uuid to use. </param>
 /// <param name="body"> The SubscriberPlan to use. </param>
 /// <param name="requestId"> A unique string value for tracking the request from the client, preferably a GUID. If this value isn&apos;t provided, one will be generated and provided in the response headers. </param>
 /// <param name="correlationId"> 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&apos;t provided, one will be generated and provided in the response headers. </param>
 /// <param name="cancellationToken"> The cancellation token to use. </param>
 /// <returns>A <see cref="string"/> representing the result of the  operation.</returns>
 public virtual string UpdateSubscription(Guid subscriptionId, SubscriberPlan body, Guid?requestId = null, Guid?correlationId = null, CancellationToken cancellationToken = default)
 {
     using var scope = this._clientDiagnostics.CreateScope("FulfillmentOperations.UpdateSubscription");
     scope.Start();
     try
     {
         var result = this.RestClient.UpdateSubscription(subscriptionId, body, requestId, correlationId, cancellationToken).Headers.OperationLocationUri;
         return(ExtractOperationIdFromOperationLocation(result));
     }
     catch (Exception e)
     {
         scope.Failed(e);
         throw;
     }
 }