コード例 #1
0
        public void CancelSubscription()
        {
            var request = new CancellationRequest
            {
                IsCancelledAtEndOfPeriod = false,
                CancelationDetails = "detaild",
            };

            _gateway.Subscription.CancelSubscription(_testData.SubscriptionId.ToString(), request);
        }
コード例 #2
0
 /// <summary>
 /// Cancels a subscription. The effects are:
 /// The customer's credit card will no longer be charged after cancellation takes effect
 /// Cancellation takes effect immediately if you set isCancelledAtEndOfPeriod = false
 /// Cancellation takes effect at the subscription next assesment if you set isCancelledAtEndOfPeriod = true
 /// No refunds or prorations will be made.
 /// No email is sent to the customer.
 /// Canceled subscription can be reactivated at a later date
 /// </summary>
 /// <param name="subscriptionId">The Id of the Subscription</param>
 /// <param name="request">The request.</param>
 /// <param name="format"></param>
 /// <returns></returns>
 public ServiceResult CancelSubscription(string subscriptionId, CancellationRequest request, string format = ContentFormat.XML)
 {
     return _service.Put<CancellationRequest, ServiceResult>(string.Format("{0}/cancel/{1}.{2}", _gatewayURL, subscriptionId, format), request);
 }