Пример #1
0
        public virtual StripeList <StripeSource> List(string customerId, StripeSourceListOptions listOptions = null, StripeRequestOptions requestOptions = null)
        {
            var url = string.Format(Urls.CustomerSources, customerId);

            if (listOptions == null)
            {
                listOptions = new StripeSourceListOptions();
            }

            return(Mapper <StripeList <StripeSource> > .MapFromJson(
                       Requestor.GetString(this.ApplyAllParameters(listOptions, url, true),
                                           SetupRequestOptions(requestOptions))
                       ));
        }
Пример #2
0
        public virtual async Task <StripeList <StripeSource> > ListAsync(string customerId, StripeSourceListOptions listOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            var url = string.Format(Urls.CustomerSources, customerId);

            if (listOptions == null)
            {
                listOptions = new StripeSourceListOptions();
            }

            return(Mapper <StripeList <StripeSource> > .MapFromJson(
                       await Requestor.GetStringAsync(this.ApplyAllParameters(listOptions, url, true),
                                                      SetupRequestOptions(requestOptions),
                                                      cancellationToken).ConfigureAwait(false)
                       ));
        }