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