예제 #1
0
 public virtual async Task<IEnumerable<StripePlan>> ListAsync(StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null)
 {
     return Mapper<StripePlan>.MapCollectionFromJson(
         await Requestor.GetStringAsync(this.ApplyAllParameters(listOptions, Urls.Plans, true),
         SetupRequestOptions(requestOptions))
     );
 }
예제 #2
0
 public virtual IEnumerable <StripeCoupon> List(StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null)
 {
     return(Mapper <StripeCoupon> .MapCollectionFromJson(
                Requestor.GetString(this.ApplyAllParameters(listOptions, Urls.Coupons, true),
                                    SetupRequestOptions(requestOptions))
                ));
 }
예제 #3
0
 public virtual IEnumerable <StripeRefund> List(string chargeId, StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null)
 {
     return(Mapper <StripeRefund> .MapCollectionFromJson(
                Requestor.GetString(this.ApplyAllParameters(listOptions, $"{Urls.Charges}/{chargeId}/refunds", true),
                                    SetupRequestOptions(requestOptions))
                ));
 }
예제 #4
0
 public virtual async Task <IEnumerable <StripePlan> > ListAsync(StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null)
 {
     return(Mapper <StripePlan> .MapCollectionFromJson(
                await Requestor.GetStringAsync(this.ApplyAllParameters(listOptions, Urls.Plans, true),
                                               SetupRequestOptions(requestOptions))
                ));
 }
예제 #5
0
 public virtual IEnumerable<StripeCoupon> List(StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null)
 {
     return Mapper<StripeCoupon>.MapCollectionFromJson(
         Requestor.GetString(this.ApplyAllParameters(listOptions, Urls.Coupons, true),
         SetupRequestOptions(requestOptions))
     );
 }
 public virtual StripeList <StripePlan> List(StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null)
 {
     return(Mapper <StripeList <StripePlan> > .MapFromJson(
                Requestor.GetString(this.ApplyAllParameters(listOptions, Urls.Plans, true),
                                    SetupRequestOptions(requestOptions))
                ));
 }
 public virtual async Task <StripeList <StripePlan> > ListAsync(StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(Mapper <StripeList <StripePlan> > .MapFromJson(
                await Requestor.GetStringAsync(this.ApplyAllParameters(listOptions, Urls.Plans, true),
                                               SetupRequestOptions(requestOptions),
                                               cancellationToken)
                ));
 }
예제 #8
0
 public virtual IEnumerable<CustomerBankAccount> List(string customerId, StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null)
 {
     return Mapper<CustomerBankAccount>.MapCollectionFromJson(
         Requestor.GetString(
             this.ApplyAllParameters(listOptions, $"{Urls.BaseUrl}/customers/{customerId}/bank_accounts", true),
             SetupRequestOptions(requestOptions)
         )
     );
 }
예제 #9
0
        public virtual IEnumerable <StripeSubscription> List(string customerId, StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null)
        {
            var url = string.Format(Urls.Subscriptions, customerId);

            return(Mapper <StripeSubscription> .MapCollectionFromJson(
                       Requestor.GetString(this.ApplyAllParameters(listOptions, url, true),
                                           SetupRequestOptions(requestOptions))
                       ));
        }
        public virtual IEnumerable<StripeSubscription> List(string customerId, StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null)
        {
            var url = string.Format(Urls.Subscriptions, customerId);

            return Mapper<StripeSubscription>.MapCollectionFromJson(
                Requestor.GetString(this.ApplyAllParameters(listOptions, url, true),
                SetupRequestOptions(requestOptions))
            );
        }
        public IEnumerable <StripeSubscriptionItem> List(string subscriptionId, StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null)
        {
            var url = this.ApplyAllParameters(listOptions, Urls.SubscriptionItems, true);

            url = ParameterBuilder.ApplyParameterToUrl(url, "subscription", subscriptionId);
            return(Mapper <StripeSubscriptionItem> .MapCollectionFromJson(
                       Requestor.GetString(url, SetupRequestOptions(requestOptions))
                       ));
        }
        public virtual IEnumerable<StripeSubscription> List(string customerId, StripeListOptions listOptions = null)
        {
            var url = string.Format(Urls.Subscriptions, customerId);
            url = this.ApplyAllParameters(listOptions, url, true);

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

            return Mapper<StripeSubscription>.MapCollectionFromJson(response);
        }
