コード例 #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))
     );
 }
コード例 #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))
                ));
 }
コード例 #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)
                ));
 }
コード例 #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)
     );
 }
コード例 #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);
        }
コード例 #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));
        }
コード例 #7
0
        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);
        }