public SubscriptionResponse Terminate(string sUUID, RefundType eRefundType)
 {
     IRestRequest request = this.CreateRequest(this.Resource + "/{UUID}/terminate?refund={refund}", Method.PUT);
     request.AddUrlSegment("UUID", sUUID);
     request.AddUrlSegment("refund", eRefundType.ToString().ToLowerInvariant());
     return this.ExecuteRequest<SubscriptionResponse>(request).Data;
 }
Beispiel #2
0
        public SubscriptionResponse Terminate(string sUUID, RefundType eRefundType)
        {
            IRestRequest request = this.CreateRequest(this.Resource + "/{UUID}/terminate?refund={refund}", Method.PUT);

            request.AddUrlSegment("UUID", sUUID);
            request.AddUrlSegment("refund", eRefundType.ToString().ToLowerInvariant());
            return(this.ExecuteRequest <SubscriptionResponse>(request).Data);
        }
        /// <summary>
        /// Immediately terminate the subscription and issue a refund.  The refund can be for the full amount
        /// or prorated until its paid-thru date.  If you need to refund a specific amount, please issue a
        /// refund against the individual transaction instead.
        /// </summary>
        /// <param name="accountCode">Subscriber's Account Code</param>
        /// <param name="refundType"></param>
        public static void RefundSubscription(string accountCode, RefundType refundType)
        {
            string refundTypeParameter = refundType.ToString().ToLower();

            string refundUrl = String.Format("{0}?refund={1}",
                                             SubscriptionUrl(accountCode),
                                             refundTypeParameter);

            RecurlyClient.PerformRequest(RecurlyClient.HttpRequestMethod.Delete, refundUrl);
        }
 /// <summary>
 /// Cancels subscription.
 /// </summary>
 /// <param name="uuid">Subscription ID.</param>
 /// <param name="refund">Refund type</param>
 public void TerminateSubscription(string uuid, RefundType refund = RefundType.None)
 {
     ExecuteRequest(new[] { ENDPOINT_POSTFIX, uuid, String.Format("terminate?refund={0}", refund.ToString()) }, Method.PUT);
 }
        /// <summary>
        /// Immediately terminate the subscription and issue a refund.  The refund can be for the full amount
        /// or prorated until its paid-thru date.  If you need to refund a specific amount, please issue a
        /// refund against the individual transaction instead.
        /// </summary>
        /// <param name="accountCode">Subscriber's Account Code</param>
        /// <param name="refundType"></param>
        public static void RefundSubscription(string accountCode, RefundType refundType)
        {
            string refundTypeParameter = refundType.ToString().ToLower();

            string refundUrl = String.Format("{0}?refund={1}",
                SubscriptionUrl(accountCode),
                refundTypeParameter);

            RecurlyClient.PerformRequest(RecurlyClient.HttpRequestMethod.Delete, refundUrl);
        }
 /// <summary>
 /// Terminates the subscription immediately.
 /// </summary>
 /// <param name="refund"></param>
 public void Terminate(RefundType refund)
 {
     Client.Instance.PerformRequest(Client.HttpRequestMethod.Put,
         UrlPrefix + Uri.EscapeUriString(Uuid) + "/terminate?refund=" + refund.ToString().EnumNameToTransportCase(),
         ReadXml);
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="nextRenewalDate"></param>
 public void Terminate(RefundType refund)
 {
     Client.PerformRequest(Client.HttpRequestMethod.Put, UrlPrefix + System.Uri.EscapeUriString(this.Uuid) + "/terminate?refund=" +
         refund.ToString(),
          new Client.ReadXmlDelegate(this.ReadXml));
 }
 /// <summary>
 /// Terminates the subscription immediately.
 /// </summary>
 /// <param name="refund"></param>
 public void Terminate(RefundType refund)
 {
     Client.Instance.PerformRequest(Client.HttpRequestMethod.Put,
                                    UrlPrefix + Uri.EscapeUriString(Uuid) + "/terminate?refund=" + refund.ToString().EnumNameToTransportCase(),
                                    ReadXml);
 }