예제 #13
0
		public virtual IEnumerable<StripePlan> List(StripeListOptions listOptions = null)
		{
			var url = Urls.Plans;
			url = this.ApplyAllParameters(listOptions, url, true);

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

			return Mapper<StripePlan>.MapCollectionFromJson(response);
		}
 public virtual StripeList <CountrySpec> List(StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null)
 {
     return(Mapper <StripeList <CountrySpec> > .MapFromJson(
                Requestor.GetString(
                    this.ApplyAllParameters(listOptions, $"{Urls.CountrySpecs}", true),
                    SetupRequestOptions(requestOptions)
                    )
                ));
 }
예제 #15
0
        public virtual IEnumerable<StripeCard> List(string customerOrRecipientId, StripeListOptions listOptions = null, bool isRecipient = false, StripeRequestOptions requestOptions = null)
        {
            var url = SetupUrl(customerOrRecipientId, isRecipient);

            return Mapper<StripeCard>.MapCollectionFromJson(
                Requestor.GetString(this.ApplyAllParameters(listOptions, url, true),
                SetupRequestOptions(requestOptions))
            );
        }
        public virtual StripeList <StripeAccount> List(StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null)
        {
            var path = $"{Urls.BaseUrl}/accounts";

            return(Mapper <StripeList <StripeAccount> > .MapFromJson(
                       Requestor.GetString(this.ApplyAllParameters(listOptions, path, true),
                                           SetupRequestOptions(requestOptions))
                       ));
        }
예제 #17
0
        public virtual IEnumerable<StripeRefund> List(string chargeId, StripeListOptions listOptions = null)
        {
            var url = string.Format("{0}/{1}/refunds", Urls.Charges, chargeId);
            url = this.ApplyAllParameters(listOptions, url, true);

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

            return Mapper<StripeRefund>.MapCollectionFromJson(response);
        }
예제 #18
0
        public virtual IEnumerable <StripeCard> List(string customerOrRecipientId, StripeListOptions listOptions = null, bool isRecipient = false, StripeRequestOptions requestOptions = null)
        {
            var url = SetupUrl(customerOrRecipientId, isRecipient);

            return(Mapper <StripeCard> .MapCollectionFromJson(
                       Requestor.GetString(this.ApplyAllParameters(listOptions, url, true),
                                           SetupRequestOptions(requestOptions))
                       ));
        }
 public virtual StripeList<StripeExchangeRate> List(StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null)
 {
     return Mapper<StripeList<StripeExchangeRate>>.MapFromJson(
         Requestor.GetString(
             this.ApplyAllParameters(listOptions, $"{Urls.ExchangeRates}", true),
             SetupRequestOptions(requestOptions)
         )
     );
 }
예제 #20
0
 public virtual IEnumerable <CustomerBankAccount> List(string customerId, StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null)
 {
     return(Mapper <CustomerBankAccount> .MapCollectionFromJson(
                Requestor.GetString(
                    this.ApplyAllParameters(listOptions, $"{Urls.BaseUrl}/customers/{customerId}/bank_accounts", true),
                    SetupRequestOptions(requestOptions)
                    )
                ));
 }
예제 #21
0
        public virtual IEnumerable<StripeCard> List(string customerOrRecipientId, StripeListOptions listOptions = null, bool isRecipient = false)
        {
            var url = SetupUrl(customerOrRecipientId, isRecipient);
            url = this.ApplyAllParameters(listOptions, url, true);

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

            return Mapper<StripeCard>.MapCollectionFromJson(response);
        }
        public virtual async Task <StripeList <StripeAccount> > ListAsync(StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            var path = $"{Urls.BaseUrl}/accounts";

            return(Mapper <StripeList <StripeAccount> > .MapFromJson(
                       await Requestor.GetStringAsync(this.ApplyAllParameters(listOptions, path, true),
                                                      SetupRequestOptions(requestOptions),
                                                      cancellationToken)
                       ));
        }
