/// <summary>
        /// Get the coupon redemption for the account , if any
        /// </summary>
        /// <param name="accountNumber"></param>
        /// <returns></returns>
        public static RecurlyCouponRedemption GetAccountRedemption(string accountNumber)
        {
            var redemption = new RecurlyCouponRedemption();

            var statusCode = RecurlyClient.PerformRequest(RecurlyClient.HttpRequestMethod.Get,
                                                          String.Format(Settings.Default.PathAccountCouponRedemption,
                                                                        accountNumber), redemption.ReadXml);

            return statusCode == HttpStatusCode.OK ? redemption : null;
        }
        /// <summary>
        /// Redeem a coupon on an account.
        /// </summary>
        /// <param name="accountCode"></param>
        /// <param name="couponCode"></param>
        /// <param name="currency"></param>
        /// <returns></returns>
        public static RecurlyCouponRedemption Redeem(string couponCode, string accountCode, string currency = null)
        {
            var redemption = new RecurlyCouponRedemption() { AccountCode = accountCode, Currency = couponCode};

            var statusCode = RecurlyClient.PerformRequest(RecurlyClient.HttpRequestMethod.Post,
                String.Format(Settings.Default.PathRedeemCoupon,HttpUtility.UrlEncode(couponCode)),
                redemption.WriteXml,
                redemption.ReadXml);

            return statusCode == HttpStatusCode.Created ? redemption : null;
        }
        public bool Equals(RecurlyCouponRedemption redemption)
        {
            if(string.IsNullOrWhiteSpace(AccountCode) || string.IsNullOrWhiteSpace(CouponCode))
                return false;

            return AccountCode == redemption.AccountCode && CouponCode == redemption.CouponCode;
        }