Esempio 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);
        }
Esempio 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);
        }