Ejemplo n.º 1
0
 public virtual StripeList <StripeSubscription> List(StripeSubscriptionListOptions listOptions = null, StripeRequestOptions requestOptions = null)
 {
     return(Mapper <StripeList <StripeSubscription> > .MapFromJson(
                Requestor.GetString(this.ApplyAllParameters(listOptions, Urls.Subscriptions, true),
                                    SetupRequestOptions(requestOptions))
                ));
 }
Ejemplo n.º 2
0
 public virtual async Task <StripeList <StripeSubscription> > ListAsync(StripeSubscriptionListOptions listOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(Mapper <StripeList <StripeSubscription> > .MapFromJson(
                await Requestor.GetStringAsync(this.ApplyAllParameters(listOptions, Urls.Subscriptions, true),
                                               SetupRequestOptions(requestOptions),
                                               cancellationToken)
                ));
 }
Ejemplo n.º 3
0
        public virtual Task <StripeList <StripeSubscription> > ListAsync(string customerId, StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new StripeSubscriptionListOptions
            {
                CustomerId = customerId
            };

            if (listOptions != null)
            {
                options.EndingBefore  = listOptions.EndingBefore;
                options.StartingAfter = listOptions.StartingAfter;
                options.Limit         = listOptions.Limit;
            }

            return(this.ListAsync(options, requestOptions, cancellationToken));
        }
Ejemplo n.º 4
0
        public virtual StripeList <StripeSubscription> List(string customerId, StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null)
        {
            var options = new StripeSubscriptionListOptions
            {
                CustomerId = customerId
            };

            if (listOptions != null)
            {
                options.EndingBefore  = listOptions.EndingBefore;
                options.StartingAfter = listOptions.StartingAfter;
                options.Limit         = listOptions.Limit;
            }

            return(this.List(options, requestOptions));
        }