diff --git a/API_VERSION b/API_VERSION index 79148401a4..c0d21e6b67 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -23fb5589c3b9c027a742408f7ac2cff1be45a926 \ No newline at end of file +0b70149ad16c8d226d0b0d5ef7ac045c8a86ea31 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index d1d1d36216..8a7edbe682 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2080 \ No newline at end of file +v2100 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Billing/MeterEventSummaries/MeterEventSummary.cs b/src/Stripe.net/Entities/Billing/MeterEventSummaries/MeterEventSummary.cs index 13d0b818a5..fcfe6b4151 100644 --- a/src/Stripe.net/Entities/Billing/MeterEventSummaries/MeterEventSummary.cs +++ b/src/Stripe.net/Entities/Billing/MeterEventSummaries/MeterEventSummary.cs @@ -2,6 +2,7 @@ namespace Stripe.Billing { using System; + using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; #if NET6_0_OR_GREATER @@ -47,6 +48,15 @@ public class MeterEventSummary : StripeEntity, IHasId, IHasOb #endif public decimal AggregatedValue { get; set; } + /// + /// Key-value pairs of dimension values for event summaries with grouping on dimensions. + /// + [JsonProperty("dimensions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dimensions")] +#endif + public Dictionary Dimensions { get; set; } + /// /// End timestamp for this event summary (exclusive). Must be aligned with minute /// boundaries. diff --git a/src/Stripe.net/Entities/Billing/Meters/Meter.cs b/src/Stripe.net/Entities/Billing/Meters/Meter.cs index 8d2eb2755f..e70512d995 100644 --- a/src/Stripe.net/Entities/Billing/Meters/Meter.cs +++ b/src/Stripe.net/Entities/Billing/Meters/Meter.cs @@ -2,6 +2,7 @@ namespace Stripe.Billing { using System; + using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; #if NET6_0_OR_GREATER @@ -59,6 +60,15 @@ public class Meter : StripeEntity, IHasId, IHasObject #endif public MeterDefaultAggregation DefaultAggregation { get; set; } + /// + /// Set of keys that will be used to group meter events by. + /// + [JsonProperty("dimension_payload_keys")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dimension_payload_keys")] +#endif + public List DimensionPayloadKeys { get; set; } + /// /// The meter's name. /// diff --git a/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSession.cs b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSession.cs index b6f2bd877a..d494ad6267 100644 --- a/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSession.cs +++ b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSession.cs @@ -1,7 +1,10 @@ // File generated from our OpenAPI spec namespace Stripe.DelegatedCheckout { + using System; + using System.Collections.Generic; using Newtonsoft.Json; + using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif @@ -9,7 +12,7 @@ namespace Stripe.DelegatedCheckout /// /// A requested session is a session that has been requested by a customer. /// - public class RequestedSession : StripeEntity, IHasId, IHasObject + public class RequestedSession : StripeEntity, IHasId, IHasMetadata, IHasObject { /// /// Unique identifier for the object. @@ -29,6 +32,35 @@ public class RequestedSession : StripeEntity, IHasId, IHasObje #endif public string Object { get; set; } + /// + /// The subtotal amount of the requested session. + /// + [JsonProperty("amount_subtotal")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_subtotal")] +#endif + public long AmountSubtotal { get; set; } + + /// + /// The total amount of the requested session. + /// + [JsonProperty("amount_total")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_total")] +#endif + public long AmountTotal { get; set; } + + /// + /// Time at which the object was created. Measured in seconds since the Unix epoch. + /// + [JsonProperty("created_at")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime CreatedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + /// /// Three-letter ISO currency /// code, in lowercase. Must be a supported @@ -49,12 +81,35 @@ public class RequestedSession : StripeEntity, IHasId, IHasObje #endif public string Customer { get; set; } + /// + /// Time at which the requested session expires. Measured in seconds since the Unix epoch. + /// + [JsonProperty("expires_at")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The details of the fulfillment. + /// [JsonProperty("fulfillment_details")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("fulfillment_details")] #endif public RequestedSessionFulfillmentDetails FulfillmentDetails { get; set; } + /// + /// The line items to be purchased. + /// + [JsonProperty("line_item_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_item_details")] +#endif + public List LineItemDetails { get; set; } + /// /// Has the value true if the object exists in live mode or the value false if /// the object exists in test mode. @@ -64,5 +119,94 @@ public class RequestedSession : StripeEntity, IHasId, IHasObje [STJS.JsonPropertyName("livemode")] #endif public bool Livemode { 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. + /// + [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif + public Dictionary Metadata { get; set; } + + /// + /// The details of the order. + /// + [JsonProperty("order_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("order_details")] +#endif + public RequestedSessionOrderDetails OrderDetails { get; set; } + + /// + /// The payment method used for the requested session. + /// + [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif + public string PaymentMethod { get; set; } + + [JsonProperty("seller_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("seller_details")] +#endif + public RequestedSessionSellerDetails SellerDetails { get; set; } + + /// + /// Whether or not the payment method should be saved for future use. + /// + [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif + public string SetupFutureUsage { get; set; } + + /// + /// The metadata shared with the seller. + /// + [JsonProperty("shared_metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shared_metadata")] +#endif + public Dictionary SharedMetadata { get; set; } + + /// + /// The SPT used for payment. + /// + [JsonProperty("shared_payment_issued_token")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shared_payment_issued_token")] +#endif + public string SharedPaymentIssuedToken { get; set; } + + /// + /// The status of the requested session. + /// One of: completed, expired, or open. + /// + [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif + public string Status { get; set; } + + [JsonProperty("total_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("total_details")] +#endif + public RequestedSessionTotalDetails TotalDetails { get; set; } + + /// + /// Time at which the object was last updated. Measured in seconds since the Unix epoch. + /// + [JsonProperty("updated_at")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("updated_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime UpdatedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; } } diff --git a/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetails.cs b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetails.cs index 8090e0ba77..a415848117 100644 --- a/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetails.cs +++ b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetails.cs @@ -1,7 +1,66 @@ // File generated from our OpenAPI spec namespace Stripe.DelegatedCheckout { + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + public class RequestedSessionFulfillmentDetails : StripeEntity { + /// + /// The fulfillment address. + /// + [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif + public RequestedSessionFulfillmentDetailsAddress Address { get; set; } + + /// + /// The email address for the fulfillment details. + /// + [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif + public string Email { get; set; } + + /// + /// The fulfillment options. + /// + [JsonProperty("fulfillment_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fulfillment_options")] +#endif + public List FulfillmentOptions { get; set; } + + /// + /// The name for the fulfillment details. + /// + [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif + public string Name { get; set; } + + /// + /// The phone number for the fulfillment details. + /// + [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif + public string Phone { get; set; } + + /// + /// The fulfillment option. + /// + [JsonProperty("selected_fulfillment_option")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("selected_fulfillment_option")] +#endif + public RequestedSessionFulfillmentDetailsSelectedFulfillmentOption SelectedFulfillmentOption { get; set; } } } diff --git a/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsAddress.cs b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsAddress.cs new file mode 100644 index 0000000000..ff7e6d444f --- /dev/null +++ b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsAddress.cs @@ -0,0 +1,66 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionFulfillmentDetailsAddress : StripeEntity + { + /// + /// City, district, suburb, town, or village. + /// + [JsonProperty("city")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("city")] +#endif + public string City { get; set; } + + /// + /// Two-letter country code (ISO + /// 3166-1 alpha-2). + /// + [JsonProperty("country")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("country")] +#endif + public string Country { get; set; } + + /// + /// Address line 1, such as the street, PO Box, or company name. + /// + [JsonProperty("line1")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line1")] +#endif + public string Line1 { get; set; } + + /// + /// Address line 2, such as the apartment, suite, unit, or building. + /// + [JsonProperty("line2")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line2")] +#endif + public string Line2 { get; set; } + + /// + /// ZIP or postal code. + /// + [JsonProperty("postal_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("postal_code")] +#endif + public string PostalCode { get; set; } + + /// + /// State, county, province, or region. + /// + [JsonProperty("state")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("state")] +#endif + public string State { get; set; } + } +} diff --git a/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsFulfillmentOption.cs b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsFulfillmentOption.cs new file mode 100644 index 0000000000..dcd865053f --- /dev/null +++ b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsFulfillmentOption.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionFulfillmentDetailsFulfillmentOption : StripeEntity + { + /// + /// The shipping option. + /// + [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif + public RequestedSessionFulfillmentDetailsFulfillmentOptionShipping Shipping { get; set; } + + /// + /// The type of the fulfillment option. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsFulfillmentOptionShipping.cs b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsFulfillmentOptionShipping.cs new file mode 100644 index 0000000000..c8330770fd --- /dev/null +++ b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsFulfillmentOptionShipping.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionFulfillmentDetailsFulfillmentOptionShipping : StripeEntity + { + /// + /// The shipping options. + /// + [JsonProperty("shipping_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_options")] +#endif + public List ShippingOptions { get; set; } + } +} diff --git a/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsFulfillmentOptionShippingShippingOption.cs b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsFulfillmentOptionShippingShippingOption.cs new file mode 100644 index 0000000000..fa454c5489 --- /dev/null +++ b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsFulfillmentOptionShippingShippingOption.cs @@ -0,0 +1,65 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionFulfillmentDetailsFulfillmentOptionShippingShippingOption : StripeEntity + { + /// + /// The description of the shipping option. + /// + [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif + public string Description { get; set; } + + /// + /// The display name of the shipping option. + /// + [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif + public string DisplayName { get; set; } + + /// + /// The earliest delivery time of the shipping option. + /// + [JsonProperty("earliest_delivery_time")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("earliest_delivery_time")] +#endif + public long? EarliestDeliveryTime { get; set; } + + /// + /// The key of the shipping option. + /// + [JsonProperty("key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("key")] +#endif + public string Key { get; set; } + + /// + /// The latest delivery time of the shipping option. + /// + [JsonProperty("latest_delivery_time")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("latest_delivery_time")] +#endif + public long? LatestDeliveryTime { get; set; } + + /// + /// The shipping amount of the shipping option. + /// + [JsonProperty("shipping_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_amount")] +#endif + public long ShippingAmount { get; set; } + } +} diff --git a/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOption.cs b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOption.cs new file mode 100644 index 0000000000..b42e124b6d --- /dev/null +++ b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOption.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionFulfillmentDetailsSelectedFulfillmentOption : StripeEntity + { + /// + /// The shipping option. + /// + [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif + public RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionShipping Shipping { get; set; } + + /// + /// The type of the selected fulfillment option. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionShipping.cs b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionShipping.cs new file mode 100644 index 0000000000..09d8d17a1f --- /dev/null +++ b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionShipping.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionShipping : StripeEntity + { + /// + /// The shipping option. + /// + [JsonProperty("shipping_option")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_option")] +#endif + public string ShippingOption { get; set; } + } +} diff --git a/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionLineItemDetail.cs b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionLineItemDetail.cs new file mode 100644 index 0000000000..128ac16a0b --- /dev/null +++ b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionLineItemDetail.cs @@ -0,0 +1,75 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionLineItemDetail : StripeEntity + { + /// + /// The description of the line item. + /// + [JsonProperty("description")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("description")] +#endif + public string Description { get; set; } + + /// + /// The images of the line item. + /// + [JsonProperty("images")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("images")] +#endif + public List Images { get; set; } + + /// + /// The key of the line item. + /// + [JsonProperty("key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("key")] +#endif + public string Key { get; set; } + + /// + /// The name of the line item. + /// + [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif + public string Name { get; set; } + + /// + /// The quantity of the line item. + /// + [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif + public long Quantity { get; set; } + + /// + /// The SKU ID of the line item. + /// + [JsonProperty("sku_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sku_id")] +#endif + public string SkuId { get; set; } + + /// + /// The unit amount of the line item. + /// + [JsonProperty("unit_amount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("unit_amount")] +#endif + public long UnitAmount { get; set; } + } +} diff --git a/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionOrderDetails.cs b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionOrderDetails.cs new file mode 100644 index 0000000000..ddbc0084a8 --- /dev/null +++ b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionOrderDetails.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionOrderDetails : StripeEntity + { + /// + /// The URL to the order status. + /// + [JsonProperty("order_status_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("order_status_url")] +#endif + public string OrderStatusUrl { get; set; } + } +} diff --git a/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionSellerDetails.cs b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionSellerDetails.cs new file mode 100644 index 0000000000..6c649fc006 --- /dev/null +++ b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionSellerDetails.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + public class RequestedSessionSellerDetails : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionTotalDetails.cs b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionTotalDetails.cs new file mode 100644 index 0000000000..9b3c2e5250 --- /dev/null +++ b/src/Stripe.net/Entities/DelegatedCheckout/RequestedSessions/RequestedSessionTotalDetails.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionTotalDetails : StripeEntity + { + /// + /// The amount discount of the total details. + /// + [JsonProperty("amount_discount")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_discount")] +#endif + public long? AmountDiscount { get; set; } + + /// + /// The amount fulfillment of the total details. + /// + [JsonProperty("amount_fulfillment")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_fulfillment")] +#endif + public long? AmountFulfillment { get; set; } + + /// + /// The amount tax of the total details. + /// + [JsonProperty("amount_tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amount_tax")] +#endif + public long? AmountTax { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollectionEmailDelivery.cs b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollectionEmailDelivery.cs index d29b221537..8f93d1dca8 100644 --- a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollectionEmailDelivery.cs +++ b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollectionEmailDelivery.cs @@ -9,8 +9,8 @@ namespace Stripe.V2.Billing public class CadenceSettingsDataCollectionEmailDelivery : StripeEntity { /// - /// Controls emails for when the payment is due. For example after the invoice is finilized - /// and transition to Open state. + /// Controls emails for when the payment is due. For example after the invoice is finalized + /// and transitions to Open state. /// [JsonProperty("payment_due")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollectionEmailDeliveryPaymentDue.cs b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollectionEmailDeliveryPaymentDue.cs index 02b17ef660..ac46824ce7 100644 --- a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollectionEmailDeliveryPaymentDue.cs +++ b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollectionEmailDeliveryPaymentDue.cs @@ -18,7 +18,7 @@ public class CadenceSettingsDataCollectionEmailDeliveryPaymentDue : StripeEntity public bool Enabled { get; set; } /// - /// If true the payment link to hosted invocie page would be included in email and PDF of + /// If true the payment link to hosted invoice page would be included in email and PDF of /// the invoice. /// [JsonProperty("include_payment_link")] diff --git a/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionEmailDelivery.cs b/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionEmailDelivery.cs index 7f91483619..60a15c418a 100644 --- a/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionEmailDelivery.cs +++ b/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionEmailDelivery.cs @@ -9,8 +9,8 @@ namespace Stripe.V2.Billing public class CollectionSettingVersionEmailDelivery : StripeEntity { /// - /// Controls emails for when the payment is due. For example after the invoice is finilized - /// and transition to Open state. + /// Controls emails for when the payment is due. For example after the invoice is finalized + /// and transitions to Open state. /// [JsonProperty("payment_due")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionEmailDeliveryPaymentDue.cs b/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionEmailDeliveryPaymentDue.cs index 950870c1b8..c38b0f351e 100644 --- a/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionEmailDeliveryPaymentDue.cs +++ b/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionEmailDeliveryPaymentDue.cs @@ -18,7 +18,7 @@ public class CollectionSettingVersionEmailDeliveryPaymentDue : StripeEntity - /// If true the payment link to hosted invocie page would be included in email and PDF of + /// If true the payment link to hosted invoice page would be included in email and PDF of /// the invoice. /// [JsonProperty("include_payment_link")] diff --git a/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingEmailDelivery.cs b/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingEmailDelivery.cs index 709ad0a5aa..b70429659b 100644 --- a/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingEmailDelivery.cs +++ b/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingEmailDelivery.cs @@ -9,8 +9,8 @@ namespace Stripe.V2.Billing public class CollectionSettingEmailDelivery : StripeEntity { /// - /// Controls emails for when the payment is due. For example after the invoice is finilized - /// and transition to Open state. + /// Controls emails for when the payment is due. For example after the invoice is finalized + /// and transitions to Open state. /// [JsonProperty("payment_due")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingEmailDeliveryPaymentDue.cs b/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingEmailDeliveryPaymentDue.cs index 8da3f0eca0..1bc5a75e61 100644 --- a/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingEmailDeliveryPaymentDue.cs +++ b/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingEmailDeliveryPaymentDue.cs @@ -18,7 +18,7 @@ public class CollectionSettingEmailDeliveryPaymentDue : StripeEntity - /// If true the payment link to hosted invocie page would be included in email and PDF of + /// If true the payment link to hosted invoice page would be included in email and PDF of /// the invoice. /// [JsonProperty("include_payment_link")] diff --git a/src/Stripe.net/Entities/V2/Billing/PricingPlanSubscriptionComponents/PricingPlanSubscriptionComponents.cs b/src/Stripe.net/Entities/V2/Billing/PricingPlanSubscriptionComponents/PricingPlanSubscriptionComponents.cs new file mode 100644 index 0000000000..3483e19cc6 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Billing/PricingPlanSubscriptionComponents/PricingPlanSubscriptionComponents.cs @@ -0,0 +1,44 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Billing +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// A set of component subscriptions for a Pricing Plan Subscription. + /// + public class PricingPlanSubscriptionComponents : StripeEntity, IHasObject + { + /// + /// String representing the object's type. Objects of the same type share the same value of + /// the object field. + /// + [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif + public string Object { get; set; } + + /// + /// The component subscriptions of the Pricing Plan Subscription. + /// + [JsonProperty("components")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("components")] +#endif + public List Components { get; set; } + + /// + /// Has the value true if the object exists in live mode or the value false if + /// the object exists in test mode. + /// + [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif + public bool Livemode { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Billing/PricingPlanSubscriptionComponents/PricingPlanSubscriptionComponentsComponent.cs b/src/Stripe.net/Entities/V2/Billing/PricingPlanSubscriptionComponents/PricingPlanSubscriptionComponentsComponent.cs new file mode 100644 index 0000000000..c2d1524357 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Billing/PricingPlanSubscriptionComponents/PricingPlanSubscriptionComponentsComponent.cs @@ -0,0 +1,48 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Billing +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PricingPlanSubscriptionComponentsComponent : StripeEntity + { + /// + /// The Pricing Plan Component associated with this component subscription. + /// + [JsonProperty("pricing_plan_component")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("pricing_plan_component")] +#endif + public string PricingPlanComponent { get; set; } + + /// + /// The type of subscription. + /// One of: license_fee_subscription, or rate_card_subscription. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + + /// + /// The ID of the License Fee Subscription. + /// + [JsonProperty("license_fee_subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("license_fee_subscription")] +#endif + public string LicenseFeeSubscription { get; set; } + + /// + /// The ID of the Rate Card Subscription. + /// + [JsonProperty("rate_card_subscription")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("rate_card_subscription")] +#endif + public string RateCardSubscription { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/Account.cs b/src/Stripe.net/Entities/V2/Core/Accounts/Account.cs index 04b7aa20ff..8b00166995 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/Account.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/Account.cs @@ -46,6 +46,15 @@ public class Account : StripeEntity, IHasId, IHasMetadata, IHasObject #endif public List AppliedConfigurations { get; set; } + /// + /// A value indicating if the Account has been closed. + /// + [JsonProperty("closed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("closed")] +#endif + public bool? Closed { get; set; } + /// /// An Account Configuration which allows the Account to take on a key persona across Stripe /// products. diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerAutomaticIndirectTax.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerAutomaticIndirectTax.cs index 53f9c6a965..bec45585f2 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerAutomaticIndirectTax.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationCustomerAutomaticIndirectTax.cs @@ -43,7 +43,8 @@ public class AccountConfigurationCustomerAutomaticIndirectTax : StripeEntityidentity_address, ip_address, or shipping_address. + /// One of: identity_address, ip_address, payment_method, or + /// shipping_address. /// [JsonProperty("location_source")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrencies.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrencies.cs index 73c82b8f10..3f76c6fa80 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrencies.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrencies.cs @@ -16,5 +16,14 @@ public class AccountConfigurationStorerCapabilitiesHoldsCurrencies : StripeEntit [STJS.JsonPropertyName("gbp")] #endif public AccountConfigurationStorerCapabilitiesHoldsCurrenciesGbp Gbp { get; set; } + + /// + /// Can hold storage-type funds on Stripe in USD. + /// + [JsonProperty("usd")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usd")] +#endif + public AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsd Usd { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsd.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsd.cs new file mode 100644 index 0000000000..bf2d5bfa66 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsd.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsd : StripeEntity + { + /// + /// Whether the Capability has been requested. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool Requested { get; set; } + + /// + /// The status of the Capability. + /// One of: active, pending, restricted, or unsupported. + /// + [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif + public string Status { get; set; } + + /// + /// Additional details regarding the status of the Capability. status_details will be + /// empty if the Capability's status is active. + /// + [JsonProperty("status_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status_details")] +#endif + public List StatusDetails { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdStatusDetail.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdStatusDetail.cs new file mode 100644 index 0000000000..d817755596 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdStatusDetail.cs @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountConfigurationStorerCapabilitiesHoldsCurrenciesUsdStatusDetail : StripeEntity + { + /// + /// Machine-readable code explaining the reason for the Capability to be in its current + /// status. + /// One of: determining_status, requirements_past_due, + /// requirements_pending_verification, restricted_other, + /// unsupported_business, unsupported_country, or + /// unsupported_entity_type. + /// + [JsonProperty("code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("code")] +#endif + public string Code { get; set; } + + /// + /// Machine-readable code explaining how to make the Capability active. + /// One of: contact_stripe, no_resolution, or provide_info. + /// + [JsonProperty("resolution")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("resolution")] +#endif + public string Resolution { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountDefaultsResponsibilities.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountDefaultsResponsibilities.cs index ed8836ccd0..76a570ea2e 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountDefaultsResponsibilities.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountDefaultsResponsibilities.cs @@ -11,7 +11,8 @@ public class AccountDefaultsResponsibilities : StripeEntity /// A value indicating the responsible payer of a bundle of Stripe fees for pricing-control /// eligible products on this Account. - /// One of: application, or stripe. + /// One of: application, application_custom, application_express, or + /// stripe. /// [JsonProperty("fees_collector")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentity.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentity.cs index d15bee9335..be70f24088 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentity.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentity.cs @@ -9,7 +9,8 @@ namespace Stripe.V2.Core public class AccountIdentity : StripeEntity { /// - /// Attestations from the identity's key people, e.g. owners, executives, directors. + /// Attestations from the identity's key people, e.g. owners, executives, directors, + /// representatives. /// [JsonProperty("attestations")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestations.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestations.cs index 37862d4a6c..e79e0b93ed 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestations.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestations.cs @@ -37,6 +37,16 @@ public class AccountIdentityAttestations : StripeEntity + /// This hash is used to attest that the representative is authorized to act as the + /// representative of their legal entity. + /// + [JsonProperty("representative_declaration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("representative_declaration")] +#endif + public AccountIdentityAttestationsRepresentativeDeclaration RepresentativeDeclaration { get; set; } + /// /// Attestations of accepted terms of service agreements. /// diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsRepresentativeDeclaration.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsRepresentativeDeclaration.cs new file mode 100644 index 0000000000..9baf35a2a7 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountIdentityAttestationsRepresentativeDeclaration.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using System; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountIdentityAttestationsRepresentativeDeclaration : StripeEntity + { + /// + /// The time marking when the representative attestation was made. Represented as a RFC 3339 + /// date & time UTC value in millisecond precision, for example: + /// 2022-09-18T13:22:18.123Z. + /// + [JsonProperty("date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("date")] +#endif + public DateTime? Date { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The IP address from which the representative attestation was made. + /// + [JsonProperty("ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip")] +#endif + public string Ip { get; set; } + + /// + /// The user agent of the browser from which the representative attestation was made. + /// + [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif + public string UserAgent { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountRequirementsEntryImpactRestrictsCapability.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountRequirementsEntryImpactRestrictsCapability.cs index d9d0879224..5969597d60 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountRequirementsEntryImpactRestrictsCapability.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountRequirementsEntryImpactRestrictsCapability.cs @@ -22,7 +22,8 @@ public class AccountRequirementsEntryImpactRestrictsCapability : StripeEntitycommercial.stripe.prepaid_card, crypto, eps_payments, /// financial_addresses.bank_accounts, fpx_payments, /// gb_bank_transfer_payments, grabpay_payments, holds_currencies.gbp, - /// ideal_payments, inbound_transfers.financial_accounts, jcb_payments, + /// holds_currencies.usd, ideal_payments, + /// inbound_transfers.financial_accounts, jcb_payments, /// jp_bank_transfer_payments, kakao_pay_payments, klarna_payments, /// konbini_payments, kr_card_payments, link_payments, /// mobilepay_payments, multibanco_payments, mx_bank_transfer_payments, diff --git a/src/Stripe.net/Entities/V2/Core/Vault/UsBankAccounts/UsBankAccount.cs b/src/Stripe.net/Entities/V2/Core/Vault/UsBankAccounts/UsBankAccount.cs index ec9a7eedea..189a20e6d0 100644 --- a/src/Stripe.net/Entities/V2/Core/Vault/UsBankAccounts/UsBankAccount.cs +++ b/src/Stripe.net/Entities/V2/Core/Vault/UsBankAccounts/UsBankAccount.cs @@ -106,5 +106,14 @@ public class UsBankAccount : StripeEntity, IHasId, IHasObject [STJS.JsonPropertyName("routing_number")] #endif public string RoutingNumber { get; set; } + + /// + /// The bank account verification details. + /// + [JsonProperty("verification")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification")] +#endif + public UsBankAccountVerification Verification { get; set; } } } diff --git a/src/Stripe.net/Entities/V2/Core/Vault/UsBankAccounts/UsBankAccountVerification.cs b/src/Stripe.net/Entities/V2/Core/Vault/UsBankAccounts/UsBankAccountVerification.cs new file mode 100644 index 0000000000..fbd003dc9c --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Vault/UsBankAccounts/UsBankAccountVerification.cs @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core.Vault +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class UsBankAccountVerification : StripeEntity + { + /// + /// The microdeposit verification details if the status is awaiting verification. + /// + [JsonProperty("microdeposit_verification_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("microdeposit_verification_details")] +#endif + public UsBankAccountVerificationMicrodepositVerificationDetails MicrodepositVerificationDetails { get; set; } + + /// + /// The bank account verification status. + /// One of: awaiting_verification, unverified, verification_failed, or + /// verified. + /// + [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Vault/UsBankAccounts/UsBankAccountVerificationMicrodepositVerificationDetails.cs b/src/Stripe.net/Entities/V2/Core/Vault/UsBankAccounts/UsBankAccountVerificationMicrodepositVerificationDetails.cs new file mode 100644 index 0000000000..6515d1434a --- /dev/null +++ b/src/Stripe.net/Entities/V2/Core/Vault/UsBankAccounts/UsBankAccountVerificationMicrodepositVerificationDetails.cs @@ -0,0 +1,40 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core.Vault +{ + using System; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class UsBankAccountVerificationMicrodepositVerificationDetails : StripeEntity + { + /// + /// Time when microdeposits will expire and have to be re-sent. + /// + [JsonProperty("expires")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expires")] +#endif + public DateTime Expires { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// Microdeposit type can be amounts or descriptor_type. + /// One of: amounts, or descriptor_code. + /// + [JsonProperty("microdeposit_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("microdeposit_type")] +#endif + public string MicrodepositType { get; set; } + + /// + /// Time when microdeposits were sent. + /// + [JsonProperty("sent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sent")] +#endif + public DateTime Sent { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + } +} diff --git a/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropFiringEventDataImpact.cs b/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropFiringEventDataImpact.cs index 5455e2cf48..8dbadbb30b 100644 --- a/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropFiringEventDataImpact.cs +++ b/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropFiringEventDataImpact.cs @@ -42,14 +42,19 @@ public class V2CoreHealthAuthorizationRateDropFiringEventDataImpact : StripeEnti /// The type of the payment method. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, apple_pay, au_becs_debit, - /// bacs_debit, bancontact, blik, boleto, card, - /// card_present, cartes_bancaires, cashapp, - /// dummy_passthrough_card, eps, fpx, giropay, grabpay, - /// ideal, interac_present, kakao_pay, klarna, konbini, - /// link, mobilepay, multibanco, naver_pay, oxxo, - /// p24, paper_check, paynow, paypal, payto, - /// pay_by_bank, pix, promptpay, revolut_pay, sepa_debit, - /// sofort, swish, twint, upi, wechat_pay, or zip. + /// bacs_debit, bancontact, billie, blik, boleto, + /// card, card_present, cartes_bancaires, cashapp, + /// crypto, dummy_passthrough_card, eps, fpx, giropay, + /// grabpay, ideal, interac_present, kakao_pay, klarna, + /// konbini, kriya, kr_card, link, mb_way, + /// mobilepay, mondu, multibanco, naver_pay, ng_bank, + /// ng_bank_transfer, ng_card, ng_market, ng_ussd, + /// ng_wallet, oxxo, p24, paper_check, payco, + /// paynow, paypal, paypay, payto, pay_by_bank, + /// pix, promptpay, rechnung, revolut_pay, samsung_pay, + /// satispay, scalapay, sepa_debit, sequra, sofort, + /// sunbit, swish, twint, upi, us_bank_account, + /// vipps, wechat_pay, or zip. /// [JsonProperty("payment_method_type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropResolvedEventDataImpact.cs b/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropResolvedEventDataImpact.cs index 7cb5ee0446..8ddab9f520 100644 --- a/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropResolvedEventDataImpact.cs +++ b/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropResolvedEventDataImpact.cs @@ -42,14 +42,19 @@ public class V2CoreHealthAuthorizationRateDropResolvedEventDataImpact : StripeEn /// The type of the payment method. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, apple_pay, au_becs_debit, - /// bacs_debit, bancontact, blik, boleto, card, - /// card_present, cartes_bancaires, cashapp, - /// dummy_passthrough_card, eps, fpx, giropay, grabpay, - /// ideal, interac_present, kakao_pay, klarna, konbini, - /// link, mobilepay, multibanco, naver_pay, oxxo, - /// p24, paper_check, paynow, paypal, payto, - /// pay_by_bank, pix, promptpay, revolut_pay, sepa_debit, - /// sofort, swish, twint, upi, wechat_pay, or zip. + /// bacs_debit, bancontact, billie, blik, boleto, + /// card, card_present, cartes_bancaires, cashapp, + /// crypto, dummy_passthrough_card, eps, fpx, giropay, + /// grabpay, ideal, interac_present, kakao_pay, klarna, + /// konbini, kriya, kr_card, link, mb_way, + /// mobilepay, mondu, multibanco, naver_pay, ng_bank, + /// ng_bank_transfer, ng_card, ng_market, ng_ussd, + /// ng_wallet, oxxo, p24, paper_check, payco, + /// paynow, paypal, paypay, payto, pay_by_bank, + /// pix, promptpay, rechnung, revolut_pay, samsung_pay, + /// satispay, scalapay, sepa_debit, sequra, sofort, + /// sunbit, swish, twint, upi, us_bank_account, + /// vipps, wechat_pay, or zip. /// [JsonProperty("payment_method_type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Events/V2CoreHealthPaymentMethodErrorFiringEventDataImpact.cs b/src/Stripe.net/Events/V2CoreHealthPaymentMethodErrorFiringEventDataImpact.cs index 92d1f0d123..a509a7f6d9 100644 --- a/src/Stripe.net/Events/V2CoreHealthPaymentMethodErrorFiringEventDataImpact.cs +++ b/src/Stripe.net/Events/V2CoreHealthPaymentMethodErrorFiringEventDataImpact.cs @@ -31,14 +31,19 @@ public class V2CoreHealthPaymentMethodErrorFiringEventDataImpact : StripeEntity< /// The type of the payment method. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, apple_pay, au_becs_debit, - /// bacs_debit, bancontact, blik, boleto, card, - /// card_present, cartes_bancaires, cashapp, - /// dummy_passthrough_card, eps, fpx, giropay, grabpay, - /// ideal, interac_present, kakao_pay, klarna, konbini, - /// link, mobilepay, multibanco, naver_pay, oxxo, - /// p24, paper_check, paynow, paypal, payto, - /// pay_by_bank, pix, promptpay, revolut_pay, sepa_debit, - /// sofort, swish, twint, upi, wechat_pay, or zip. + /// bacs_debit, bancontact, billie, blik, boleto, + /// card, card_present, cartes_bancaires, cashapp, + /// crypto, dummy_passthrough_card, eps, fpx, giropay, + /// grabpay, ideal, interac_present, kakao_pay, klarna, + /// konbini, kriya, kr_card, link, mb_way, + /// mobilepay, mondu, multibanco, naver_pay, ng_bank, + /// ng_bank_transfer, ng_card, ng_market, ng_ussd, + /// ng_wallet, oxxo, p24, paper_check, payco, + /// paynow, paypal, paypay, payto, pay_by_bank, + /// pix, promptpay, rechnung, revolut_pay, samsung_pay, + /// satispay, scalapay, sepa_debit, sequra, sofort, + /// sunbit, swish, twint, upi, us_bank_account, + /// vipps, wechat_pay, or zip. /// [JsonProperty("payment_method_type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Events/V2CoreHealthPaymentMethodErrorResolvedEventDataImpact.cs b/src/Stripe.net/Events/V2CoreHealthPaymentMethodErrorResolvedEventDataImpact.cs index af3c106483..e53f6f9fe9 100644 --- a/src/Stripe.net/Events/V2CoreHealthPaymentMethodErrorResolvedEventDataImpact.cs +++ b/src/Stripe.net/Events/V2CoreHealthPaymentMethodErrorResolvedEventDataImpact.cs @@ -31,14 +31,19 @@ public class V2CoreHealthPaymentMethodErrorResolvedEventDataImpact : StripeEntit /// The type of the payment method. /// One of: acss_debit, affirm, afterpay_clearpay, alipay, /// alma, amazon_pay, apple_pay, au_becs_debit, - /// bacs_debit, bancontact, blik, boleto, card, - /// card_present, cartes_bancaires, cashapp, - /// dummy_passthrough_card, eps, fpx, giropay, grabpay, - /// ideal, interac_present, kakao_pay, klarna, konbini, - /// link, mobilepay, multibanco, naver_pay, oxxo, - /// p24, paper_check, paynow, paypal, payto, - /// pay_by_bank, pix, promptpay, revolut_pay, sepa_debit, - /// sofort, swish, twint, upi, wechat_pay, or zip. + /// bacs_debit, bancontact, billie, blik, boleto, + /// card, card_present, cartes_bancaires, cashapp, + /// crypto, dummy_passthrough_card, eps, fpx, giropay, + /// grabpay, ideal, interac_present, kakao_pay, klarna, + /// konbini, kriya, kr_card, link, mb_way, + /// mobilepay, mondu, multibanco, naver_pay, ng_bank, + /// ng_bank_transfer, ng_card, ng_market, ng_ussd, + /// ng_wallet, oxxo, p24, paper_check, payco, + /// paynow, paypal, paypay, payto, pay_by_bank, + /// pix, promptpay, rechnung, revolut_pay, samsung_pay, + /// satispay, scalapay, sepa_debit, sequra, sofort, + /// sunbit, swish, twint, upi, us_bank_account, + /// vipps, wechat_pay, or zip. /// [JsonProperty("payment_method_type")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Events/V2MoneyManagementTransactionCreatedEvent.cs b/src/Stripe.net/Events/V2MoneyManagementTransactionCreatedEvent.cs index fd95237ebb..1bb06b3bba 100644 --- a/src/Stripe.net/Events/V2MoneyManagementTransactionCreatedEvent.cs +++ b/src/Stripe.net/Events/V2MoneyManagementTransactionCreatedEvent.cs @@ -12,6 +12,16 @@ namespace Stripe.Events /// public class V2MoneyManagementTransactionCreatedEvent : V2.Core.Event { + /// + /// Data for the v2.money_management.transaction.created event. + /// + [JsonProperty("data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("data")] +#endif + + public V2MoneyManagementTransactionCreatedEventData Data { get; set; } + /// /// Object containing the reference to API resource relevant to the event. /// diff --git a/src/Stripe.net/Events/V2MoneyManagementTransactionCreatedEventData.cs b/src/Stripe.net/Events/V2MoneyManagementTransactionCreatedEventData.cs new file mode 100644 index 0000000000..d87f23a852 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementTransactionCreatedEventData.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class V2MoneyManagementTransactionCreatedEventData : StripeEntity + { + /// + /// Id of the v1 Transaction corresponding to this Transaction. + /// + [JsonProperty("v1_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("v1_id")] +#endif + public string V1Id { get; set; } + } +} diff --git a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs index 30eba414d0..52e59d3ad9 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs @@ -265,6 +265,10 @@ public static class StripeTypeRegistry "v2.billing.pricing_plan_subscription", typeof( V2.Billing.PricingPlanSubscription) }, + { + "v2.billing.pricing_plan_subscription_components", typeof( + V2.Billing.PricingPlanSubscriptionComponents) + }, { "v2.billing.pricing_plan_version", typeof(V2.Billing.PricingPlanVersion) }, { "v2.billing.profile", typeof(V2.Billing.Profile) }, { "v2.billing.rate_card", typeof(V2.Billing.RateCard) }, diff --git a/src/Stripe.net/Services/Billing/MeterEventSummaries/MeterEventSummaryListOptions.cs b/src/Stripe.net/Services/Billing/MeterEventSummaries/MeterEventSummaryListOptions.cs index 74033df34d..9acb74ecee 100644 --- a/src/Stripe.net/Services/Billing/MeterEventSummaries/MeterEventSummaryListOptions.cs +++ b/src/Stripe.net/Services/Billing/MeterEventSummaries/MeterEventSummaryListOptions.cs @@ -2,6 +2,7 @@ namespace Stripe.Billing { using System; + using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; #if NET6_0_OR_GREATER @@ -19,6 +20,26 @@ public class MeterEventSummaryListOptions : ListOptions #endif public string Customer { get; set; } + /// + /// Key-value pairs used to filter meter events by dimension values. If specified, event + /// summaries will be generated with only matching meter events. + /// + [JsonProperty("dimension_filters")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dimension_filters")] +#endif + public Dictionary DimensionFilters { get; set; } + + /// + /// List of dimension payload keys to group by. If specified, event summaries will be + /// grouped by the given dimension payload key values. + /// + [JsonProperty("dimension_group_by_keys")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dimension_group_by_keys")] +#endif + public List DimensionGroupByKeys { get; set; } + /// /// The timestamp from when to stop aggregating meter events (exclusive). Must be aligned /// with minute boundaries. diff --git a/src/Stripe.net/Services/Billing/Meters/MeterCreateOptions.cs b/src/Stripe.net/Services/Billing/Meters/MeterCreateOptions.cs index c534e9f579..1d18469038 100644 --- a/src/Stripe.net/Services/Billing/Meters/MeterCreateOptions.cs +++ b/src/Stripe.net/Services/Billing/Meters/MeterCreateOptions.cs @@ -1,6 +1,7 @@ // File generated from our OpenAPI spec namespace Stripe.Billing { + using System.Collections.Generic; using Newtonsoft.Json; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; @@ -26,6 +27,16 @@ public class MeterCreateOptions : BaseOptions #endif public MeterDefaultAggregationOptions DefaultAggregation { get; set; } + /// + /// Set of keys that will be used to group meter events by. Each key must be present in the + /// event payload. + /// + [JsonProperty("dimension_payload_keys")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("dimension_payload_keys")] +#endif + public List DimensionPayloadKeys { get; set; } + /// /// The meter’s name. Not visible to the customer. /// diff --git a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionCreateOptions.cs b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionCreateOptions.cs index 00bd3a6f88..3dc4dfd574 100644 --- a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionCreateOptions.cs +++ b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionCreateOptions.cs @@ -1,7 +1,111 @@ // File generated from our OpenAPI spec namespace Stripe.DelegatedCheckout { - public class RequestedSessionCreateOptions : BaseOptions + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionCreateOptions : BaseOptions, IHasMetadata { + /// + /// The currency for this requested session. + /// + [JsonProperty("currency")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("currency")] +#endif + public string Currency { get; set; } + + /// + /// The customer for this requested session. + /// + [JsonProperty("customer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("customer")] +#endif + public string Customer { get; set; } + + /// + /// The details of the fulfillment. + /// + [JsonProperty("fulfillment_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fulfillment_details")] +#endif + public RequestedSessionFulfillmentDetailsOptions FulfillmentDetails { get; set; } + + /// + /// The details of the line items. + /// + [JsonProperty("line_item_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_item_details")] +#endif + public List LineItemDetails { get; set; } + + /// + /// The metadata for this requested session. + /// + [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif + public Dictionary Metadata { get; set; } + + /// + /// The payment method for this requested session. + /// + [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif + public string PaymentMethod { get; set; } + + /// + /// The payment method data for this requested session. + /// + [JsonProperty("payment_method_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_data")] +#endif + public RequestedSessionPaymentMethodDataOptions PaymentMethodData { get; set; } + + /// + /// The risk details for this requested session. + /// + [JsonProperty("risk_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("risk_details")] +#endif + public RequestedSessionRiskDetailsOptions RiskDetails { get; set; } + + /// + /// The details of the seller. + /// + [JsonProperty("seller_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("seller_details")] +#endif + public RequestedSessionSellerDetailsOptions SellerDetails { get; set; } + + /// + /// The setup future usage for this requested session. + /// + [JsonProperty("setup_future_usage")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("setup_future_usage")] +#endif + public string SetupFutureUsage { get; set; } + + /// + /// The shared metadata for this requested session. + /// + [JsonProperty("shared_metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shared_metadata")] +#endif + public Dictionary SharedMetadata { get; set; } } } diff --git a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsOptions.cs b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsOptions.cs new file mode 100644 index 0000000000..572231e654 --- /dev/null +++ b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsOptions.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionFulfillmentDetailsOptions : INestedOptions + { + [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif + public AddressOptions Address { get; set; } + + /// + /// The customer's email address. + /// + [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif + public string Email { get; set; } + + /// + /// The customer's name. + /// + [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif + public string Name { get; set; } + + /// + /// The customer's phone number. + /// + [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif + public string Phone { get; set; } + + /// + /// The fulfillment option to select. + /// + [JsonProperty("selected_fulfillment_option")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("selected_fulfillment_option")] +#endif + public RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionOptions SelectedFulfillmentOption { get; set; } + } +} diff --git a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionOptions.cs b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionOptions.cs new file mode 100644 index 0000000000..98568c572c --- /dev/null +++ b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionOptions.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionOptions : INestedOptions + { + /// + /// The shipping fulfillment option. + /// + [JsonProperty("shipping")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping")] +#endif + public RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionShippingOptions Shipping { get; set; } + + /// + /// The type of fulfillment option. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionShippingOptions.cs b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionShippingOptions.cs new file mode 100644 index 0000000000..7708cddd27 --- /dev/null +++ b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionShippingOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionFulfillmentDetailsSelectedFulfillmentOptionShippingOptions : INestedOptions + { + /// + /// The shipping option identifer. + /// + [JsonProperty("shipping_option")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shipping_option")] +#endif + public string ShippingOption { get; set; } + } +} diff --git a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionLineItemDetailOptions.cs b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionLineItemDetailOptions.cs new file mode 100644 index 0000000000..4cd236224a --- /dev/null +++ b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionLineItemDetailOptions.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionLineItemDetailOptions : INestedOptions + { + /// + /// The key of the line item. + /// + [JsonProperty("key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("key")] +#endif + public string Key { get; set; } + + /// + /// The quantity of the line item. + /// + [JsonProperty("quantity")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("quantity")] +#endif + public long? Quantity { get; set; } + + /// + /// The SKU ID of the line item. + /// + [JsonProperty("sku_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("sku_id")] +#endif + public string SkuId { get; set; } + } +} diff --git a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionPaymentMethodDataBillingDetailsOptions.cs b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionPaymentMethodDataBillingDetailsOptions.cs new file mode 100644 index 0000000000..4322256058 --- /dev/null +++ b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionPaymentMethodDataBillingDetailsOptions.cs @@ -0,0 +1,47 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionPaymentMethodDataBillingDetailsOptions : INestedOptions + { + /// + /// The address for the billing details. + /// + [JsonProperty("address")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("address")] +#endif + public AddressOptions Address { get; set; } + + /// + /// The email for the billing details. + /// + [JsonProperty("email")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("email")] +#endif + public string Email { get; set; } + + /// + /// The name for the billing details. + /// + [JsonProperty("name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("name")] +#endif + public string Name { get; set; } + + /// + /// The phone for the billing details. + /// + [JsonProperty("phone")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phone")] +#endif + public string Phone { get; set; } + } +} diff --git a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionPaymentMethodDataCardOptions.cs b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionPaymentMethodDataCardOptions.cs new file mode 100644 index 0000000000..7e57900ea7 --- /dev/null +++ b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionPaymentMethodDataCardOptions.cs @@ -0,0 +1,47 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionPaymentMethodDataCardOptions : INestedOptions + { + /// + /// The CVC of the card. + /// + [JsonProperty("cvc")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("cvc")] +#endif + public string Cvc { get; set; } + + /// + /// The expiration month of the card. + /// + [JsonProperty("exp_month")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_month")] +#endif + public long? ExpMonth { get; set; } + + /// + /// The expiration year of the card. + /// + [JsonProperty("exp_year")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("exp_year")] +#endif + public long? ExpYear { get; set; } + + /// + /// The number of the card. + /// + [JsonProperty("number")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("number")] +#endif + public string Number { get; set; } + } +} diff --git a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionPaymentMethodDataOptions.cs b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionPaymentMethodDataOptions.cs new file mode 100644 index 0000000000..e83f4c53de --- /dev/null +++ b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionPaymentMethodDataOptions.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionPaymentMethodDataOptions : INestedOptions + { + /// + /// The billing details for the payment method data. + /// + [JsonProperty("billing_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_details")] +#endif + public RequestedSessionPaymentMethodDataBillingDetailsOptions BillingDetails { get; set; } + + /// + /// The card for the payment method data. + /// + [JsonProperty("card")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("card")] +#endif + public RequestedSessionPaymentMethodDataCardOptions Card { get; set; } + + /// + /// The type of the payment method data. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionRiskDetailsClientDeviceMetadataDetailsOptions.cs b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionRiskDetailsClientDeviceMetadataDetailsOptions.cs new file mode 100644 index 0000000000..3a0ba03d67 --- /dev/null +++ b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionRiskDetailsClientDeviceMetadataDetailsOptions.cs @@ -0,0 +1,56 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionRiskDetailsClientDeviceMetadataDetailsOptions : INestedOptions + { + /// + /// The radar session. + /// + [JsonProperty("radar_session")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("radar_session")] +#endif + public string RadarSession { get; set; } + + /// + /// The referrer of the client device. + /// + [JsonProperty("referrer")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("referrer")] +#endif + public string Referrer { get; set; } + + /// + /// The remote IP address of the client device. + /// + [JsonProperty("remote_ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("remote_ip")] +#endif + public string RemoteIp { get; set; } + + /// + /// The time on page in seconds. + /// + [JsonProperty("time_on_page")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("time_on_page")] +#endif + public long? TimeOnPage { get; set; } + + /// + /// The user agent of the client device. + /// + [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif + public string UserAgent { get; set; } + } +} diff --git a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionRiskDetailsOptions.cs b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionRiskDetailsOptions.cs new file mode 100644 index 0000000000..253646c7c9 --- /dev/null +++ b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionRiskDetailsOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionRiskDetailsOptions : INestedOptions + { + /// + /// The client device metadata details for this requested session. + /// + [JsonProperty("client_device_metadata_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("client_device_metadata_details")] +#endif + public RequestedSessionRiskDetailsClientDeviceMetadataDetailsOptions ClientDeviceMetadataDetails { get; set; } + } +} diff --git a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionSellerDetailsOptions.cs b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionSellerDetailsOptions.cs new file mode 100644 index 0000000000..8eb24361f6 --- /dev/null +++ b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionSellerDetailsOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.DelegatedCheckout +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionSellerDetailsOptions : INestedOptions + { + /// + /// The network profile for the seller. + /// + [JsonProperty("network_profile")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("network_profile")] +#endif + public string NetworkProfile { get; set; } + } +} diff --git a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionUpdateOptions.cs b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionUpdateOptions.cs index 5656abeb9f..ec119b730c 100644 --- a/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionUpdateOptions.cs +++ b/src/Stripe.net/Services/DelegatedCheckout/RequestedSessions/RequestedSessionUpdateOptions.cs @@ -1,7 +1,66 @@ // File generated from our OpenAPI spec namespace Stripe.DelegatedCheckout { - public class RequestedSessionUpdateOptions : BaseOptions + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RequestedSessionUpdateOptions : BaseOptions, IHasMetadata { + /// + /// The details of the fulfillment. + /// + [JsonProperty("fulfillment_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fulfillment_details")] +#endif + public RequestedSessionFulfillmentDetailsOptions FulfillmentDetails { get; set; } + + /// + /// The details of the line items. + /// + [JsonProperty("line_item_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_item_details")] +#endif + public List LineItemDetails { get; set; } + + /// + /// The metadata for this requested session. + /// + [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif + public Dictionary Metadata { get; set; } + + /// + /// The payment method for this requested session. + /// + [JsonProperty("payment_method")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method")] +#endif + public string PaymentMethod { get; set; } + + /// + /// The payment method data for this requested session. + /// + [JsonProperty("payment_method_data")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_data")] +#endif + public RequestedSessionPaymentMethodDataOptions PaymentMethodData { get; set; } + + /// + /// The shared metadata for this requested session. + /// + [JsonProperty("shared_metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("shared_metadata")] +#endif + public Dictionary SharedMetadata { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreateEmailDeliveryOptions.cs b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreateEmailDeliveryOptions.cs index c01725d8a1..dc09055eab 100644 --- a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreateEmailDeliveryOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreateEmailDeliveryOptions.cs @@ -9,8 +9,8 @@ namespace Stripe.V2.Billing public class CollectionSettingCreateEmailDeliveryOptions : INestedOptions { /// - /// Controls emails for when the payment is due. For example after the invoice is finilized - /// and transition to Open state. + /// Controls emails for when the payment is due. For example after the invoice is finalized + /// and transitions to Open state. /// [JsonProperty("payment_due")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreateEmailDeliveryPaymentDueOptions.cs b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreateEmailDeliveryPaymentDueOptions.cs index b87ea8b7ce..ac924ee09c 100644 --- a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreateEmailDeliveryPaymentDueOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreateEmailDeliveryPaymentDueOptions.cs @@ -18,7 +18,7 @@ public class CollectionSettingCreateEmailDeliveryPaymentDueOptions : INestedOpti public bool? Enabled { get; set; } /// - /// If true the payment link to hosted invocie page would be included in email and PDF of + /// If true the payment link to hosted invoice page would be included in email and PDF of /// the invoice. /// [JsonProperty("include_payment_link")] diff --git a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdateEmailDeliveryOptions.cs b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdateEmailDeliveryOptions.cs index 125bfccfe9..3adf4c753f 100644 --- a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdateEmailDeliveryOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdateEmailDeliveryOptions.cs @@ -9,8 +9,8 @@ namespace Stripe.V2.Billing public class CollectionSettingUpdateEmailDeliveryOptions : INestedOptions { /// - /// Controls emails for when the payment is due. For example after the invoice is finilized - /// and transition to Open state. + /// Controls emails for when the payment is due. For example after the invoice is finalized + /// and transitions to Open state. /// [JsonProperty("payment_due")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdateEmailDeliveryPaymentDueOptions.cs b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdateEmailDeliveryPaymentDueOptions.cs index 67ef7114f6..1a4473046a 100644 --- a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdateEmailDeliveryPaymentDueOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdateEmailDeliveryPaymentDueOptions.cs @@ -18,7 +18,7 @@ public class CollectionSettingUpdateEmailDeliveryPaymentDueOptions : INestedOpti public bool? Enabled { get; set; } /// - /// If true the payment link to hosted invocie page would be included in email and PDF of + /// If true the payment link to hosted invoice page would be included in email and PDF of /// the invoice. /// [JsonProperty("include_payment_link")] diff --git a/src/Stripe.net/Services/V2/Billing/PricingPlanSubscriptions/Components/ComponentGetOptions.cs b/src/Stripe.net/Services/V2/Billing/PricingPlanSubscriptions/Components/ComponentGetOptions.cs new file mode 100644 index 0000000000..fb57169943 --- /dev/null +++ b/src/Stripe.net/Services/V2/Billing/PricingPlanSubscriptions/Components/ComponentGetOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Billing.PricingPlanSubscriptions +{ + public class ComponentGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/Billing/PricingPlanSubscriptions/Components/ComponentService.cs b/src/Stripe.net/Services/V2/Billing/PricingPlanSubscriptions/Components/ComponentService.cs new file mode 100644 index 0000000000..6c87c4f1b0 --- /dev/null +++ b/src/Stripe.net/Services/V2/Billing/PricingPlanSubscriptions/Components/ComponentService.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Billing.PricingPlanSubscriptions +{ + using System; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + public class ComponentService : Service + { + internal ComponentService(ApiRequestor requestor) + : base(requestor) + { + } + + internal ComponentService(IStripeClient client) + : base(client) + { + } + + /// + /// Retrieve a Pricing Plan Subscription's components. + /// + public virtual V2.Billing.PricingPlanSubscriptionComponents Get(string id, ComponentGetOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v2/billing/pricing_plan_subscriptions/{WebUtility.UrlEncode(id)}/components", options, requestOptions); + } + + /// + /// Retrieve a Pricing Plan Subscription's components. + /// + public virtual Task GetAsync(string id, ComponentGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v2/billing/pricing_plan_subscriptions/{WebUtility.UrlEncode(id)}/components", options, requestOptions, cancellationToken); + } + } +} diff --git a/src/Stripe.net/Services/V2/Billing/PricingPlanSubscriptions/PricingPlanSubscriptionService.cs b/src/Stripe.net/Services/V2/Billing/PricingPlanSubscriptions/PricingPlanSubscriptionService.cs index 390f83b469..d5d54daa34 100644 --- a/src/Stripe.net/Services/V2/Billing/PricingPlanSubscriptions/PricingPlanSubscriptionService.cs +++ b/src/Stripe.net/Services/V2/Billing/PricingPlanSubscriptions/PricingPlanSubscriptionService.cs @@ -10,6 +10,8 @@ namespace Stripe.V2.Billing public class PricingPlanSubscriptionService : Service { + private V2.Billing.PricingPlanSubscriptions.ComponentService components; + internal PricingPlanSubscriptionService(ApiRequestor requestor) : base(requestor) { @@ -20,6 +22,9 @@ internal PricingPlanSubscriptionService(IStripeClient client) { } + public virtual V2.Billing.PricingPlanSubscriptions.ComponentService Components => this.components ??= new V2.Billing.PricingPlanSubscriptions.ComponentService( + this.Requestor); + /// /// Retrieve a Pricing Plan Subscription object. /// diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCustomerAutomaticIndirectTaxOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCustomerAutomaticIndirectTaxOptions.cs index 8003fe2a9d..ced2458ef4 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCustomerAutomaticIndirectTaxOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationCustomerAutomaticIndirectTaxOptions.cs @@ -33,7 +33,8 @@ public class AccountCreateConfigurationCustomerAutomaticIndirectTaxOptions : INe /// The data source used to identify the customer's tax location - defaults to /// 'identity_address'. Will only be used for automatic tax calculation on the customer's /// Invoices and Subscriptions. - /// One of: identity_address, ip_address, or shipping_address. + /// One of: identity_address, ip_address, payment_method, or + /// shipping_address. /// [JsonProperty("location_source")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesOptions.cs index c08f0bbeba..74c8a2eafd 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesOptions.cs @@ -16,5 +16,14 @@ public class AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesOptions [STJS.JsonPropertyName("gbp")] #endif public AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions Gbp { get; set; } + + /// + /// Can hold storage-type funds on Stripe in USD. + /// + [JsonProperty("usd")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usd")] +#endif + public AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdOptions Usd { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdOptions.cs new file mode 100644 index 0000000000..0f4128e09e --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountCreateConfigurationStorerCapabilitiesHoldsCurrenciesUsdOptions : INestedOptions + { + /// + /// To request a new Capability for an account, pass true. There can be a delay before the + /// requested Capability becomes active. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateDefaultsResponsibilitiesOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateDefaultsResponsibilitiesOptions.cs index ac55a66c89..aa142110ac 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateDefaultsResponsibilitiesOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateDefaultsResponsibilitiesOptions.cs @@ -10,7 +10,8 @@ public class AccountCreateDefaultsResponsibilitiesOptions : INestedOptions { /// /// A value indicating the party responsible for collecting fees from this account. - /// One of: application, or stripe. + /// One of: application, application_custom, application_express, or + /// stripe. /// [JsonProperty("fees_collector")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityAttestationsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityAttestationsOptions.cs index 336316a764..e84a868e3a 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityAttestationsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityAttestationsOptions.cs @@ -37,6 +37,16 @@ public class AccountCreateIdentityAttestationsOptions : INestedOptions #endif public AccountCreateIdentityAttestationsPersonsProvidedOptions PersonsProvided { get; set; } + /// + /// This hash is used to attest that the representative is authorized to act as the + /// representative of their legal entity. + /// + [JsonProperty("representative_declaration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("representative_declaration")] +#endif + public AccountCreateIdentityAttestationsRepresentativeDeclarationOptions RepresentativeDeclaration { get; set; } + /// /// Attestations of accepted terms of service agreements. /// diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityAttestationsRepresentativeDeclarationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityAttestationsRepresentativeDeclarationOptions.cs new file mode 100644 index 0000000000..94891268db --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityAttestationsRepresentativeDeclarationOptions.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using System; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountCreateIdentityAttestationsRepresentativeDeclarationOptions : INestedOptions + { + /// + /// The time marking when the representative attestation was made. Represented as a RFC 3339 + /// date & time UTC value in millisecond precision, for example: + /// 2022-09-18T13:22:18.123Z. + /// + [JsonProperty("date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("date")] +#endif + public DateTime? Date { get; set; } + + /// + /// The IP address from which the representative attestation was made. + /// + [JsonProperty("ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip")] +#endif + public string Ip { get; set; } + + /// + /// The user agent of the browser from which the representative attestation was made. + /// + [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif + public string UserAgent { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityOptions.cs index 8d1377621b..1060c19280 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountCreateIdentityOptions.cs @@ -9,7 +9,8 @@ namespace Stripe.V2.Core public class AccountCreateIdentityOptions : INestedOptions { /// - /// Attestations from the identity's key people, e.g. owners, executives, directors. + /// Attestations from the identity's key people, e.g. owners, executives, directors, + /// representatives. /// [JsonProperty("attestations")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountListOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountListOptions.cs index a3ce131f43..6ca93567d6 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountListOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountListOptions.cs @@ -18,5 +18,15 @@ public class AccountListOptions : V2.ListOptions [STJS.JsonPropertyName("applied_configurations")] #endif public List AppliedConfigurations { get; set; } + + /// + /// Filter by whether the account is closed. If omitted, returns only Accounts that are not + /// closed. + /// + [JsonProperty("closed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("closed")] +#endif + public bool? Closed { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountService.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountService.cs index 5d2a4895b5..a3e06f358b 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountService.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountService.cs @@ -26,7 +26,9 @@ internal AccountService(IStripeClient client) this.Requestor); /// - /// Removes access to the Account and its associated resources. + /// Removes access to the Account and its associated resources. Closed Accounts can no + /// longer be operated on, but limited information can still be retrieved through the API in + /// order to be able to track their history. /// public virtual Account Close(string id, AccountCloseOptions options = null, RequestOptions requestOptions = null) { @@ -34,7 +36,9 @@ public virtual Account Close(string id, AccountCloseOptions options = null, Requ } /// - /// Removes access to the Account and its associated resources. + /// Removes access to the Account and its associated resources. Closed Accounts can no + /// longer be operated on, but limited information can still be retrieved through the API in + /// order to be able to track their history. /// public virtual Task CloseAsync(string id, AccountCloseOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCustomerAutomaticIndirectTaxOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCustomerAutomaticIndirectTaxOptions.cs index 7037521b51..d69c3a0f97 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCustomerAutomaticIndirectTaxOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationCustomerAutomaticIndirectTaxOptions.cs @@ -33,7 +33,8 @@ public class AccountUpdateConfigurationCustomerAutomaticIndirectTaxOptions : INe /// The data source used to identify the customer's tax location - defaults to /// 'identity_address'. Will only be used for automatic tax calculation on the customer's /// Invoices and Subscriptions. - /// One of: identity_address, ip_address, or shipping_address. + /// One of: identity_address, ip_address, payment_method, or + /// shipping_address. /// [JsonProperty("location_source")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesOptions.cs index 10f8f0ab87..e8570b91d5 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesOptions.cs @@ -16,5 +16,14 @@ public class AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesOptions [STJS.JsonPropertyName("gbp")] #endif public AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesGbpOptions Gbp { get; set; } + + /// + /// Can hold storage-type funds on Stripe in USD. + /// + [JsonProperty("usd")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("usd")] +#endif + public AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdOptions Usd { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdOptions.cs new file mode 100644 index 0000000000..53a9ccb98f --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountUpdateConfigurationStorerCapabilitiesHoldsCurrenciesUsdOptions : INestedOptions + { + /// + /// To request a new Capability for an account, pass true. There can be a delay before the + /// requested Capability becomes active. + /// + [JsonProperty("requested")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("requested")] +#endif + public bool? Requested { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateDefaultsResponsibilitiesOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateDefaultsResponsibilitiesOptions.cs index fbd121b71d..73b3b422c1 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateDefaultsResponsibilitiesOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateDefaultsResponsibilitiesOptions.cs @@ -10,7 +10,8 @@ public class AccountUpdateDefaultsResponsibilitiesOptions : INestedOptions { /// /// A value indicating the party responsible for collecting fees from this account. - /// One of: application, or stripe. + /// One of: application, application_custom, application_express, or + /// stripe. /// [JsonProperty("fees_collector")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityAttestationsOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityAttestationsOptions.cs index 0bcf540b0c..76c829ea34 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityAttestationsOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityAttestationsOptions.cs @@ -37,6 +37,16 @@ public class AccountUpdateIdentityAttestationsOptions : INestedOptions #endif public AccountUpdateIdentityAttestationsPersonsProvidedOptions PersonsProvided { get; set; } + /// + /// This hash is used to attest that the representative is authorized to act as the + /// representative of their legal entity. + /// + [JsonProperty("representative_declaration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("representative_declaration")] +#endif + public AccountUpdateIdentityAttestationsRepresentativeDeclarationOptions RepresentativeDeclaration { get; set; } + /// /// Attestations of accepted terms of service agreements. /// diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityAttestationsRepresentativeDeclarationOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityAttestationsRepresentativeDeclarationOptions.cs new file mode 100644 index 0000000000..d298fd331c --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityAttestationsRepresentativeDeclarationOptions.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using System; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountUpdateIdentityAttestationsRepresentativeDeclarationOptions : INestedOptions + { + /// + /// The time marking when the representative attestation was made. Represented as a RFC 3339 + /// date & time UTC value in millisecond precision, for example: + /// 2022-09-18T13:22:18.123Z. + /// + [JsonProperty("date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("date")] +#endif + public DateTime? Date { get; set; } + + /// + /// The IP address from which the representative attestation was made. + /// + [JsonProperty("ip")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("ip")] +#endif + public string Ip { get; set; } + + /// + /// The user agent of the browser from which the representative attestation was made. + /// + [JsonProperty("user_agent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("user_agent")] +#endif + public string UserAgent { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityOptions.cs b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityOptions.cs index 7fb192f5c9..8f9e419e1e 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/AccountUpdateIdentityOptions.cs @@ -9,7 +9,8 @@ namespace Stripe.V2.Core public class AccountUpdateIdentityOptions : INestedOptions { /// - /// Attestations from the identity's key people, e.g. owners, executives, directors. + /// Attestations from the identity's key people, e.g. owners, executives, directors, + /// representatives. /// [JsonProperty("attestations")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs b/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs index 49db479c1a..db38556e8c 100644 --- a/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs @@ -1,6 +1,8 @@ // File generated from our OpenAPI spec namespace Stripe.V2.Core { + using System; + using System.Collections.Generic; using Newtonsoft.Json; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; @@ -8,6 +10,42 @@ namespace Stripe.V2.Core public class EventListOptions : V2.ListOptions { + /// + /// Filter for events created after the specified timestamp. + /// + [JsonProperty("gt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gt")] +#endif + public DateTime? Gt { get; set; } + + /// + /// Filter for events created at or after the specified timestamp. + /// + [JsonProperty("gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gte")] +#endif + public DateTime? Gte { get; set; } + + /// + /// Filter for events created before the specified timestamp. + /// + [JsonProperty("lt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lt")] +#endif + public DateTime? Lt { get; set; } + + /// + /// Filter for events created at or before the specified timestamp. + /// + [JsonProperty("lte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lte")] +#endif + public DateTime? Lte { get; set; } + /// /// Primary object ID used to retrieve related events. /// @@ -16,5 +54,14 @@ public class EventListOptions : V2.ListOptions [STJS.JsonPropertyName("object_id")] #endif public string ObjectId { get; set; } + + /// + /// An array of up to 20 strings containing specific event names. + /// + [JsonProperty("types")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("types")] +#endif + public List Types { get; set; } } } diff --git a/src/Stripe.net/Services/V2/Core/Vault/GbBankAccounts/GbBankAccountListOptions.cs b/src/Stripe.net/Services/V2/Core/Vault/GbBankAccounts/GbBankAccountListOptions.cs new file mode 100644 index 0000000000..82052423fa --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Vault/GbBankAccounts/GbBankAccountListOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core.Vault +{ + public class GbBankAccountListOptions : V2.ListOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/Core/Vault/GbBankAccounts/GbBankAccountService.cs b/src/Stripe.net/Services/V2/Core/Vault/GbBankAccounts/GbBankAccountService.cs index 82fbd89d75..0fcd4b5137 100644 --- a/src/Stripe.net/Services/V2/Core/Vault/GbBankAccounts/GbBankAccountService.cs +++ b/src/Stripe.net/Services/V2/Core/Vault/GbBankAccounts/GbBankAccountService.cs @@ -2,6 +2,7 @@ namespace Stripe.V2.Core.Vault { using System; + using System.Collections.Generic; using System.Net; using System.Net.Http; using System.Threading; @@ -114,5 +115,41 @@ public virtual Task InitiateConfirmationOfPayeeAsync(string id, G { return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/core/vault/gb_bank_accounts/{WebUtility.UrlEncode(id)}/initiate_confirmation_of_payee", options, requestOptions, cancellationToken); } + + /// + /// List objects that can be used as destinations for outbound money movement via + /// OutboundPayment. + /// + public virtual V2.StripeList List(GbBankAccountListOptions options = null, RequestOptions requestOptions = null) + { + return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v2/core/vault/gb_bank_accounts", options, requestOptions); + } + + /// + /// List objects that can be used as destinations for outbound money movement via + /// OutboundPayment. + /// + public virtual Task> ListAsync(GbBankAccountListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v2/core/vault/gb_bank_accounts", options, requestOptions, cancellationToken); + } + + /// + /// List objects that can be used as destinations for outbound money movement via + /// OutboundPayment. + /// + public virtual IEnumerable ListAutoPaging(GbBankAccountListOptions options = null, RequestOptions requestOptions = null) + { + return this.ListRequestAutoPaging($"/v2/core/vault/gb_bank_accounts", options, requestOptions); + } + + /// + /// List objects that can be used as destinations for outbound money movement via + /// OutboundPayment. + /// + public virtual IAsyncEnumerable ListAutoPagingAsync(GbBankAccountListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.ListRequestAutoPagingAsync($"/v2/core/vault/gb_bank_accounts", options, requestOptions, cancellationToken); + } } } diff --git a/src/Stripe.net/Services/V2/Core/Vault/UsBankAccounts/UsBankAccountConfirmMicrodepositsOptions.cs b/src/Stripe.net/Services/V2/Core/Vault/UsBankAccounts/UsBankAccountConfirmMicrodepositsOptions.cs new file mode 100644 index 0000000000..85ad04784d --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Vault/UsBankAccounts/UsBankAccountConfirmMicrodepositsOptions.cs @@ -0,0 +1,32 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core.Vault +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class UsBankAccountConfirmMicrodepositsOptions : BaseOptions + { + /// + /// Two amounts received through Send Microdeposits must match the input to Confirm + /// Microdeposits to verify US Bank Account. + /// + [JsonProperty("amounts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amounts")] +#endif + public List Amounts { get; set; } + + /// + /// Descriptor code received through Send Microdeposits must match the input to Confirm + /// Microdeposits to verify US Bank Account. + /// + [JsonProperty("descriptor_code")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("descriptor_code")] +#endif + public string DescriptorCode { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Vault/UsBankAccounts/UsBankAccountListOptions.cs b/src/Stripe.net/Services/V2/Core/Vault/UsBankAccounts/UsBankAccountListOptions.cs new file mode 100644 index 0000000000..83e5c0e64e --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Vault/UsBankAccounts/UsBankAccountListOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core.Vault +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class UsBankAccountListOptions : V2.ListOptions + { + /// + /// Optionally filter by verification status. Mutually exclusive with unverified, + /// verified, awaiting_verification, and verification_failed. + /// + [JsonProperty("verification_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("verification_status")] +#endif + public string VerificationStatus { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Vault/UsBankAccounts/UsBankAccountSendMicrodepositsOptions.cs b/src/Stripe.net/Services/V2/Core/Vault/UsBankAccounts/UsBankAccountSendMicrodepositsOptions.cs new file mode 100644 index 0000000000..09cdc15c35 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Vault/UsBankAccounts/UsBankAccountSendMicrodepositsOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core.Vault +{ + public class UsBankAccountSendMicrodepositsOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/Core/Vault/UsBankAccounts/UsBankAccountService.cs b/src/Stripe.net/Services/V2/Core/Vault/UsBankAccounts/UsBankAccountService.cs index ac5d7b2a9a..5ac7966120 100644 --- a/src/Stripe.net/Services/V2/Core/Vault/UsBankAccounts/UsBankAccountService.cs +++ b/src/Stripe.net/Services/V2/Core/Vault/UsBankAccounts/UsBankAccountService.cs @@ -2,6 +2,7 @@ namespace Stripe.V2.Core.Vault { using System; + using System.Collections.Generic; using System.Net; using System.Net.Http; using System.Threading; @@ -39,6 +40,26 @@ public virtual Task ArchiveAsync(string id, UsBankAccountArchiveO return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/core/vault/us_bank_accounts/{WebUtility.UrlEncode(id)}/archive", options, requestOptions, cancellationToken); } + /// + /// Confirm microdeposits amounts or descriptor code that you have received from the Send + /// Microdeposits request. Once you correctly confirm this, this US Bank Account will be + /// verified and eligible to transfer funds with. + /// + public virtual UsBankAccount ConfirmMicrodeposits(string id, UsBankAccountConfirmMicrodepositsOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v2/core/vault/us_bank_accounts/{WebUtility.UrlEncode(id)}/confirm_microdeposits", options, requestOptions); + } + + /// + /// Confirm microdeposits amounts or descriptor code that you have received from the Send + /// Microdeposits request. Once you correctly confirm this, this US Bank Account will be + /// verified and eligible to transfer funds with. + /// + public virtual Task ConfirmMicrodepositsAsync(string id, UsBankAccountConfirmMicrodepositsOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/core/vault/us_bank_accounts/{WebUtility.UrlEncode(id)}/confirm_microdeposits", options, requestOptions, cancellationToken); + } + /// /// Create a USBankAccount object. /// @@ -71,6 +92,58 @@ public virtual Task GetAsync(string id, UsBankAccountGetOptions o return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v2/core/vault/us_bank_accounts/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); } + /// + /// List USBankAccount objects. Optionally filter by verification status. + /// + public virtual V2.StripeList List(UsBankAccountListOptions options = null, RequestOptions requestOptions = null) + { + return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v2/core/vault/us_bank_accounts", options, requestOptions); + } + + /// + /// List USBankAccount objects. Optionally filter by verification status. + /// + public virtual Task> ListAsync(UsBankAccountListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v2/core/vault/us_bank_accounts", options, requestOptions, cancellationToken); + } + + /// + /// List USBankAccount objects. Optionally filter by verification status. + /// + public virtual IEnumerable ListAutoPaging(UsBankAccountListOptions options = null, RequestOptions requestOptions = null) + { + return this.ListRequestAutoPaging($"/v2/core/vault/us_bank_accounts", options, requestOptions); + } + + /// + /// List USBankAccount objects. Optionally filter by verification status. + /// + public virtual IAsyncEnumerable ListAutoPagingAsync(UsBankAccountListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.ListRequestAutoPagingAsync($"/v2/core/vault/us_bank_accounts", options, requestOptions, cancellationToken); + } + + /// + /// Send microdeposits in order to verify your US Bank Account so it is eligible to transfer + /// funds. This will start the verification process and you must Confirm Microdeposits to + /// successfully verify your US Bank Account. + /// + public virtual UsBankAccount SendMicrodeposits(string id, UsBankAccountSendMicrodepositsOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v2/core/vault/us_bank_accounts/{WebUtility.UrlEncode(id)}/send_microdeposits", options, requestOptions); + } + + /// + /// Send microdeposits in order to verify your US Bank Account so it is eligible to transfer + /// funds. This will start the verification process and you must Confirm Microdeposits to + /// successfully verify your US Bank Account. + /// + public virtual Task SendMicrodepositsAsync(string id, UsBankAccountSendMicrodepositsOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/core/vault/us_bank_accounts/{WebUtility.UrlEncode(id)}/send_microdeposits", options, requestOptions, cancellationToken); + } + /// /// Update a USBankAccount object. This is limited to supplying a previously empty /// routing_number field. diff --git a/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountService.cs b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountService.cs index 231eaacb63..4bf9506fcb 100644 --- a/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountService.cs +++ b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountService.cs @@ -99,5 +99,21 @@ public virtual IAsyncEnumerable ListAutoPagingAsync(FinancialA { return this.ListRequestAutoPagingAsync($"/v2/money_management/financial_accounts", options, requestOptions, cancellationToken); } + + /// + /// Updates an existing FinancialAccount. + /// + public virtual FinancialAccount Update(string id, FinancialAccountUpdateOptions options, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v2/money_management/financial_accounts/{WebUtility.UrlEncode(id)}", options, requestOptions); + } + + /// + /// Updates an existing FinancialAccount. + /// + public virtual Task UpdateAsync(string id, FinancialAccountUpdateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/money_management/financial_accounts/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); + } } } diff --git a/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountUpdateOptions.cs b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountUpdateOptions.cs new file mode 100644 index 0000000000..72f1e9796c --- /dev/null +++ b/src/Stripe.net/Services/V2/MoneyManagement/FinancialAccounts/FinancialAccountUpdateOptions.cs @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.MoneyManagement +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class FinancialAccountUpdateOptions : BaseOptions, IHasMetadata + { + /// + /// A descriptive name for the FinancialAccount, up to 50 characters long. This name will be + /// used in the Stripe Dashboard and embedded components. + /// + [JsonProperty("display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("display_name")] +#endif + public string DisplayName { get; set; } + + /// + /// Metadata associated with the FinancialAccount. + /// + [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif + public Dictionary Metadata { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/TestHelpers/MoneyManagements/MoneyManagementRecipientVerificationsOptions.cs b/src/Stripe.net/Services/V2/TestHelpers/MoneyManagements/MoneyManagementRecipientVerificationsOptions.cs index fe9c3b0f9f..3925ba2900 100644 --- a/src/Stripe.net/Services/V2/TestHelpers/MoneyManagements/MoneyManagementRecipientVerificationsOptions.cs +++ b/src/Stripe.net/Services/V2/TestHelpers/MoneyManagements/MoneyManagementRecipientVerificationsOptions.cs @@ -10,7 +10,9 @@ public class MoneyManagementRecipientVerificationsOptions : BaseOptions { /// /// Expected match level of the RecipientVerification to be created: match, - /// close_match, no_match, unavailable. + /// close_match, no_match, unavailable. For close_match, the + /// simulated response appends "close_match" to the provided name in + /// match_result_details.matched_name. /// One of: close_match, match, no_match, or unavailable. /// [JsonProperty("match_result")] diff --git a/src/StripeTests/Services/GeneratedExamplesTest.cs b/src/StripeTests/Services/GeneratedExamplesTest.cs index 959de4b978..172794aef6 100644 --- a/src/StripeTests/Services/GeneratedExamplesTest.cs +++ b/src/StripeTests/Services/GeneratedExamplesTest.cs @@ -7456,6 +7456,23 @@ public void TestV2BillingPricingPlanSubscriptionPost() "/v2/billing/pricing_plan_subscriptions/id_123"); } + [Fact] + public void TestV2BillingPricingPlanSubscriptionsComponentGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/billing/pricing_plan_subscriptions/id_123/components", + (HttpStatusCode)200, + "{\"object\":\"v2.billing.pricing_plan_subscription_components\",\"components\":[{\"pricing_plan_component\":\"pricing_plan_component\",\"type\":\"license_fee_subscription\"}],\"livemode\":true}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Billing.PricingPlanSubscriptions.Components; + Stripe.V2.Billing.PricingPlanSubscriptionComponents pricingPlanSubscriptionComponents = service + .Get("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/billing/pricing_plan_subscriptions/id_123/components"); + } + [Fact] public void TestV2BillingProfileGet() { @@ -8113,20 +8130,11 @@ public void TestV2CoreEventGet() HttpMethod.Get, "/v2/core/events", (HttpStatusCode)200, - "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}", - "object_id=object_id"); - var options = new Stripe.V2.Core.EventListOptions - { - ObjectId = "object_id", - }; + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Events; - Stripe.V2.StripeList events = service.List( - options); - this.AssertRequest( - HttpMethod.Get, - "/v2/core/events", - "object_id=object_id"); + Stripe.V2.StripeList events = service.List(); + this.AssertRequest(HttpMethod.Get, "/v2/core/events"); } [Fact] @@ -8282,6 +8290,23 @@ public void TestV2CoreEventDestinationPost5() "/v2/core/event_destinations/id_123/ping"); } + [Fact] + public void TestV2CoreVaultGbBankAccountGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/vault/gb_bank_accounts", + (HttpStatusCode)200, + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true,\"sort_code\":\"sort_code\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Vault.GbBankAccounts; + Stripe.V2.StripeList gbBankAccounts = service + .List(); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/vault/gb_bank_accounts"); + } + [Fact] public void TestV2CoreVaultGbBankAccountPost() { @@ -8305,7 +8330,7 @@ public void TestV2CoreVaultGbBankAccountPost() } [Fact] - public void TestV2CoreVaultGbBankAccountGet() + public void TestV2CoreVaultGbBankAccountGet2() { this.StubRequest( HttpMethod.Get, @@ -8372,6 +8397,23 @@ public void TestV2CoreVaultGbBankAccountPost4() "/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee"); } + [Fact] + public void TestV2CoreVaultUsBankAccountGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/core/vault/us_bank_accounts", + (HttpStatusCode)200, + "{\"data\":[{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true,\"verification\":{\"status\":\"verification_failed\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.StripeList usBankAccounts = service + .List(); + this.AssertRequest( + HttpMethod.Get, + "/v2/core/vault/us_bank_accounts"); + } + [Fact] public void TestV2CoreVaultUsBankAccountPost() { @@ -8379,7 +8421,7 @@ public void TestV2CoreVaultUsBankAccountPost() HttpMethod.Post, "/v2/core/vault/us_bank_accounts", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true,\"verification\":{\"status\":\"verification_failed\"}}"); var options = new Stripe.V2.Core.Vault.UsBankAccountCreateOptions { AccountNumber = "account_number", @@ -8394,13 +8436,13 @@ public void TestV2CoreVaultUsBankAccountPost() } [Fact] - public void TestV2CoreVaultUsBankAccountGet() + public void TestV2CoreVaultUsBankAccountGet2() { this.StubRequest( HttpMethod.Get, "/v2/core/vault/us_bank_accounts/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true,\"verification\":{\"status\":\"verification_failed\"}}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.UsBankAccounts; Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Get( @@ -8417,7 +8459,7 @@ public void TestV2CoreVaultUsBankAccountPost2() HttpMethod.Post, "/v2/core/vault/us_bank_accounts/id_123", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true,\"verification\":{\"status\":\"verification_failed\"}}"); var options = new Stripe.V2.Core.Vault.UsBankAccountUpdateOptions(); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.UsBankAccounts; @@ -8436,7 +8478,7 @@ public void TestV2CoreVaultUsBankAccountPost3() HttpMethod.Post, "/v2/core/vault/us_bank_accounts/id_123/archive", (HttpStatusCode)200, - "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true,\"verification\":{\"status\":\"verification_failed\"}}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.UsBankAccounts; Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service.Archive( @@ -8446,6 +8488,40 @@ public void TestV2CoreVaultUsBankAccountPost3() "/v2/core/vault/us_bank_accounts/id_123/archive"); } + [Fact] + public void TestV2CoreVaultUsBankAccountPost4() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + (HttpStatusCode)200, + "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true,\"verification\":{\"status\":\"verification_failed\"}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service + .ConfirmMicrodeposits("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits"); + } + + [Fact] + public void TestV2CoreVaultUsBankAccountPost5() + { + this.StubRequest( + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts/id_123/send_microdeposits", + (HttpStatusCode)200, + "{\"id\":\"obj_123\",\"object\":\"v2.core.vault.us_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"created\":\"1970-01-12T21:42:34.472Z\",\"last4\":\"last4\",\"livemode\":true,\"verification\":{\"status\":\"verification_failed\"}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Core.Vault.UsBankAccounts; + Stripe.V2.Core.Vault.UsBankAccount usBankAccount = service + .SendMicrodeposits("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/core/vault/us_bank_accounts/id_123/send_microdeposits"); + } + [Fact] public void TestV2MoneyManagementAdjustmentGet() { @@ -8537,6 +8613,24 @@ public void TestV2MoneyManagementFinancialAccountGet2() [Fact] public void TestV2MoneyManagementFinancialAccountPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/money_management/financial_accounts/id_123", + (HttpStatusCode)200, + "{\"id\":\"obj_123\",\"object\":\"v2.money_management.financial_account\",\"balance\":{\"available\":{\"key\":{\"currency\":\"USD\",\"value\":35}},\"inbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":11}},\"outbound_pending\":{\"key\":{\"currency\":\"USD\",\"value\":60}}},\"country\":\"country\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"status\":\"closed\",\"type\":\"other\"}"); + var options = new Stripe.V2.MoneyManagement.FinancialAccountUpdateOptions(); + var client = new StripeClient(this.Requestor); + var service = client.V2.MoneyManagement.FinancialAccounts; + Stripe.V2.MoneyManagement.FinancialAccount financialAccount = service + .Update("id_123", options); + this.AssertRequest( + HttpMethod.Post, + "/v2/money_management/financial_accounts/id_123"); + } + + [Fact] + public void TestV2MoneyManagementFinancialAccountPost3() { this.StubRequest( HttpMethod.Post, @@ -9613,7 +9707,7 @@ public void TestFeatureNotEnabledError() HttpMethod.Post, "/v2/money_management/financial_accounts", (HttpStatusCode)400, - "{\"error\":{\"type\":\"feature_not_enabled\",\"code\":\"recipient_feature_not_active\"}}"); + "{\"error\":{\"type\":\"feature_not_enabled\",\"code\":\"outbound_flow_from_closed_financial_account_unsupported\"}}"); var exception = Assert.Throws( () => {