// Sync public virtual StripeSubscriptionItem Create(StripeSubscriptionItemCreateOptions options, StripeRequestOptions requestOptions = null) { return(Post($"{Urls.BaseUrl}/subscription_items", requestOptions, options)); }
// Async public virtual Task <StripeSubscriptionItem> CreateAsync(StripeSubscriptionItemCreateOptions options, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { return(PostAsync($"{Urls.BaseUrl}/subscription_items", requestOptions, cancellationToken, options)); }
public virtual StripeSubscriptionItem Create(string planId, string subscriptionId, StripeSubscriptionItemCreateOptions createOptions = null, StripeRequestOptions requestOptions = null) { var url = this.ApplyAllParameters(createOptions, Urls.SubscriptionItems, false); url = ParameterBuilder.ApplyParameterToUrl(url, "plan", planId); url = ParameterBuilder.ApplyParameterToUrl(url, "subscription", subscriptionId); return(Mapper <StripeSubscriptionItem> .MapFromJson( Requestor.PostString(url, SetupRequestOptions(requestOptions)) )); }