diff --git a/src/Stripe.net/Entities/V2/EventDestinations/EventDestination.cs b/src/Stripe.net/Entities/V2/EventDestinations/EventDestination.cs index 192aba7bc0..7228fc017d 100644 --- a/src/Stripe.net/Entities/V2/EventDestinations/EventDestination.cs +++ b/src/Stripe.net/Entities/V2/EventDestinations/EventDestination.cs @@ -5,6 +5,14 @@ namespace Stripe.V2 using System.Collections.Generic; using Newtonsoft.Json; + /// + /// Set up an event destination to receive events from Stripe across multiple destination + /// types, including webhook endpoints and Amazon EventBridge. + /// Event destinations support receiving thin events and snapshot events. + /// public class EventDestination : StripeEntity, IHasId, IHasMetadata, IHasObject { /// diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesAutomaticTaxLiabilityOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesAutomaticTaxLiabilityOptions.cs deleted file mode 100644 index 55105cd4b4..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesAutomaticTaxLiabilityOptions.cs +++ /dev/null @@ -1,21 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesAutomaticTaxLiabilityOptions : INestedOptions - { - /// - /// The connected account being referenced when type is account. - /// - [JsonProperty("account")] - public string Account { get; set; } - - /// - /// Type of the account referenced in the request. - /// One of: account, or self. - /// - [JsonProperty("type")] - public string Type { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesAutomaticTaxOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesAutomaticTaxOptions.cs deleted file mode 100644 index 7484bcb972..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesAutomaticTaxOptions.cs +++ /dev/null @@ -1,25 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesAutomaticTaxOptions : INestedOptions - { - /// - /// Whether Stripe automatically computes tax on this invoice. Note that incompatible - /// invoice items (invoice items with manually specified tax rates, negative amounts, or - /// tax_behavior=unspecified) cannot be added to automatic tax invoices. - /// - [JsonProperty("enabled")] - public bool? Enabled { get; set; } - - /// - /// The account that's liable for tax. If set, the business address and tax registrations - /// required to perform the tax calculation are loaded from this account. The tax - /// transaction is returned in the report of the connected account. - /// - [JsonProperty("liability")] - public InvoiceUpcomingLinesAutomaticTaxLiabilityOptions Liability { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsOptions.cs deleted file mode 100644 index 55c7c38733..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsOptions.cs +++ /dev/null @@ -1,40 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using System.Collections.Generic; - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesCustomerDetailsOptions : INestedOptions - { - /// - /// The customer's address. - /// - [JsonProperty("address")] - public AddressOptions Address { get; set; } - - /// - /// The customer's shipping information. Appears on invoices emailed to this customer. - /// - [JsonProperty("shipping")] - public InvoiceUpcomingLinesCustomerDetailsShippingOptions Shipping { get; set; } - - /// - /// Tax details about the customer. - /// - [JsonProperty("tax")] - public InvoiceUpcomingLinesCustomerDetailsTaxOptions Tax { get; set; } - - /// - /// The customer's tax exemption. One of none, exempt, or reverse. - /// One of: exempt, none, or reverse. - /// - [JsonProperty("tax_exempt")] - public string TaxExempt { get; set; } - - /// - /// The customer's tax IDs. - /// - [JsonProperty("tax_ids")] - public List TaxIds { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsShippingOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsShippingOptions.cs deleted file mode 100644 index 1652cb0039..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsShippingOptions.cs +++ /dev/null @@ -1,26 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesCustomerDetailsShippingOptions : INestedOptions - { - /// - /// Customer shipping address. - /// - [JsonProperty("address")] - public AddressOptions Address { get; set; } - - /// - /// Customer name. - /// - [JsonProperty("name")] - public string Name { get; set; } - - /// - /// Customer phone (including extension). - /// - [JsonProperty("phone")] - public string Phone { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsTaxIdOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsTaxIdOptions.cs deleted file mode 100644 index f22a1d4139..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsTaxIdOptions.cs +++ /dev/null @@ -1,59 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesCustomerDetailsTaxIdOptions : INestedOptions - { - /// - /// Type of the tax ID, one of ad_nrt, ae_trn, al_tin, am_tin, - /// ao_tin, ar_cuit, au_abn, au_arn, ba_tin, - /// bb_tin, bg_uic, bh_vat, bo_tin, br_cnpj, - /// br_cpf, bs_tin, by_tin, ca_bn, ca_gst_hst, - /// ca_pst_bc, ca_pst_mb, ca_pst_sk, ca_qst, cd_nif, - /// ch_uid, ch_vat, cl_tin, cn_tin, co_nit, - /// cr_tin, de_stn, do_rcn, ec_ruc, eg_tin, - /// es_cif, eu_oss_vat, eu_vat, gb_vat, ge_vat, - /// gn_nif, hk_br, hr_oib, hu_tin, id_npwp, - /// il_vat, in_gst, is_vat, jp_cn, jp_rn, jp_trn, - /// ke_pin, kh_tin, kr_brn, kz_bin, li_uid, - /// li_vat, ma_vat, md_vat, me_pib, mk_vat, - /// mr_nif, mx_rfc, my_frp, my_itn, my_sst, - /// ng_tin, no_vat, no_voec, np_pan, nz_gst, - /// om_vat, pe_ruc, ph_tin, ro_tin, rs_pib, - /// ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, - /// si_tin, sn_ninea, sr_fin, sv_nit, th_vat, - /// tj_tin, tr_tin, tw_vat, tz_vat, ua_vat, - /// ug_tin, us_ein, uy_ruc, uz_tin, uz_vat, - /// ve_rif, vn_tin, za_vat, zm_tin, or zw_tin. - /// One of: ad_nrt, ae_trn, al_tin, am_tin, ao_tin, - /// ar_cuit, au_abn, au_arn, ba_tin, bb_tin, - /// bg_uic, bh_vat, bo_tin, br_cnpj, br_cpf, - /// bs_tin, by_tin, ca_bn, ca_gst_hst, ca_pst_bc, - /// ca_pst_mb, ca_pst_sk, ca_qst, cd_nif, ch_uid, - /// ch_vat, cl_tin, cn_tin, co_nit, cr_tin, - /// de_stn, do_rcn, ec_ruc, eg_tin, es_cif, - /// eu_oss_vat, eu_vat, gb_vat, ge_vat, gn_nif, - /// hk_br, hr_oib, hu_tin, id_npwp, il_vat, - /// in_gst, is_vat, jp_cn, jp_rn, jp_trn, ke_pin, - /// kh_tin, kr_brn, kz_bin, li_uid, li_vat, - /// ma_vat, md_vat, me_pib, mk_vat, mr_nif, - /// mx_rfc, my_frp, my_itn, my_sst, ng_tin, - /// no_vat, no_voec, np_pan, nz_gst, om_vat, - /// pe_ruc, ph_tin, ro_tin, rs_pib, ru_inn, - /// ru_kpp, sa_vat, sg_gst, sg_uen, si_tin, - /// sn_ninea, sr_fin, sv_nit, th_vat, tj_tin, - /// tr_tin, tw_vat, tz_vat, ua_vat, ug_tin, - /// us_ein, uy_ruc, uz_tin, uz_vat, ve_rif, - /// vn_tin, za_vat, zm_tin, or zw_tin. - /// - [JsonProperty("type")] - public string Type { get; set; } - - /// - /// Value of the tax ID. - /// - [JsonProperty("value")] - public string Value { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsTaxOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsTaxOptions.cs deleted file mode 100644 index afa7183184..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesCustomerDetailsTaxOptions.cs +++ /dev/null @@ -1,17 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesCustomerDetailsTaxOptions : INestedOptions - { - /// - /// A recent IP address of the customer used for tax reporting and tax location inference. - /// Stripe recommends updating the IP address when a new PaymentMethod is attached or the - /// address field on the customer is updated. We recommend against updating this field more - /// frequently since it could result in unexpected tax location/reporting outcomes. - /// - [JsonProperty("ip_address")] - public string IpAddress { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesDiscountOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesDiscountOptions.cs deleted file mode 100644 index 2d9e80955b..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesDiscountOptions.cs +++ /dev/null @@ -1,26 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesDiscountOptions : INestedOptions - { - /// - /// ID of the coupon to create a new discount for. - /// - [JsonProperty("coupon")] - public string Coupon { get; set; } - - /// - /// ID of an existing discount on the object (or one of its ancestors) to reuse. - /// - [JsonProperty("discount")] - public string Discount { get; set; } - - /// - /// ID of the promotion code to create a new discount for. - /// - [JsonProperty("promotion_code")] - public string PromotionCode { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemDiscountOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemDiscountOptions.cs deleted file mode 100644 index 7443e622c3..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemDiscountOptions.cs +++ /dev/null @@ -1,26 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesInvoiceItemDiscountOptions : INestedOptions - { - /// - /// ID of the coupon to create a new discount for. - /// - [JsonProperty("coupon")] - public string Coupon { get; set; } - - /// - /// ID of an existing discount on the object (or one of its ancestors) to reuse. - /// - [JsonProperty("discount")] - public string Discount { get; set; } - - /// - /// ID of the promotion code to create a new discount for. - /// - [JsonProperty("promotion_code")] - public string PromotionCode { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemOptions.cs deleted file mode 100644 index bc932a507e..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemOptions.cs +++ /dev/null @@ -1,131 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using System.Collections.Generic; - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesInvoiceItemOptions : INestedOptions, IHasMetadata - { - /// - /// The integer amount in cents (or local equivalent) of previewed invoice item. - /// - [JsonProperty("amount")] - public long? Amount { get; set; } - - /// - /// Three-letter ISO currency - /// code, in lowercase. Must be a supported - /// currency. Only applicable to new invoice items. - /// - [JsonProperty("currency")] - public string Currency { get; set; } - - /// - /// An arbitrary string which you can attach to the invoice item. The description is - /// displayed in the invoice for easy tracking. - /// - [JsonProperty("description")] - public string Description { get; set; } - - /// - /// Explicitly controls whether discounts apply to this invoice item. Defaults to true, - /// except for negative invoice items. - /// - [JsonProperty("discountable")] - public bool? Discountable { get; set; } - - /// - /// The coupons to redeem into discounts for the invoice item in the preview. - /// - [JsonProperty("discounts")] - public List Discounts { get; set; } - - /// - /// The ID of the invoice item to update in preview. If not specified, a new invoice item - /// will be added to the preview of the upcoming invoice. - /// - [JsonProperty("invoiceitem")] - public string Invoiceitem { get; set; } - - /// - /// Set of key-value pairs that you can - /// attach to an object. This can be useful for storing additional information about the - /// object in a structured format. Individual keys can be unset by posting an empty value to - /// them. All keys can be unset by posting an empty value to metadata. - /// - [JsonProperty("metadata")] - public Dictionary Metadata { get; set; } - - /// - /// The period associated with this invoice item. When set to different values, the period - /// will be rendered on the invoice. If you have Stripe Revenue Recognition - /// enabled, the period will be used to recognize and defer revenue. See the Revenue - /// Recognition documentation for details. - /// - [JsonProperty("period")] - public InvoiceUpcomingLinesInvoiceItemPeriodOptions Period { get; set; } - - /// - /// The ID of the price object. One of price or price_data is required. - /// - [JsonProperty("price")] - public string Price { get; set; } - - /// - /// Data used to generate a new Price - /// object inline. One of price or price_data is required. - /// - [JsonProperty("price_data")] - public InvoiceUpcomingLinesInvoiceItemPriceDataOptions PriceData { get; set; } - - /// - /// Non-negative integer. The quantity of units for the invoice item. - /// - [JsonProperty("quantity")] - public long? Quantity { get; set; } - - /// - /// Only required if a default - /// tax behavior was not provided in the Stripe Tax settings. Specifies whether the - /// price is considered inclusive of taxes or exclusive of taxes. One of inclusive, - /// exclusive, or unspecified. Once specified as either inclusive or - /// exclusive, it cannot be changed. - /// One of: exclusive, inclusive, or unspecified. - /// - [JsonProperty("tax_behavior")] - public string TaxBehavior { get; set; } - - /// - /// A tax code ID. - /// - [JsonProperty("tax_code")] - public string TaxCode { get; set; } - - /// - /// The tax rates that apply to the item. When set, any default_tax_rates do not - /// apply to this item. - /// - [JsonProperty("tax_rates")] - public List TaxRates { get; set; } - - /// - /// The integer unit amount in cents (or local equivalent) of the charge to be applied to - /// the upcoming invoice. This unit_amount will be multiplied by the quantity to get the - /// full amount. If you want to apply a credit to the customer's account, pass a negative - /// unit_amount. - /// - [JsonProperty("unit_amount")] - public long? UnitAmount { get; set; } - - /// - /// Same as unit_amount, but accepts a decimal value in cents (or local equivalent) - /// with at most 12 decimal places. Only one of unit_amount and - /// unit_amount_decimal can be set. - /// - [JsonProperty("unit_amount_decimal")] - public decimal? UnitAmountDecimal { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemPeriodOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemPeriodOptions.cs deleted file mode 100644 index 55d0cc4bd0..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemPeriodOptions.cs +++ /dev/null @@ -1,25 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using System; - using Newtonsoft.Json; - using Stripe.Infrastructure; - - public class InvoiceUpcomingLinesInvoiceItemPeriodOptions : INestedOptions - { - /// - /// The end of the period, which must be greater than or equal to the start. This value is - /// inclusive. - /// - [JsonProperty("end")] - [JsonConverter(typeof(UnixDateTimeConverter))] - public DateTime? End { get; set; } - - /// - /// The start of the period. This value is inclusive. - /// - [JsonProperty("start")] - [JsonConverter(typeof(UnixDateTimeConverter))] - public DateTime? Start { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemPriceDataOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemPriceDataOptions.cs deleted file mode 100644 index 07ba65fa75..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesInvoiceItemPriceDataOptions.cs +++ /dev/null @@ -1,49 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesInvoiceItemPriceDataOptions : INestedOptions - { - /// - /// Three-letter ISO currency - /// code, in lowercase. Must be a supported - /// currency. - /// - [JsonProperty("currency")] - public string Currency { get; set; } - - /// - /// The ID of the product that this price will belong to. - /// - [JsonProperty("product")] - public string Product { get; set; } - - /// - /// Only required if a default - /// tax behavior was not provided in the Stripe Tax settings. Specifies whether the - /// price is considered inclusive of taxes or exclusive of taxes. One of inclusive, - /// exclusive, or unspecified. Once specified as either inclusive or - /// exclusive, it cannot be changed. - /// One of: exclusive, inclusive, or unspecified. - /// - [JsonProperty("tax_behavior")] - public string TaxBehavior { get; set; } - - /// - /// A positive integer in cents (or local equivalent) (or 0 for a free price) representing - /// how much to charge. - /// - [JsonProperty("unit_amount")] - public long? UnitAmount { get; set; } - - /// - /// Same as unit_amount, but accepts a decimal value in cents (or local equivalent) - /// with at most 12 decimal places. Only one of unit_amount and - /// unit_amount_decimal can be set. - /// - [JsonProperty("unit_amount_decimal")] - public decimal? UnitAmountDecimal { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesIssuerOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesIssuerOptions.cs deleted file mode 100644 index d95ab18065..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesIssuerOptions.cs +++ /dev/null @@ -1,21 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesIssuerOptions : INestedOptions - { - /// - /// The connected account being referenced when type is account. - /// - [JsonProperty("account")] - public string Account { get; set; } - - /// - /// Type of the account referenced in the request. - /// One of: account, or self. - /// - [JsonProperty("type")] - public string Type { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsOptions.cs deleted file mode 100644 index ac6701d6ec..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsOptions.cs +++ /dev/null @@ -1,36 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using System.Collections.Generic; - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesScheduleDetailsOptions : INestedOptions - { - /// - /// Behavior of the subscription schedule and underlying subscription when it ends. Possible - /// values are release or cancel with the default being release. - /// release will end the subscription schedule and keep the underlying subscription - /// running. cancel will end the subscription schedule and cancel the underlying - /// subscription. - /// One of: cancel, or release. - /// - [JsonProperty("end_behavior")] - public string EndBehavior { get; set; } - - /// - /// List representing phases of the subscription schedule. Each phase can be customized to - /// have different durations, plans, and coupons. If there are multiple phases, the - /// end_date of one phase will always equal the start_date of the next phase. - /// - [JsonProperty("phases")] - public List Phases { get; set; } - - /// - /// In cases where the schedule_details params update the currently active phase, - /// specifies if and how to prorate at the time of the request. - /// One of: always_invoice, create_prorations, or none. - /// - [JsonProperty("proration_behavior")] - public string ProrationBehavior { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemDiscountOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemDiscountOptions.cs deleted file mode 100644 index 63d136266f..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemDiscountOptions.cs +++ /dev/null @@ -1,26 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemDiscountOptions : INestedOptions - { - /// - /// ID of the coupon to create a new discount for. - /// - [JsonProperty("coupon")] - public string Coupon { get; set; } - - /// - /// ID of an existing discount on the object (or one of its ancestors) to reuse. - /// - [JsonProperty("discount")] - public string Discount { get; set; } - - /// - /// ID of the promotion code to create a new discount for. - /// - [JsonProperty("promotion_code")] - public string PromotionCode { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemOptions.cs deleted file mode 100644 index 7c31fa437a..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemOptions.cs +++ /dev/null @@ -1,41 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using System.Collections.Generic; - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemOptions : INestedOptions - { - /// - /// The coupons to redeem into discounts for the item. - /// - [JsonProperty("discounts")] - public List Discounts { get; set; } - - /// - /// The ID of the price object. One of price or price_data is required. - /// - [JsonProperty("price")] - public string Price { get; set; } - - /// - /// Data used to generate a new Price - /// object inline. One of price or price_data is required. - /// - [JsonProperty("price_data")] - public InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemPriceDataOptions PriceData { get; set; } - - /// - /// Quantity for this item. Defaults to 1. - /// - [JsonProperty("quantity")] - public long? Quantity { get; set; } - - /// - /// The tax rates which apply to the item. When set, the default_tax_rates do not - /// apply to this item. - /// - [JsonProperty("tax_rates")] - public List TaxRates { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemPriceDataOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemPriceDataOptions.cs deleted file mode 100644 index 3fed1c3cf6..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemPriceDataOptions.cs +++ /dev/null @@ -1,50 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesScheduleDetailsPhaseAddInvoiceItemPriceDataOptions : INestedOptions - { - /// - /// Three-letter ISO currency - /// code, in lowercase. Must be a supported - /// currency. - /// - [JsonProperty("currency")] - public string Currency { get; set; } - - /// - /// The ID of the product that this price will belong to. - /// - [JsonProperty("product")] - public string Product { get; set; } - - /// - /// Only required if a default - /// tax behavior was not provided in the Stripe Tax settings. Specifies whether the - /// price is considered inclusive of taxes or exclusive of taxes. One of inclusive, - /// exclusive, or unspecified. Once specified as either inclusive or - /// exclusive, it cannot be changed. - /// One of: exclusive, inclusive, or unspecified. - /// - [JsonProperty("tax_behavior")] - public string TaxBehavior { get; set; } - - /// - /// A positive integer in cents (or local equivalent) (or 0 for a free price) representing - /// how much to charge or a negative integer representing the amount to credit to the - /// customer. - /// - [JsonProperty("unit_amount")] - public long? UnitAmount { get; set; } - - /// - /// Same as unit_amount, but accepts a decimal value in cents (or local equivalent) - /// with at most 12 decimal places. Only one of unit_amount and - /// unit_amount_decimal can be set. - /// - [JsonProperty("unit_amount_decimal")] - public decimal? UnitAmountDecimal { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxLiabilityOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxLiabilityOptions.cs deleted file mode 100644 index 955bfd474e..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxLiabilityOptions.cs +++ /dev/null @@ -1,21 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxLiabilityOptions : INestedOptions - { - /// - /// The connected account being referenced when type is account. - /// - [JsonProperty("account")] - public string Account { get; set; } - - /// - /// Type of the account referenced in the request. - /// One of: account, or self. - /// - [JsonProperty("type")] - public string Type { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxOptions.cs deleted file mode 100644 index 52a14ae1dc..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxOptions.cs +++ /dev/null @@ -1,23 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxOptions : INestedOptions - { - /// - /// Enabled automatic tax calculation which will automatically compute tax rates on all - /// invoices generated by the subscription. - /// - [JsonProperty("enabled")] - public bool? Enabled { get; set; } - - /// - /// The account that's liable for tax. If set, the business address and tax registrations - /// required to perform the tax calculation are loaded from this account. The tax - /// transaction is returned in the report of the connected account. - /// - [JsonProperty("liability")] - public InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxLiabilityOptions Liability { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseBillingThresholdsOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseBillingThresholdsOptions.cs deleted file mode 100644 index 6383446af6..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseBillingThresholdsOptions.cs +++ /dev/null @@ -1,22 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesScheduleDetailsPhaseBillingThresholdsOptions : INestedOptions - { - /// - /// Monetary threshold that triggers the subscription to advance to a new billing period. - /// - [JsonProperty("amount_gte")] - public long? AmountGte { get; set; } - - /// - /// Indicates if the billing_cycle_anchor should be reset when a threshold is - /// reached. If true, billing_cycle_anchor will be updated to the date/time the - /// threshold was last reached; otherwise, the value will remain unchanged. - /// - [JsonProperty("reset_billing_cycle_anchor")] - public bool? ResetBillingCycleAnchor { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseDiscountOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseDiscountOptions.cs deleted file mode 100644 index e993fed251..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseDiscountOptions.cs +++ /dev/null @@ -1,26 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesScheduleDetailsPhaseDiscountOptions : INestedOptions - { - /// - /// ID of the coupon to create a new discount for. - /// - [JsonProperty("coupon")] - public string Coupon { get; set; } - - /// - /// ID of an existing discount on the object (or one of its ancestors) to reuse. - /// - [JsonProperty("discount")] - public string Discount { get; set; } - - /// - /// ID of the promotion code to create a new discount for. - /// - [JsonProperty("promotion_code")] - public string PromotionCode { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseEndDate.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseEndDate.cs deleted file mode 100644 index 5200acb076..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseEndDate.cs +++ /dev/null @@ -1,13 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - public class InvoiceUpcomingLinesScheduleDetailsPhaseEndDate : StringEnum - { - public static readonly InvoiceUpcomingLinesScheduleDetailsPhaseEndDate Now = new InvoiceUpcomingLinesScheduleDetailsPhaseEndDate("now"); - - private InvoiceUpcomingLinesScheduleDetailsPhaseEndDate(string value) - : base(value) - { - } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsIssuerOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsIssuerOptions.cs deleted file mode 100644 index 975b6641fb..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsIssuerOptions.cs +++ /dev/null @@ -1,21 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsIssuerOptions : INestedOptions - { - /// - /// The connected account being referenced when type is account. - /// - [JsonProperty("account")] - public string Account { get; set; } - - /// - /// Type of the account referenced in the request. - /// One of: account, or self. - /// - [JsonProperty("type")] - public string Type { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsOptions.cs deleted file mode 100644 index ca21f2fd60..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsOptions.cs +++ /dev/null @@ -1,31 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using System.Collections.Generic; - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsOptions : INestedOptions - { - /// - /// The account tax IDs associated with this phase of the subscription schedule. Will be set - /// on invoices generated by this phase of the subscription schedule. - /// - [JsonProperty("account_tax_ids")] - public List AccountTaxIds { get; set; } - - /// - /// Number of days within which a customer must pay invoices generated by this subscription - /// schedule. This value will be null for subscription schedules where - /// billing=charge_automatically. - /// - [JsonProperty("days_until_due")] - public long? DaysUntilDue { get; set; } - - /// - /// The connected account that issues the invoice. The invoice is presented with the - /// branding and support information of the specified account. - /// - [JsonProperty("issuer")] - public InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsIssuerOptions Issuer { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemBillingThresholdsOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemBillingThresholdsOptions.cs deleted file mode 100644 index cc63834f84..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemBillingThresholdsOptions.cs +++ /dev/null @@ -1,17 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesScheduleDetailsPhaseItemBillingThresholdsOptions : INestedOptions - { - /// - /// Number of units that meets the billing threshold to advance the subscription to a new - /// billing period (e.g., it takes 10 $5 units to meet a $50 monetary - /// threshold). - /// - [JsonProperty("usage_gte")] - public long? UsageGte { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemDiscountOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemDiscountOptions.cs deleted file mode 100644 index 155a669adc..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemDiscountOptions.cs +++ /dev/null @@ -1,26 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesScheduleDetailsPhaseItemDiscountOptions : INestedOptions - { - /// - /// ID of the coupon to create a new discount for. - /// - [JsonProperty("coupon")] - public string Coupon { get; set; } - - /// - /// ID of an existing discount on the object (or one of its ancestors) to reuse. - /// - [JsonProperty("discount")] - public string Discount { get; set; } - - /// - /// ID of the promotion code to create a new discount for. - /// - [JsonProperty("promotion_code")] - public string PromotionCode { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemOptions.cs deleted file mode 100644 index 8b3d977258..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemOptions.cs +++ /dev/null @@ -1,73 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using System.Collections.Generic; - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesScheduleDetailsPhaseItemOptions : INestedOptions, IHasMetadata - { - /// - /// Define thresholds at which an invoice will be sent, and the subscription advanced to a - /// new billing period. When updating, pass an empty string to remove previously-defined - /// thresholds. - /// - [JsonProperty("billing_thresholds")] - public InvoiceUpcomingLinesScheduleDetailsPhaseItemBillingThresholdsOptions BillingThresholds { get; set; } - - /// - /// The coupons to redeem into discounts for the subscription item. - /// - [JsonProperty("discounts")] - public List Discounts { get; set; } - - /// - /// Set of key-value pairs that you can - /// attach to a configuration item. Metadata on a configuration item will update the - /// underlying subscription item's metadata when the phase is entered, adding new - /// keys and replacing existing keys. Individual keys in the subscription item's - /// metadata can be unset by posting an empty value to them in the configuration - /// item's metadata. To unset all keys in the subscription item's metadata, - /// update the subscription item directly or unset every key individually from the - /// configuration item's metadata. - /// - [JsonProperty("metadata")] - public Dictionary Metadata { get; set; } - - /// - /// The plan ID to subscribe to. You may specify the same ID in plan and - /// price. - /// - [JsonProperty("plan")] - public string Plan { get; set; } - - /// - /// The ID of the price object. - /// - [JsonProperty("price")] - public string Price { get; set; } - - /// - /// Data used to generate a new Price - /// object inline. - /// - [JsonProperty("price_data")] - public InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataOptions PriceData { get; set; } - - /// - /// Quantity for the given price. Can be set only if the price's usage_type is - /// licensed and not metered. - /// - [JsonProperty("quantity")] - public long? Quantity { get; set; } - - /// - /// A list of Tax Rate ids. These Tax - /// Rates will override the default_tax_rates - /// on the Subscription. When updating, pass an empty string to remove previously-defined - /// tax rates. - /// - [JsonProperty("tax_rates")] - public List TaxRates { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataOptions.cs deleted file mode 100644 index fb2fab27e6..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataOptions.cs +++ /dev/null @@ -1,55 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataOptions : INestedOptions - { - /// - /// Three-letter ISO currency - /// code, in lowercase. Must be a supported - /// currency. - /// - [JsonProperty("currency")] - public string Currency { get; set; } - - /// - /// The ID of the product that this price will belong to. - /// - [JsonProperty("product")] - public string Product { get; set; } - - /// - /// The recurring components of a price such as interval and interval_count. - /// - [JsonProperty("recurring")] - public InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataRecurringOptions Recurring { get; set; } - - /// - /// Only required if a default - /// tax behavior was not provided in the Stripe Tax settings. Specifies whether the - /// price is considered inclusive of taxes or exclusive of taxes. One of inclusive, - /// exclusive, or unspecified. Once specified as either inclusive or - /// exclusive, it cannot be changed. - /// One of: exclusive, inclusive, or unspecified. - /// - [JsonProperty("tax_behavior")] - public string TaxBehavior { get; set; } - - /// - /// A positive integer in cents (or local equivalent) (or 0 for a free price) representing - /// how much to charge. - /// - [JsonProperty("unit_amount")] - public long? UnitAmount { get; set; } - - /// - /// Same as unit_amount, but accepts a decimal value in cents (or local equivalent) - /// with at most 12 decimal places. Only one of unit_amount and - /// unit_amount_decimal can be set. - /// - [JsonProperty("unit_amount_decimal")] - public decimal? UnitAmountDecimal { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataRecurringOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataRecurringOptions.cs deleted file mode 100644 index 281b6c9d8f..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataRecurringOptions.cs +++ /dev/null @@ -1,24 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesScheduleDetailsPhaseItemPriceDataRecurringOptions : INestedOptions - { - /// - /// Specifies billing frequency. Either day, week, month or - /// year. - /// One of: day, month, week, or year. - /// - [JsonProperty("interval")] - public string Interval { get; set; } - - /// - /// The number of intervals between subscription billings. For example, - /// interval=month and interval_count=3 bills every 3 months. Maximum of three - /// years interval allowed (3 years, 36 months, or 156 weeks). - /// - [JsonProperty("interval_count")] - public long? IntervalCount { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseOptions.cs deleted file mode 100644 index 5ae6b5f180..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseOptions.cs +++ /dev/null @@ -1,209 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using System; - using System.Collections.Generic; - using Newtonsoft.Json; - using Stripe.Infrastructure; - - public class InvoiceUpcomingLinesScheduleDetailsPhaseOptions : INestedOptions, IHasMetadata - { - /// - /// A list of prices and quantities that will generate invoice items appended to the next - /// invoice for this phase. You may pass up to 20 items. - /// - [JsonProperty("add_invoice_items")] - public List AddInvoiceItems { get; set; } - - /// - /// A non-negative decimal between 0 and 100, with at most two decimal places. This - /// represents the percentage of the subscription invoice total that will be transferred to - /// the application owner's Stripe account. The request must be made by a platform account - /// on a connected account in order to set an application fee percentage. For more - /// information, see the application fees documentation. - /// - [JsonProperty("application_fee_percent")] - public decimal? ApplicationFeePercent { get; set; } - - /// - /// Automatic tax settings for this phase. - /// - [JsonProperty("automatic_tax")] - public InvoiceUpcomingLinesScheduleDetailsPhaseAutomaticTaxOptions AutomaticTax { get; set; } - - /// - /// Can be set to phase_start to set the anchor to the start of the phase or - /// automatic to automatically change it if needed. Cannot be set to - /// phase_start if this phase specifies a trial. For more information, see the - /// billing cycle documentation. - /// One of: automatic, or phase_start. - /// - [JsonProperty("billing_cycle_anchor")] - public string BillingCycleAnchor { get; set; } - - /// - /// Define thresholds at which an invoice will be sent, and the subscription advanced to a - /// new billing period. Pass an empty string to remove previously-defined thresholds. - /// - [JsonProperty("billing_thresholds")] - public InvoiceUpcomingLinesScheduleDetailsPhaseBillingThresholdsOptions BillingThresholds { get; set; } - - /// - /// Either charge_automatically, or send_invoice. When charging automatically, - /// Stripe will attempt to pay the underlying subscription at the end of each billing cycle - /// using the default source attached to the customer. When sending an invoice, Stripe will - /// email your customer an invoice with payment instructions and mark the subscription as - /// active. Defaults to charge_automatically on creation. - /// One of: charge_automatically, or send_invoice. - /// - [JsonProperty("collection_method")] - public string CollectionMethod { get; set; } - - /// - /// The ID of the coupon to apply to this phase of the subscription schedule. This field has - /// been deprecated and will be removed in a future API version. Use discounts - /// instead. - /// - [JsonProperty("coupon")] - public string Coupon { get; set; } - - /// - /// Three-letter ISO currency - /// code, in lowercase. Must be a supported - /// currency. - /// - [JsonProperty("currency")] - public string Currency { get; set; } - - /// - /// ID of the default payment method for the subscription schedule. It must belong to the - /// customer associated with the subscription schedule. If not set, invoices will use the - /// default payment method in the customer's invoice settings. - /// - [JsonProperty("default_payment_method")] - public string DefaultPaymentMethod { get; set; } - - /// - /// A list of Tax Rate ids. These Tax - /// Rates will set the Subscription's default_tax_rates, - /// which means they will be the Invoice's default_tax_rates - /// for any Invoices issued by the Subscription during this Phase. - /// - [JsonProperty("default_tax_rates")] - public List DefaultTaxRates { get; set; } - - /// - /// Subscription description, meant to be displayable to the customer. Use this field to - /// optionally store an explanation of the subscription for rendering in Stripe surfaces and - /// certain local payment methods UIs. - /// - [JsonProperty("description")] - public string Description { get; set; } - - /// - /// The coupons to redeem into discounts for the schedule phase. If not specified, inherits - /// the discount from the subscription's customer. Pass an empty string to avoid inheriting - /// any discounts. - /// - [JsonProperty("discounts")] - public List Discounts { get; set; } - - /// - /// The date at which this phase of the subscription schedule ends. If set, - /// iterations must not be set. - /// - [JsonProperty("end_date")] - [JsonConverter(typeof(AnyOfConverter))] - public AnyOf EndDate { get; set; } - - /// - /// All invoices will be billed using the specified settings. - /// - [JsonProperty("invoice_settings")] - public InvoiceUpcomingLinesScheduleDetailsPhaseInvoiceSettingsOptions InvoiceSettings { get; set; } - - /// - /// List of configuration items, each with an attached price, to apply during this phase of - /// the subscription schedule. - /// - [JsonProperty("items")] - public List Items { get; set; } - - /// - /// Integer representing the multiplier applied to the price interval. For example, - /// iterations=2 applied to a price with interval=month and - /// interval_count=3 results in a phase of duration 2 * 3 months = 6 months. - /// If set, end_date must not be set. - /// - [JsonProperty("iterations")] - public long? Iterations { get; set; } - - /// - /// Set of key-value pairs that you can - /// attach to a phase. Metadata on a schedule's phase will update the underlying - /// subscription's metadata when the phase is entered, adding new keys and replacing - /// existing keys in the subscription's metadata. Individual keys in the - /// subscription's metadata can be unset by posting an empty value to them in the - /// phase's metadata. To unset all keys in the subscription's metadata, update - /// the subscription directly or unset every key individually from the phase's - /// metadata. - /// - [JsonProperty("metadata")] - public Dictionary Metadata { get; set; } - - /// - /// The account on behalf of which to charge, for each of the associated subscription's - /// invoices. - /// - [JsonProperty("on_behalf_of")] - public string OnBehalfOf { get; set; } - - /// - /// Whether the subscription schedule will create prorations when - /// transitioning to this phase. The default value is create_prorations. This setting - /// controls prorations when a phase is started asynchronously and it is persisted as a - /// field on the phase. It's different from the request-level proration_behavior - /// parameter which controls what happens if the update request affects the billing - /// configuration of the current phase. - /// One of: always_invoice, create_prorations, or none. - /// - [JsonProperty("proration_behavior")] - public string ProrationBehavior { get; set; } - - /// - /// The date at which this phase of the subscription schedule starts or now. Must be - /// set on the first phase. - /// - [JsonProperty("start_date")] - [JsonConverter(typeof(AnyOfConverter))] - public AnyOf StartDate { get; set; } - - /// - /// The data with which to automatically create a Transfer for each of the associated - /// subscription's invoices. - /// - [JsonProperty("transfer_data")] - public InvoiceUpcomingLinesScheduleDetailsPhaseTransferDataOptions TransferData { get; set; } - - /// - /// If set to true the entire phase is counted as a trial and the customer will not be - /// charged for any fees. - /// - [JsonProperty("trial")] - public bool? Trial { get; set; } - - /// - /// Sets the phase to trialing from the start date to this date. Must be before the phase - /// end date, can not be combined with trial. - /// - [JsonProperty("trial_end")] - [JsonConverter(typeof(AnyOfConverter))] - public AnyOf TrialEnd { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseStartDate.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseStartDate.cs deleted file mode 100644 index 4e45e85f5e..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseStartDate.cs +++ /dev/null @@ -1,13 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - public class InvoiceUpcomingLinesScheduleDetailsPhaseStartDate : StringEnum - { - public static readonly InvoiceUpcomingLinesScheduleDetailsPhaseStartDate Now = new InvoiceUpcomingLinesScheduleDetailsPhaseStartDate("now"); - - private InvoiceUpcomingLinesScheduleDetailsPhaseStartDate(string value) - : base(value) - { - } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseTransferDataOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseTransferDataOptions.cs deleted file mode 100644 index 40171ec724..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseTransferDataOptions.cs +++ /dev/null @@ -1,23 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesScheduleDetailsPhaseTransferDataOptions : INestedOptions - { - /// - /// A non-negative decimal between 0 and 100, with at most two decimal places. This - /// represents the percentage of the subscription invoice total 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/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseTrialEnd.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseTrialEnd.cs deleted file mode 100644 index 0d17cbeb9d..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesScheduleDetailsPhaseTrialEnd.cs +++ /dev/null @@ -1,13 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - public class InvoiceUpcomingLinesScheduleDetailsPhaseTrialEnd : StringEnum - { - public static readonly InvoiceUpcomingLinesScheduleDetailsPhaseTrialEnd Now = new InvoiceUpcomingLinesScheduleDetailsPhaseTrialEnd("now"); - - private InvoiceUpcomingLinesScheduleDetailsPhaseTrialEnd(string value) - : base(value) - { - } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesService.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesService.cs deleted file mode 100644 index 59e078821c..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesService.cs +++ /dev/null @@ -1,66 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using System; - using System.Collections.Generic; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - public class InvoiceUpcomingLinesService : ServiceNested - { - public InvoiceUpcomingLinesService() - { - } - - internal InvoiceUpcomingLinesService(ApiRequestor requestor) - : base(requestor) - { - } - - public InvoiceUpcomingLinesService(IStripeClient client) - : base(client) - { - } - - /// - ///

