public virtual StripeList <StripeRefund> List(StripeRefundListOptions listOptions = null, StripeRequestOptions requestOptions = null)
 {
     return(Mapper <StripeList <StripeRefund> > .MapFromJson(
                Requestor.GetString(
                    this.ApplyAllParameters(listOptions, $"{Urls.BaseUrl}/refunds", true),
                    this.SetupRequestOptions(requestOptions))));
 }
 public virtual async Task <StripeList <StripeRefund> > ListAsync(StripeRefundListOptions listOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(Mapper <StripeList <StripeRefund> > .MapFromJson(
                await Requestor.GetStringAsync(
                    this.ApplyAllParameters(listOptions, $"{Urls.BaseUrl}/refunds", true),
                    this.SetupRequestOptions(requestOptions),
                    cancellationToken).ConfigureAwait(false)));
 }
Exemplo n.º 3
0
 public virtual IEnumerable<StripeRefund> List(StripeRefundListOptions listOptions = null, StripeRequestOptions requestOptions = null)
 {
     return Mapper<StripeRefund>.MapCollectionFromJson(
         Requestor.GetString(
             this.ApplyAllParameters(listOptions, $"{Urls.BaseUrl}/refunds", true),
             SetupRequestOptions(requestOptions)
         )
     );
 }
Exemplo n.º 4
0
 public virtual async Task <IEnumerable <StripeRefund> > ListAsync(StripeRefundListOptions listOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(Mapper <StripeRefund> .MapCollectionFromJson(
                await Requestor.GetStringAsync(
                    this.ApplyAllParameters(listOptions, $"{Urls.BaseUrl}/refunds", true),
                    SetupRequestOptions(requestOptions),
                    cancellationToken
                    )
                ));
 }
Exemplo n.º 5
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));
        }
Exemplo n.º 6
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));
        }
Exemplo n.º 7
0
 public virtual async Task<IEnumerable<StripeRefund>> ListAsync(StripeRefundListOptions listOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return Mapper<StripeRefund>.MapCollectionFromJson(
         await Requestor.GetStringAsync(
             this.ApplyAllParameters(listOptions, $"{Urls.BaseUrl}/refunds", true),
             SetupRequestOptions(requestOptions),
             cancellationToken
         )
     );
 }