コード例 #1
0
 public virtual IEnumerable<StripeCustomer> List(StripeCustomerListOptions listOptions = null, StripeRequestOptions requestOptions = null)
 {
     return Mapper<StripeCustomer>.MapCollectionFromJson(
         Requestor.GetString(this.ApplyAllParameters(listOptions, Urls.Customers, true),
         SetupRequestOptions(requestOptions))
     );
 }
コード例 #2
0
 public virtual StripeList <StripeCustomer> List(StripeCustomerListOptions listOptions = null, StripeRequestOptions requestOptions = null)
 {
     return(Mapper <StripeList <StripeCustomer> > .MapFromJson(
                Requestor.GetString(
                    this.ApplyAllParameters(listOptions, Urls.Customers, true),
                    this.SetupRequestOptions(requestOptions))));
 }
コード例 #3
0
 public virtual async Task <IEnumerable <StripeCustomer> > ListAsync(StripeCustomerListOptions listOptions = null, StripeRequestOptions requestOptions = null)
 {
     return(Mapper <StripeCustomer> .MapCollectionFromJson(
                await Requestor.GetStringAsync(this.ApplyAllParameters(listOptions, Urls.Customers, true),
                                               SetupRequestOptions(requestOptions))
                ));
 }
コード例 #4
0
 public virtual async Task <StripeList <StripeCustomer> > ListAsync(StripeCustomerListOptions listOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(Mapper <StripeList <StripeCustomer> > .MapFromJson(
                await Requestor.GetStringAsync(
                    this.ApplyAllParameters(listOptions, Urls.Customers, true),
                    this.SetupRequestOptions(requestOptions),
                    cancellationToken).ConfigureAwait(false)));
 }
コード例 #5
0
		public virtual IEnumerable<StripeCustomer> List(StripeCustomerListOptions listOptions = null)
		{
			var url = Urls.Customers;
			url = this.ApplyAllParameters(listOptions, url, true);

			var response = Requestor.GetString(url, ApiKey);

			return Mapper<StripeCustomer>.MapCollectionFromJson(response);
		}
コード例 #6
0
        public virtual IEnumerable <StripeCustomer> List(StripeCustomerListOptions listOptions = null)
        {
            var url = Urls.Customers;

            url = this.ApplyAllParameters(listOptions, url, true);

            var response = Requestor.GetString(url, ApiKey);

            return(Mapper <StripeCustomer> .MapCollectionFromJson(response));
        }
コード例 #7
0
		public virtual IEnumerable<StripeCustomer> List(StripeCustomerListOptions listOptions = null)
		{
			var url = Urls.Customers;

			if (listOptions != null)
				url = ParameterBuilder.ApplyAllParameters(listOptions, url);

			var response = Requestor.GetString(url, ApiKey);

			return Mapper.MapCollectionFromJson<StripeCustomer>(response);
		}
コード例 #8
0
        public virtual IEnumerable <StripeCustomer> List(StripeCustomerListOptions listOptions = null)
        {
            var url = Urls.Customers;

            if (listOptions != null)
            {
                url = ParameterBuilder.ApplyAllParameters(listOptions, url);
            }

            var response = Requestor.GetString(url, ApiKey);

            return(Mapper.MapCollectionFromJson <StripeCustomer>(response));
        }
コード例 #9
0
 public void CleanCustomers()
 {
     try
     {
         StripeCustomerService stripeService = new StripeCustomerService("sk_0JDG46M1ff0yZRqZjz9CNKtW2Aj14");
         var options = new StripeCustomerListOptions();
         options.Limit = 10000;
         var customers = stripeService.List(options);
         foreach (var customer in customers)
         {
             stripeService.Delete(customer.Id);
         }
     }
     catch
     {
     }
 }
コード例 #10
0
 public virtual async Task<IEnumerable<StripeCustomer>> ListAsync(StripeCustomerListOptions listOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return Mapper<StripeCustomer>.MapCollectionFromJson(
         await Requestor.GetStringAsync(this.ApplyAllParameters(listOptions, Urls.Customers, true),
         SetupRequestOptions(requestOptions),
         cancellationToken)
     );
 }