Esempio n. 1
0
 public virtual StripeList <StripeCoupon> List(StripeCouponListOptions listOptions = null, StripeRequestOptions requestOptions = null)
 {
     return(Mapper <StripeList <StripeCoupon> > .MapFromJson(
                Requestor.GetString(
                    this.ApplyAllParameters(listOptions, Urls.Coupons, true),
                    this.SetupRequestOptions(requestOptions))));
 }
Esempio n. 2
0
 public virtual async Task <StripeList <StripeCoupon> > ListAsync(StripeCouponListOptions listOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(Mapper <StripeList <StripeCoupon> > .MapFromJson(
                await Requestor.GetStringAsync(
                    this.ApplyAllParameters(listOptions, Urls.Coupons, true),
                    this.SetupRequestOptions(requestOptions),
                    cancellationToken).ConfigureAwait(false)));
 }
        public StripeCouponServiceTest()
        {
            this.service = new StripeCouponService();

            this.createOptions = new StripeCouponCreateOptions()
            {
                PercentOff = 25,
                Duration   = "forever",
            };

            this.updateOptions = new StripeCouponUpdateOptions()
            {
                Metadata = new Dictionary <string, string>()
                {
                    { "key", "value" },
                },
            };

            this.listOptions = new StripeCouponListOptions()
            {
                Limit = 1,
            };
        }