Ejemplo n.º 1
0
 //Sync
 public virtual StripeRefund Create(string chargeId, StripeRefundCreateOptions createOptions = null, StripeRequestOptions requestOptions = null)
 {
     return Mapper<StripeRefund>.MapFromJson(
         Requestor.PostString(this.ApplyAllParameters(createOptions, $"{Urls.Charges}/{chargeId}/refunds", false),
         SetupRequestOptions(requestOptions))
     );
 }
Ejemplo n.º 2
0
 //Sync
 public virtual StripeRefund Create(string chargeId, StripeRefundCreateOptions createOptions = null, StripeRequestOptions requestOptions = null)
 {
     return(Mapper <StripeRefund> .MapFromJson(
                Requestor.PostString(this.ApplyAllParameters(createOptions, $"{Urls.Charges}/{chargeId}/refunds", false),
                                     SetupRequestOptions(requestOptions))
                ));
 }
Ejemplo n.º 3
0
 //Async
 public virtual async Task <StripeRefund> CreateAsync(string chargeId, StripeRefundCreateOptions createOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(Mapper <StripeRefund> .MapFromJson(
                await Requestor.PostStringAsync(this.ApplyAllParameters(createOptions, $"{Urls.Charges}/{chargeId}/refunds", false),
                                                SetupRequestOptions(requestOptions),
                                                cancellationToken)
                ));
 }
Ejemplo n.º 4
0
 //Async
 public virtual async Task<StripeRefund> CreateAsync(string chargeId, StripeRefundCreateOptions createOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return Mapper<StripeRefund>.MapFromJson(
         await Requestor.PostStringAsync(this.ApplyAllParameters(createOptions, $"{Urls.Charges}/{chargeId}/refunds", false),
         SetupRequestOptions(requestOptions),
         cancellationToken)
     );
 }
Ejemplo n.º 5
0
        public virtual StripeRefund Create(string chargeId, StripeRefundCreateOptions createOptions = null)
        {
            var url = string.Format("{0}/{1}/refunds", Urls.Charges, chargeId);
            url = this.ApplyAllParameters(createOptions, url, false);

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

            return Mapper<StripeRefund>.MapFromJson(response);
        }
Ejemplo n.º 6
0
        public virtual StripeRefund Create(string chargeId, StripeRefundCreateOptions createOptions = null)
        {
            var url = string.Format("{0}/{1}/refunds", Urls.Charges, chargeId);

            url = this.ApplyAllParameters(createOptions, url, false);

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

            return(Mapper <StripeRefund> .MapFromJson(response));
        }
        public virtual StripeRefund Create(StripeRefundCreateOptions createOptions = null, StripeRequestOptions requestOptions = null)
        {
            requestOptions = SetupRequestOptions(requestOptions);

            var url = this.ApplyAllParameters(createOptions, Urls.Refunds, false);
            url = this.ApplyAllParameters(null, url, false);

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

            return Mapper<StripeRefund>.MapFromJson(response);
        }