예제 #23
0
        public virtual IEnumerable <StripeRefund> List(string chargeId, StripeListOptions listOptions = null)
        {
            var url = string.Format("{0}/{1}/refunds", Urls.Charges, chargeId);

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

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

            return(Mapper <StripeRefund> .MapCollectionFromJson(response));
        }
예제 #24
0
        public virtual IEnumerable <StripeCard> List(string customerOrRecipientId, StripeListOptions listOptions = null, bool isRecipient = false)
        {
            var url = SetupUrl(customerOrRecipientId, isRecipient);

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

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

            return(Mapper <StripeCard> .MapCollectionFromJson(response));
        }
예제 #25
0
        public virtual IEnumerable <StripeCard> List(string customerId, StripeListOptions listOptions = null)
        {
            var url = string.Format(Urls.Cards, customerId);

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

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

            return(Mapper <StripeCard> .MapCollectionFromJson(response));
        }
예제 #26
0
 public virtual async Task<IEnumerable<CountrySpec>> ListAsync(StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return Mapper<CountrySpec>.MapCollectionFromJson(
         await Requestor.GetStringAsync(
             this.ApplyAllParameters(listOptions, $"{Urls.CountrySpecs}", true),
             SetupRequestOptions(requestOptions),
             cancellationToken
         )
     );
 }
예제 #27
0
 public virtual async Task <IEnumerable <CountrySpec> > ListAsync(StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(Mapper <CountrySpec> .MapCollectionFromJson(
                await Requestor.GetStringAsync(
                    this.ApplyAllParameters(listOptions, $"{Urls.CountrySpecs}", true),
                    SetupRequestOptions(requestOptions),
                    cancellationToken
                    )
                ));
 }
예제 #28
0
        public virtual IEnumerable <StripeAccount> List(StripeListOptions listOptions = null)
        {
            var url = Urls.Accounts;

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

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

            return(Mapper <StripeAccount> .MapCollectionFromJson(response));
        }
예제 #29
0
		public virtual IEnumerable<StripeCoupon> List(StripeListOptions listOptions = null)
		{
			var url = Urls.Coupons;

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

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

			return Mapper<StripeCoupon>.MapCollectionFromJson(response);
		}
예제 #30
0
		public virtual IEnumerable<StripeCard> List(string customerId, StripeListOptions listOptions = null)
		{
			var url = string.Format(Urls.Cards, customerId);

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

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

			return Mapper.MapCollectionFromJson<StripeCard>(response);
		}
예제 #31
0
        public virtual IEnumerable<StripeProduct> List(StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null)
        {
            requestOptions = SetupRequestOptions(requestOptions);

            var url = Urls.Products;
            url = this.ApplyAllParameters(listOptions, url, true);

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

            return Mapper<StripeProduct>.MapCollectionFromJson(response);
        }
        public virtual IEnumerable <StripeCoupon> List(StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null)
        {
            requestOptions = SetupRequestOptions(requestOptions);

            var url = Urls.Coupons;

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

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

            return(Mapper <StripeCoupon> .MapCollectionFromJson(response));
        }
예제 #33
0
        public virtual IEnumerable <StripeCard> List(string customerId, StripeListOptions listOptions = null)
        {
            var url = string.Format(Urls.Cards, customerId);

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

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

            return(Mapper.MapCollectionFromJson <StripeCard>(response));
        }
예제 #34
0
        public virtual IEnumerable <StripeCoupon> List(StripeListOptions listOptions = null)
        {
            var url = Urls.Coupons;

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

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

            return(Mapper <StripeCoupon> .MapCollectionFromJson(response));
        }
