Пример #1
0
        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))
                       ));
        }
Пример #3
0
        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))
            );
        }
Пример #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)
                       ));
        }
Пример #5
0
        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);
        }
Пример #6
0
        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)
            );
        }