From 917a4d3c72eeada041082e7959e41c0ad994562b Mon Sep 17 00:00:00 2001 From: Richard Marmorstein Date: Wed, 31 Mar 2021 16:35:56 -0400 Subject: [PATCH] Codegen for openapi 9458a29 --- .../Reporting/ReportRuns/ReportRun.cs | 3 ++- .../Checkout/Sessions/SessionCreateOptions.cs | 11 +++++---- .../SessionPaymentIntentDataOptions.cs | 5 ++-- .../SessionSubscriptionDataOptions.cs | 8 +++++++ ...sionSubscriptionDataTransferDataOptions.cs | 23 +++++++++++++++++++ .../SubscriptionSchedulePhaseOptions.cs | 2 +- .../SubscriptionCreateOptions.cs | 2 +- .../SubscriptionUpdateOptions.cs | 2 +- 8 files changed, 46 insertions(+), 10 deletions(-) create mode 100644 src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataTransferDataOptions.cs diff --git a/src/Stripe.net/Entities/Reporting/ReportRuns/ReportRun.cs b/src/Stripe.net/Entities/Reporting/ReportRuns/ReportRun.cs index 206b75d982..caf877709a 100644 --- a/src/Stripe.net/Entities/Reporting/ReportRuns/ReportRun.cs +++ b/src/Stripe.net/Entities/Reporting/ReportRuns/ReportRun.cs @@ -34,7 +34,8 @@ public class ReportRun : StripeEntity, IHasId, IHasObject public string Error { get; set; } /// - /// Always true: reports can only be run on live-mode data. + /// true if the report is run on live mode data and false if it is run on test + /// mode data. /// [JsonProperty("livemode")] public bool Livemode { get; set; } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs index 80369fd59c..5bbdbf39fa 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionCreateOptions.cs @@ -61,11 +61,14 @@ public class SessionCreateOptions : BaseOptions, IHasMetadata /// /// A list of items the customer is purchasing. Use this parameter to pass one-time or - /// recurring Prices. One-time Prices in - /// subscription mode will be on the initial invoice only. + /// recurring Prices. /// - /// There is a maximum of 100 line items, however it is recommended to consolidate line - /// items if there are more than a few dozen. + /// For payment mode, there is a maximum of 100 line items, however it is recommended + /// to consolidate line items if there are more than a few dozen. + /// + /// For subscription mode, there is a maximum of 20 line items with recurring Prices + /// and 20 line items with one-time Prices. Line items with one-time Prices in will be on + /// the initial invoice only. /// [JsonProperty("line_items")] public List LineItems { get; set; } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentIntentDataOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentIntentDataOptions.cs index ef78c842fd..fea408ddd8 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentIntentDataOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentIntentDataOptions.cs @@ -58,8 +58,9 @@ public class SessionPaymentIntentDataOptions : INestedOptions, IHasMetadata public string ReceiptEmail { get; set; } /// - /// Indicates that you intend to make future payments with the payment method collected by - /// this Checkout Session. + /// Indicates that you intend to make future + /// payments with the payment method collected by this Checkout Session. /// /// When setting this to on_session, Checkout will show a notice to the customer that /// their payment details will be saved. diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataOptions.cs index cef07c3b27..26528fba80 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataOptions.cs @@ -50,6 +50,14 @@ public class SessionSubscriptionDataOptions : INestedOptions, IHasMetadata [JsonProperty("metadata")] public Dictionary Metadata { get; set; } + /// + /// If specified, the funds from the subscription's invoices will be transferred to the + /// destination and the ID of the resulting transfers will be found on the resulting + /// charges. + /// + [JsonProperty("transfer_data")] + public SessionSubscriptionDataTransferDataOptions TransferData { get; set; } + /// /// Unix timestamp representing the end of the trial period the customer will get before /// being charged for the first time. Has to be at least 48 hours in the future. diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataTransferDataOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataTransferDataOptions.cs new file mode 100644 index 0000000000..10dac78d19 --- /dev/null +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionSubscriptionDataTransferDataOptions.cs @@ -0,0 +1,23 @@ +// File generated from our OpenAPI spec +namespace Stripe.Checkout +{ + using Newtonsoft.Json; + + public class SessionSubscriptionDataTransferDataOptions : INestedOptions + { + /// + /// A non-negative decimal between 0 and 100, with at most two decimal places. This + /// represents the percentage of the subscription invoice subtotal that will be transferred + /// to the destination account. By default, the entire amount is transferred to the + /// destination. + /// + [JsonProperty("amount_percent")] + public decimal? AmountPercent { get; set; } + + /// + /// ID of an existing, connected Stripe account. + /// + [JsonProperty("destination")] + public string Destination { get; set; } + } +} diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs index 8adbb55b6d..b679041866 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionSchedulePhaseOptions.cs @@ -10,7 +10,7 @@ public class SubscriptionSchedulePhaseOptions : INestedOptions { /// /// A list of prices and quantities that will generate invoice items appended to the next - /// invoice. You may pass up to 10 items. + /// invoice. You may pass up to 20 items. /// [JsonProperty("add_invoice_items")] public List AddInvoiceItems { get; set; } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs index f63287e09c..2cc84bfbf8 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs @@ -10,7 +10,7 @@ public class SubscriptionCreateOptions : BaseOptions, IHasMetadata { /// /// A list of prices and quantities that will generate invoice items appended to the first - /// invoice for this subscription. You may pass up to 10 items. + /// invoice for this subscription. You may pass up to 20 items. /// [JsonProperty("add_invoice_items")] public List AddInvoiceItems { get; set; } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs index 748fe35383..f353e3a2eb 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionUpdateOptions.cs @@ -10,7 +10,7 @@ public class SubscriptionUpdateOptions : BaseOptions, IHasMetadata { /// /// A list of prices and quantities that will generate invoice items appended to the first - /// invoice for this subscription. You may pass up to 10 items. + /// invoice for this subscription. You may pass up to 20 items. /// [JsonProperty("add_invoice_items")] public List AddInvoiceItems { get; set; }