Ejemplo n.º 1
0
        public RecurlyList <Coupon> GetUniqueCouponCodes()
        {
            var coupons = new CouponList();

            var statusCode = Client.Instance.PerformRequest(Client.HttpRequestMethod.Get,
                                                            memberUrl() + "/unique_coupon_codes/",
                                                            coupons.ReadXmlList);

            return(statusCode == HttpStatusCode.NotFound ? null : coupons);
        }
Ejemplo n.º 2
0
        public RecurlyList <Coupon> Generate(int amount)
        {
            NumberOfUniqueCodes = amount;
            var coupons = new CouponList();

            var statusCode = Client.Instance.PerformRequest(Client.HttpRequestMethod.Post,
                                                            memberUrl() + "/generate/",
                                                            this.WriteGenerateXml,
                                                            coupons.ReadFromLocation);

            return(statusCode == HttpStatusCode.NotFound ? null : coupons);
        }