When retrieving an upcoming invoice, you’ll get a lines property - /// containing the total count of line items and the first handful of those items. There is - /// also a URL where you can retrieve the full (paginated) list of line items.

. - ///
- public virtual StripeList List(InvoiceUpcomingLinesListOptions options = null, RequestOptions requestOptions = null) - { - return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v1/invoices/upcoming/lines", options, requestOptions); - } - - /// - ///

When retrieving an upcoming invoice, you’ll get a lines property - /// containing the total count of line items and the first handful of those items. There is - /// also a URL where you can retrieve the full (paginated) list of line items.

. - ///
- public virtual Task> ListAsync(InvoiceUpcomingLinesListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v1/invoices/upcoming/lines", options, requestOptions, cancellationToken); - } - - /// - ///

When retrieving an upcoming invoice, you’ll get a lines property - /// containing the total count of line items and the first handful of those items. There is - /// also a URL where you can retrieve the full (paginated) list of line items.

. - ///
- public virtual IEnumerable ListAutoPaging(InvoiceUpcomingLinesListOptions options = null, RequestOptions requestOptions = null) - { - return this.ListRequestAutoPaging($"/v1/invoices/upcoming/lines", options, requestOptions); - } - - /// - ///

When retrieving an upcoming invoice, you’ll get a lines property - /// containing the total count of line items and the first handful of those items. There is - /// also a URL where you can retrieve the full (paginated) list of line items.

. - ///
- public virtual IAsyncEnumerable ListAutoPagingAsync(InvoiceUpcomingLinesListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.ListRequestAutoPagingAsync($"/v1/invoices/upcoming/lines", options, requestOptions, cancellationToken); - } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsBillingCycleAnchor.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsBillingCycleAnchor.cs deleted file mode 100644 index 8cc0bd65e4..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsBillingCycleAnchor.cs +++ /dev/null @@ -1,14 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - public class InvoiceUpcomingLinesSubscriptionDetailsBillingCycleAnchor : StringEnum - { - public static readonly InvoiceUpcomingLinesSubscriptionDetailsBillingCycleAnchor Now = new InvoiceUpcomingLinesSubscriptionDetailsBillingCycleAnchor("now"); - public static readonly InvoiceUpcomingLinesSubscriptionDetailsBillingCycleAnchor Unchanged = new InvoiceUpcomingLinesSubscriptionDetailsBillingCycleAnchor("unchanged"); - - private InvoiceUpcomingLinesSubscriptionDetailsBillingCycleAnchor(string value) - : base(value) - { - } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemBillingThresholdsOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemBillingThresholdsOptions.cs deleted file mode 100644 index 0952d08104..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemBillingThresholdsOptions.cs +++ /dev/null @@ -1,17 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesSubscriptionDetailsItemBillingThresholdsOptions : INestedOptions - { - /// - /// Number of units that meets the billing threshold to advance the subscription to a new - /// billing period (e.g., it takes 10 $5 units to meet a $50 monetary - /// threshold). - /// - [JsonProperty("usage_gte")] - public long? UsageGte { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemDiscountOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemDiscountOptions.cs deleted file mode 100644 index 46dade2e0d..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemDiscountOptions.cs +++ /dev/null @@ -1,26 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesSubscriptionDetailsItemDiscountOptions : INestedOptions - { - /// - /// ID of the coupon to create a new discount for. - /// - [JsonProperty("coupon")] - public string Coupon { get; set; } - - /// - /// ID of an existing discount on the object (or one of its ancestors) to reuse. - /// - [JsonProperty("discount")] - public string Discount { get; set; } - - /// - /// ID of the promotion code to create a new discount for. - /// - [JsonProperty("promotion_code")] - public string PromotionCode { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemOptions.cs deleted file mode 100644 index 6a8edcfe40..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemOptions.cs +++ /dev/null @@ -1,89 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using System.Collections.Generic; - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesSubscriptionDetailsItemOptions : INestedOptions, IHasId, IHasMetadata - { - /// - /// Define thresholds at which an invoice will be sent, and the subscription advanced to a - /// new billing period. When updating, pass an empty string to remove previously-defined - /// thresholds. - /// - [JsonProperty("billing_thresholds")] - public InvoiceUpcomingLinesSubscriptionDetailsItemBillingThresholdsOptions BillingThresholds { get; set; } - - /// - /// Delete all usage for a given subscription item. You must pass this when deleting a usage - /// records subscription item. clear_usage has no effect if the plan has a billing - /// meter attached. - /// - [JsonProperty("clear_usage")] - public bool? ClearUsage { get; set; } - - /// - /// A flag that, if set to true, will delete the specified item. - /// - [JsonProperty("deleted")] - public bool? Deleted { get; set; } - - /// - /// The coupons to redeem into discounts for the subscription item. - /// - [JsonProperty("discounts")] - public List Discounts { get; set; } - - /// - /// Subscription item to update. - /// - [JsonProperty("id")] - public string Id { get; set; } - - /// - /// Set of key-value pairs that you can - /// attach to an object. This can be useful for storing additional information about the - /// object in a structured format. Individual keys can be unset by posting an empty value to - /// them. All keys can be unset by posting an empty value to metadata. - /// - [JsonProperty("metadata")] - public Dictionary Metadata { get; set; } - - /// - /// Plan ID for this item, as a string. - /// - [JsonProperty("plan")] - public string Plan { get; set; } - - /// - /// The ID of the price object. One of price or price_data is required. When - /// changing a subscription item's price, quantity is set to 1 unless a - /// quantity parameter is provided. - /// - [JsonProperty("price")] - public string Price { get; set; } - - /// - /// Data used to generate a new Price - /// object inline. One of price or price_data is required. - /// - [JsonProperty("price_data")] - public InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataOptions PriceData { get; set; } - - /// - /// Quantity for this item. - /// - [JsonProperty("quantity")] - public long? Quantity { get; set; } - - /// - /// A list of Tax Rate ids. These Tax - /// Rates will override the default_tax_rates - /// on the Subscription. When updating, pass an empty string to remove previously-defined - /// tax rates. - /// - [JsonProperty("tax_rates")] - public List TaxRates { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataOptions.cs deleted file mode 100644 index e523ef7afd..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataOptions.cs +++ /dev/null @@ -1,55 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataOptions : INestedOptions - { - /// - /// Three-letter ISO currency - /// code, in lowercase. Must be a supported - /// currency. - /// - [JsonProperty("currency")] - public string Currency { get; set; } - - /// - /// The ID of the product that this price will belong to. - /// - [JsonProperty("product")] - public string Product { get; set; } - - /// - /// The recurring components of a price such as interval and interval_count. - /// - [JsonProperty("recurring")] - public InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataRecurringOptions Recurring { get; set; } - - /// - /// Only required if a default - /// tax behavior was not provided in the Stripe Tax settings. Specifies whether the - /// price is considered inclusive of taxes or exclusive of taxes. One of inclusive, - /// exclusive, or unspecified. Once specified as either inclusive or - /// exclusive, it cannot be changed. - /// One of: exclusive, inclusive, or unspecified. - /// - [JsonProperty("tax_behavior")] - public string TaxBehavior { get; set; } - - /// - /// A positive integer in cents (or local equivalent) (or 0 for a free price) representing - /// how much to charge. - /// - [JsonProperty("unit_amount")] - public long? UnitAmount { get; set; } - - /// - /// Same as unit_amount, but accepts a decimal value in cents (or local equivalent) - /// with at most 12 decimal places. Only one of unit_amount and - /// unit_amount_decimal can be set. - /// - [JsonProperty("unit_amount_decimal")] - public decimal? UnitAmountDecimal { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataRecurringOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataRecurringOptions.cs deleted file mode 100644 index 1753cab590..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataRecurringOptions.cs +++ /dev/null @@ -1,24 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesSubscriptionDetailsItemPriceDataRecurringOptions : INestedOptions - { - /// - /// Specifies billing frequency. Either day, week, month or - /// year. - /// One of: day, month, week, or year. - /// - [JsonProperty("interval")] - public string Interval { get; set; } - - /// - /// The number of intervals between subscription billings. For example, - /// interval=month and interval_count=3 bills every 3 months. Maximum of three - /// years interval allowed (3 years, 36 months, or 156 weeks). - /// - [JsonProperty("interval_count")] - public long? IntervalCount { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsOptions.cs deleted file mode 100644 index 564207becf..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsOptions.cs +++ /dev/null @@ -1,106 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using System; - using System.Collections.Generic; - using Newtonsoft.Json; - using Stripe.Infrastructure; - - public class InvoiceUpcomingLinesSubscriptionDetailsOptions : INestedOptions - { - /// - /// For new subscriptions, a future timestamp to anchor the subscription's billing cycle. This is - /// used to determine the date of the first full invoice, and, for plans with month - /// or year intervals, the day of the month for subsequent invoices. For existing - /// subscriptions, the value can only be set to now or unchanged. - /// - [JsonProperty("billing_cycle_anchor")] - [JsonConverter(typeof(AnyOfConverter))] - public AnyOf BillingCycleAnchor { get; set; } - - /// - /// A timestamp at which the subscription should cancel. If set to a date before the current - /// period ends, this will cause a proration if prorations have been enabled using - /// proration_behavior. If set during a future period, this will always cause a - /// proration for that period. - /// - [JsonProperty("cancel_at")] - [JsonConverter(typeof(UnixDateTimeConverter))] - public DateTime? CancelAt { get; set; } - - /// - /// Indicate whether this subscription should cancel at the end of the current period - /// (current_period_end). Defaults to false. - /// - [JsonProperty("cancel_at_period_end")] - public bool? CancelAtPeriodEnd { get; set; } - - /// - /// This simulates the subscription being canceled or expired immediately. - /// - [JsonProperty("cancel_now")] - public bool? CancelNow { get; set; } - - /// - /// If provided, the invoice returned will preview updating or creating a subscription with - /// these default tax rates. The default tax rates will apply to any line item that does not - /// have tax_rates set. - /// - [JsonProperty("default_tax_rates")] - public List DefaultTaxRates { get; set; } - - /// - /// A list of up to 20 subscription items, each with an attached price. - /// - [JsonProperty("items")] - public List Items { get; set; } - - /// - /// Determines how to handle prorations when the - /// billing cycle changes (e.g., when switching plans, resetting - /// billing_cycle_anchor=now, or starting a trial), or if an item's quantity - /// changes. The default value is create_prorations. - /// One of: always_invoice, create_prorations, or none. - /// - [JsonProperty("proration_behavior")] - public string ProrationBehavior { get; set; } - - /// - /// If previewing an update to a subscription, and doing proration, - /// subscription_details.proration_date forces the proration to be calculated as - /// though the update was done at the specified time. The time given must be within the - /// current subscription period and within the current phase of the schedule backing this - /// subscription, if the schedule exists. If set, subscription, and one of - /// subscription_details.items, or subscription_details.trial_end are - /// required. Also, subscription_details.proration_behavior cannot be set to 'none'. - /// - [JsonProperty("proration_date")] - [JsonConverter(typeof(UnixDateTimeConverter))] - public DateTime? ProrationDate { get; set; } - - /// - /// For paused subscriptions, setting subscription_details.resume_at to now - /// will preview the invoice that will be generated if the subscription is resumed. - /// - [JsonProperty("resume_at")] - public string ResumeAt { get; set; } - - /// - /// Date a subscription is intended to start (can be future or past). - /// - [JsonProperty("start_date")] - [JsonConverter(typeof(UnixDateTimeConverter))] - public DateTime? StartDate { get; set; } - - /// - /// If provided, the invoice returned will preview updating or creating a subscription with - /// that trial end. If set, one of subscription_details.items or subscription - /// is required. - /// - [JsonProperty("trial_end")] - [JsonConverter(typeof(AnyOfConverter))] - public AnyOf TrialEnd { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsTrialEnd.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsTrialEnd.cs deleted file mode 100644 index c67472eb13..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionDetailsTrialEnd.cs +++ /dev/null @@ -1,13 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - public class InvoiceUpcomingLinesSubscriptionDetailsTrialEnd : StringEnum - { - public static readonly InvoiceUpcomingLinesSubscriptionDetailsTrialEnd Now = new InvoiceUpcomingLinesSubscriptionDetailsTrialEnd("now"); - - private InvoiceUpcomingLinesSubscriptionDetailsTrialEnd(string value) - : base(value) - { - } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemBillingThresholdsOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemBillingThresholdsOptions.cs deleted file mode 100644 index 5e4f99f56c..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemBillingThresholdsOptions.cs +++ /dev/null @@ -1,17 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesSubscriptionItemBillingThresholdsOptions : INestedOptions - { - /// - /// Number of units that meets the billing threshold to advance the subscription to a new - /// billing period (e.g., it takes 10 $5 units to meet a $50 monetary - /// threshold). - /// - [JsonProperty("usage_gte")] - public long? UsageGte { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemDiscountOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemDiscountOptions.cs deleted file mode 100644 index 1a0845005d..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemDiscountOptions.cs +++ /dev/null @@ -1,26 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesSubscriptionItemDiscountOptions : INestedOptions - { - /// - /// ID of the coupon to create a new discount for. - /// - [JsonProperty("coupon")] - public string Coupon { get; set; } - - /// - /// ID of an existing discount on the object (or one of its ancestors) to reuse. - /// - [JsonProperty("discount")] - public string Discount { get; set; } - - /// - /// ID of the promotion code to create a new discount for. - /// - [JsonProperty("promotion_code")] - public string PromotionCode { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemOptions.cs deleted file mode 100644 index 9ec6b7760e..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemOptions.cs +++ /dev/null @@ -1,89 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using System.Collections.Generic; - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesSubscriptionItemOptions : INestedOptions, IHasId, IHasMetadata - { - /// - /// Define thresholds at which an invoice will be sent, and the subscription advanced to a - /// new billing period. When updating, pass an empty string to remove previously-defined - /// thresholds. - /// - [JsonProperty("billing_thresholds")] - public InvoiceUpcomingLinesSubscriptionItemBillingThresholdsOptions BillingThresholds { get; set; } - - /// - /// Delete all usage for a given subscription item. You must pass this when deleting a usage - /// records subscription item. clear_usage has no effect if the plan has a billing - /// meter attached. - /// - [JsonProperty("clear_usage")] - public bool? ClearUsage { get; set; } - - /// - /// A flag that, if set to true, will delete the specified item. - /// - [JsonProperty("deleted")] - public bool? Deleted { get; set; } - - /// - /// The coupons to redeem into discounts for the subscription item. - /// - [JsonProperty("discounts")] - public List Discounts { get; set; } - - /// - /// Subscription item to update. - /// - [JsonProperty("id")] - public string Id { get; set; } - - /// - /// Set of key-value pairs that you can - /// attach to an object. This can be useful for storing additional information about the - /// object in a structured format. Individual keys can be unset by posting an empty value to - /// them. All keys can be unset by posting an empty value to metadata. - /// - [JsonProperty("metadata")] - public Dictionary Metadata { get; set; } - - /// - /// Plan ID for this item, as a string. - /// - [JsonProperty("plan")] - public string Plan { get; set; } - - /// - /// The ID of the price object. One of price or price_data is required. When - /// changing a subscription item's price, quantity is set to 1 unless a - /// quantity parameter is provided. - /// - [JsonProperty("price")] - public string Price { get; set; } - - /// - /// Data used to generate a new Price - /// object inline. One of price or price_data is required. - /// - [JsonProperty("price_data")] - public InvoiceUpcomingLinesSubscriptionItemPriceDataOptions PriceData { get; set; } - - /// - /// Quantity for this item. - /// - [JsonProperty("quantity")] - public long? Quantity { get; set; } - - /// - /// A list of Tax Rate ids. These Tax - /// Rates will override the default_tax_rates - /// on the Subscription. When updating, pass an empty string to remove previously-defined - /// tax rates. - /// - [JsonProperty("tax_rates")] - public List TaxRates { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemPriceDataOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemPriceDataOptions.cs deleted file mode 100644 index 07c863eded..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemPriceDataOptions.cs +++ /dev/null @@ -1,55 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesSubscriptionItemPriceDataOptions : INestedOptions - { - /// - /// Three-letter ISO currency - /// code, in lowercase. Must be a supported - /// currency. - /// - [JsonProperty("currency")] - public string Currency { get; set; } - - /// - /// The ID of the product that this price will belong to. - /// - [JsonProperty("product")] - public string Product { get; set; } - - /// - /// The recurring components of a price such as interval and interval_count. - /// - [JsonProperty("recurring")] - public InvoiceUpcomingLinesSubscriptionItemPriceDataRecurringOptions Recurring { get; set; } - - /// - /// Only required if a default - /// tax behavior was not provided in the Stripe Tax settings. Specifies whether the - /// price is considered inclusive of taxes or exclusive of taxes. One of inclusive, - /// exclusive, or unspecified. Once specified as either inclusive or - /// exclusive, it cannot be changed. - /// One of: exclusive, inclusive, or unspecified. - /// - [JsonProperty("tax_behavior")] - public string TaxBehavior { get; set; } - - /// - /// A positive integer in cents (or local equivalent) (or 0 for a free price) representing - /// how much to charge. - /// - [JsonProperty("unit_amount")] - public long? UnitAmount { get; set; } - - /// - /// Same as unit_amount, but accepts a decimal value in cents (or local equivalent) - /// with at most 12 decimal places. Only one of unit_amount and - /// unit_amount_decimal can be set. - /// - [JsonProperty("unit_amount_decimal")] - public decimal? UnitAmountDecimal { get; set; } - } -} diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemPriceDataRecurringOptions.cs b/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemPriceDataRecurringOptions.cs deleted file mode 100644 index 6809a7194f..0000000000 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesSubscriptionItemPriceDataRecurringOptions.cs +++ /dev/null @@ -1,24 +0,0 @@ -// File generated from our OpenAPI spec -namespace Stripe -{ - using Newtonsoft.Json; - - public class InvoiceUpcomingLinesSubscriptionItemPriceDataRecurringOptions : INestedOptions - { - /// - /// Specifies billing frequency. Either day, week, month or - /// year. - /// One of: day, month, week, or year. - /// - [JsonProperty("interval")] - public string Interval { get; set; } - - /// - /// The number of intervals between subscription billings. For example, - /// interval=month and interval_count=3 bills every 3 months. Maximum of three - /// years interval allowed (3 years, 36 months, or 156 weeks). - /// - [JsonProperty("interval_count")] - public long? IntervalCount { get; set; } - } -} diff --git a/src/Stripe.net/Services/Invoices/InvoiceService.cs b/src/Stripe.net/Services/Invoices/InvoiceService.cs index 76bd4911dc..05943f1731 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceService.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceService.cs @@ -17,7 +17,6 @@ public partial class InvoiceService : Service, IUpdatable { private InvoiceLineItemService lineItems; - private InvoiceUpcomingLinesService upcomingLines; public InvoiceService() { @@ -36,9 +35,6 @@ public InvoiceService(IStripeClient client) public virtual InvoiceLineItemService LineItems => this.lineItems ??= new InvoiceLineItemService( this.Requestor); - public virtual InvoiceUpcomingLinesService UpcomingLines => this.upcomingLines ??= new InvoiceUpcomingLinesService( - this.Requestor); - /// ///

Adds multiple line items to an invoice. This is only possible when an invoice is /// still a draft.

. @@ -437,6 +433,46 @@ public virtual Task UpcomingAsync(UpcomingInvoiceOptions options = null return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v1/invoices/upcoming", options, requestOptions, cancellationToken); } + /// + ///

When retrieving an upcoming invoice, you’ll get a lines property + /// containing the total count of line items and the first handful of those items. There is + /// also a URL where you can retrieve the full (paginated) list of line items.

. + ///
+ public virtual StripeList UpcomingLines(InvoiceUpcomingLinesOptions options = null, RequestOptions requestOptions = null) + { + return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v1/invoices/upcoming/lines", options, requestOptions); + } + + /// + ///

When retrieving an upcoming invoice, you’ll get a lines property + /// containing the total count of line items and the first handful of those items. There is + /// also a URL where you can retrieve the full (paginated) list of line items.

. + ///
+ public virtual Task> UpcomingLinesAsync(InvoiceUpcomingLinesOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v1/invoices/upcoming/lines", options, requestOptions, cancellationToken); + } + + /// + ///

When retrieving an upcoming invoice, you’ll get a lines property + /// containing the total count of line items and the first handful of those items. There is + /// also a URL where you can retrieve the full (paginated) list of line items.

. + ///
+ public virtual IEnumerable UpcomingLinesAutoPaging(InvoiceUpcomingLinesOptions options = null, RequestOptions requestOptions = null) + { + return this.ListRequestAutoPaging($"/v1/invoices/upcoming/lines", options, requestOptions); + } + + /// + ///

When retrieving an upcoming invoice, you’ll get a lines property + /// containing the total count of line items and the first handful of those items. There is + /// also a URL where you can retrieve the full (paginated) list of line items.

. + ///
+ public virtual IAsyncEnumerable UpcomingLinesAutoPagingAsync(InvoiceUpcomingLinesOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.ListRequestAutoPagingAsync($"/v1/invoices/upcoming/lines", options, requestOptions, cancellationToken); + } + /// ///

Draft invoices are fully editable. Once an invoice is finalized, diff --git a/src/Stripe.net/Services/Invoices/InvoiceService.partial.cs b/src/Stripe.net/Services/Invoices/InvoiceService.partial.cs index dd46c7903a..c6237576e2 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceService.partial.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceService.partial.cs @@ -53,50 +53,6 @@ public virtual IAsyncEnumerable ListLineItemsAutoPagingAsync(st return this.ListRequestAutoPagingAsync($"/v1/invoices/{WebUtility.UrlEncode(id)}/lines", options, requestOptions, cancellationToken); } - ///

- ///

When retrieving an upcoming invoice, you’ll get a lines property - /// containing the total count of line items and the first handful of those items. There is - /// also a URL where you can retrieve the full (paginated) list of line items.

. - ///
- [Obsolete("Use InvoiceUpcomingLinesService.List instead.")] - public virtual StripeList ListUpcomingLineItems(InvoiceUpcomingLinesListOptions options = null, RequestOptions requestOptions = null) - { - return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v1/invoices/upcoming/lines", options, requestOptions); - } - - /// - ///

When retrieving an upcoming invoice, you’ll get a lines property - /// containing the total count of line items and the first handful of those items. There is - /// also a URL where you can retrieve the full (paginated) list of line items.

. - ///
- [Obsolete("Use InvoiceUpcomingLinesService.ListAsync instead.")] - public virtual Task> ListUpcomingLineItemsAsync(InvoiceUpcomingLinesListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v1/invoices/upcoming/lines", options, requestOptions, cancellationToken); - } - - /// - ///

When retrieving an upcoming invoice, you’ll get a lines property - /// containing the total count of line items and the first handful of those items. There is - /// also a URL where you can retrieve the full (paginated) list of line items.

. - ///
- [Obsolete("Use InvoiceUpcomingLinesService.ListAutoPaging instead.")] - public virtual IEnumerable ListUpcomingLineItemsAutoPaging(InvoiceUpcomingLinesListOptions options = null, RequestOptions requestOptions = null) - { - return this.ListRequestAutoPaging($"/v1/invoices/upcoming/lines", options, requestOptions); - } - - /// - ///

When retrieving an upcoming invoice, you’ll get a lines property - /// containing the total count of line items and the first handful of those items. There is - /// also a URL where you can retrieve the full (paginated) list of line items.

. - ///
- [Obsolete("Use InvoiceUpcomingLinesService.ListAutoPagingAsync instead.")] - public virtual IAsyncEnumerable ListUpcomingLineItemsAutoPagingAsync(InvoiceUpcomingLinesListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) - { - return this.ListRequestAutoPagingAsync($"/v1/invoices/upcoming/lines", options, requestOptions, cancellationToken); - } - /// ///

Updates an invoice’s line item. Some fields, such as tax_amounts, only live on /// the invoice line item, so they can only be updated through this endpoint. Other fields, diff --git a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesListOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceUpcomingLinesOptions.cs similarity index 94% rename from src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesListOptions.cs rename to src/Stripe.net/Services/Invoices/InvoiceUpcomingLinesOptions.cs index 4f4a89fc8a..e50e5f1735 100644 --- a/src/Stripe.net/Services/InvoiceUpcomingLines/InvoiceUpcomingLinesListOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceUpcomingLinesOptions.cs @@ -6,13 +6,13 @@ namespace Stripe using Newtonsoft.Json; using Stripe.Infrastructure; - public class InvoiceUpcomingLinesListOptions : ListOptions + public class InvoiceUpcomingLinesOptions : ListOptions { ///

/// Settings for automatic tax lookup for this invoice preview. /// [JsonProperty("automatic_tax")] - public InvoiceUpcomingLinesAutomaticTaxOptions AutomaticTax { get; set; } + public InvoiceAutomaticTaxOptions AutomaticTax { get; set; } /// /// The ID of the coupon to apply to this phase of the subscription schedule. This field has @@ -43,7 +43,7 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// subscription, or schedule must be set. /// [JsonProperty("customer_details")] - public InvoiceUpcomingLinesCustomerDetailsOptions CustomerDetails { get; set; } + public InvoiceCustomerDetailsOptions CustomerDetails { get; set; } /// /// The coupons to redeem into discounts for the invoice preview. If not specified, inherits @@ -52,20 +52,20 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// avoid inheriting any discounts. /// [JsonProperty("discounts")] - public List Discounts { get; set; } + public List Discounts { get; set; } /// /// List of invoice items to add or update in the upcoming invoice preview (up to 250). /// [JsonProperty("invoice_items")] - public List InvoiceItems { get; set; } + public List InvoiceItems { get; set; } /// /// The connected account that issues the invoice. The invoice is presented with the /// branding and support information of the specified account. /// [JsonProperty("issuer")] - public InvoiceUpcomingLinesIssuerOptions Issuer { get; set; } + public InvoiceIssuerOptions Issuer { get; set; } /// /// The account (if any) for which the funds of the invoice payment are intended. If set, @@ -96,7 +96,7 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// subscription or subscription_ prefixed fields. /// [JsonProperty("schedule_details")] - public InvoiceUpcomingLinesScheduleDetailsOptions ScheduleDetails { get; set; } + public InvoiceScheduleDetailsOptions ScheduleDetails { get; set; } /// /// The identifier of the subscription for which you'd like to retrieve the upcoming @@ -163,7 +163,7 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// with schedule or schedule_details fields. /// [JsonProperty("subscription_details")] - public InvoiceUpcomingLinesSubscriptionDetailsOptions SubscriptionDetails { get; set; } + public InvoiceSubscriptionDetailsOptions SubscriptionDetails { get; set; } /// /// A list of up to 20 subscription items, each with an attached price. This field has been @@ -171,7 +171,7 @@ public class InvoiceUpcomingLinesListOptions : ListOptions /// subscription_details.items instead. /// [JsonProperty("subscription_items")] - public List SubscriptionItems { get; set; } + public List SubscriptionItems { get; set; } /// /// Determines how to handle /// Lists all event destinations. /// - public virtual StripeList List(EventDestinationListOptions options = null, RequestOptions requestOptions = null) + public virtual V2.StripeList List(EventDestinationListOptions options = null, RequestOptions requestOptions = null) { - return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v2/core/event_destinations", options, requestOptions); + return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v2/core/event_destinations", options, requestOptions); } /// /// Lists all event destinations. /// - public virtual Task> ListAsync(EventDestinationListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + public virtual Task> ListAsync(EventDestinationListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { - return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v2/core/event_destinations", options, requestOptions, cancellationToken); + return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v2/core/event_destinations", options, requestOptions, cancellationToken); } /// diff --git a/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs b/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs index fb44221797..6ab511a60b 100644 --- a/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs @@ -1,10 +1,43 @@ // File generated from our OpenAPI spec namespace Stripe.V2.Core { + using System; using Newtonsoft.Json; public class EventListOptions : V2.ListOptions { + /// + /// Filter for events created after the specified timestamp. + /// + [JsonProperty("created_gt")] + public DateTime? CreatedGt { get; set; } + + /// + /// Filter for events created at or after the specified timestamp. + /// + [JsonProperty("created_gte")] + public DateTime? CreatedGte { get; set; } + + /// + /// Filter for events created before the specified timestamp. + /// + [JsonProperty("created_lt")] + public DateTime? CreatedLt { get; set; } + + /// + /// Filter for events created at or before the specified timestamp. + /// + [JsonProperty("created_lte")] + public DateTime? CreatedLte { get; set; } + + /// + /// Filter events based on whether they were successfully delivered to all subscribed event + /// destinations. If false, events which are still pending or have failed all delivery + /// attempts to a event destination will be returned. + /// + [JsonProperty("delivery_success")] + public bool? DeliverySuccess { get; set; } + /// /// Primary object ID used to retrieve related events. /// diff --git a/src/Stripe.net/Services/V2/Core/Events/EventService.cs b/src/Stripe.net/Services/V2/Core/Events/EventService.cs index ac5d439f25..e39553225f 100644 --- a/src/Stripe.net/Services/V2/Core/Events/EventService.cs +++ b/src/Stripe.net/Services/V2/Core/Events/EventService.cs @@ -39,17 +39,17 @@ public virtual V2.Event Get(string id, EventGetOptions options = null, RequestOp /// /// List events, going back up to 30 days. /// - public virtual StripeList List(EventListOptions options = null, RequestOptions requestOptions = null) + public virtual V2.StripeList List(EventListOptions options = null, RequestOptions requestOptions = null) { - return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v2/core/events", options, requestOptions); + return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v2/core/events", options, requestOptions); } /// /// List events, going back up to 30 days. /// - public virtual Task> ListAsync(EventListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + public virtual Task> ListAsync(EventListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { - return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v2/core/events", options, requestOptions, cancellationToken); + return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v2/core/events", options, requestOptions, cancellationToken); } /// diff --git a/src/StripeTests/Services/GeneratedExamplesTest.cs b/src/StripeTests/Services/GeneratedExamplesTest.cs index 1e4eff99a1..37349d2df3 100644 --- a/src/StripeTests/Services/GeneratedExamplesTest.cs +++ b/src/StripeTests/Services/GeneratedExamplesTest.cs @@ -1852,21 +1852,6 @@ public void TestInvoicesSendPost() "/v1/invoices/in_xxxxxxxxxxxxx/send"); } - [Fact] - public void TestInvoicesUpcomingGet() - { - var options = new UpcomingInvoiceOptions - { - Customer = "cus_9utnxg47pWjV1e", - }; - var service = new InvoiceService(this.StripeClient); - service.Upcoming(options); - this.AssertRequest( - HttpMethod.Get, - "/v1/invoices/upcoming", - "customer=cus_9utnxg47pWjV1e"); - } - [Fact] public void TestInvoicesVoidPost() { diff --git a/src/StripeTests/Services/Invoices/InvoiceServiceTest.cs b/src/StripeTests/Services/Invoices/InvoiceServiceTest.cs index cc939ae16d..2943bc5fc7 100644 --- a/src/StripeTests/Services/Invoices/InvoiceServiceTest.cs +++ b/src/StripeTests/Services/Invoices/InvoiceServiceTest.cs @@ -19,7 +19,6 @@ public class InvoiceServiceTest : BaseStripeTest private readonly InvoiceListOptions listOptions; private readonly InvoiceLineItemListOptions lineItemListOptions; private readonly UpcomingInvoiceOptions upcomingOptions; - private readonly InvoiceUpcomingLinesListOptions upcomingListLineItemsOptions; private readonly InvoiceFinalizeOptions finalizeOptions; private readonly InvoiceMarkUncollectibleOptions markUncollectibleOptions; private readonly InvoiceSendOptions sendOptions; @@ -67,13 +66,6 @@ public InvoiceServiceTest( Subscription = "sub_123", }; - this.upcomingListLineItemsOptions = new InvoiceUpcomingLinesListOptions() - { - Limit = 1, - Customer = "cus_123", - Subscription = "sub_123", - }; - this.finalizeOptions = new InvoiceFinalizeOptions { }; @@ -239,44 +231,6 @@ public async Task ListLineItemsAutoPagingAsync() Assert.Equal("line_item", lineItem.Object); } - [Fact] - public void ListUpcomingLineItems() - { - var lineItems = this.service.UpcomingLines.List(this.upcomingListLineItemsOptions); - this.AssertRequest(HttpMethod.Get, "/v1/invoices/upcoming/lines"); - Assert.NotNull(lineItems); - Assert.Equal("list", lineItems.Object); - Assert.Single(lineItems.Data); - Assert.Equal("line_item", lineItems.Data[0].Object); - } - - [Fact] - public async Task ListUpcomingLineItemsAsync() - { - var lineItems = await this.service.UpcomingLines.ListAsync(this.upcomingListLineItemsOptions); - this.AssertRequest(HttpMethod.Get, "/v1/invoices/upcoming/lines"); - Assert.NotNull(lineItems); - Assert.Equal("list", lineItems.Object); - Assert.Single(lineItems.Data); - Assert.Equal("line_item", lineItems.Data[0].Object); - } - - [Fact] - public void ListUpcomingLineItemsAutoPaging() - { - var lineItem = this.service.UpcomingLines.ListAutoPaging(this.upcomingListLineItemsOptions).First(); - Assert.NotNull(lineItem); - Assert.Equal("line_item", lineItem.Object); - } - - [Fact] - public async Task ListUpcomingLineItemsAutoPagingAsync() - { - var lineItem = await this.service.UpcomingLines.ListAutoPagingAsync(this.upcomingListLineItemsOptions).FirstAsync(); - Assert.NotNull(lineItem); - Assert.Equal("line_item", lineItem.Object); - } - [Fact] public void MarkUncollectible() { diff --git a/src/StripeTests/Services/Invoices/UpcomingInvoiceListLineItemsOptionsTest.cs b/src/StripeTests/Services/Invoices/UpcomingInvoiceListLineItemsOptionsTest.cs deleted file mode 100644 index c56111360c..0000000000 --- a/src/StripeTests/Services/Invoices/UpcomingInvoiceListLineItemsOptionsTest.cs +++ /dev/null @@ -1,63 +0,0 @@ -namespace StripeTests -{ - using System; - using Stripe; - using Stripe.Infrastructure.FormEncoding; - using Xunit; - - public class UpcomingInvoiceListLineItemsOptionsTest : BaseStripeTest - { - [Fact] - public void SerializeSubscriptionBillingCycleAnchor() - { - var testCases = new[] - { - new - { - options = new InvoiceUpcomingLinesListOptions() - { - SubscriptionBillingCycleAnchor = DateTime.Parse("Fri, 13 Feb 2009 23:31:30Z"), - }, - want = "subscription_billing_cycle_anchor=1234567890", - }, - new - { - options = new InvoiceUpcomingLinesListOptions - { - SubscriptionBillingCycleAnchor = SubscriptionBillingCycleAnchor.Now, - }, - want = "subscription_billing_cycle_anchor=now", - }, - new - { - options = new InvoiceUpcomingLinesListOptions - { - SubscriptionBillingCycleAnchor = SubscriptionBillingCycleAnchor.Unchanged, - }, - want = "subscription_billing_cycle_anchor=unchanged", - }, - new - { - options = new InvoiceUpcomingLinesListOptions - { - SubscriptionTrialEnd = DateTime.Parse("Fri, 13 Feb 2009 23:31:30Z"), - }, - want = "subscription_trial_end=1234567890", - }, - new - { - options = new InvoiceUpcomingLinesListOptions - { - SubscriptionTrialEnd = SubscriptionTrialEnd.Now, - }, - want = "subscription_trial_end=now", - }, - }; - - foreach (var testCase in testCases) - { - Assert.Equal(testCase.want, ContentEncoder.CreateQueryString(testCase.options)); - } - } - } -}