public virtual StripeInvoice Create(StripeInvoiceCreateOptions createOptions)
        {
            var url = ParameterBuilder.ApplyAllParameters(createOptions, Urls.Invoices);
            var response = Requestor.PostString(url, ApiKey);

            return Mapper<StripeInvoice>.MapFromJson(response);
        }
        public virtual StripeInvoice Create(string customerId, StripeInvoiceCreateOptions createOptions = null, StripeRequestOptions requestOptions = null)
        {
            var url = ParameterBuilder.ApplyParameterToUrl(Urls.Invoices, "customer", customerId);

            return(Mapper <StripeInvoice> .MapFromJson(
                       Requestor.PostString(this.ApplyAllParameters(createOptions, url, false),
                                            SetupRequestOptions(requestOptions))
                       ));
        }
        public virtual StripeInvoice Create(string customerId, StripeInvoiceCreateOptions createOptions = null, StripeRequestOptions requestOptions = null)
        {
            var url = ParameterBuilder.ApplyParameterToUrl(Urls.Invoices, "customer", customerId);

            return Mapper<StripeInvoice>.MapFromJson(
                Requestor.PostString(this.ApplyAllParameters(createOptions, url, false),
                SetupRequestOptions(requestOptions))
            );
        }
Exemple #4
0
        public virtual async Task <StripeInvoice> CreateAsync(string customerId, StripeInvoiceCreateOptions createOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            var url = ParameterBuilder.ApplyParameterToUrl(Urls.Invoices, "customer", customerId);

            return(Mapper <StripeInvoice> .MapFromJson(
                       await Requestor.PostStringAsync(this.ApplyAllParameters(createOptions, url),
                                                       SetupRequestOptions(requestOptions),
                                                       cancellationToken)
                       ));
        }
        public virtual StripeInvoice Create(string customerId, StripeInvoiceCreateOptions createOptions = null)
        {
            var url = Urls.Invoices;
            url = ParameterBuilder.ApplyParameterToUrl(url, "customer", customerId);
            url = this.ApplyAllParameters(createOptions, url, false);

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

            return Mapper<StripeInvoice>.MapFromJson(response);
        }
        public virtual StripeInvoice Create(string customerId, StripeInvoiceCreateOptions createOptions = null)
        {
            var url = Urls.Invoices;

            url = ParameterBuilder.ApplyParameterToUrl(url, "customer", customerId);
            url = this.ApplyAllParameters(createOptions, url, false);

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

            return(Mapper <StripeInvoice> .MapFromJson(response));
        }
        public virtual async Task<StripeInvoice> CreateAsync(string customerId, StripeInvoiceCreateOptions createOptions = null, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            var url = ParameterBuilder.ApplyParameterToUrl(Urls.Invoices, "customer", customerId);

            return Mapper<StripeInvoice>.MapFromJson(
                await Requestor.PostStringAsync(this.ApplyAllParameters(createOptions, url),
                SetupRequestOptions(requestOptions),
                cancellationToken)
            );
        }