//Async
 public virtual async Task <StripeFileUpload> CreateAsync(string fileName, Stream fileStream, string purpose, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(Mapper <StripeFileUpload> .MapFromJson(
                await Requestor.PostFileAsync(Urls.FileUploads, fileName, fileStream, purpose, SetupRequestOptions(requestOptions), cancellationToken)
                ));
 }
Exemple #2
0
        public virtual void Delete(string invoiceItemId)
        {
            var url = string.Format("{0}/{1}", Urls.InvoiceItems, invoiceItemId);

            Requestor.Delete(url);
        }
 //Sync
 public virtual StripeFileUpload Create(string fileName, Stream fileStream, string purpose, StripeRequestOptions requestOptions = null)
 {
     return(Mapper <StripeFileUpload> .MapFromJson(
                Requestor.PostFile(Urls.FileUploads, fileName, fileStream, purpose, SetupRequestOptions(requestOptions))
                ));
 }
Exemple #4
0
        public virtual void Delete(string customerOrRecipientId, string cardId, bool isRecipient = false, StripeRequestOptions requestOptions = null)
        {
            var url = SetupUrl(customerOrRecipientId, isRecipient, cardId);

            Requestor.Delete(url, SetupRequestOptions(requestOptions));
        }
Exemple #5
0
        public virtual void Delete(string customerId)
        {
            var url = string.Format("{0}/{1}", Urls.Customers, customerId);

            Requestor.Delete(url, ApiKey);
        }
 public virtual async void DeleteAsync(string invoiceItemId, StripeRequestOptions requestOptions = null)
 {
     await Requestor.DeleteAsync($"{Urls.InvoiceItems}/{invoiceItemId}",
                                 SetupRequestOptions(requestOptions));
 }
Exemple #7
0
        public virtual async Task DeleteAsync(string customerOrRecipientId, string cardId, bool isRecipient = false, StripeRequestOptions requestOptions = null)
        {
            var url = SetupUrl(customerOrRecipientId, isRecipient, cardId);

            await Requestor.DeleteAsync(url, SetupRequestOptions(requestOptions));
        }
 public virtual void Delete(string invoiceItemId, StripeRequestOptions requestOptions = null)
 {
     Requestor.Delete($"{Urls.InvoiceItems}/{invoiceItemId}",
                      SetupRequestOptions(requestOptions));
 }
        public virtual StripeBalance Get()
        {
            var response = Requestor.GetString(Urls.Balance, ApiKey);

            return(Mapper <StripeBalance> .MapFromJson(response));
        }
Exemple #10
0
 public virtual async Task DeleteAsync(string customerId, StripeRequestOptions requestOptions = null)
 {
     await Requestor.DeleteAsync($"{Urls.Customers}/{customerId}",
                                 SetupRequestOptions(requestOptions));
 }
Exemple #11
0
 public virtual void Delete(string customerId, StripeRequestOptions requestOptions = null)
 {
     Requestor.Delete($"{Urls.Customers}/{customerId}",
                      SetupRequestOptions(requestOptions));
 }
        public virtual void Delete(string couponId)
        {
            var url = string.Format("{0}/{1}", Urls.Coupons, couponId);

            Requestor.Delete(url);
        }