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))
     );
 }
Esempio n. 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))));
 }
 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))
                ));
 }
Esempio n. 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)));
 }
		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);
		}
        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));
        }
		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);
		}
Esempio n. 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));
        }
 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
     {
     }
 }
 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)
     );
 }