From 4b96cc48d6a1dc3bbc5abbffb3d85fca9c5db20d Mon Sep 17 00:00:00 2001
From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Date: Mon, 4 Dec 2023 15:54:18 +0000
Subject: [PATCH] Update generated code for v694
---
OPENAPI_VERSION | 2 +-
.../Entities/PaymentLinks/PaymentLink.cs | 13 +++++++++++
.../PaymentLinks/PaymentLinkRestrictions.cs | 11 ++++++++++
...aymentLinkRestrictionsCompletedSessions.cs | 22 +++++++++++++++++++
.../PaymentLinks/PaymentLinkCreateOptions.cs | 13 +++++++++++
...inkRestrictionsCompletedSessionsOptions.cs | 15 +++++++++++++
.../PaymentLinkRestrictionsOptions.cs | 14 ++++++++++++
.../PaymentLinks/PaymentLinkUpdateOptions.cs | 13 +++++++++++
8 files changed, 102 insertions(+), 1 deletion(-)
create mode 100644 src/Stripe.net/Entities/PaymentLinks/PaymentLinkRestrictions.cs
create mode 100644 src/Stripe.net/Entities/PaymentLinks/PaymentLinkRestrictionsCompletedSessions.cs
create mode 100644 src/Stripe.net/Services/PaymentLinks/PaymentLinkRestrictionsCompletedSessionsOptions.cs
create mode 100644 src/Stripe.net/Services/PaymentLinks/PaymentLinkRestrictionsOptions.cs
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index eea48661aa..181e032acd 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v692
\ No newline at end of file
+v694
\ No newline at end of file
diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLink.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLink.cs
index 548b807187..e6e38ec78e 100644
--- a/src/Stripe.net/Entities/PaymentLinks/PaymentLink.cs
+++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLink.cs
@@ -133,6 +133,13 @@ public Application Application
[JsonProperty("customer_creation")]
public string CustomerCreation { get; set; }
+ ///
+ /// The custom message to be displayed to a customer when a payment link is no longer
+ /// active.
+ ///
+ [JsonProperty("inactive_message")]
+ public string InactiveMessage { get; set; }
+
///
/// Configuration for creating invoice for payment mode payment links.
///
@@ -226,6 +233,12 @@ public Account OnBehalfOf
[JsonProperty("phone_number_collection")]
public PaymentLinkPhoneNumberCollection PhoneNumberCollection { get; set; }
+ ///
+ /// Settings that restrict the usage of a payment link.
+ ///
+ [JsonProperty("restrictions")]
+ public PaymentLinkRestrictions Restrictions { get; set; }
+
///
/// Configuration for collecting the customer's shipping address.
///
diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkRestrictions.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkRestrictions.cs
new file mode 100644
index 0000000000..f566e8589a
--- /dev/null
+++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkRestrictions.cs
@@ -0,0 +1,11 @@
+// File generated from our OpenAPI spec
+namespace Stripe
+{
+ using Newtonsoft.Json;
+
+ public class PaymentLinkRestrictions : StripeEntity
+ {
+ [JsonProperty("completed_sessions")]
+ public PaymentLinkRestrictionsCompletedSessions CompletedSessions { get; set; }
+ }
+}
diff --git a/src/Stripe.net/Entities/PaymentLinks/PaymentLinkRestrictionsCompletedSessions.cs b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkRestrictionsCompletedSessions.cs
new file mode 100644
index 0000000000..3d72af2d7e
--- /dev/null
+++ b/src/Stripe.net/Entities/PaymentLinks/PaymentLinkRestrictionsCompletedSessions.cs
@@ -0,0 +1,22 @@
+// File generated from our OpenAPI spec
+namespace Stripe
+{
+ using Newtonsoft.Json;
+
+ public class PaymentLinkRestrictionsCompletedSessions : StripeEntity
+ {
+ ///
+ /// The current number of checkout sessions that have been completed on the payment link
+ /// which count towards the completed_sessions restriction to be met.
+ ///
+ [JsonProperty("count")]
+ public long Count { get; set; }
+
+ ///
+ /// The maximum number of checkout sessions that can be completed for the
+ /// completed_sessions restriction to be met.
+ ///
+ [JsonProperty("limit")]
+ public long Limit { get; set; }
+ }
+}
diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCreateOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCreateOptions.cs
index 076808b1cd..13667744f5 100644
--- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkCreateOptions.cs
+++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkCreateOptions.cs
@@ -84,6 +84,13 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata
[JsonProperty("customer_creation")]
public string CustomerCreation { get; set; }
+ ///
+ /// The custom message to be displayed to a customer when a payment link is no longer
+ /// active.
+ ///
+ [JsonProperty("inactive_message")]
+ public string InactiveMessage { get; set; }
+
///
/// Generate a post-purchase Invoice for one-time payments.
///
@@ -162,6 +169,12 @@ public class PaymentLinkCreateOptions : BaseOptions, IHasMetadata
[JsonProperty("phone_number_collection")]
public PaymentLinkPhoneNumberCollectionOptions PhoneNumberCollection { get; set; }
+ ///
+ /// Settings that restrict the usage of a payment link.
+ ///
+ [JsonProperty("restrictions")]
+ public PaymentLinkRestrictionsOptions Restrictions { get; set; }
+
///
/// Configuration for collecting the customer's shipping address.
///
diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkRestrictionsCompletedSessionsOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkRestrictionsCompletedSessionsOptions.cs
new file mode 100644
index 0000000000..64943d2683
--- /dev/null
+++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkRestrictionsCompletedSessionsOptions.cs
@@ -0,0 +1,15 @@
+// File generated from our OpenAPI spec
+namespace Stripe
+{
+ using Newtonsoft.Json;
+
+ public class PaymentLinkRestrictionsCompletedSessionsOptions : INestedOptions
+ {
+ ///
+ /// The maximum number of checkout sessions that can be completed for the
+ /// completed_sessions restriction to be met.
+ ///
+ [JsonProperty("limit")]
+ public long? Limit { get; set; }
+ }
+}
diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkRestrictionsOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkRestrictionsOptions.cs
new file mode 100644
index 0000000000..598ea49b60
--- /dev/null
+++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkRestrictionsOptions.cs
@@ -0,0 +1,14 @@
+// File generated from our OpenAPI spec
+namespace Stripe
+{
+ using Newtonsoft.Json;
+
+ public class PaymentLinkRestrictionsOptions : INestedOptions
+ {
+ ///
+ /// Configuration for the completed_sessions restriction type.
+ ///
+ [JsonProperty("completed_sessions")]
+ public PaymentLinkRestrictionsCompletedSessionsOptions CompletedSessions { get; set; }
+ }
+}
diff --git a/src/Stripe.net/Services/PaymentLinks/PaymentLinkUpdateOptions.cs b/src/Stripe.net/Services/PaymentLinks/PaymentLinkUpdateOptions.cs
index dee5a9f723..11a65f8bb6 100644
--- a/src/Stripe.net/Services/PaymentLinks/PaymentLinkUpdateOptions.cs
+++ b/src/Stripe.net/Services/PaymentLinks/PaymentLinkUpdateOptions.cs
@@ -60,6 +60,13 @@ public class PaymentLinkUpdateOptions : BaseOptions, IHasMetadata
[JsonProperty("customer_creation")]
public string CustomerCreation { get; set; }
+ ///
+ /// The custom message to be displayed to a customer when a payment link is no longer
+ /// active.
+ ///
+ [JsonProperty("inactive_message")]
+ public string InactiveMessage { get; set; }
+
///
/// Generate a post-purchase Invoice for one-time payments.
///
@@ -123,6 +130,12 @@ public class PaymentLinkUpdateOptions : BaseOptions, IHasMetadata
[JsonProperty("payment_method_types")]
public List PaymentMethodTypes { get; set; }
+ ///
+ /// Settings that restrict the usage of a payment link.
+ ///
+ [JsonProperty("restrictions")]
+ public PaymentLinkRestrictionsOptions Restrictions { get; set; }
+
///
/// Configuration for collecting the customer's shipping address.
///