예제 #35
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));
        }
예제 #36
0
        public virtual IEnumerable <StripeRefund> List(string chargeId, StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null)
        {
            if (listOptions == null)
            {
                return(List(new StripeRefundListOptions {
                    ChargeId = chargeId
                }, requestOptions));
            }

            var refundOptions = new StripeRefundListOptions()
            {
                ChargeId      = chargeId,
                EndingBefore  = listOptions.EndingBefore,
                Limit         = listOptions.Limit,
                StartingAfter = listOptions.StartingAfter
            };

            return(List(refundOptions, requestOptions));
        }
예제 #37
0
        public virtual async Task <IEnumerable <StripeRefund> > ListAsync(string chargeId, StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            if (listOptions == null)
            {
                return(await ListAsync(new StripeRefundListOptions { ChargeId = chargeId }, requestOptions, cancellationToken));
            }

            var refundOptions = new StripeRefundListOptions()
            {
                ChargeId      = chargeId,
                EndingBefore  = listOptions.EndingBefore,
                Limit         = listOptions.Limit,
                StartingAfter = listOptions.StartingAfter
            };

            return(await ListAsync(refundOptions, requestOptions, cancellationToken));
        }
        public virtual async Task<IEnumerable<StripeSubscription>> ListAsync(string customerId, StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            var url = string.Format(Urls.Subscriptions, customerId);

            return Mapper<StripeSubscription>.MapCollectionFromJson(
                await Requestor.GetStringAsync(this.ApplyAllParameters(listOptions, url, true),
                SetupRequestOptions(requestOptions),
                cancellationToken)
            );
        }
예제 #39
0
 public virtual async Task<IEnumerable<CustomerBankAccount>> ListAsync(string customerId, StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return Mapper<CustomerBankAccount>.MapCollectionFromJson(
         await Requestor.GetStringAsync(
             this.ApplyAllParameters(listOptions, $"{Urls.BaseUrl}/customers/{customerId}/bank_accounts", true),
             SetupRequestOptions(requestOptions),
             cancellationToken
         )
     );
 }
예제 #40
0
 public virtual async Task <IEnumerable <StripeRefund> > ListAsync(string chargeId, StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(Mapper <StripeRefund> .MapCollectionFromJson(
                await Requestor.GetStringAsync(this.ApplyAllParameters(listOptions, $"{Urls.Charges}/{chargeId}/refunds", true),
                                               SetupRequestOptions(requestOptions),
                                               cancellationToken)
                ));
 }
예제 #41
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));
        }
예제 #42
0
 public virtual async Task <StripeList <CustomerBankAccount> > ListAsync(string customerId, StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(Mapper <StripeList <CustomerBankAccount> > .MapFromJson(
                await Requestor.GetStringAsync(
                    this.ApplyAllParameters(listOptions, $"{Urls.BaseUrl}/customers/{customerId}/bank_accounts", true),
                    SetupRequestOptions(requestOptions),
                    cancellationToken
                    )
                ));
 }
 public virtual StripeList <StripeApplePayDomain> List(StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null)
 {
     return(GetEntityList($"{Urls.BaseUrl}/apple_pay/domains", requestOptions, listOptions));
 }
 public virtual Task <StripeList <StripeApplePayDomain> > ListAsync(StripeListOptions listOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(GetEntityListAsync($"{Urls.BaseUrl}/apple_pay/domains", requestOptions, cancellationToken, listOptions));
 }
예제 #45
0
        public virtual async Task <IEnumerable <StripeCard> > ListAsync(string customerOrRecipientId, StripeListOptions listOptions = null, bool isRecipient = false, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            var url = SetupUrl(customerOrRecipientId, isRecipient);

            return(Mapper <StripeCard> .MapCollectionFromJson(
                       await Requestor.GetStringAsync(this.ApplyAllParameters(listOptions, url, true),
                                                      SetupRequestOptions(requestOptions),
                                                      cancellationToken)
                       ));
        }