stripe/resources/generated/
payment_link.rs

1// ======================================
2// This file was automatically generated.
3// ======================================
4
5use crate::client::{Client, Response};
6use crate::ids::PaymentLinkId;
7use crate::params::{Expand, Expandable, List, Metadata, Object, Paginable};
8use crate::resources::{
9    Account, Application, CheckoutSessionItem, ConnectAccountReference, Currency,
10    InvoiceSettingRenderingOptions, ShippingRate, SubscriptionsTrialsResourceTrialSettings, TaxId,
11};
12use serde::{Deserialize, Serialize};
13
14/// The resource representing a Stripe "PaymentLink".
15///
16/// For more details see <https://stripe.com/docs/api/payment-link/object>
17#[derive(Clone, Debug, Default, Deserialize, Serialize)]
18pub struct PaymentLink {
19    /// Unique identifier for the object.
20    pub id: PaymentLinkId,
21
22    /// Whether the payment link's `url` is active.
23    ///
24    /// If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated.
25    pub active: bool,
26
27    pub after_completion: PaymentLinksResourceAfterCompletion,
28
29    /// Whether user redeemable promotion codes are enabled.
30    pub allow_promotion_codes: bool,
31
32    /// The ID of the Connect application that created the Payment Link.
33    pub application: Option<Expandable<Application>>,
34
35    /// The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.
36    pub application_fee_amount: Option<i64>,
37
38    /// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account.
39    pub application_fee_percent: Option<f64>,
40
41    pub automatic_tax: PaymentLinksResourceAutomaticTax,
42
43    /// Configuration for collecting the customer's billing address.
44    pub billing_address_collection: PaymentLinkBillingAddressCollection,
45
46    /// When set, provides configuration to gather active consent from customers.
47    pub consent_collection: Option<PaymentLinksResourceConsentCollection>,
48
49    /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
50    ///
51    /// Must be a [supported currency](https://stripe.com/docs/currencies).
52    pub currency: Currency,
53
54    /// Collect additional information from your customer using custom fields.
55    ///
56    /// Up to 3 fields are supported.
57    pub custom_fields: Vec<PaymentLinksResourceCustomFields>,
58
59    pub custom_text: PaymentLinksResourceCustomText,
60
61    /// Configuration for Customer creation during checkout.
62    pub customer_creation: PaymentLinkCustomerCreation,
63
64    /// The custom message to be displayed to a customer when a payment link is no longer active.
65    pub inactive_message: Option<String>,
66
67    /// Configuration for creating invoice for payment mode payment links.
68    pub invoice_creation: Option<PaymentLinksResourceInvoiceCreation>,
69
70    /// The line items representing what is being sold.
71    #[serde(skip_serializing_if = "Option::is_none")]
72    pub line_items: Option<List<CheckoutSessionItem>>,
73
74    /// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
75    pub livemode: bool,
76
77    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
78    ///
79    /// This can be useful for storing additional information about the object in a structured format.
80    pub metadata: Metadata,
81
82    /// The account on behalf of which to charge.
83    ///
84    /// See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details.
85    pub on_behalf_of: Option<Expandable<Account>>,
86
87    /// Indicates the parameters to be passed to PaymentIntent creation during checkout.
88    pub payment_intent_data: Option<PaymentLinksResourcePaymentIntentData>,
89
90    /// Configuration for collecting a payment method during checkout.
91    pub payment_method_collection: PaymentLinkPaymentMethodCollection,
92
93    /// The list of payment method types that customers can use.
94    ///
95    /// When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
96    pub payment_method_types: Option<Vec<PaymentLinkPaymentMethodTypes>>,
97
98    pub phone_number_collection: PaymentLinksResourcePhoneNumberCollection,
99
100    /// Settings that restrict the usage of a payment link.
101    pub restrictions: Option<PaymentLinksResourceRestrictions>,
102
103    /// Configuration for collecting the customer's shipping address.
104    pub shipping_address_collection: Option<PaymentLinksResourceShippingAddressCollection>,
105
106    /// The shipping rate options applied to the session.
107    pub shipping_options: Vec<PaymentLinksResourceShippingOption>,
108
109    /// Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button.
110    pub submit_type: PaymentLinkSubmitType,
111
112    /// When creating a subscription, the specified configuration data will be used.
113    ///
114    /// There must be at least one line item with a recurring price to use `subscription_data`.
115    pub subscription_data: Option<PaymentLinksResourceSubscriptionData>,
116
117    pub tax_id_collection: PaymentLinksResourceTaxIdCollection,
118
119    /// The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
120    pub transfer_data: Option<PaymentLinksResourceTransferData>,
121
122    /// The public URL that can be shared with customers.
123    pub url: String,
124}
125
126impl PaymentLink {
127    /// Returns a list of your payment links.
128    pub fn list(client: &Client, params: &ListPaymentLinks<'_>) -> Response<List<PaymentLink>> {
129        client.get_query("/payment_links", params)
130    }
131
132    /// Creates a payment link.
133    pub fn create(client: &Client, params: CreatePaymentLink<'_>) -> Response<PaymentLink> {
134        #[allow(clippy::needless_borrows_for_generic_args)]
135        client.post_form("/payment_links", &params)
136    }
137
138    /// Retrieve a payment link.
139    pub fn retrieve(client: &Client, id: &PaymentLinkId, expand: &[&str]) -> Response<PaymentLink> {
140        client.get_query(&format!("/payment_links/{}", id), Expand { expand })
141    }
142
143    /// Updates a payment link.
144    pub fn update(
145        client: &Client,
146        id: &PaymentLinkId,
147        params: UpdatePaymentLink<'_>,
148    ) -> Response<PaymentLink> {
149        #[allow(clippy::needless_borrows_for_generic_args)]
150        client.post_form(&format!("/payment_links/{}", id), &params)
151    }
152}
153
154impl Object for PaymentLink {
155    type Id = PaymentLinkId;
156    fn id(&self) -> Self::Id {
157        self.id.clone()
158    }
159    fn object(&self) -> &'static str {
160        "payment_link"
161    }
162}
163
164#[derive(Clone, Debug, Default, Deserialize, Serialize)]
165pub struct PaymentLinksResourceAfterCompletion {
166    #[serde(skip_serializing_if = "Option::is_none")]
167    pub hosted_confirmation: Option<PaymentLinksResourceCompletionBehaviorConfirmationPage>,
168
169    #[serde(skip_serializing_if = "Option::is_none")]
170    pub redirect: Option<PaymentLinksResourceCompletionBehaviorRedirect>,
171
172    /// The specified behavior after the purchase is complete.
173    #[serde(rename = "type")]
174    pub type_: PaymentLinksResourceAfterCompletionType,
175}
176
177#[derive(Clone, Debug, Default, Deserialize, Serialize)]
178pub struct PaymentLinksResourceAutomaticTax {
179    /// If `true`, tax will be calculated automatically using the customer's location.
180    pub enabled: bool,
181
182    /// The account that's liable for tax.
183    ///
184    /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account.
185    /// The tax transaction is returned in the report of the connected account.
186    pub liability: Option<ConnectAccountReference>,
187}
188
189#[derive(Clone, Debug, Default, Deserialize, Serialize)]
190pub struct PaymentLinksResourceCompletionBehaviorConfirmationPage {
191    /// The custom message that is displayed to the customer after the purchase is complete.
192    pub custom_message: Option<String>,
193}
194
195#[derive(Clone, Debug, Default, Deserialize, Serialize)]
196pub struct PaymentLinksResourceCompletionBehaviorRedirect {
197    /// The URL the customer will be redirected to after the purchase is complete.
198    pub url: String,
199}
200
201#[derive(Clone, Debug, Default, Deserialize, Serialize)]
202pub struct PaymentLinksResourceConsentCollection {
203    /// Settings related to the payment method reuse text shown in the Checkout UI.
204    pub payment_method_reuse_agreement: Option<PaymentLinksResourcePaymentMethodReuseAgreement>,
205
206    /// If set to `auto`, enables the collection of customer consent for promotional communications.
207    pub promotions: Option<PaymentLinksResourceConsentCollectionPromotions>,
208
209    /// If set to `required`, it requires cutomers to accept the terms of service before being able to pay.
210    ///
211    /// If set to `none`, customers won't be shown a checkbox to accept the terms of service.
212    pub terms_of_service: Option<PaymentLinksResourceConsentCollectionTermsOfService>,
213}
214
215#[derive(Clone, Debug, Default, Deserialize, Serialize)]
216pub struct PaymentLinksResourceCustomFields {
217    #[serde(skip_serializing_if = "Option::is_none")]
218    pub dropdown: Option<PaymentLinksResourceCustomFieldsDropdown>,
219
220    /// String of your choice that your integration can use to reconcile this field.
221    ///
222    /// Must be unique to this field, alphanumeric, and up to 200 characters.
223    pub key: String,
224
225    pub label: PaymentLinksResourceCustomFieldsLabel,
226
227    #[serde(skip_serializing_if = "Option::is_none")]
228    pub numeric: Option<PaymentLinksResourceCustomFieldsNumeric>,
229
230    /// Whether the customer is required to complete the field before completing the Checkout Session.
231    ///
232    /// Defaults to `false`.
233    pub optional: bool,
234
235    #[serde(skip_serializing_if = "Option::is_none")]
236    pub text: Option<PaymentLinksResourceCustomFieldsText>,
237
238    /// The type of the field.
239    #[serde(rename = "type")]
240    pub type_: PaymentLinksResourceCustomFieldsType,
241}
242
243#[derive(Clone, Debug, Default, Deserialize, Serialize)]
244pub struct PaymentLinksResourceCustomFieldsDropdown {
245    /// The options available for the customer to select.
246    ///
247    /// Up to 200 options allowed.
248    pub options: Vec<PaymentLinksResourceCustomFieldsDropdownOption>,
249}
250
251#[derive(Clone, Debug, Default, Deserialize, Serialize)]
252pub struct PaymentLinksResourceCustomFieldsDropdownOption {
253    /// The label for the option, displayed to the customer.
254    ///
255    /// Up to 100 characters.
256    pub label: String,
257
258    /// The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer.
259    ///
260    /// Must be unique to this option, alphanumeric, and up to 100 characters.
261    pub value: String,
262}
263
264#[derive(Clone, Debug, Default, Deserialize, Serialize)]
265pub struct PaymentLinksResourceCustomFieldsLabel {
266    /// Custom text for the label, displayed to the customer.
267    ///
268    /// Up to 50 characters.
269    pub custom: Option<String>,
270
271    /// The type of the label.
272    #[serde(rename = "type")]
273    pub type_: PaymentLinksResourceCustomFieldsLabelType,
274}
275
276#[derive(Clone, Debug, Default, Deserialize, Serialize)]
277pub struct PaymentLinksResourceCustomFieldsNumeric {
278    /// The maximum character length constraint for the customer's input.
279    pub maximum_length: Option<i64>,
280
281    /// The minimum character length requirement for the customer's input.
282    pub minimum_length: Option<i64>,
283}
284
285#[derive(Clone, Debug, Default, Deserialize, Serialize)]
286pub struct PaymentLinksResourceCustomFieldsText {
287    /// The maximum character length constraint for the customer's input.
288    pub maximum_length: Option<i64>,
289
290    /// The minimum character length requirement for the customer's input.
291    pub minimum_length: Option<i64>,
292}
293
294#[derive(Clone, Debug, Default, Deserialize, Serialize)]
295pub struct PaymentLinksResourceCustomText {
296    /// Custom text that should be displayed after the payment confirmation button.
297    pub after_submit: Option<PaymentLinksResourceCustomTextPosition>,
298
299    /// Custom text that should be displayed alongside shipping address collection.
300    pub shipping_address: Option<PaymentLinksResourceCustomTextPosition>,
301
302    /// Custom text that should be displayed alongside the payment confirmation button.
303    pub submit: Option<PaymentLinksResourceCustomTextPosition>,
304
305    /// Custom text that should be displayed in place of the default terms of service agreement text.
306    pub terms_of_service_acceptance: Option<PaymentLinksResourceCustomTextPosition>,
307}
308
309#[derive(Clone, Debug, Default, Deserialize, Serialize)]
310pub struct PaymentLinksResourceCustomTextPosition {
311    /// Text may be up to 1200 characters in length.
312    pub message: String,
313}
314
315#[derive(Clone, Debug, Default, Deserialize, Serialize)]
316pub struct PaymentLinksResourceInvoiceCreation {
317    /// Enable creating an invoice on successful payment.
318    pub enabled: bool,
319
320    /// Configuration for the invoice.
321    ///
322    /// Default invoice values will be used if unspecified.
323    pub invoice_data: Option<PaymentLinksResourceInvoiceSettings>,
324}
325
326#[derive(Clone, Debug, Default, Deserialize, Serialize)]
327pub struct PaymentLinksResourceInvoiceSettings {
328    /// The account tax IDs associated with the invoice.
329    pub account_tax_ids: Option<Vec<Expandable<TaxId>>>,
330
331    /// A list of up to 4 custom fields to be displayed on the invoice.
332    pub custom_fields: Option<Vec<InvoiceSettingCustomField>>,
333
334    /// An arbitrary string attached to the object.
335    ///
336    /// Often useful for displaying to users.
337    pub description: Option<String>,
338
339    /// Footer to be displayed on the invoice.
340    pub footer: Option<String>,
341
342    /// The connected account that issues the invoice.
343    ///
344    /// The invoice is presented with the branding and support information of the specified account.
345    pub issuer: Option<ConnectAccountReference>,
346
347    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
348    ///
349    /// This can be useful for storing additional information about the object in a structured format.
350    pub metadata: Option<Metadata>,
351
352    /// Options for invoice PDF rendering.
353    pub rendering_options: Option<InvoiceSettingRenderingOptions>,
354}
355
356#[derive(Clone, Debug, Default, Deserialize, Serialize)]
357pub struct InvoiceSettingCustomField {
358    /// The name of the custom field.
359    pub name: String,
360
361    /// The value of the custom field.
362    pub value: String,
363}
364
365#[derive(Clone, Debug, Default, Deserialize, Serialize)]
366pub struct PaymentLinksResourcePaymentIntentData {
367    /// Indicates when the funds will be captured from the customer's account.
368    pub capture_method: Option<PaymentLinksResourcePaymentIntentDataCaptureMethod>,
369
370    /// An arbitrary string attached to the object.
371    ///
372    /// Often useful for displaying to users.
373    pub description: Option<String>,
374
375    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link.
376    pub metadata: Metadata,
377
378    /// Indicates that you intend to make future payments with the payment method collected during checkout.
379    pub setup_future_usage: Option<PaymentLinksResourcePaymentIntentDataSetupFutureUsage>,
380
381    /// Extra information about the payment.
382    ///
383    /// This will appear on your customer's statement when this payment succeeds in creating a charge.
384    pub statement_descriptor: Option<String>,
385
386    /// Provides information about the charge that customers see on their statements.
387    ///
388    /// Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor.
389    /// Maximum 22 characters for the concatenated descriptor.
390    pub statement_descriptor_suffix: Option<String>,
391
392    /// A string that identifies the resulting payment as part of a group.
393    ///
394    /// See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details.
395    pub transfer_group: Option<String>,
396}
397
398#[derive(Clone, Debug, Default, Deserialize, Serialize)]
399pub struct PaymentLinksResourcePaymentMethodReuseAgreement {
400    /// Determines the position and visibility of the payment method reuse agreement in the UI.
401    ///
402    /// When set to `auto`, Stripe's defaults will be used.  When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
403    pub position: PaymentLinksResourcePaymentMethodReuseAgreementPosition,
404}
405
406#[derive(Clone, Debug, Default, Deserialize, Serialize)]
407pub struct PaymentLinksResourcePhoneNumberCollection {
408    /// If `true`, a phone number will be collected during checkout.
409    pub enabled: bool,
410}
411
412#[derive(Clone, Debug, Default, Deserialize, Serialize)]
413pub struct PaymentLinksResourceRestrictions {
414    pub completed_sessions: PaymentLinksResourceCompletedSessions,
415}
416
417#[derive(Clone, Debug, Default, Deserialize, Serialize)]
418pub struct PaymentLinksResourceCompletedSessions {
419    /// The current number of checkout sessions that have been completed on the payment link which count towards the `completed_sessions` restriction to be met.
420    pub count: u64,
421
422    /// The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.
423    pub limit: i64,
424}
425
426#[derive(Clone, Debug, Default, Deserialize, Serialize)]
427pub struct PaymentLinksResourceShippingAddressCollection {
428    /// An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations.
429    ///
430    /// Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.
431    pub allowed_countries: Vec<PaymentLinksResourceShippingAddressCollectionAllowedCountries>,
432}
433
434#[derive(Clone, Debug, Default, Deserialize, Serialize)]
435pub struct PaymentLinksResourceShippingOption {
436    /// A non-negative integer in cents representing how much to charge.
437    pub shipping_amount: i64,
438
439    /// The ID of the Shipping Rate to use for this shipping option.
440    pub shipping_rate: Expandable<ShippingRate>,
441}
442
443#[derive(Clone, Debug, Default, Deserialize, Serialize)]
444pub struct PaymentLinksResourceSubscriptionData {
445    /// The subscription's description, meant to be displayable to the customer.
446    ///
447    /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
448    pub description: Option<String>,
449
450    pub invoice_settings: PaymentLinksResourceSubscriptionDataInvoiceSettings,
451
452    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link.
453    pub metadata: Metadata,
454
455    /// Integer representing the number of trial period days before the customer is charged for the first time.
456    pub trial_period_days: Option<u32>,
457
458    /// Settings related to subscription trials.
459    pub trial_settings: Option<SubscriptionsTrialsResourceTrialSettings>,
460}
461
462#[derive(Clone, Debug, Default, Deserialize, Serialize)]
463pub struct PaymentLinksResourceSubscriptionDataInvoiceSettings {
464    pub issuer: ConnectAccountReference,
465}
466
467#[derive(Clone, Debug, Default, Deserialize, Serialize)]
468pub struct PaymentLinksResourceTaxIdCollection {
469    /// Indicates whether tax ID collection is enabled for the session.
470    pub enabled: bool,
471}
472
473#[derive(Clone, Debug, Default, Deserialize, Serialize)]
474pub struct PaymentLinksResourceTransferData {
475    /// The amount in cents (or local equivalent) that will be transferred to the destination account.
476    ///
477    /// By default, the entire amount is transferred to the destination.
478    pub amount: Option<i64>,
479
480    /// The connected account receiving the transfer.
481    pub destination: Expandable<Account>,
482}
483
484/// The parameters for `PaymentLink::create`.
485#[derive(Clone, Debug, Serialize)]
486pub struct CreatePaymentLink<'a> {
487    /// Behavior after the purchase is complete.
488    #[serde(skip_serializing_if = "Option::is_none")]
489    pub after_completion: Option<CreatePaymentLinkAfterCompletion>,
490
491    /// Enables user redeemable promotion codes.
492    #[serde(skip_serializing_if = "Option::is_none")]
493    pub allow_promotion_codes: Option<bool>,
494
495    /// The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account.
496    ///
497    /// Can only be applied when there are no line items with recurring prices.
498    #[serde(skip_serializing_if = "Option::is_none")]
499    pub application_fee_amount: Option<i64>,
500
501    /// A non-negative decimal between 0 and 100, with at most two decimal places.
502    ///
503    /// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account.
504    /// There must be at least 1 line item with a recurring price to use this field.
505    #[serde(skip_serializing_if = "Option::is_none")]
506    pub application_fee_percent: Option<f64>,
507
508    /// Configuration for automatic tax collection.
509    #[serde(skip_serializing_if = "Option::is_none")]
510    pub automatic_tax: Option<CreatePaymentLinkAutomaticTax>,
511
512    /// Configuration for collecting the customer's billing address.
513    #[serde(skip_serializing_if = "Option::is_none")]
514    pub billing_address_collection: Option<PaymentLinkBillingAddressCollection>,
515
516    /// Configure fields to gather active consent from customers.
517    #[serde(skip_serializing_if = "Option::is_none")]
518    pub consent_collection: Option<CreatePaymentLinkConsentCollection>,
519
520    /// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
521    ///
522    /// Must be a [supported currency](https://stripe.com/docs/currencies) and supported by each line item's price.
523    #[serde(skip_serializing_if = "Option::is_none")]
524    pub currency: Option<Currency>,
525
526    /// Collect additional information from your customer using custom fields.
527    ///
528    /// Up to 3 fields are supported.
529    #[serde(skip_serializing_if = "Option::is_none")]
530    pub custom_fields: Option<Vec<CreatePaymentLinkCustomFields>>,
531
532    /// Display additional text for your customers using custom text.
533    #[serde(skip_serializing_if = "Option::is_none")]
534    pub custom_text: Option<CreatePaymentLinkCustomText>,
535
536    /// Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers).
537    #[serde(skip_serializing_if = "Option::is_none")]
538    pub customer_creation: Option<PaymentLinkCustomerCreation>,
539
540    /// Specifies which fields in the response should be expanded.
541    #[serde(skip_serializing_if = "Expand::is_empty")]
542    pub expand: &'a [&'a str],
543
544    /// The custom message to be displayed to a customer when a payment link is no longer active.
545    #[serde(skip_serializing_if = "Option::is_none")]
546    pub inactive_message: Option<&'a str>,
547
548    /// Generate a post-purchase Invoice for one-time payments.
549    #[serde(skip_serializing_if = "Option::is_none")]
550    pub invoice_creation: Option<CreatePaymentLinkInvoiceCreation>,
551
552    /// The line items representing what is being sold.
553    ///
554    /// Each line item represents an item being sold.
555    /// Up to 20 line items are supported.
556    pub line_items: Vec<CreatePaymentLinkLineItems>,
557
558    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
559    ///
560    /// This can be useful for storing additional information about the object in a structured format.
561    /// Individual keys can be unset by posting an empty value to them.
562    /// All keys can be unset by posting an empty value to `metadata`.
563    /// Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
564    #[serde(skip_serializing_if = "Option::is_none")]
565    pub metadata: Option<Metadata>,
566
567    /// The account on behalf of which to charge.
568    #[serde(skip_serializing_if = "Option::is_none")]
569    pub on_behalf_of: Option<&'a str>,
570
571    /// A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
572    #[serde(skip_serializing_if = "Option::is_none")]
573    pub payment_intent_data: Option<CreatePaymentLinkPaymentIntentData>,
574
575    /// Specify whether Checkout should collect a payment method.
576    ///
577    /// When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount.  Can only be set in `subscription` mode.  If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).
578    #[serde(skip_serializing_if = "Option::is_none")]
579    pub payment_method_collection: Option<PaymentLinkPaymentMethodCollection>,
580
581    /// The list of payment method types that customers can use.
582    ///
583    /// If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)).
584    #[serde(skip_serializing_if = "Option::is_none")]
585    pub payment_method_types: Option<Vec<CreatePaymentLinkPaymentMethodTypes>>,
586
587    /// Controls phone number collection settings during checkout.
588    ///
589    /// We recommend that you review your privacy policy and check with your legal contacts.
590    #[serde(skip_serializing_if = "Option::is_none")]
591    pub phone_number_collection: Option<CreatePaymentLinkPhoneNumberCollection>,
592
593    /// Settings that restrict the usage of a payment link.
594    #[serde(skip_serializing_if = "Option::is_none")]
595    pub restrictions: Option<CreatePaymentLinkRestrictions>,
596
597    /// Configuration for collecting the customer's shipping address.
598    #[serde(skip_serializing_if = "Option::is_none")]
599    pub shipping_address_collection: Option<CreatePaymentLinkShippingAddressCollection>,
600
601    /// The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
602    #[serde(skip_serializing_if = "Option::is_none")]
603    pub shipping_options: Option<Vec<CreatePaymentLinkShippingOptions>>,
604
605    /// Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button.
606    ///
607    /// Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`).
608    #[serde(skip_serializing_if = "Option::is_none")]
609    pub submit_type: Option<PaymentLinkSubmitType>,
610
611    /// When creating a subscription, the specified configuration data will be used.
612    ///
613    /// There must be at least one line item with a recurring price to use `subscription_data`.
614    #[serde(skip_serializing_if = "Option::is_none")]
615    pub subscription_data: Option<CreatePaymentLinkSubscriptionData>,
616
617    /// Controls tax ID collection during checkout.
618    #[serde(skip_serializing_if = "Option::is_none")]
619    pub tax_id_collection: Option<CreatePaymentLinkTaxIdCollection>,
620
621    /// The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to.
622    #[serde(skip_serializing_if = "Option::is_none")]
623    pub transfer_data: Option<CreatePaymentLinkTransferData>,
624}
625
626impl<'a> CreatePaymentLink<'a> {
627    pub fn new(line_items: Vec<CreatePaymentLinkLineItems>) -> Self {
628        CreatePaymentLink {
629            after_completion: Default::default(),
630            allow_promotion_codes: Default::default(),
631            application_fee_amount: Default::default(),
632            application_fee_percent: Default::default(),
633            automatic_tax: Default::default(),
634            billing_address_collection: Default::default(),
635            consent_collection: Default::default(),
636            currency: Default::default(),
637            custom_fields: Default::default(),
638            custom_text: Default::default(),
639            customer_creation: Default::default(),
640            expand: Default::default(),
641            inactive_message: Default::default(),
642            invoice_creation: Default::default(),
643            line_items,
644            metadata: Default::default(),
645            on_behalf_of: Default::default(),
646            payment_intent_data: Default::default(),
647            payment_method_collection: Default::default(),
648            payment_method_types: Default::default(),
649            phone_number_collection: Default::default(),
650            restrictions: Default::default(),
651            shipping_address_collection: Default::default(),
652            shipping_options: Default::default(),
653            submit_type: Default::default(),
654            subscription_data: Default::default(),
655            tax_id_collection: Default::default(),
656            transfer_data: Default::default(),
657        }
658    }
659}
660
661/// The parameters for `PaymentLink::list`.
662#[derive(Clone, Debug, Serialize, Default)]
663pub struct ListPaymentLinks<'a> {
664    /// Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links).
665    #[serde(skip_serializing_if = "Option::is_none")]
666    pub active: Option<bool>,
667
668    /// A cursor for use in pagination.
669    ///
670    /// `ending_before` is an object ID that defines your place in the list.
671    /// For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
672    #[serde(skip_serializing_if = "Option::is_none")]
673    pub ending_before: Option<PaymentLinkId>,
674
675    /// Specifies which fields in the response should be expanded.
676    #[serde(skip_serializing_if = "Expand::is_empty")]
677    pub expand: &'a [&'a str],
678
679    /// A limit on the number of objects to be returned.
680    ///
681    /// Limit can range between 1 and 100, and the default is 10.
682    #[serde(skip_serializing_if = "Option::is_none")]
683    pub limit: Option<u64>,
684
685    /// A cursor for use in pagination.
686    ///
687    /// `starting_after` is an object ID that defines your place in the list.
688    /// For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
689    #[serde(skip_serializing_if = "Option::is_none")]
690    pub starting_after: Option<PaymentLinkId>,
691}
692
693impl<'a> ListPaymentLinks<'a> {
694    pub fn new() -> Self {
695        ListPaymentLinks {
696            active: Default::default(),
697            ending_before: Default::default(),
698            expand: Default::default(),
699            limit: Default::default(),
700            starting_after: Default::default(),
701        }
702    }
703}
704impl Paginable for ListPaymentLinks<'_> {
705    type O = PaymentLink;
706    fn set_last(&mut self, item: Self::O) {
707        self.starting_after = Some(item.id());
708    }
709}
710/// The parameters for `PaymentLink::update`.
711#[derive(Clone, Debug, Serialize, Default)]
712pub struct UpdatePaymentLink<'a> {
713    /// Whether the payment link's `url` is active.
714    ///
715    /// If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated.
716    #[serde(skip_serializing_if = "Option::is_none")]
717    pub active: Option<bool>,
718
719    /// Behavior after the purchase is complete.
720    #[serde(skip_serializing_if = "Option::is_none")]
721    pub after_completion: Option<UpdatePaymentLinkAfterCompletion>,
722
723    /// Enables user redeemable promotion codes.
724    #[serde(skip_serializing_if = "Option::is_none")]
725    pub allow_promotion_codes: Option<bool>,
726
727    /// Configuration for automatic tax collection.
728    #[serde(skip_serializing_if = "Option::is_none")]
729    pub automatic_tax: Option<UpdatePaymentLinkAutomaticTax>,
730
731    /// Configuration for collecting the customer's billing address.
732    #[serde(skip_serializing_if = "Option::is_none")]
733    pub billing_address_collection: Option<PaymentLinkBillingAddressCollection>,
734
735    /// Collect additional information from your customer using custom fields.
736    ///
737    /// Up to 3 fields are supported.
738    #[serde(skip_serializing_if = "Option::is_none")]
739    pub custom_fields: Option<Vec<UpdatePaymentLinkCustomFields>>,
740
741    /// Display additional text for your customers using custom text.
742    #[serde(skip_serializing_if = "Option::is_none")]
743    pub custom_text: Option<UpdatePaymentLinkCustomText>,
744
745    /// Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers).
746    #[serde(skip_serializing_if = "Option::is_none")]
747    pub customer_creation: Option<PaymentLinkCustomerCreation>,
748
749    /// Specifies which fields in the response should be expanded.
750    #[serde(skip_serializing_if = "Expand::is_empty")]
751    pub expand: &'a [&'a str],
752
753    /// The custom message to be displayed to a customer when a payment link is no longer active.
754    #[serde(skip_serializing_if = "Option::is_none")]
755    pub inactive_message: Option<String>,
756
757    /// Generate a post-purchase Invoice for one-time payments.
758    #[serde(skip_serializing_if = "Option::is_none")]
759    pub invoice_creation: Option<UpdatePaymentLinkInvoiceCreation>,
760
761    /// The line items representing what is being sold.
762    ///
763    /// Each line item represents an item being sold.
764    /// Up to 20 line items are supported.
765    #[serde(skip_serializing_if = "Option::is_none")]
766    pub line_items: Option<Vec<UpdatePaymentLinkLineItems>>,
767
768    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
769    ///
770    /// This can be useful for storing additional information about the object in a structured format.
771    /// Individual keys can be unset by posting an empty value to them.
772    /// All keys can be unset by posting an empty value to `metadata`.
773    /// Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link.
774    #[serde(skip_serializing_if = "Option::is_none")]
775    pub metadata: Option<Metadata>,
776
777    /// A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
778    #[serde(skip_serializing_if = "Option::is_none")]
779    pub payment_intent_data: Option<UpdatePaymentLinkPaymentIntentData>,
780
781    /// Specify whether Checkout should collect a payment method.
782    ///
783    /// When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount.  Can only be set in `subscription` mode.  If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials).
784    #[serde(skip_serializing_if = "Option::is_none")]
785    pub payment_method_collection: Option<PaymentLinkPaymentMethodCollection>,
786
787    /// The list of payment method types that customers can use.
788    ///
789    /// Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
790    #[serde(skip_serializing_if = "Option::is_none")]
791    pub payment_method_types: Option<Vec<UpdatePaymentLinkPaymentMethodTypes>>,
792
793    /// Settings that restrict the usage of a payment link.
794    #[serde(skip_serializing_if = "Option::is_none")]
795    pub restrictions: Option<UpdatePaymentLinkRestrictions>,
796
797    /// Configuration for collecting the customer's shipping address.
798    #[serde(skip_serializing_if = "Option::is_none")]
799    pub shipping_address_collection: Option<UpdatePaymentLinkShippingAddressCollection>,
800
801    /// When creating a subscription, the specified configuration data will be used.
802    ///
803    /// There must be at least one line item with a recurring price to use `subscription_data`.
804    #[serde(skip_serializing_if = "Option::is_none")]
805    pub subscription_data: Option<UpdatePaymentLinkSubscriptionData>,
806}
807
808impl<'a> UpdatePaymentLink<'a> {
809    pub fn new() -> Self {
810        UpdatePaymentLink {
811            active: Default::default(),
812            after_completion: Default::default(),
813            allow_promotion_codes: Default::default(),
814            automatic_tax: Default::default(),
815            billing_address_collection: Default::default(),
816            custom_fields: Default::default(),
817            custom_text: Default::default(),
818            customer_creation: Default::default(),
819            expand: Default::default(),
820            inactive_message: Default::default(),
821            invoice_creation: Default::default(),
822            line_items: Default::default(),
823            metadata: Default::default(),
824            payment_intent_data: Default::default(),
825            payment_method_collection: Default::default(),
826            payment_method_types: Default::default(),
827            restrictions: Default::default(),
828            shipping_address_collection: Default::default(),
829            subscription_data: Default::default(),
830        }
831    }
832}
833
834#[derive(Clone, Debug, Default, Deserialize, Serialize)]
835pub struct CreatePaymentLinkAfterCompletion {
836    /// Configuration when `type=hosted_confirmation`.
837    #[serde(skip_serializing_if = "Option::is_none")]
838    pub hosted_confirmation: Option<CreatePaymentLinkAfterCompletionHostedConfirmation>,
839
840    /// Configuration when `type=redirect`.
841    #[serde(skip_serializing_if = "Option::is_none")]
842    pub redirect: Option<CreatePaymentLinkAfterCompletionRedirect>,
843
844    /// The specified behavior after the purchase is complete.
845    ///
846    /// Either `redirect` or `hosted_confirmation`.
847    #[serde(rename = "type")]
848    pub type_: CreatePaymentLinkAfterCompletionType,
849}
850
851#[derive(Clone, Debug, Default, Deserialize, Serialize)]
852pub struct CreatePaymentLinkAutomaticTax {
853    /// If `true`, tax will be calculated automatically using the customer's location.
854    pub enabled: bool,
855
856    /// The account that's liable for tax.
857    ///
858    /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account.
859    /// The tax transaction is returned in the report of the connected account.
860    #[serde(skip_serializing_if = "Option::is_none")]
861    pub liability: Option<CreatePaymentLinkAutomaticTaxLiability>,
862}
863
864#[derive(Clone, Debug, Default, Deserialize, Serialize)]
865pub struct CreatePaymentLinkConsentCollection {
866    /// Determines the display of payment method reuse agreement text in the UI.
867    ///
868    /// If set to `hidden`, it will hide legal text related to the reuse of a payment method.
869    #[serde(skip_serializing_if = "Option::is_none")]
870    pub payment_method_reuse_agreement:
871        Option<CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreement>,
872
873    /// If set to `auto`, enables the collection of customer consent for promotional communications.
874    ///
875    /// The Checkout Session will determine whether to display an option to opt into promotional communication from the merchant depending on the customer's locale.
876    /// Only available to US merchants.
877    #[serde(skip_serializing_if = "Option::is_none")]
878    pub promotions: Option<CreatePaymentLinkConsentCollectionPromotions>,
879
880    /// If set to `required`, it requires customers to check a terms of service checkbox before being able to pay.
881    /// There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public).
882    #[serde(skip_serializing_if = "Option::is_none")]
883    pub terms_of_service: Option<CreatePaymentLinkConsentCollectionTermsOfService>,
884}
885
886#[derive(Clone, Debug, Default, Deserialize, Serialize)]
887pub struct CreatePaymentLinkCustomFields {
888    /// Configuration for `type=dropdown` fields.
889    #[serde(skip_serializing_if = "Option::is_none")]
890    pub dropdown: Option<CreatePaymentLinkCustomFieldsDropdown>,
891
892    /// String of your choice that your integration can use to reconcile this field.
893    ///
894    /// Must be unique to this field, alphanumeric, and up to 200 characters.
895    pub key: String,
896
897    /// The label for the field, displayed to the customer.
898    pub label: CreatePaymentLinkCustomFieldsLabel,
899
900    /// Configuration for `type=numeric` fields.
901    #[serde(skip_serializing_if = "Option::is_none")]
902    pub numeric: Option<CreatePaymentLinkCustomFieldsNumeric>,
903
904    /// Whether the customer is required to complete the field before completing the Checkout Session.
905    ///
906    /// Defaults to `false`.
907    #[serde(skip_serializing_if = "Option::is_none")]
908    pub optional: Option<bool>,
909
910    /// Configuration for `type=text` fields.
911    #[serde(skip_serializing_if = "Option::is_none")]
912    pub text: Option<CreatePaymentLinkCustomFieldsText>,
913
914    /// The type of the field.
915    #[serde(rename = "type")]
916    pub type_: CreatePaymentLinkCustomFieldsType,
917}
918
919#[derive(Clone, Debug, Default, Deserialize, Serialize)]
920pub struct CreatePaymentLinkCustomText {
921    /// Custom text that should be displayed after the payment confirmation button.
922    #[serde(skip_serializing_if = "Option::is_none")]
923    pub after_submit: Option<CreatePaymentLinkCustomTextAfterSubmit>,
924
925    /// Custom text that should be displayed alongside shipping address collection.
926    #[serde(skip_serializing_if = "Option::is_none")]
927    pub shipping_address: Option<CreatePaymentLinkCustomTextShippingAddress>,
928
929    /// Custom text that should be displayed alongside the payment confirmation button.
930    #[serde(skip_serializing_if = "Option::is_none")]
931    pub submit: Option<CreatePaymentLinkCustomTextSubmit>,
932
933    /// Custom text that should be displayed in place of the default terms of service agreement text.
934    #[serde(skip_serializing_if = "Option::is_none")]
935    pub terms_of_service_acceptance: Option<CreatePaymentLinkCustomTextTermsOfServiceAcceptance>,
936}
937
938#[derive(Clone, Debug, Default, Deserialize, Serialize)]
939pub struct CreatePaymentLinkInvoiceCreation {
940    /// Whether the feature is enabled.
941    pub enabled: bool,
942
943    /// Invoice PDF configuration.
944    #[serde(skip_serializing_if = "Option::is_none")]
945    pub invoice_data: Option<CreatePaymentLinkInvoiceCreationInvoiceData>,
946}
947
948#[derive(Clone, Debug, Default, Deserialize, Serialize)]
949pub struct CreatePaymentLinkLineItems {
950    /// When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout.
951    #[serde(skip_serializing_if = "Option::is_none")]
952    pub adjustable_quantity: Option<CreatePaymentLinkLineItemsAdjustableQuantity>,
953
954    /// The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
955    pub price: String,
956
957    /// The quantity of the line item being purchased.
958    pub quantity: u64,
959}
960
961#[derive(Clone, Debug, Default, Deserialize, Serialize)]
962pub struct CreatePaymentLinkPaymentIntentData {
963    /// Controls when the funds will be captured from the customer's account.
964    #[serde(skip_serializing_if = "Option::is_none")]
965    pub capture_method: Option<CreatePaymentLinkPaymentIntentDataCaptureMethod>,
966
967    /// An arbitrary string attached to the object.
968    ///
969    /// Often useful for displaying to users.
970    #[serde(skip_serializing_if = "Option::is_none")]
971    pub description: Option<String>,
972
973    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link.
974    ///
975    /// Unlike object-level metadata, this field is declarative.
976    /// Updates will clear prior values.
977    #[serde(skip_serializing_if = "Option::is_none")]
978    pub metadata: Option<Metadata>,
979
980    /// Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session.
981    ///
982    /// When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved.
983    ///
984    /// When setting this to `off_session`, Checkout will show a notice to the customer that their payment details will be saved and used for future payments.
985    ///
986    /// If a Customer has been provided or Checkout creates a new Customer,Checkout will attach the payment method to the Customer.
987    ///
988    /// If Checkout does not create a Customer, the payment method is not attached to a Customer.
989    ///
990    /// To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent.  When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA.
991    #[serde(skip_serializing_if = "Option::is_none")]
992    pub setup_future_usage: Option<CreatePaymentLinkPaymentIntentDataSetupFutureUsage>,
993
994    /// Extra information about the payment.
995    ///
996    /// This will appear on your customer's statement when this payment succeeds in creating a charge.
997    #[serde(skip_serializing_if = "Option::is_none")]
998    pub statement_descriptor: Option<String>,
999
1000    /// Provides information about the charge that customers see on their statements.
1001    ///
1002    /// Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor.
1003    /// Maximum 22 characters for the concatenated descriptor.
1004    #[serde(skip_serializing_if = "Option::is_none")]
1005    pub statement_descriptor_suffix: Option<String>,
1006
1007    /// A string that identifies the resulting payment as part of a group.
1008    ///
1009    /// See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details.
1010    #[serde(skip_serializing_if = "Option::is_none")]
1011    pub transfer_group: Option<String>,
1012}
1013
1014#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1015pub struct CreatePaymentLinkPhoneNumberCollection {
1016    /// Set to `true` to enable phone number collection.
1017    pub enabled: bool,
1018}
1019
1020#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1021pub struct CreatePaymentLinkRestrictions {
1022    /// Configuration for the `completed_sessions` restriction type.
1023    pub completed_sessions: CreatePaymentLinkRestrictionsCompletedSessions,
1024}
1025
1026#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1027pub struct CreatePaymentLinkShippingAddressCollection {
1028    /// An array of two-letter ISO country codes representing which countries Checkout should provide as options for
1029    /// shipping locations.
1030    ///
1031    /// Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.
1032    pub allowed_countries: Vec<CreatePaymentLinkShippingAddressCollectionAllowedCountries>,
1033}
1034
1035#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1036pub struct CreatePaymentLinkShippingOptions {
1037    /// The ID of the Shipping Rate to use for this shipping option.
1038    #[serde(skip_serializing_if = "Option::is_none")]
1039    pub shipping_rate: Option<String>,
1040}
1041
1042#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1043pub struct CreatePaymentLinkSubscriptionData {
1044    /// The subscription's description, meant to be displayable to the customer.
1045    ///
1046    /// Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
1047    #[serde(skip_serializing_if = "Option::is_none")]
1048    pub description: Option<String>,
1049
1050    /// All invoices will be billed using the specified settings.
1051    #[serde(skip_serializing_if = "Option::is_none")]
1052    pub invoice_settings: Option<CreatePaymentLinkSubscriptionDataInvoiceSettings>,
1053
1054    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link.
1055    ///
1056    /// Unlike object-level metadata, this field is declarative.
1057    /// Updates will clear prior values.
1058    #[serde(skip_serializing_if = "Option::is_none")]
1059    pub metadata: Option<Metadata>,
1060
1061    /// Integer representing the number of trial period days before the customer is charged for the first time.
1062    ///
1063    /// Has to be at least 1.
1064    #[serde(skip_serializing_if = "Option::is_none")]
1065    pub trial_period_days: Option<u32>,
1066
1067    /// Settings related to subscription trials.
1068    #[serde(skip_serializing_if = "Option::is_none")]
1069    pub trial_settings: Option<CreatePaymentLinkSubscriptionDataTrialSettings>,
1070}
1071
1072#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1073pub struct CreatePaymentLinkTaxIdCollection {
1074    /// Set to `true` to enable tax ID collection.
1075    pub enabled: bool,
1076}
1077
1078#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1079pub struct CreatePaymentLinkTransferData {
1080    /// The amount that will be transferred automatically when a charge succeeds.
1081    #[serde(skip_serializing_if = "Option::is_none")]
1082    pub amount: Option<i64>,
1083
1084    /// If specified, successful charges will be attributed to the destination
1085    /// account for tax reporting, and the funds from charges will be transferred
1086    /// to the destination account.
1087    ///
1088    /// The ID of the resulting transfer will be returned on the successful charge's `transfer` field.
1089    pub destination: String,
1090}
1091
1092#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1093pub struct UpdatePaymentLinkAfterCompletion {
1094    /// Configuration when `type=hosted_confirmation`.
1095    #[serde(skip_serializing_if = "Option::is_none")]
1096    pub hosted_confirmation: Option<UpdatePaymentLinkAfterCompletionHostedConfirmation>,
1097
1098    /// Configuration when `type=redirect`.
1099    #[serde(skip_serializing_if = "Option::is_none")]
1100    pub redirect: Option<UpdatePaymentLinkAfterCompletionRedirect>,
1101
1102    /// The specified behavior after the purchase is complete.
1103    ///
1104    /// Either `redirect` or `hosted_confirmation`.
1105    #[serde(rename = "type")]
1106    pub type_: UpdatePaymentLinkAfterCompletionType,
1107}
1108
1109#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1110pub struct UpdatePaymentLinkAutomaticTax {
1111    /// If `true`, tax will be calculated automatically using the customer's location.
1112    pub enabled: bool,
1113
1114    /// The account that's liable for tax.
1115    ///
1116    /// If set, the business address and tax registrations required to perform the tax calculation are loaded from this account.
1117    /// The tax transaction is returned in the report of the connected account.
1118    #[serde(skip_serializing_if = "Option::is_none")]
1119    pub liability: Option<UpdatePaymentLinkAutomaticTaxLiability>,
1120}
1121
1122#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1123pub struct UpdatePaymentLinkCustomFields {
1124    /// Configuration for `type=dropdown` fields.
1125    #[serde(skip_serializing_if = "Option::is_none")]
1126    pub dropdown: Option<UpdatePaymentLinkCustomFieldsDropdown>,
1127
1128    /// String of your choice that your integration can use to reconcile this field.
1129    ///
1130    /// Must be unique to this field, alphanumeric, and up to 200 characters.
1131    pub key: String,
1132
1133    /// The label for the field, displayed to the customer.
1134    pub label: UpdatePaymentLinkCustomFieldsLabel,
1135
1136    /// Configuration for `type=numeric` fields.
1137    #[serde(skip_serializing_if = "Option::is_none")]
1138    pub numeric: Option<UpdatePaymentLinkCustomFieldsNumeric>,
1139
1140    /// Whether the customer is required to complete the field before completing the Checkout Session.
1141    ///
1142    /// Defaults to `false`.
1143    #[serde(skip_serializing_if = "Option::is_none")]
1144    pub optional: Option<bool>,
1145
1146    /// Configuration for `type=text` fields.
1147    #[serde(skip_serializing_if = "Option::is_none")]
1148    pub text: Option<UpdatePaymentLinkCustomFieldsText>,
1149
1150    /// The type of the field.
1151    #[serde(rename = "type")]
1152    pub type_: UpdatePaymentLinkCustomFieldsType,
1153}
1154
1155#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1156pub struct UpdatePaymentLinkCustomText {
1157    /// Custom text that should be displayed after the payment confirmation button.
1158    #[serde(skip_serializing_if = "Option::is_none")]
1159    pub after_submit: Option<UpdatePaymentLinkCustomTextAfterSubmit>,
1160
1161    /// Custom text that should be displayed alongside shipping address collection.
1162    #[serde(skip_serializing_if = "Option::is_none")]
1163    pub shipping_address: Option<UpdatePaymentLinkCustomTextShippingAddress>,
1164
1165    /// Custom text that should be displayed alongside the payment confirmation button.
1166    #[serde(skip_serializing_if = "Option::is_none")]
1167    pub submit: Option<UpdatePaymentLinkCustomTextSubmit>,
1168
1169    /// Custom text that should be displayed in place of the default terms of service agreement text.
1170    #[serde(skip_serializing_if = "Option::is_none")]
1171    pub terms_of_service_acceptance: Option<UpdatePaymentLinkCustomTextTermsOfServiceAcceptance>,
1172}
1173
1174#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1175pub struct UpdatePaymentLinkInvoiceCreation {
1176    /// Whether the feature is enabled.
1177    pub enabled: bool,
1178
1179    /// Invoice PDF configuration.
1180    #[serde(skip_serializing_if = "Option::is_none")]
1181    pub invoice_data: Option<UpdatePaymentLinkInvoiceCreationInvoiceData>,
1182}
1183
1184#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1185pub struct UpdatePaymentLinkLineItems {
1186    /// When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout.
1187    #[serde(skip_serializing_if = "Option::is_none")]
1188    pub adjustable_quantity: Option<UpdatePaymentLinkLineItemsAdjustableQuantity>,
1189
1190    /// The ID of an existing line item on the payment link.
1191    pub id: String,
1192
1193    /// The quantity of the line item being purchased.
1194    #[serde(skip_serializing_if = "Option::is_none")]
1195    pub quantity: Option<u64>,
1196}
1197
1198#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1199pub struct UpdatePaymentLinkPaymentIntentData {
1200    /// An arbitrary string attached to the object.
1201    ///
1202    /// Often useful for displaying to users.
1203    #[serde(skip_serializing_if = "Option::is_none")]
1204    pub description: Option<String>,
1205
1206    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link.
1207    ///
1208    /// Unlike object-level metadata, this field is declarative.
1209    /// Updates will clear prior values.
1210    #[serde(skip_serializing_if = "Option::is_none")]
1211    pub metadata: Option<Metadata>,
1212
1213    /// Extra information about the payment.
1214    ///
1215    /// This will appear on your customer's statement when this payment succeeds in creating a charge.
1216    #[serde(skip_serializing_if = "Option::is_none")]
1217    pub statement_descriptor: Option<String>,
1218
1219    /// Provides information about the charge that customers see on their statements.
1220    ///
1221    /// Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor.
1222    /// Maximum 22 characters for the concatenated descriptor.
1223    #[serde(skip_serializing_if = "Option::is_none")]
1224    pub statement_descriptor_suffix: Option<String>,
1225
1226    /// A string that identifies the resulting payment as part of a group.
1227    ///
1228    /// See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details.
1229    #[serde(skip_serializing_if = "Option::is_none")]
1230    pub transfer_group: Option<String>,
1231}
1232
1233#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1234pub struct UpdatePaymentLinkRestrictions {
1235    /// Configuration for the `completed_sessions` restriction type.
1236    pub completed_sessions: UpdatePaymentLinkRestrictionsCompletedSessions,
1237}
1238
1239#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1240pub struct UpdatePaymentLinkShippingAddressCollection {
1241    /// An array of two-letter ISO country codes representing which countries Checkout should provide as options for
1242    /// shipping locations.
1243    ///
1244    /// Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`.
1245    pub allowed_countries: Vec<UpdatePaymentLinkShippingAddressCollectionAllowedCountries>,
1246}
1247
1248#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1249pub struct UpdatePaymentLinkSubscriptionData {
1250    /// All invoices will be billed using the specified settings.
1251    #[serde(skip_serializing_if = "Option::is_none")]
1252    pub invoice_settings: Option<UpdatePaymentLinkSubscriptionDataInvoiceSettings>,
1253
1254    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link.
1255    ///
1256    /// Unlike object-level metadata, this field is declarative.
1257    /// Updates will clear prior values.
1258    #[serde(skip_serializing_if = "Option::is_none")]
1259    pub metadata: Option<Metadata>,
1260
1261    /// Settings related to subscription trials.
1262    #[serde(skip_serializing_if = "Option::is_none")]
1263    pub trial_settings: Option<UpdatePaymentLinkSubscriptionDataTrialSettings>,
1264}
1265
1266#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1267pub struct CreatePaymentLinkAfterCompletionHostedConfirmation {
1268    /// A custom message to display to the customer after the purchase is complete.
1269    #[serde(skip_serializing_if = "Option::is_none")]
1270    pub custom_message: Option<String>,
1271}
1272
1273#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1274pub struct CreatePaymentLinkAfterCompletionRedirect {
1275    /// The URL the customer will be redirected to after the purchase is complete.
1276    ///
1277    /// You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included.
1278    pub url: String,
1279}
1280
1281#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1282pub struct CreatePaymentLinkAutomaticTaxLiability {
1283    /// The connected account being referenced when `type` is `account`.
1284    #[serde(skip_serializing_if = "Option::is_none")]
1285    pub account: Option<String>,
1286
1287    /// Type of the account referenced in the request.
1288    #[serde(rename = "type")]
1289    pub type_: CreatePaymentLinkAutomaticTaxLiabilityType,
1290}
1291
1292#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1293pub struct CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreement {
1294    /// Determines the position and visibility of the payment method reuse agreement in the UI.
1295    ///
1296    /// When set to `auto`, Stripe's defaults will be used.
1297    /// When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI.
1298    pub position: CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition,
1299}
1300
1301#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1302pub struct CreatePaymentLinkCustomFieldsDropdown {
1303    /// The options available for the customer to select.
1304    ///
1305    /// Up to 200 options allowed.
1306    pub options: Vec<CreatePaymentLinkCustomFieldsDropdownOptions>,
1307}
1308
1309#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1310pub struct CreatePaymentLinkCustomFieldsLabel {
1311    /// Custom text for the label, displayed to the customer.
1312    ///
1313    /// Up to 50 characters.
1314    pub custom: String,
1315
1316    /// The type of the label.
1317    #[serde(rename = "type")]
1318    pub type_: CreatePaymentLinkCustomFieldsLabelType,
1319}
1320
1321#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1322pub struct CreatePaymentLinkCustomFieldsNumeric {
1323    /// The maximum character length constraint for the customer's input.
1324    #[serde(skip_serializing_if = "Option::is_none")]
1325    pub maximum_length: Option<i64>,
1326
1327    /// The minimum character length requirement for the customer's input.
1328    #[serde(skip_serializing_if = "Option::is_none")]
1329    pub minimum_length: Option<i64>,
1330}
1331
1332#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1333pub struct CreatePaymentLinkCustomFieldsText {
1334    /// The maximum character length constraint for the customer's input.
1335    #[serde(skip_serializing_if = "Option::is_none")]
1336    pub maximum_length: Option<i64>,
1337
1338    /// The minimum character length requirement for the customer's input.
1339    #[serde(skip_serializing_if = "Option::is_none")]
1340    pub minimum_length: Option<i64>,
1341}
1342
1343#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1344pub struct CreatePaymentLinkCustomTextAfterSubmit {
1345    /// Text may be up to 1200 characters in length.
1346    pub message: String,
1347}
1348
1349#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1350pub struct CreatePaymentLinkCustomTextShippingAddress {
1351    /// Text may be up to 1200 characters in length.
1352    pub message: String,
1353}
1354
1355#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1356pub struct CreatePaymentLinkCustomTextSubmit {
1357    /// Text may be up to 1200 characters in length.
1358    pub message: String,
1359}
1360
1361#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1362pub struct CreatePaymentLinkCustomTextTermsOfServiceAcceptance {
1363    /// Text may be up to 1200 characters in length.
1364    pub message: String,
1365}
1366
1367#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1368pub struct CreatePaymentLinkInvoiceCreationInvoiceData {
1369    /// The account tax IDs associated with the invoice.
1370    #[serde(skip_serializing_if = "Option::is_none")]
1371    pub account_tax_ids: Option<Vec<String>>,
1372
1373    /// Default custom fields to be displayed on invoices for this customer.
1374    #[serde(skip_serializing_if = "Option::is_none")]
1375    pub custom_fields: Option<Vec<CreatePaymentLinkInvoiceCreationInvoiceDataCustomFields>>,
1376
1377    /// An arbitrary string attached to the object.
1378    ///
1379    /// Often useful for displaying to users.
1380    #[serde(skip_serializing_if = "Option::is_none")]
1381    pub description: Option<String>,
1382
1383    /// Default footer to be displayed on invoices for this customer.
1384    #[serde(skip_serializing_if = "Option::is_none")]
1385    pub footer: Option<String>,
1386
1387    /// The connected account that issues the invoice.
1388    ///
1389    /// The invoice is presented with the branding and support information of the specified account.
1390    #[serde(skip_serializing_if = "Option::is_none")]
1391    pub issuer: Option<CreatePaymentLinkInvoiceCreationInvoiceDataIssuer>,
1392
1393    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
1394    ///
1395    /// This can be useful for storing additional information about the object in a structured format.
1396    /// Individual keys can be unset by posting an empty value to them.
1397    /// All keys can be unset by posting an empty value to `metadata`.
1398    #[serde(skip_serializing_if = "Option::is_none")]
1399    pub metadata: Option<Metadata>,
1400
1401    /// Default options for invoice PDF rendering for this customer.
1402    #[serde(skip_serializing_if = "Option::is_none")]
1403    pub rendering_options: Option<CreatePaymentLinkInvoiceCreationInvoiceDataRenderingOptions>,
1404}
1405
1406#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1407pub struct CreatePaymentLinkLineItemsAdjustableQuantity {
1408    /// Set to true if the quantity can be adjusted to any non-negative Integer.
1409    pub enabled: bool,
1410
1411    /// The maximum quantity the customer can purchase.
1412    ///
1413    /// By default this value is 99.
1414    /// You can specify a value up to 999.
1415    #[serde(skip_serializing_if = "Option::is_none")]
1416    pub maximum: Option<i64>,
1417
1418    /// The minimum quantity the customer can purchase.
1419    ///
1420    /// By default this value is 0.
1421    /// If there is only one item in the cart then that item's quantity cannot go down to 0.
1422    #[serde(skip_serializing_if = "Option::is_none")]
1423    pub minimum: Option<i64>,
1424}
1425
1426#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1427pub struct CreatePaymentLinkRestrictionsCompletedSessions {
1428    /// The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.
1429    pub limit: i64,
1430}
1431
1432#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1433pub struct CreatePaymentLinkSubscriptionDataInvoiceSettings {
1434    /// The connected account that issues the invoice.
1435    ///
1436    /// The invoice is presented with the branding and support information of the specified account.
1437    #[serde(skip_serializing_if = "Option::is_none")]
1438    pub issuer: Option<CreatePaymentLinkSubscriptionDataInvoiceSettingsIssuer>,
1439}
1440
1441#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1442pub struct CreatePaymentLinkSubscriptionDataTrialSettings {
1443    /// Defines how the subscription should behave when the user's free trial ends.
1444    pub end_behavior: CreatePaymentLinkSubscriptionDataTrialSettingsEndBehavior,
1445}
1446
1447#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1448pub struct UpdatePaymentLinkAfterCompletionHostedConfirmation {
1449    /// A custom message to display to the customer after the purchase is complete.
1450    #[serde(skip_serializing_if = "Option::is_none")]
1451    pub custom_message: Option<String>,
1452}
1453
1454#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1455pub struct UpdatePaymentLinkAfterCompletionRedirect {
1456    /// The URL the customer will be redirected to after the purchase is complete.
1457    ///
1458    /// You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included.
1459    pub url: String,
1460}
1461
1462#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1463pub struct UpdatePaymentLinkAutomaticTaxLiability {
1464    /// The connected account being referenced when `type` is `account`.
1465    #[serde(skip_serializing_if = "Option::is_none")]
1466    pub account: Option<String>,
1467
1468    /// Type of the account referenced in the request.
1469    #[serde(rename = "type")]
1470    pub type_: UpdatePaymentLinkAutomaticTaxLiabilityType,
1471}
1472
1473#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1474pub struct UpdatePaymentLinkCustomFieldsDropdown {
1475    /// The options available for the customer to select.
1476    ///
1477    /// Up to 200 options allowed.
1478    pub options: Vec<UpdatePaymentLinkCustomFieldsDropdownOptions>,
1479}
1480
1481#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1482pub struct UpdatePaymentLinkCustomFieldsLabel {
1483    /// Custom text for the label, displayed to the customer.
1484    ///
1485    /// Up to 50 characters.
1486    pub custom: String,
1487
1488    /// The type of the label.
1489    #[serde(rename = "type")]
1490    pub type_: UpdatePaymentLinkCustomFieldsLabelType,
1491}
1492
1493#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1494pub struct UpdatePaymentLinkCustomFieldsNumeric {
1495    /// The maximum character length constraint for the customer's input.
1496    #[serde(skip_serializing_if = "Option::is_none")]
1497    pub maximum_length: Option<i64>,
1498
1499    /// The minimum character length requirement for the customer's input.
1500    #[serde(skip_serializing_if = "Option::is_none")]
1501    pub minimum_length: Option<i64>,
1502}
1503
1504#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1505pub struct UpdatePaymentLinkCustomFieldsText {
1506    /// The maximum character length constraint for the customer's input.
1507    #[serde(skip_serializing_if = "Option::is_none")]
1508    pub maximum_length: Option<i64>,
1509
1510    /// The minimum character length requirement for the customer's input.
1511    #[serde(skip_serializing_if = "Option::is_none")]
1512    pub minimum_length: Option<i64>,
1513}
1514
1515#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1516pub struct UpdatePaymentLinkCustomTextAfterSubmit {
1517    /// Text may be up to 1200 characters in length.
1518    pub message: String,
1519}
1520
1521#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1522pub struct UpdatePaymentLinkCustomTextShippingAddress {
1523    /// Text may be up to 1200 characters in length.
1524    pub message: String,
1525}
1526
1527#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1528pub struct UpdatePaymentLinkCustomTextSubmit {
1529    /// Text may be up to 1200 characters in length.
1530    pub message: String,
1531}
1532
1533#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1534pub struct UpdatePaymentLinkCustomTextTermsOfServiceAcceptance {
1535    /// Text may be up to 1200 characters in length.
1536    pub message: String,
1537}
1538
1539#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1540pub struct UpdatePaymentLinkInvoiceCreationInvoiceData {
1541    /// The account tax IDs associated with the invoice.
1542    #[serde(skip_serializing_if = "Option::is_none")]
1543    pub account_tax_ids: Option<Vec<String>>,
1544
1545    /// Default custom fields to be displayed on invoices for this customer.
1546    #[serde(skip_serializing_if = "Option::is_none")]
1547    pub custom_fields: Option<Vec<UpdatePaymentLinkInvoiceCreationInvoiceDataCustomFields>>,
1548
1549    /// An arbitrary string attached to the object.
1550    ///
1551    /// Often useful for displaying to users.
1552    #[serde(skip_serializing_if = "Option::is_none")]
1553    pub description: Option<String>,
1554
1555    /// Default footer to be displayed on invoices for this customer.
1556    #[serde(skip_serializing_if = "Option::is_none")]
1557    pub footer: Option<String>,
1558
1559    /// The connected account that issues the invoice.
1560    ///
1561    /// The invoice is presented with the branding and support information of the specified account.
1562    #[serde(skip_serializing_if = "Option::is_none")]
1563    pub issuer: Option<UpdatePaymentLinkInvoiceCreationInvoiceDataIssuer>,
1564
1565    /// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object.
1566    ///
1567    /// This can be useful for storing additional information about the object in a structured format.
1568    /// Individual keys can be unset by posting an empty value to them.
1569    /// All keys can be unset by posting an empty value to `metadata`.
1570    #[serde(skip_serializing_if = "Option::is_none")]
1571    pub metadata: Option<Metadata>,
1572
1573    /// Default options for invoice PDF rendering for this customer.
1574    #[serde(skip_serializing_if = "Option::is_none")]
1575    pub rendering_options: Option<UpdatePaymentLinkInvoiceCreationInvoiceDataRenderingOptions>,
1576}
1577
1578#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1579pub struct UpdatePaymentLinkLineItemsAdjustableQuantity {
1580    /// Set to true if the quantity can be adjusted to any non-negative Integer.
1581    pub enabled: bool,
1582
1583    /// The maximum quantity the customer can purchase.
1584    ///
1585    /// By default this value is 99.
1586    /// You can specify a value up to 999.
1587    #[serde(skip_serializing_if = "Option::is_none")]
1588    pub maximum: Option<i64>,
1589
1590    /// The minimum quantity the customer can purchase.
1591    ///
1592    /// By default this value is 0.
1593    /// If there is only one item in the cart then that item's quantity cannot go down to 0.
1594    #[serde(skip_serializing_if = "Option::is_none")]
1595    pub minimum: Option<i64>,
1596}
1597
1598#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1599pub struct UpdatePaymentLinkRestrictionsCompletedSessions {
1600    /// The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met.
1601    pub limit: i64,
1602}
1603
1604#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1605pub struct UpdatePaymentLinkSubscriptionDataInvoiceSettings {
1606    /// The connected account that issues the invoice.
1607    ///
1608    /// The invoice is presented with the branding and support information of the specified account.
1609    #[serde(skip_serializing_if = "Option::is_none")]
1610    pub issuer: Option<UpdatePaymentLinkSubscriptionDataInvoiceSettingsIssuer>,
1611}
1612
1613#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1614pub struct UpdatePaymentLinkSubscriptionDataTrialSettings {
1615    /// Defines how the subscription should behave when the user's free trial ends.
1616    pub end_behavior: UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehavior,
1617}
1618
1619#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1620pub struct CreatePaymentLinkCustomFieldsDropdownOptions {
1621    /// The label for the option, displayed to the customer.
1622    ///
1623    /// Up to 100 characters.
1624    pub label: String,
1625
1626    /// The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer.
1627    ///
1628    /// Must be unique to this option, alphanumeric, and up to 100 characters.
1629    pub value: String,
1630}
1631
1632#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1633pub struct CreatePaymentLinkInvoiceCreationInvoiceDataCustomFields {
1634    /// The name of the custom field.
1635    ///
1636    /// This may be up to 30 characters.
1637    pub name: String,
1638
1639    /// The value of the custom field.
1640    ///
1641    /// This may be up to 30 characters.
1642    pub value: String,
1643}
1644
1645#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1646pub struct CreatePaymentLinkInvoiceCreationInvoiceDataIssuer {
1647    /// The connected account being referenced when `type` is `account`.
1648    #[serde(skip_serializing_if = "Option::is_none")]
1649    pub account: Option<String>,
1650
1651    /// Type of the account referenced in the request.
1652    #[serde(rename = "type")]
1653    pub type_: CreatePaymentLinkInvoiceCreationInvoiceDataIssuerType,
1654}
1655
1656#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1657pub struct CreatePaymentLinkInvoiceCreationInvoiceDataRenderingOptions {
1658    /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
1659    ///
1660    /// One of `exclude_tax` or `include_inclusive_tax`.
1661    /// `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts.
1662    /// `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
1663    #[serde(skip_serializing_if = "Option::is_none")]
1664    pub amount_tax_display:
1665        Option<CreatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay>,
1666}
1667
1668#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1669pub struct CreatePaymentLinkSubscriptionDataInvoiceSettingsIssuer {
1670    /// The connected account being referenced when `type` is `account`.
1671    #[serde(skip_serializing_if = "Option::is_none")]
1672    pub account: Option<String>,
1673
1674    /// Type of the account referenced in the request.
1675    #[serde(rename = "type")]
1676    pub type_: CreatePaymentLinkSubscriptionDataInvoiceSettingsIssuerType,
1677}
1678
1679#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1680pub struct CreatePaymentLinkSubscriptionDataTrialSettingsEndBehavior {
1681    /// Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
1682    pub missing_payment_method:
1683        CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod,
1684}
1685
1686#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1687pub struct UpdatePaymentLinkCustomFieldsDropdownOptions {
1688    /// The label for the option, displayed to the customer.
1689    ///
1690    /// Up to 100 characters.
1691    pub label: String,
1692
1693    /// The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer.
1694    ///
1695    /// Must be unique to this option, alphanumeric, and up to 100 characters.
1696    pub value: String,
1697}
1698
1699#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1700pub struct UpdatePaymentLinkInvoiceCreationInvoiceDataCustomFields {
1701    /// The name of the custom field.
1702    ///
1703    /// This may be up to 30 characters.
1704    pub name: String,
1705
1706    /// The value of the custom field.
1707    ///
1708    /// This may be up to 30 characters.
1709    pub value: String,
1710}
1711
1712#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1713pub struct UpdatePaymentLinkInvoiceCreationInvoiceDataIssuer {
1714    /// The connected account being referenced when `type` is `account`.
1715    #[serde(skip_serializing_if = "Option::is_none")]
1716    pub account: Option<String>,
1717
1718    /// Type of the account referenced in the request.
1719    #[serde(rename = "type")]
1720    pub type_: UpdatePaymentLinkInvoiceCreationInvoiceDataIssuerType,
1721}
1722
1723#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1724pub struct UpdatePaymentLinkInvoiceCreationInvoiceDataRenderingOptions {
1725    /// How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
1726    ///
1727    /// One of `exclude_tax` or `include_inclusive_tax`.
1728    /// `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts.
1729    /// `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
1730    #[serde(skip_serializing_if = "Option::is_none")]
1731    pub amount_tax_display:
1732        Option<UpdatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay>,
1733}
1734
1735#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1736pub struct UpdatePaymentLinkSubscriptionDataInvoiceSettingsIssuer {
1737    /// The connected account being referenced when `type` is `account`.
1738    #[serde(skip_serializing_if = "Option::is_none")]
1739    pub account: Option<String>,
1740
1741    /// Type of the account referenced in the request.
1742    #[serde(rename = "type")]
1743    pub type_: UpdatePaymentLinkSubscriptionDataInvoiceSettingsIssuerType,
1744}
1745
1746#[derive(Clone, Debug, Default, Deserialize, Serialize)]
1747pub struct UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehavior {
1748    /// Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
1749    pub missing_payment_method:
1750        UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod,
1751}
1752
1753/// An enum representing the possible values of an `CreatePaymentLinkAfterCompletion`'s `type` field.
1754#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
1755#[serde(rename_all = "snake_case")]
1756pub enum CreatePaymentLinkAfterCompletionType {
1757    HostedConfirmation,
1758    Redirect,
1759}
1760
1761impl CreatePaymentLinkAfterCompletionType {
1762    pub fn as_str(self) -> &'static str {
1763        match self {
1764            CreatePaymentLinkAfterCompletionType::HostedConfirmation => "hosted_confirmation",
1765            CreatePaymentLinkAfterCompletionType::Redirect => "redirect",
1766        }
1767    }
1768}
1769
1770impl AsRef<str> for CreatePaymentLinkAfterCompletionType {
1771    fn as_ref(&self) -> &str {
1772        self.as_str()
1773    }
1774}
1775
1776impl std::fmt::Display for CreatePaymentLinkAfterCompletionType {
1777    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1778        self.as_str().fmt(f)
1779    }
1780}
1781impl std::default::Default for CreatePaymentLinkAfterCompletionType {
1782    fn default() -> Self {
1783        Self::HostedConfirmation
1784    }
1785}
1786
1787/// An enum representing the possible values of an `CreatePaymentLinkAutomaticTaxLiability`'s `type` field.
1788#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
1789#[serde(rename_all = "snake_case")]
1790pub enum CreatePaymentLinkAutomaticTaxLiabilityType {
1791    Account,
1792    #[serde(rename = "self")]
1793    Self_,
1794}
1795
1796impl CreatePaymentLinkAutomaticTaxLiabilityType {
1797    pub fn as_str(self) -> &'static str {
1798        match self {
1799            CreatePaymentLinkAutomaticTaxLiabilityType::Account => "account",
1800            CreatePaymentLinkAutomaticTaxLiabilityType::Self_ => "self",
1801        }
1802    }
1803}
1804
1805impl AsRef<str> for CreatePaymentLinkAutomaticTaxLiabilityType {
1806    fn as_ref(&self) -> &str {
1807        self.as_str()
1808    }
1809}
1810
1811impl std::fmt::Display for CreatePaymentLinkAutomaticTaxLiabilityType {
1812    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1813        self.as_str().fmt(f)
1814    }
1815}
1816impl std::default::Default for CreatePaymentLinkAutomaticTaxLiabilityType {
1817    fn default() -> Self {
1818        Self::Account
1819    }
1820}
1821
1822/// An enum representing the possible values of an `CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreement`'s `position` field.
1823#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
1824#[serde(rename_all = "snake_case")]
1825pub enum CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition {
1826    Auto,
1827    Hidden,
1828}
1829
1830impl CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition {
1831    pub fn as_str(self) -> &'static str {
1832        match self {
1833            CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition::Auto => "auto",
1834            CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition::Hidden => {
1835                "hidden"
1836            }
1837        }
1838    }
1839}
1840
1841impl AsRef<str> for CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition {
1842    fn as_ref(&self) -> &str {
1843        self.as_str()
1844    }
1845}
1846
1847impl std::fmt::Display for CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition {
1848    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1849        self.as_str().fmt(f)
1850    }
1851}
1852impl std::default::Default
1853    for CreatePaymentLinkConsentCollectionPaymentMethodReuseAgreementPosition
1854{
1855    fn default() -> Self {
1856        Self::Auto
1857    }
1858}
1859
1860/// An enum representing the possible values of an `CreatePaymentLinkConsentCollection`'s `promotions` field.
1861#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
1862#[serde(rename_all = "snake_case")]
1863pub enum CreatePaymentLinkConsentCollectionPromotions {
1864    Auto,
1865    None,
1866}
1867
1868impl CreatePaymentLinkConsentCollectionPromotions {
1869    pub fn as_str(self) -> &'static str {
1870        match self {
1871            CreatePaymentLinkConsentCollectionPromotions::Auto => "auto",
1872            CreatePaymentLinkConsentCollectionPromotions::None => "none",
1873        }
1874    }
1875}
1876
1877impl AsRef<str> for CreatePaymentLinkConsentCollectionPromotions {
1878    fn as_ref(&self) -> &str {
1879        self.as_str()
1880    }
1881}
1882
1883impl std::fmt::Display for CreatePaymentLinkConsentCollectionPromotions {
1884    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1885        self.as_str().fmt(f)
1886    }
1887}
1888impl std::default::Default for CreatePaymentLinkConsentCollectionPromotions {
1889    fn default() -> Self {
1890        Self::Auto
1891    }
1892}
1893
1894/// An enum representing the possible values of an `CreatePaymentLinkConsentCollection`'s `terms_of_service` field.
1895#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
1896#[serde(rename_all = "snake_case")]
1897pub enum CreatePaymentLinkConsentCollectionTermsOfService {
1898    None,
1899    Required,
1900}
1901
1902impl CreatePaymentLinkConsentCollectionTermsOfService {
1903    pub fn as_str(self) -> &'static str {
1904        match self {
1905            CreatePaymentLinkConsentCollectionTermsOfService::None => "none",
1906            CreatePaymentLinkConsentCollectionTermsOfService::Required => "required",
1907        }
1908    }
1909}
1910
1911impl AsRef<str> for CreatePaymentLinkConsentCollectionTermsOfService {
1912    fn as_ref(&self) -> &str {
1913        self.as_str()
1914    }
1915}
1916
1917impl std::fmt::Display for CreatePaymentLinkConsentCollectionTermsOfService {
1918    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1919        self.as_str().fmt(f)
1920    }
1921}
1922impl std::default::Default for CreatePaymentLinkConsentCollectionTermsOfService {
1923    fn default() -> Self {
1924        Self::None
1925    }
1926}
1927
1928/// An enum representing the possible values of an `CreatePaymentLinkCustomFieldsLabel`'s `type` field.
1929#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
1930#[serde(rename_all = "snake_case")]
1931pub enum CreatePaymentLinkCustomFieldsLabelType {
1932    Custom,
1933}
1934
1935impl CreatePaymentLinkCustomFieldsLabelType {
1936    pub fn as_str(self) -> &'static str {
1937        match self {
1938            CreatePaymentLinkCustomFieldsLabelType::Custom => "custom",
1939        }
1940    }
1941}
1942
1943impl AsRef<str> for CreatePaymentLinkCustomFieldsLabelType {
1944    fn as_ref(&self) -> &str {
1945        self.as_str()
1946    }
1947}
1948
1949impl std::fmt::Display for CreatePaymentLinkCustomFieldsLabelType {
1950    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1951        self.as_str().fmt(f)
1952    }
1953}
1954impl std::default::Default for CreatePaymentLinkCustomFieldsLabelType {
1955    fn default() -> Self {
1956        Self::Custom
1957    }
1958}
1959
1960/// An enum representing the possible values of an `CreatePaymentLinkCustomFields`'s `type` field.
1961#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
1962#[serde(rename_all = "snake_case")]
1963pub enum CreatePaymentLinkCustomFieldsType {
1964    Dropdown,
1965    Numeric,
1966    Text,
1967}
1968
1969impl CreatePaymentLinkCustomFieldsType {
1970    pub fn as_str(self) -> &'static str {
1971        match self {
1972            CreatePaymentLinkCustomFieldsType::Dropdown => "dropdown",
1973            CreatePaymentLinkCustomFieldsType::Numeric => "numeric",
1974            CreatePaymentLinkCustomFieldsType::Text => "text",
1975        }
1976    }
1977}
1978
1979impl AsRef<str> for CreatePaymentLinkCustomFieldsType {
1980    fn as_ref(&self) -> &str {
1981        self.as_str()
1982    }
1983}
1984
1985impl std::fmt::Display for CreatePaymentLinkCustomFieldsType {
1986    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1987        self.as_str().fmt(f)
1988    }
1989}
1990impl std::default::Default for CreatePaymentLinkCustomFieldsType {
1991    fn default() -> Self {
1992        Self::Dropdown
1993    }
1994}
1995
1996/// An enum representing the possible values of an `CreatePaymentLinkInvoiceCreationInvoiceDataIssuer`'s `type` field.
1997#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
1998#[serde(rename_all = "snake_case")]
1999pub enum CreatePaymentLinkInvoiceCreationInvoiceDataIssuerType {
2000    Account,
2001    #[serde(rename = "self")]
2002    Self_,
2003}
2004
2005impl CreatePaymentLinkInvoiceCreationInvoiceDataIssuerType {
2006    pub fn as_str(self) -> &'static str {
2007        match self {
2008            CreatePaymentLinkInvoiceCreationInvoiceDataIssuerType::Account => "account",
2009            CreatePaymentLinkInvoiceCreationInvoiceDataIssuerType::Self_ => "self",
2010        }
2011    }
2012}
2013
2014impl AsRef<str> for CreatePaymentLinkInvoiceCreationInvoiceDataIssuerType {
2015    fn as_ref(&self) -> &str {
2016        self.as_str()
2017    }
2018}
2019
2020impl std::fmt::Display for CreatePaymentLinkInvoiceCreationInvoiceDataIssuerType {
2021    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2022        self.as_str().fmt(f)
2023    }
2024}
2025impl std::default::Default for CreatePaymentLinkInvoiceCreationInvoiceDataIssuerType {
2026    fn default() -> Self {
2027        Self::Account
2028    }
2029}
2030
2031/// An enum representing the possible values of an `CreatePaymentLinkInvoiceCreationInvoiceDataRenderingOptions`'s `amount_tax_display` field.
2032#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2033#[serde(rename_all = "snake_case")]
2034pub enum CreatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay {
2035    ExcludeTax,
2036    IncludeInclusiveTax,
2037}
2038
2039impl CreatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay {
2040    pub fn as_str(self) -> &'static str {
2041        match self {
2042            CreatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay::ExcludeTax => "exclude_tax",
2043            CreatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay::IncludeInclusiveTax => "include_inclusive_tax",
2044        }
2045    }
2046}
2047
2048impl AsRef<str> for CreatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay {
2049    fn as_ref(&self) -> &str {
2050        self.as_str()
2051    }
2052}
2053
2054impl std::fmt::Display
2055    for CreatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay
2056{
2057    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2058        self.as_str().fmt(f)
2059    }
2060}
2061impl std::default::Default
2062    for CreatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay
2063{
2064    fn default() -> Self {
2065        Self::ExcludeTax
2066    }
2067}
2068
2069/// An enum representing the possible values of an `CreatePaymentLinkPaymentIntentData`'s `capture_method` field.
2070#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2071#[serde(rename_all = "snake_case")]
2072pub enum CreatePaymentLinkPaymentIntentDataCaptureMethod {
2073    Automatic,
2074    AutomaticAsync,
2075    Manual,
2076}
2077
2078impl CreatePaymentLinkPaymentIntentDataCaptureMethod {
2079    pub fn as_str(self) -> &'static str {
2080        match self {
2081            CreatePaymentLinkPaymentIntentDataCaptureMethod::Automatic => "automatic",
2082            CreatePaymentLinkPaymentIntentDataCaptureMethod::AutomaticAsync => "automatic_async",
2083            CreatePaymentLinkPaymentIntentDataCaptureMethod::Manual => "manual",
2084        }
2085    }
2086}
2087
2088impl AsRef<str> for CreatePaymentLinkPaymentIntentDataCaptureMethod {
2089    fn as_ref(&self) -> &str {
2090        self.as_str()
2091    }
2092}
2093
2094impl std::fmt::Display for CreatePaymentLinkPaymentIntentDataCaptureMethod {
2095    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2096        self.as_str().fmt(f)
2097    }
2098}
2099impl std::default::Default for CreatePaymentLinkPaymentIntentDataCaptureMethod {
2100    fn default() -> Self {
2101        Self::Automatic
2102    }
2103}
2104
2105/// An enum representing the possible values of an `CreatePaymentLinkPaymentIntentData`'s `setup_future_usage` field.
2106#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2107#[serde(rename_all = "snake_case")]
2108pub enum CreatePaymentLinkPaymentIntentDataSetupFutureUsage {
2109    OffSession,
2110    OnSession,
2111}
2112
2113impl CreatePaymentLinkPaymentIntentDataSetupFutureUsage {
2114    pub fn as_str(self) -> &'static str {
2115        match self {
2116            CreatePaymentLinkPaymentIntentDataSetupFutureUsage::OffSession => "off_session",
2117            CreatePaymentLinkPaymentIntentDataSetupFutureUsage::OnSession => "on_session",
2118        }
2119    }
2120}
2121
2122impl AsRef<str> for CreatePaymentLinkPaymentIntentDataSetupFutureUsage {
2123    fn as_ref(&self) -> &str {
2124        self.as_str()
2125    }
2126}
2127
2128impl std::fmt::Display for CreatePaymentLinkPaymentIntentDataSetupFutureUsage {
2129    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2130        self.as_str().fmt(f)
2131    }
2132}
2133impl std::default::Default for CreatePaymentLinkPaymentIntentDataSetupFutureUsage {
2134    fn default() -> Self {
2135        Self::OffSession
2136    }
2137}
2138
2139/// An enum representing the possible values of an `CreatePaymentLink`'s `payment_method_types` field.
2140#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2141#[serde(rename_all = "snake_case")]
2142pub enum CreatePaymentLinkPaymentMethodTypes {
2143    Affirm,
2144    AfterpayClearpay,
2145    Alipay,
2146    AuBecsDebit,
2147    BacsDebit,
2148    Bancontact,
2149    Blik,
2150    Boleto,
2151    Card,
2152    Cashapp,
2153    Eps,
2154    Fpx,
2155    Giropay,
2156    Grabpay,
2157    Ideal,
2158    Klarna,
2159    Konbini,
2160    Link,
2161    Oxxo,
2162    P24,
2163    Paynow,
2164    Paypal,
2165    Pix,
2166    Promptpay,
2167    SepaDebit,
2168    Sofort,
2169    Swish,
2170    UsBankAccount,
2171    WechatPay,
2172}
2173
2174impl CreatePaymentLinkPaymentMethodTypes {
2175    pub fn as_str(self) -> &'static str {
2176        match self {
2177            CreatePaymentLinkPaymentMethodTypes::Affirm => "affirm",
2178            CreatePaymentLinkPaymentMethodTypes::AfterpayClearpay => "afterpay_clearpay",
2179            CreatePaymentLinkPaymentMethodTypes::Alipay => "alipay",
2180            CreatePaymentLinkPaymentMethodTypes::AuBecsDebit => "au_becs_debit",
2181            CreatePaymentLinkPaymentMethodTypes::BacsDebit => "bacs_debit",
2182            CreatePaymentLinkPaymentMethodTypes::Bancontact => "bancontact",
2183            CreatePaymentLinkPaymentMethodTypes::Blik => "blik",
2184            CreatePaymentLinkPaymentMethodTypes::Boleto => "boleto",
2185            CreatePaymentLinkPaymentMethodTypes::Card => "card",
2186            CreatePaymentLinkPaymentMethodTypes::Cashapp => "cashapp",
2187            CreatePaymentLinkPaymentMethodTypes::Eps => "eps",
2188            CreatePaymentLinkPaymentMethodTypes::Fpx => "fpx",
2189            CreatePaymentLinkPaymentMethodTypes::Giropay => "giropay",
2190            CreatePaymentLinkPaymentMethodTypes::Grabpay => "grabpay",
2191            CreatePaymentLinkPaymentMethodTypes::Ideal => "ideal",
2192            CreatePaymentLinkPaymentMethodTypes::Klarna => "klarna",
2193            CreatePaymentLinkPaymentMethodTypes::Konbini => "konbini",
2194            CreatePaymentLinkPaymentMethodTypes::Link => "link",
2195            CreatePaymentLinkPaymentMethodTypes::Oxxo => "oxxo",
2196            CreatePaymentLinkPaymentMethodTypes::P24 => "p24",
2197            CreatePaymentLinkPaymentMethodTypes::Paynow => "paynow",
2198            CreatePaymentLinkPaymentMethodTypes::Paypal => "paypal",
2199            CreatePaymentLinkPaymentMethodTypes::Pix => "pix",
2200            CreatePaymentLinkPaymentMethodTypes::Promptpay => "promptpay",
2201            CreatePaymentLinkPaymentMethodTypes::SepaDebit => "sepa_debit",
2202            CreatePaymentLinkPaymentMethodTypes::Sofort => "sofort",
2203            CreatePaymentLinkPaymentMethodTypes::Swish => "swish",
2204            CreatePaymentLinkPaymentMethodTypes::UsBankAccount => "us_bank_account",
2205            CreatePaymentLinkPaymentMethodTypes::WechatPay => "wechat_pay",
2206        }
2207    }
2208}
2209
2210impl AsRef<str> for CreatePaymentLinkPaymentMethodTypes {
2211    fn as_ref(&self) -> &str {
2212        self.as_str()
2213    }
2214}
2215
2216impl std::fmt::Display for CreatePaymentLinkPaymentMethodTypes {
2217    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2218        self.as_str().fmt(f)
2219    }
2220}
2221impl std::default::Default for CreatePaymentLinkPaymentMethodTypes {
2222    fn default() -> Self {
2223        Self::Affirm
2224    }
2225}
2226
2227/// An enum representing the possible values of an `CreatePaymentLinkShippingAddressCollection`'s `allowed_countries` field.
2228#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2229#[serde(rename_all = "snake_case")]
2230pub enum CreatePaymentLinkShippingAddressCollectionAllowedCountries {
2231    #[serde(rename = "AC")]
2232    Ac,
2233    #[serde(rename = "AD")]
2234    Ad,
2235    #[serde(rename = "AE")]
2236    Ae,
2237    #[serde(rename = "AF")]
2238    Af,
2239    #[serde(rename = "AG")]
2240    Ag,
2241    #[serde(rename = "AI")]
2242    Ai,
2243    #[serde(rename = "AL")]
2244    Al,
2245    #[serde(rename = "AM")]
2246    Am,
2247    #[serde(rename = "AO")]
2248    Ao,
2249    #[serde(rename = "AQ")]
2250    Aq,
2251    #[serde(rename = "AR")]
2252    Ar,
2253    #[serde(rename = "AT")]
2254    At,
2255    #[serde(rename = "AU")]
2256    Au,
2257    #[serde(rename = "AW")]
2258    Aw,
2259    #[serde(rename = "AX")]
2260    Ax,
2261    #[serde(rename = "AZ")]
2262    Az,
2263    #[serde(rename = "BA")]
2264    Ba,
2265    #[serde(rename = "BB")]
2266    Bb,
2267    #[serde(rename = "BD")]
2268    Bd,
2269    #[serde(rename = "BE")]
2270    Be,
2271    #[serde(rename = "BF")]
2272    Bf,
2273    #[serde(rename = "BG")]
2274    Bg,
2275    #[serde(rename = "BH")]
2276    Bh,
2277    #[serde(rename = "BI")]
2278    Bi,
2279    #[serde(rename = "BJ")]
2280    Bj,
2281    #[serde(rename = "BL")]
2282    Bl,
2283    #[serde(rename = "BM")]
2284    Bm,
2285    #[serde(rename = "BN")]
2286    Bn,
2287    #[serde(rename = "BO")]
2288    Bo,
2289    #[serde(rename = "BQ")]
2290    Bq,
2291    #[serde(rename = "BR")]
2292    Br,
2293    #[serde(rename = "BS")]
2294    Bs,
2295    #[serde(rename = "BT")]
2296    Bt,
2297    #[serde(rename = "BV")]
2298    Bv,
2299    #[serde(rename = "BW")]
2300    Bw,
2301    #[serde(rename = "BY")]
2302    By,
2303    #[serde(rename = "BZ")]
2304    Bz,
2305    #[serde(rename = "CA")]
2306    Ca,
2307    #[serde(rename = "CD")]
2308    Cd,
2309    #[serde(rename = "CF")]
2310    Cf,
2311    #[serde(rename = "CG")]
2312    Cg,
2313    #[serde(rename = "CH")]
2314    Ch,
2315    #[serde(rename = "CI")]
2316    Ci,
2317    #[serde(rename = "CK")]
2318    Ck,
2319    #[serde(rename = "CL")]
2320    Cl,
2321    #[serde(rename = "CM")]
2322    Cm,
2323    #[serde(rename = "CN")]
2324    Cn,
2325    #[serde(rename = "CO")]
2326    Co,
2327    #[serde(rename = "CR")]
2328    Cr,
2329    #[serde(rename = "CV")]
2330    Cv,
2331    #[serde(rename = "CW")]
2332    Cw,
2333    #[serde(rename = "CY")]
2334    Cy,
2335    #[serde(rename = "CZ")]
2336    Cz,
2337    #[serde(rename = "DE")]
2338    De,
2339    #[serde(rename = "DJ")]
2340    Dj,
2341    #[serde(rename = "DK")]
2342    Dk,
2343    #[serde(rename = "DM")]
2344    Dm,
2345    #[serde(rename = "DO")]
2346    Do,
2347    #[serde(rename = "DZ")]
2348    Dz,
2349    #[serde(rename = "EC")]
2350    Ec,
2351    #[serde(rename = "EE")]
2352    Ee,
2353    #[serde(rename = "EG")]
2354    Eg,
2355    #[serde(rename = "EH")]
2356    Eh,
2357    #[serde(rename = "ER")]
2358    Er,
2359    #[serde(rename = "ES")]
2360    Es,
2361    #[serde(rename = "ET")]
2362    Et,
2363    #[serde(rename = "FI")]
2364    Fi,
2365    #[serde(rename = "FJ")]
2366    Fj,
2367    #[serde(rename = "FK")]
2368    Fk,
2369    #[serde(rename = "FO")]
2370    Fo,
2371    #[serde(rename = "FR")]
2372    Fr,
2373    #[serde(rename = "GA")]
2374    Ga,
2375    #[serde(rename = "GB")]
2376    Gb,
2377    #[serde(rename = "GD")]
2378    Gd,
2379    #[serde(rename = "GE")]
2380    Ge,
2381    #[serde(rename = "GF")]
2382    Gf,
2383    #[serde(rename = "GG")]
2384    Gg,
2385    #[serde(rename = "GH")]
2386    Gh,
2387    #[serde(rename = "GI")]
2388    Gi,
2389    #[serde(rename = "GL")]
2390    Gl,
2391    #[serde(rename = "GM")]
2392    Gm,
2393    #[serde(rename = "GN")]
2394    Gn,
2395    #[serde(rename = "GP")]
2396    Gp,
2397    #[serde(rename = "GQ")]
2398    Gq,
2399    #[serde(rename = "GR")]
2400    Gr,
2401    #[serde(rename = "GS")]
2402    Gs,
2403    #[serde(rename = "GT")]
2404    Gt,
2405    #[serde(rename = "GU")]
2406    Gu,
2407    #[serde(rename = "GW")]
2408    Gw,
2409    #[serde(rename = "GY")]
2410    Gy,
2411    #[serde(rename = "HK")]
2412    Hk,
2413    #[serde(rename = "HN")]
2414    Hn,
2415    #[serde(rename = "HR")]
2416    Hr,
2417    #[serde(rename = "HT")]
2418    Ht,
2419    #[serde(rename = "HU")]
2420    Hu,
2421    #[serde(rename = "ID")]
2422    Id,
2423    #[serde(rename = "IE")]
2424    Ie,
2425    #[serde(rename = "IL")]
2426    Il,
2427    #[serde(rename = "IM")]
2428    Im,
2429    #[serde(rename = "IN")]
2430    In,
2431    #[serde(rename = "IO")]
2432    Io,
2433    #[serde(rename = "IQ")]
2434    Iq,
2435    #[serde(rename = "IS")]
2436    Is,
2437    #[serde(rename = "IT")]
2438    It,
2439    #[serde(rename = "JE")]
2440    Je,
2441    #[serde(rename = "JM")]
2442    Jm,
2443    #[serde(rename = "JO")]
2444    Jo,
2445    #[serde(rename = "JP")]
2446    Jp,
2447    #[serde(rename = "KE")]
2448    Ke,
2449    #[serde(rename = "KG")]
2450    Kg,
2451    #[serde(rename = "KH")]
2452    Kh,
2453    #[serde(rename = "KI")]
2454    Ki,
2455    #[serde(rename = "KM")]
2456    Km,
2457    #[serde(rename = "KN")]
2458    Kn,
2459    #[serde(rename = "KR")]
2460    Kr,
2461    #[serde(rename = "KW")]
2462    Kw,
2463    #[serde(rename = "KY")]
2464    Ky,
2465    #[serde(rename = "KZ")]
2466    Kz,
2467    #[serde(rename = "LA")]
2468    La,
2469    #[serde(rename = "LB")]
2470    Lb,
2471    #[serde(rename = "LC")]
2472    Lc,
2473    #[serde(rename = "LI")]
2474    Li,
2475    #[serde(rename = "LK")]
2476    Lk,
2477    #[serde(rename = "LR")]
2478    Lr,
2479    #[serde(rename = "LS")]
2480    Ls,
2481    #[serde(rename = "LT")]
2482    Lt,
2483    #[serde(rename = "LU")]
2484    Lu,
2485    #[serde(rename = "LV")]
2486    Lv,
2487    #[serde(rename = "LY")]
2488    Ly,
2489    #[serde(rename = "MA")]
2490    Ma,
2491    #[serde(rename = "MC")]
2492    Mc,
2493    #[serde(rename = "MD")]
2494    Md,
2495    #[serde(rename = "ME")]
2496    Me,
2497    #[serde(rename = "MF")]
2498    Mf,
2499    #[serde(rename = "MG")]
2500    Mg,
2501    #[serde(rename = "MK")]
2502    Mk,
2503    #[serde(rename = "ML")]
2504    Ml,
2505    #[serde(rename = "MM")]
2506    Mm,
2507    #[serde(rename = "MN")]
2508    Mn,
2509    #[serde(rename = "MO")]
2510    Mo,
2511    #[serde(rename = "MQ")]
2512    Mq,
2513    #[serde(rename = "MR")]
2514    Mr,
2515    #[serde(rename = "MS")]
2516    Ms,
2517    #[serde(rename = "MT")]
2518    Mt,
2519    #[serde(rename = "MU")]
2520    Mu,
2521    #[serde(rename = "MV")]
2522    Mv,
2523    #[serde(rename = "MW")]
2524    Mw,
2525    #[serde(rename = "MX")]
2526    Mx,
2527    #[serde(rename = "MY")]
2528    My,
2529    #[serde(rename = "MZ")]
2530    Mz,
2531    #[serde(rename = "NA")]
2532    Na,
2533    #[serde(rename = "NC")]
2534    Nc,
2535    #[serde(rename = "NE")]
2536    Ne,
2537    #[serde(rename = "NG")]
2538    Ng,
2539    #[serde(rename = "NI")]
2540    Ni,
2541    #[serde(rename = "NL")]
2542    Nl,
2543    #[serde(rename = "NO")]
2544    No,
2545    #[serde(rename = "NP")]
2546    Np,
2547    #[serde(rename = "NR")]
2548    Nr,
2549    #[serde(rename = "NU")]
2550    Nu,
2551    #[serde(rename = "NZ")]
2552    Nz,
2553    #[serde(rename = "OM")]
2554    Om,
2555    #[serde(rename = "PA")]
2556    Pa,
2557    #[serde(rename = "PE")]
2558    Pe,
2559    #[serde(rename = "PF")]
2560    Pf,
2561    #[serde(rename = "PG")]
2562    Pg,
2563    #[serde(rename = "PH")]
2564    Ph,
2565    #[serde(rename = "PK")]
2566    Pk,
2567    #[serde(rename = "PL")]
2568    Pl,
2569    #[serde(rename = "PM")]
2570    Pm,
2571    #[serde(rename = "PN")]
2572    Pn,
2573    #[serde(rename = "PR")]
2574    Pr,
2575    #[serde(rename = "PS")]
2576    Ps,
2577    #[serde(rename = "PT")]
2578    Pt,
2579    #[serde(rename = "PY")]
2580    Py,
2581    #[serde(rename = "QA")]
2582    Qa,
2583    #[serde(rename = "RE")]
2584    Re,
2585    #[serde(rename = "RO")]
2586    Ro,
2587    #[serde(rename = "RS")]
2588    Rs,
2589    #[serde(rename = "RU")]
2590    Ru,
2591    #[serde(rename = "RW")]
2592    Rw,
2593    #[serde(rename = "SA")]
2594    Sa,
2595    #[serde(rename = "SB")]
2596    Sb,
2597    #[serde(rename = "SC")]
2598    Sc,
2599    #[serde(rename = "SE")]
2600    Se,
2601    #[serde(rename = "SG")]
2602    Sg,
2603    #[serde(rename = "SH")]
2604    Sh,
2605    #[serde(rename = "SI")]
2606    Si,
2607    #[serde(rename = "SJ")]
2608    Sj,
2609    #[serde(rename = "SK")]
2610    Sk,
2611    #[serde(rename = "SL")]
2612    Sl,
2613    #[serde(rename = "SM")]
2614    Sm,
2615    #[serde(rename = "SN")]
2616    Sn,
2617    #[serde(rename = "SO")]
2618    So,
2619    #[serde(rename = "SR")]
2620    Sr,
2621    #[serde(rename = "SS")]
2622    Ss,
2623    #[serde(rename = "ST")]
2624    St,
2625    #[serde(rename = "SV")]
2626    Sv,
2627    #[serde(rename = "SX")]
2628    Sx,
2629    #[serde(rename = "SZ")]
2630    Sz,
2631    #[serde(rename = "TA")]
2632    Ta,
2633    #[serde(rename = "TC")]
2634    Tc,
2635    #[serde(rename = "TD")]
2636    Td,
2637    #[serde(rename = "TF")]
2638    Tf,
2639    #[serde(rename = "TG")]
2640    Tg,
2641    #[serde(rename = "TH")]
2642    Th,
2643    #[serde(rename = "TJ")]
2644    Tj,
2645    #[serde(rename = "TK")]
2646    Tk,
2647    #[serde(rename = "TL")]
2648    Tl,
2649    #[serde(rename = "TM")]
2650    Tm,
2651    #[serde(rename = "TN")]
2652    Tn,
2653    #[serde(rename = "TO")]
2654    To,
2655    #[serde(rename = "TR")]
2656    Tr,
2657    #[serde(rename = "TT")]
2658    Tt,
2659    #[serde(rename = "TV")]
2660    Tv,
2661    #[serde(rename = "TW")]
2662    Tw,
2663    #[serde(rename = "TZ")]
2664    Tz,
2665    #[serde(rename = "UA")]
2666    Ua,
2667    #[serde(rename = "UG")]
2668    Ug,
2669    #[serde(rename = "US")]
2670    Us,
2671    #[serde(rename = "UY")]
2672    Uy,
2673    #[serde(rename = "UZ")]
2674    Uz,
2675    #[serde(rename = "VA")]
2676    Va,
2677    #[serde(rename = "VC")]
2678    Vc,
2679    #[serde(rename = "VE")]
2680    Ve,
2681    #[serde(rename = "VG")]
2682    Vg,
2683    #[serde(rename = "VN")]
2684    Vn,
2685    #[serde(rename = "VU")]
2686    Vu,
2687    #[serde(rename = "WF")]
2688    Wf,
2689    #[serde(rename = "WS")]
2690    Ws,
2691    #[serde(rename = "XK")]
2692    Xk,
2693    #[serde(rename = "YE")]
2694    Ye,
2695    #[serde(rename = "YT")]
2696    Yt,
2697    #[serde(rename = "ZA")]
2698    Za,
2699    #[serde(rename = "ZM")]
2700    Zm,
2701    #[serde(rename = "ZW")]
2702    Zw,
2703    #[serde(rename = "ZZ")]
2704    Zz,
2705}
2706
2707impl CreatePaymentLinkShippingAddressCollectionAllowedCountries {
2708    pub fn as_str(self) -> &'static str {
2709        match self {
2710            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ac => "AC",
2711            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ad => "AD",
2712            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ae => "AE",
2713            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Af => "AF",
2714            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ag => "AG",
2715            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ai => "AI",
2716            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Al => "AL",
2717            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Am => "AM",
2718            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ao => "AO",
2719            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Aq => "AQ",
2720            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ar => "AR",
2721            CreatePaymentLinkShippingAddressCollectionAllowedCountries::At => "AT",
2722            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Au => "AU",
2723            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Aw => "AW",
2724            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ax => "AX",
2725            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Az => "AZ",
2726            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ba => "BA",
2727            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Bb => "BB",
2728            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Bd => "BD",
2729            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Be => "BE",
2730            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Bf => "BF",
2731            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Bg => "BG",
2732            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Bh => "BH",
2733            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Bi => "BI",
2734            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Bj => "BJ",
2735            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Bl => "BL",
2736            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Bm => "BM",
2737            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Bn => "BN",
2738            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Bo => "BO",
2739            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Bq => "BQ",
2740            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Br => "BR",
2741            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Bs => "BS",
2742            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Bt => "BT",
2743            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Bv => "BV",
2744            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Bw => "BW",
2745            CreatePaymentLinkShippingAddressCollectionAllowedCountries::By => "BY",
2746            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Bz => "BZ",
2747            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ca => "CA",
2748            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Cd => "CD",
2749            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Cf => "CF",
2750            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Cg => "CG",
2751            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ch => "CH",
2752            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ci => "CI",
2753            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ck => "CK",
2754            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Cl => "CL",
2755            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Cm => "CM",
2756            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Cn => "CN",
2757            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Co => "CO",
2758            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Cr => "CR",
2759            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Cv => "CV",
2760            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Cw => "CW",
2761            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Cy => "CY",
2762            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Cz => "CZ",
2763            CreatePaymentLinkShippingAddressCollectionAllowedCountries::De => "DE",
2764            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Dj => "DJ",
2765            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Dk => "DK",
2766            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Dm => "DM",
2767            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Do => "DO",
2768            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Dz => "DZ",
2769            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ec => "EC",
2770            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ee => "EE",
2771            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Eg => "EG",
2772            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Eh => "EH",
2773            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Er => "ER",
2774            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Es => "ES",
2775            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Et => "ET",
2776            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Fi => "FI",
2777            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Fj => "FJ",
2778            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Fk => "FK",
2779            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Fo => "FO",
2780            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Fr => "FR",
2781            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ga => "GA",
2782            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Gb => "GB",
2783            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Gd => "GD",
2784            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ge => "GE",
2785            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Gf => "GF",
2786            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Gg => "GG",
2787            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Gh => "GH",
2788            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Gi => "GI",
2789            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Gl => "GL",
2790            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Gm => "GM",
2791            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Gn => "GN",
2792            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Gp => "GP",
2793            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Gq => "GQ",
2794            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Gr => "GR",
2795            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Gs => "GS",
2796            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Gt => "GT",
2797            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Gu => "GU",
2798            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Gw => "GW",
2799            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Gy => "GY",
2800            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Hk => "HK",
2801            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Hn => "HN",
2802            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Hr => "HR",
2803            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ht => "HT",
2804            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Hu => "HU",
2805            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Id => "ID",
2806            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ie => "IE",
2807            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Il => "IL",
2808            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Im => "IM",
2809            CreatePaymentLinkShippingAddressCollectionAllowedCountries::In => "IN",
2810            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Io => "IO",
2811            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Iq => "IQ",
2812            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Is => "IS",
2813            CreatePaymentLinkShippingAddressCollectionAllowedCountries::It => "IT",
2814            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Je => "JE",
2815            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Jm => "JM",
2816            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Jo => "JO",
2817            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Jp => "JP",
2818            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ke => "KE",
2819            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Kg => "KG",
2820            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Kh => "KH",
2821            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ki => "KI",
2822            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Km => "KM",
2823            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Kn => "KN",
2824            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Kr => "KR",
2825            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Kw => "KW",
2826            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ky => "KY",
2827            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Kz => "KZ",
2828            CreatePaymentLinkShippingAddressCollectionAllowedCountries::La => "LA",
2829            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Lb => "LB",
2830            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Lc => "LC",
2831            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Li => "LI",
2832            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Lk => "LK",
2833            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Lr => "LR",
2834            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ls => "LS",
2835            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Lt => "LT",
2836            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Lu => "LU",
2837            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Lv => "LV",
2838            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ly => "LY",
2839            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ma => "MA",
2840            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Mc => "MC",
2841            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Md => "MD",
2842            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Me => "ME",
2843            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Mf => "MF",
2844            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Mg => "MG",
2845            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Mk => "MK",
2846            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ml => "ML",
2847            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Mm => "MM",
2848            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Mn => "MN",
2849            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Mo => "MO",
2850            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Mq => "MQ",
2851            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Mr => "MR",
2852            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ms => "MS",
2853            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Mt => "MT",
2854            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Mu => "MU",
2855            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Mv => "MV",
2856            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Mw => "MW",
2857            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Mx => "MX",
2858            CreatePaymentLinkShippingAddressCollectionAllowedCountries::My => "MY",
2859            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Mz => "MZ",
2860            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Na => "NA",
2861            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Nc => "NC",
2862            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ne => "NE",
2863            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ng => "NG",
2864            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ni => "NI",
2865            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Nl => "NL",
2866            CreatePaymentLinkShippingAddressCollectionAllowedCountries::No => "NO",
2867            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Np => "NP",
2868            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Nr => "NR",
2869            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Nu => "NU",
2870            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Nz => "NZ",
2871            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Om => "OM",
2872            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Pa => "PA",
2873            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Pe => "PE",
2874            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Pf => "PF",
2875            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Pg => "PG",
2876            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ph => "PH",
2877            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Pk => "PK",
2878            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Pl => "PL",
2879            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Pm => "PM",
2880            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Pn => "PN",
2881            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Pr => "PR",
2882            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ps => "PS",
2883            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Pt => "PT",
2884            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Py => "PY",
2885            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Qa => "QA",
2886            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Re => "RE",
2887            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ro => "RO",
2888            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Rs => "RS",
2889            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ru => "RU",
2890            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Rw => "RW",
2891            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Sa => "SA",
2892            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Sb => "SB",
2893            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Sc => "SC",
2894            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Se => "SE",
2895            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Sg => "SG",
2896            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Sh => "SH",
2897            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Si => "SI",
2898            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Sj => "SJ",
2899            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Sk => "SK",
2900            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Sl => "SL",
2901            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Sm => "SM",
2902            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Sn => "SN",
2903            CreatePaymentLinkShippingAddressCollectionAllowedCountries::So => "SO",
2904            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Sr => "SR",
2905            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ss => "SS",
2906            CreatePaymentLinkShippingAddressCollectionAllowedCountries::St => "ST",
2907            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Sv => "SV",
2908            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Sx => "SX",
2909            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Sz => "SZ",
2910            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ta => "TA",
2911            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Tc => "TC",
2912            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Td => "TD",
2913            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Tf => "TF",
2914            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Tg => "TG",
2915            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Th => "TH",
2916            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Tj => "TJ",
2917            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Tk => "TK",
2918            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Tl => "TL",
2919            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Tm => "TM",
2920            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Tn => "TN",
2921            CreatePaymentLinkShippingAddressCollectionAllowedCountries::To => "TO",
2922            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Tr => "TR",
2923            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Tt => "TT",
2924            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Tv => "TV",
2925            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Tw => "TW",
2926            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Tz => "TZ",
2927            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ua => "UA",
2928            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ug => "UG",
2929            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Us => "US",
2930            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Uy => "UY",
2931            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Uz => "UZ",
2932            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Va => "VA",
2933            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Vc => "VC",
2934            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ve => "VE",
2935            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Vg => "VG",
2936            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Vn => "VN",
2937            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Vu => "VU",
2938            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Wf => "WF",
2939            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ws => "WS",
2940            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Xk => "XK",
2941            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Ye => "YE",
2942            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Yt => "YT",
2943            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Za => "ZA",
2944            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Zm => "ZM",
2945            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Zw => "ZW",
2946            CreatePaymentLinkShippingAddressCollectionAllowedCountries::Zz => "ZZ",
2947        }
2948    }
2949}
2950
2951impl AsRef<str> for CreatePaymentLinkShippingAddressCollectionAllowedCountries {
2952    fn as_ref(&self) -> &str {
2953        self.as_str()
2954    }
2955}
2956
2957impl std::fmt::Display for CreatePaymentLinkShippingAddressCollectionAllowedCountries {
2958    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2959        self.as_str().fmt(f)
2960    }
2961}
2962impl std::default::Default for CreatePaymentLinkShippingAddressCollectionAllowedCountries {
2963    fn default() -> Self {
2964        Self::Ac
2965    }
2966}
2967
2968/// An enum representing the possible values of an `CreatePaymentLinkSubscriptionDataInvoiceSettingsIssuer`'s `type` field.
2969#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
2970#[serde(rename_all = "snake_case")]
2971pub enum CreatePaymentLinkSubscriptionDataInvoiceSettingsIssuerType {
2972    Account,
2973    #[serde(rename = "self")]
2974    Self_,
2975}
2976
2977impl CreatePaymentLinkSubscriptionDataInvoiceSettingsIssuerType {
2978    pub fn as_str(self) -> &'static str {
2979        match self {
2980            CreatePaymentLinkSubscriptionDataInvoiceSettingsIssuerType::Account => "account",
2981            CreatePaymentLinkSubscriptionDataInvoiceSettingsIssuerType::Self_ => "self",
2982        }
2983    }
2984}
2985
2986impl AsRef<str> for CreatePaymentLinkSubscriptionDataInvoiceSettingsIssuerType {
2987    fn as_ref(&self) -> &str {
2988        self.as_str()
2989    }
2990}
2991
2992impl std::fmt::Display for CreatePaymentLinkSubscriptionDataInvoiceSettingsIssuerType {
2993    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
2994        self.as_str().fmt(f)
2995    }
2996}
2997impl std::default::Default for CreatePaymentLinkSubscriptionDataInvoiceSettingsIssuerType {
2998    fn default() -> Self {
2999        Self::Account
3000    }
3001}
3002
3003/// An enum representing the possible values of an `CreatePaymentLinkSubscriptionDataTrialSettingsEndBehavior`'s `missing_payment_method` field.
3004#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3005#[serde(rename_all = "snake_case")]
3006pub enum CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod {
3007    Cancel,
3008    CreateInvoice,
3009    Pause,
3010}
3011
3012impl CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod {
3013    pub fn as_str(self) -> &'static str {
3014        match self {
3015            CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod::Cancel => "cancel",
3016            CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod::CreateInvoice => "create_invoice",
3017            CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod::Pause => "pause",
3018        }
3019    }
3020}
3021
3022impl AsRef<str> for CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod {
3023    fn as_ref(&self) -> &str {
3024        self.as_str()
3025    }
3026}
3027
3028impl std::fmt::Display
3029    for CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod
3030{
3031    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3032        self.as_str().fmt(f)
3033    }
3034}
3035impl std::default::Default
3036    for CreatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod
3037{
3038    fn default() -> Self {
3039        Self::Cancel
3040    }
3041}
3042
3043/// An enum representing the possible values of an `PaymentLink`'s `billing_address_collection` field.
3044#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3045#[serde(rename_all = "snake_case")]
3046pub enum PaymentLinkBillingAddressCollection {
3047    Auto,
3048    Required,
3049}
3050
3051impl PaymentLinkBillingAddressCollection {
3052    pub fn as_str(self) -> &'static str {
3053        match self {
3054            PaymentLinkBillingAddressCollection::Auto => "auto",
3055            PaymentLinkBillingAddressCollection::Required => "required",
3056        }
3057    }
3058}
3059
3060impl AsRef<str> for PaymentLinkBillingAddressCollection {
3061    fn as_ref(&self) -> &str {
3062        self.as_str()
3063    }
3064}
3065
3066impl std::fmt::Display for PaymentLinkBillingAddressCollection {
3067    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3068        self.as_str().fmt(f)
3069    }
3070}
3071impl std::default::Default for PaymentLinkBillingAddressCollection {
3072    fn default() -> Self {
3073        Self::Auto
3074    }
3075}
3076
3077/// An enum representing the possible values of an `PaymentLink`'s `customer_creation` field.
3078#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3079#[serde(rename_all = "snake_case")]
3080pub enum PaymentLinkCustomerCreation {
3081    Always,
3082    IfRequired,
3083}
3084
3085impl PaymentLinkCustomerCreation {
3086    pub fn as_str(self) -> &'static str {
3087        match self {
3088            PaymentLinkCustomerCreation::Always => "always",
3089            PaymentLinkCustomerCreation::IfRequired => "if_required",
3090        }
3091    }
3092}
3093
3094impl AsRef<str> for PaymentLinkCustomerCreation {
3095    fn as_ref(&self) -> &str {
3096        self.as_str()
3097    }
3098}
3099
3100impl std::fmt::Display for PaymentLinkCustomerCreation {
3101    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3102        self.as_str().fmt(f)
3103    }
3104}
3105impl std::default::Default for PaymentLinkCustomerCreation {
3106    fn default() -> Self {
3107        Self::Always
3108    }
3109}
3110
3111/// An enum representing the possible values of an `PaymentLink`'s `payment_method_collection` field.
3112#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3113#[serde(rename_all = "snake_case")]
3114pub enum PaymentLinkPaymentMethodCollection {
3115    Always,
3116    IfRequired,
3117}
3118
3119impl PaymentLinkPaymentMethodCollection {
3120    pub fn as_str(self) -> &'static str {
3121        match self {
3122            PaymentLinkPaymentMethodCollection::Always => "always",
3123            PaymentLinkPaymentMethodCollection::IfRequired => "if_required",
3124        }
3125    }
3126}
3127
3128impl AsRef<str> for PaymentLinkPaymentMethodCollection {
3129    fn as_ref(&self) -> &str {
3130        self.as_str()
3131    }
3132}
3133
3134impl std::fmt::Display for PaymentLinkPaymentMethodCollection {
3135    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3136        self.as_str().fmt(f)
3137    }
3138}
3139impl std::default::Default for PaymentLinkPaymentMethodCollection {
3140    fn default() -> Self {
3141        Self::Always
3142    }
3143}
3144
3145/// An enum representing the possible values of an `PaymentLink`'s `payment_method_types` field.
3146#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3147#[serde(rename_all = "snake_case")]
3148pub enum PaymentLinkPaymentMethodTypes {
3149    Affirm,
3150    AfterpayClearpay,
3151    Alipay,
3152    AuBecsDebit,
3153    BacsDebit,
3154    Bancontact,
3155    Blik,
3156    Boleto,
3157    Card,
3158    Cashapp,
3159    Eps,
3160    Fpx,
3161    Giropay,
3162    Grabpay,
3163    Ideal,
3164    Klarna,
3165    Konbini,
3166    Link,
3167    Oxxo,
3168    P24,
3169    Paynow,
3170    Paypal,
3171    Pix,
3172    Promptpay,
3173    SepaDebit,
3174    Sofort,
3175    Swish,
3176    UsBankAccount,
3177    WechatPay,
3178}
3179
3180impl PaymentLinkPaymentMethodTypes {
3181    pub fn as_str(self) -> &'static str {
3182        match self {
3183            PaymentLinkPaymentMethodTypes::Affirm => "affirm",
3184            PaymentLinkPaymentMethodTypes::AfterpayClearpay => "afterpay_clearpay",
3185            PaymentLinkPaymentMethodTypes::Alipay => "alipay",
3186            PaymentLinkPaymentMethodTypes::AuBecsDebit => "au_becs_debit",
3187            PaymentLinkPaymentMethodTypes::BacsDebit => "bacs_debit",
3188            PaymentLinkPaymentMethodTypes::Bancontact => "bancontact",
3189            PaymentLinkPaymentMethodTypes::Blik => "blik",
3190            PaymentLinkPaymentMethodTypes::Boleto => "boleto",
3191            PaymentLinkPaymentMethodTypes::Card => "card",
3192            PaymentLinkPaymentMethodTypes::Cashapp => "cashapp",
3193            PaymentLinkPaymentMethodTypes::Eps => "eps",
3194            PaymentLinkPaymentMethodTypes::Fpx => "fpx",
3195            PaymentLinkPaymentMethodTypes::Giropay => "giropay",
3196            PaymentLinkPaymentMethodTypes::Grabpay => "grabpay",
3197            PaymentLinkPaymentMethodTypes::Ideal => "ideal",
3198            PaymentLinkPaymentMethodTypes::Klarna => "klarna",
3199            PaymentLinkPaymentMethodTypes::Konbini => "konbini",
3200            PaymentLinkPaymentMethodTypes::Link => "link",
3201            PaymentLinkPaymentMethodTypes::Oxxo => "oxxo",
3202            PaymentLinkPaymentMethodTypes::P24 => "p24",
3203            PaymentLinkPaymentMethodTypes::Paynow => "paynow",
3204            PaymentLinkPaymentMethodTypes::Paypal => "paypal",
3205            PaymentLinkPaymentMethodTypes::Pix => "pix",
3206            PaymentLinkPaymentMethodTypes::Promptpay => "promptpay",
3207            PaymentLinkPaymentMethodTypes::SepaDebit => "sepa_debit",
3208            PaymentLinkPaymentMethodTypes::Sofort => "sofort",
3209            PaymentLinkPaymentMethodTypes::Swish => "swish",
3210            PaymentLinkPaymentMethodTypes::UsBankAccount => "us_bank_account",
3211            PaymentLinkPaymentMethodTypes::WechatPay => "wechat_pay",
3212        }
3213    }
3214}
3215
3216impl AsRef<str> for PaymentLinkPaymentMethodTypes {
3217    fn as_ref(&self) -> &str {
3218        self.as_str()
3219    }
3220}
3221
3222impl std::fmt::Display for PaymentLinkPaymentMethodTypes {
3223    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3224        self.as_str().fmt(f)
3225    }
3226}
3227impl std::default::Default for PaymentLinkPaymentMethodTypes {
3228    fn default() -> Self {
3229        Self::Affirm
3230    }
3231}
3232
3233/// An enum representing the possible values of an `PaymentLink`'s `submit_type` field.
3234#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3235#[serde(rename_all = "snake_case")]
3236pub enum PaymentLinkSubmitType {
3237    Auto,
3238    Book,
3239    Donate,
3240    Pay,
3241}
3242
3243impl PaymentLinkSubmitType {
3244    pub fn as_str(self) -> &'static str {
3245        match self {
3246            PaymentLinkSubmitType::Auto => "auto",
3247            PaymentLinkSubmitType::Book => "book",
3248            PaymentLinkSubmitType::Donate => "donate",
3249            PaymentLinkSubmitType::Pay => "pay",
3250        }
3251    }
3252}
3253
3254impl AsRef<str> for PaymentLinkSubmitType {
3255    fn as_ref(&self) -> &str {
3256        self.as_str()
3257    }
3258}
3259
3260impl std::fmt::Display for PaymentLinkSubmitType {
3261    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3262        self.as_str().fmt(f)
3263    }
3264}
3265impl std::default::Default for PaymentLinkSubmitType {
3266    fn default() -> Self {
3267        Self::Auto
3268    }
3269}
3270
3271/// An enum representing the possible values of an `PaymentLinksResourceAfterCompletion`'s `type` field.
3272#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3273#[serde(rename_all = "snake_case")]
3274pub enum PaymentLinksResourceAfterCompletionType {
3275    HostedConfirmation,
3276    Redirect,
3277}
3278
3279impl PaymentLinksResourceAfterCompletionType {
3280    pub fn as_str(self) -> &'static str {
3281        match self {
3282            PaymentLinksResourceAfterCompletionType::HostedConfirmation => "hosted_confirmation",
3283            PaymentLinksResourceAfterCompletionType::Redirect => "redirect",
3284        }
3285    }
3286}
3287
3288impl AsRef<str> for PaymentLinksResourceAfterCompletionType {
3289    fn as_ref(&self) -> &str {
3290        self.as_str()
3291    }
3292}
3293
3294impl std::fmt::Display for PaymentLinksResourceAfterCompletionType {
3295    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3296        self.as_str().fmt(f)
3297    }
3298}
3299impl std::default::Default for PaymentLinksResourceAfterCompletionType {
3300    fn default() -> Self {
3301        Self::HostedConfirmation
3302    }
3303}
3304
3305/// An enum representing the possible values of an `PaymentLinksResourceConsentCollection`'s `promotions` field.
3306#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3307#[serde(rename_all = "snake_case")]
3308pub enum PaymentLinksResourceConsentCollectionPromotions {
3309    Auto,
3310    None,
3311}
3312
3313impl PaymentLinksResourceConsentCollectionPromotions {
3314    pub fn as_str(self) -> &'static str {
3315        match self {
3316            PaymentLinksResourceConsentCollectionPromotions::Auto => "auto",
3317            PaymentLinksResourceConsentCollectionPromotions::None => "none",
3318        }
3319    }
3320}
3321
3322impl AsRef<str> for PaymentLinksResourceConsentCollectionPromotions {
3323    fn as_ref(&self) -> &str {
3324        self.as_str()
3325    }
3326}
3327
3328impl std::fmt::Display for PaymentLinksResourceConsentCollectionPromotions {
3329    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3330        self.as_str().fmt(f)
3331    }
3332}
3333impl std::default::Default for PaymentLinksResourceConsentCollectionPromotions {
3334    fn default() -> Self {
3335        Self::Auto
3336    }
3337}
3338
3339/// An enum representing the possible values of an `PaymentLinksResourceConsentCollection`'s `terms_of_service` field.
3340#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3341#[serde(rename_all = "snake_case")]
3342pub enum PaymentLinksResourceConsentCollectionTermsOfService {
3343    None,
3344    Required,
3345}
3346
3347impl PaymentLinksResourceConsentCollectionTermsOfService {
3348    pub fn as_str(self) -> &'static str {
3349        match self {
3350            PaymentLinksResourceConsentCollectionTermsOfService::None => "none",
3351            PaymentLinksResourceConsentCollectionTermsOfService::Required => "required",
3352        }
3353    }
3354}
3355
3356impl AsRef<str> for PaymentLinksResourceConsentCollectionTermsOfService {
3357    fn as_ref(&self) -> &str {
3358        self.as_str()
3359    }
3360}
3361
3362impl std::fmt::Display for PaymentLinksResourceConsentCollectionTermsOfService {
3363    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3364        self.as_str().fmt(f)
3365    }
3366}
3367impl std::default::Default for PaymentLinksResourceConsentCollectionTermsOfService {
3368    fn default() -> Self {
3369        Self::None
3370    }
3371}
3372
3373/// An enum representing the possible values of an `PaymentLinksResourceCustomFieldsLabel`'s `type` field.
3374#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3375#[serde(rename_all = "snake_case")]
3376pub enum PaymentLinksResourceCustomFieldsLabelType {
3377    Custom,
3378}
3379
3380impl PaymentLinksResourceCustomFieldsLabelType {
3381    pub fn as_str(self) -> &'static str {
3382        match self {
3383            PaymentLinksResourceCustomFieldsLabelType::Custom => "custom",
3384        }
3385    }
3386}
3387
3388impl AsRef<str> for PaymentLinksResourceCustomFieldsLabelType {
3389    fn as_ref(&self) -> &str {
3390        self.as_str()
3391    }
3392}
3393
3394impl std::fmt::Display for PaymentLinksResourceCustomFieldsLabelType {
3395    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3396        self.as_str().fmt(f)
3397    }
3398}
3399impl std::default::Default for PaymentLinksResourceCustomFieldsLabelType {
3400    fn default() -> Self {
3401        Self::Custom
3402    }
3403}
3404
3405/// An enum representing the possible values of an `PaymentLinksResourceCustomFields`'s `type` field.
3406#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3407#[serde(rename_all = "snake_case")]
3408pub enum PaymentLinksResourceCustomFieldsType {
3409    Dropdown,
3410    Numeric,
3411    Text,
3412}
3413
3414impl PaymentLinksResourceCustomFieldsType {
3415    pub fn as_str(self) -> &'static str {
3416        match self {
3417            PaymentLinksResourceCustomFieldsType::Dropdown => "dropdown",
3418            PaymentLinksResourceCustomFieldsType::Numeric => "numeric",
3419            PaymentLinksResourceCustomFieldsType::Text => "text",
3420        }
3421    }
3422}
3423
3424impl AsRef<str> for PaymentLinksResourceCustomFieldsType {
3425    fn as_ref(&self) -> &str {
3426        self.as_str()
3427    }
3428}
3429
3430impl std::fmt::Display for PaymentLinksResourceCustomFieldsType {
3431    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3432        self.as_str().fmt(f)
3433    }
3434}
3435impl std::default::Default for PaymentLinksResourceCustomFieldsType {
3436    fn default() -> Self {
3437        Self::Dropdown
3438    }
3439}
3440
3441/// An enum representing the possible values of an `PaymentLinksResourcePaymentIntentData`'s `capture_method` field.
3442#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3443#[serde(rename_all = "snake_case")]
3444pub enum PaymentLinksResourcePaymentIntentDataCaptureMethod {
3445    Automatic,
3446    AutomaticAsync,
3447    Manual,
3448}
3449
3450impl PaymentLinksResourcePaymentIntentDataCaptureMethod {
3451    pub fn as_str(self) -> &'static str {
3452        match self {
3453            PaymentLinksResourcePaymentIntentDataCaptureMethod::Automatic => "automatic",
3454            PaymentLinksResourcePaymentIntentDataCaptureMethod::AutomaticAsync => "automatic_async",
3455            PaymentLinksResourcePaymentIntentDataCaptureMethod::Manual => "manual",
3456        }
3457    }
3458}
3459
3460impl AsRef<str> for PaymentLinksResourcePaymentIntentDataCaptureMethod {
3461    fn as_ref(&self) -> &str {
3462        self.as_str()
3463    }
3464}
3465
3466impl std::fmt::Display for PaymentLinksResourcePaymentIntentDataCaptureMethod {
3467    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3468        self.as_str().fmt(f)
3469    }
3470}
3471impl std::default::Default for PaymentLinksResourcePaymentIntentDataCaptureMethod {
3472    fn default() -> Self {
3473        Self::Automatic
3474    }
3475}
3476
3477/// An enum representing the possible values of an `PaymentLinksResourcePaymentIntentData`'s `setup_future_usage` field.
3478#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3479#[serde(rename_all = "snake_case")]
3480pub enum PaymentLinksResourcePaymentIntentDataSetupFutureUsage {
3481    OffSession,
3482    OnSession,
3483}
3484
3485impl PaymentLinksResourcePaymentIntentDataSetupFutureUsage {
3486    pub fn as_str(self) -> &'static str {
3487        match self {
3488            PaymentLinksResourcePaymentIntentDataSetupFutureUsage::OffSession => "off_session",
3489            PaymentLinksResourcePaymentIntentDataSetupFutureUsage::OnSession => "on_session",
3490        }
3491    }
3492}
3493
3494impl AsRef<str> for PaymentLinksResourcePaymentIntentDataSetupFutureUsage {
3495    fn as_ref(&self) -> &str {
3496        self.as_str()
3497    }
3498}
3499
3500impl std::fmt::Display for PaymentLinksResourcePaymentIntentDataSetupFutureUsage {
3501    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3502        self.as_str().fmt(f)
3503    }
3504}
3505impl std::default::Default for PaymentLinksResourcePaymentIntentDataSetupFutureUsage {
3506    fn default() -> Self {
3507        Self::OffSession
3508    }
3509}
3510
3511/// An enum representing the possible values of an `PaymentLinksResourcePaymentMethodReuseAgreement`'s `position` field.
3512#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3513#[serde(rename_all = "snake_case")]
3514pub enum PaymentLinksResourcePaymentMethodReuseAgreementPosition {
3515    Auto,
3516    Hidden,
3517}
3518
3519impl PaymentLinksResourcePaymentMethodReuseAgreementPosition {
3520    pub fn as_str(self) -> &'static str {
3521        match self {
3522            PaymentLinksResourcePaymentMethodReuseAgreementPosition::Auto => "auto",
3523            PaymentLinksResourcePaymentMethodReuseAgreementPosition::Hidden => "hidden",
3524        }
3525    }
3526}
3527
3528impl AsRef<str> for PaymentLinksResourcePaymentMethodReuseAgreementPosition {
3529    fn as_ref(&self) -> &str {
3530        self.as_str()
3531    }
3532}
3533
3534impl std::fmt::Display for PaymentLinksResourcePaymentMethodReuseAgreementPosition {
3535    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3536        self.as_str().fmt(f)
3537    }
3538}
3539impl std::default::Default for PaymentLinksResourcePaymentMethodReuseAgreementPosition {
3540    fn default() -> Self {
3541        Self::Auto
3542    }
3543}
3544
3545/// An enum representing the possible values of an `PaymentLinksResourceShippingAddressCollection`'s `allowed_countries` field.
3546#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
3547#[serde(rename_all = "snake_case")]
3548pub enum PaymentLinksResourceShippingAddressCollectionAllowedCountries {
3549    #[serde(rename = "AC")]
3550    Ac,
3551    #[serde(rename = "AD")]
3552    Ad,
3553    #[serde(rename = "AE")]
3554    Ae,
3555    #[serde(rename = "AF")]
3556    Af,
3557    #[serde(rename = "AG")]
3558    Ag,
3559    #[serde(rename = "AI")]
3560    Ai,
3561    #[serde(rename = "AL")]
3562    Al,
3563    #[serde(rename = "AM")]
3564    Am,
3565    #[serde(rename = "AO")]
3566    Ao,
3567    #[serde(rename = "AQ")]
3568    Aq,
3569    #[serde(rename = "AR")]
3570    Ar,
3571    #[serde(rename = "AT")]
3572    At,
3573    #[serde(rename = "AU")]
3574    Au,
3575    #[serde(rename = "AW")]
3576    Aw,
3577    #[serde(rename = "AX")]
3578    Ax,
3579    #[serde(rename = "AZ")]
3580    Az,
3581    #[serde(rename = "BA")]
3582    Ba,
3583    #[serde(rename = "BB")]
3584    Bb,
3585    #[serde(rename = "BD")]
3586    Bd,
3587    #[serde(rename = "BE")]
3588    Be,
3589    #[serde(rename = "BF")]
3590    Bf,
3591    #[serde(rename = "BG")]
3592    Bg,
3593    #[serde(rename = "BH")]
3594    Bh,
3595    #[serde(rename = "BI")]
3596    Bi,
3597    #[serde(rename = "BJ")]
3598    Bj,
3599    #[serde(rename = "BL")]
3600    Bl,
3601    #[serde(rename = "BM")]
3602    Bm,
3603    #[serde(rename = "BN")]
3604    Bn,
3605    #[serde(rename = "BO")]
3606    Bo,
3607    #[serde(rename = "BQ")]
3608    Bq,
3609    #[serde(rename = "BR")]
3610    Br,
3611    #[serde(rename = "BS")]
3612    Bs,
3613    #[serde(rename = "BT")]
3614    Bt,
3615    #[serde(rename = "BV")]
3616    Bv,
3617    #[serde(rename = "BW")]
3618    Bw,
3619    #[serde(rename = "BY")]
3620    By,
3621    #[serde(rename = "BZ")]
3622    Bz,
3623    #[serde(rename = "CA")]
3624    Ca,
3625    #[serde(rename = "CD")]
3626    Cd,
3627    #[serde(rename = "CF")]
3628    Cf,
3629    #[serde(rename = "CG")]
3630    Cg,
3631    #[serde(rename = "CH")]
3632    Ch,
3633    #[serde(rename = "CI")]
3634    Ci,
3635    #[serde(rename = "CK")]
3636    Ck,
3637    #[serde(rename = "CL")]
3638    Cl,
3639    #[serde(rename = "CM")]
3640    Cm,
3641    #[serde(rename = "CN")]
3642    Cn,
3643    #[serde(rename = "CO")]
3644    Co,
3645    #[serde(rename = "CR")]
3646    Cr,
3647    #[serde(rename = "CV")]
3648    Cv,
3649    #[serde(rename = "CW")]
3650    Cw,
3651    #[serde(rename = "CY")]
3652    Cy,
3653    #[serde(rename = "CZ")]
3654    Cz,
3655    #[serde(rename = "DE")]
3656    De,
3657    #[serde(rename = "DJ")]
3658    Dj,
3659    #[serde(rename = "DK")]
3660    Dk,
3661    #[serde(rename = "DM")]
3662    Dm,
3663    #[serde(rename = "DO")]
3664    Do,
3665    #[serde(rename = "DZ")]
3666    Dz,
3667    #[serde(rename = "EC")]
3668    Ec,
3669    #[serde(rename = "EE")]
3670    Ee,
3671    #[serde(rename = "EG")]
3672    Eg,
3673    #[serde(rename = "EH")]
3674    Eh,
3675    #[serde(rename = "ER")]
3676    Er,
3677    #[serde(rename = "ES")]
3678    Es,
3679    #[serde(rename = "ET")]
3680    Et,
3681    #[serde(rename = "FI")]
3682    Fi,
3683    #[serde(rename = "FJ")]
3684    Fj,
3685    #[serde(rename = "FK")]
3686    Fk,
3687    #[serde(rename = "FO")]
3688    Fo,
3689    #[serde(rename = "FR")]
3690    Fr,
3691    #[serde(rename = "GA")]
3692    Ga,
3693    #[serde(rename = "GB")]
3694    Gb,
3695    #[serde(rename = "GD")]
3696    Gd,
3697    #[serde(rename = "GE")]
3698    Ge,
3699    #[serde(rename = "GF")]
3700    Gf,
3701    #[serde(rename = "GG")]
3702    Gg,
3703    #[serde(rename = "GH")]
3704    Gh,
3705    #[serde(rename = "GI")]
3706    Gi,
3707    #[serde(rename = "GL")]
3708    Gl,
3709    #[serde(rename = "GM")]
3710    Gm,
3711    #[serde(rename = "GN")]
3712    Gn,
3713    #[serde(rename = "GP")]
3714    Gp,
3715    #[serde(rename = "GQ")]
3716    Gq,
3717    #[serde(rename = "GR")]
3718    Gr,
3719    #[serde(rename = "GS")]
3720    Gs,
3721    #[serde(rename = "GT")]
3722    Gt,
3723    #[serde(rename = "GU")]
3724    Gu,
3725    #[serde(rename = "GW")]
3726    Gw,
3727    #[serde(rename = "GY")]
3728    Gy,
3729    #[serde(rename = "HK")]
3730    Hk,
3731    #[serde(rename = "HN")]
3732    Hn,
3733    #[serde(rename = "HR")]
3734    Hr,
3735    #[serde(rename = "HT")]
3736    Ht,
3737    #[serde(rename = "HU")]
3738    Hu,
3739    #[serde(rename = "ID")]
3740    Id,
3741    #[serde(rename = "IE")]
3742    Ie,
3743    #[serde(rename = "IL")]
3744    Il,
3745    #[serde(rename = "IM")]
3746    Im,
3747    #[serde(rename = "IN")]
3748    In,
3749    #[serde(rename = "IO")]
3750    Io,
3751    #[serde(rename = "IQ")]
3752    Iq,
3753    #[serde(rename = "IS")]
3754    Is,
3755    #[serde(rename = "IT")]
3756    It,
3757    #[serde(rename = "JE")]
3758    Je,
3759    #[serde(rename = "JM")]
3760    Jm,
3761    #[serde(rename = "JO")]
3762    Jo,
3763    #[serde(rename = "JP")]
3764    Jp,
3765    #[serde(rename = "KE")]
3766    Ke,
3767    #[serde(rename = "KG")]
3768    Kg,
3769    #[serde(rename = "KH")]
3770    Kh,
3771    #[serde(rename = "KI")]
3772    Ki,
3773    #[serde(rename = "KM")]
3774    Km,
3775    #[serde(rename = "KN")]
3776    Kn,
3777    #[serde(rename = "KR")]
3778    Kr,
3779    #[serde(rename = "KW")]
3780    Kw,
3781    #[serde(rename = "KY")]
3782    Ky,
3783    #[serde(rename = "KZ")]
3784    Kz,
3785    #[serde(rename = "LA")]
3786    La,
3787    #[serde(rename = "LB")]
3788    Lb,
3789    #[serde(rename = "LC")]
3790    Lc,
3791    #[serde(rename = "LI")]
3792    Li,
3793    #[serde(rename = "LK")]
3794    Lk,
3795    #[serde(rename = "LR")]
3796    Lr,
3797    #[serde(rename = "LS")]
3798    Ls,
3799    #[serde(rename = "LT")]
3800    Lt,
3801    #[serde(rename = "LU")]
3802    Lu,
3803    #[serde(rename = "LV")]
3804    Lv,
3805    #[serde(rename = "LY")]
3806    Ly,
3807    #[serde(rename = "MA")]
3808    Ma,
3809    #[serde(rename = "MC")]
3810    Mc,
3811    #[serde(rename = "MD")]
3812    Md,
3813    #[serde(rename = "ME")]
3814    Me,
3815    #[serde(rename = "MF")]
3816    Mf,
3817    #[serde(rename = "MG")]
3818    Mg,
3819    #[serde(rename = "MK")]
3820    Mk,
3821    #[serde(rename = "ML")]
3822    Ml,
3823    #[serde(rename = "MM")]
3824    Mm,
3825    #[serde(rename = "MN")]
3826    Mn,
3827    #[serde(rename = "MO")]
3828    Mo,
3829    #[serde(rename = "MQ")]
3830    Mq,
3831    #[serde(rename = "MR")]
3832    Mr,
3833    #[serde(rename = "MS")]
3834    Ms,
3835    #[serde(rename = "MT")]
3836    Mt,
3837    #[serde(rename = "MU")]
3838    Mu,
3839    #[serde(rename = "MV")]
3840    Mv,
3841    #[serde(rename = "MW")]
3842    Mw,
3843    #[serde(rename = "MX")]
3844    Mx,
3845    #[serde(rename = "MY")]
3846    My,
3847    #[serde(rename = "MZ")]
3848    Mz,
3849    #[serde(rename = "NA")]
3850    Na,
3851    #[serde(rename = "NC")]
3852    Nc,
3853    #[serde(rename = "NE")]
3854    Ne,
3855    #[serde(rename = "NG")]
3856    Ng,
3857    #[serde(rename = "NI")]
3858    Ni,
3859    #[serde(rename = "NL")]
3860    Nl,
3861    #[serde(rename = "NO")]
3862    No,
3863    #[serde(rename = "NP")]
3864    Np,
3865    #[serde(rename = "NR")]
3866    Nr,
3867    #[serde(rename = "NU")]
3868    Nu,
3869    #[serde(rename = "NZ")]
3870    Nz,
3871    #[serde(rename = "OM")]
3872    Om,
3873    #[serde(rename = "PA")]
3874    Pa,
3875    #[serde(rename = "PE")]
3876    Pe,
3877    #[serde(rename = "PF")]
3878    Pf,
3879    #[serde(rename = "PG")]
3880    Pg,
3881    #[serde(rename = "PH")]
3882    Ph,
3883    #[serde(rename = "PK")]
3884    Pk,
3885    #[serde(rename = "PL")]
3886    Pl,
3887    #[serde(rename = "PM")]
3888    Pm,
3889    #[serde(rename = "PN")]
3890    Pn,
3891    #[serde(rename = "PR")]
3892    Pr,
3893    #[serde(rename = "PS")]
3894    Ps,
3895    #[serde(rename = "PT")]
3896    Pt,
3897    #[serde(rename = "PY")]
3898    Py,
3899    #[serde(rename = "QA")]
3900    Qa,
3901    #[serde(rename = "RE")]
3902    Re,
3903    #[serde(rename = "RO")]
3904    Ro,
3905    #[serde(rename = "RS")]
3906    Rs,
3907    #[serde(rename = "RU")]
3908    Ru,
3909    #[serde(rename = "RW")]
3910    Rw,
3911    #[serde(rename = "SA")]
3912    Sa,
3913    #[serde(rename = "SB")]
3914    Sb,
3915    #[serde(rename = "SC")]
3916    Sc,
3917    #[serde(rename = "SE")]
3918    Se,
3919    #[serde(rename = "SG")]
3920    Sg,
3921    #[serde(rename = "SH")]
3922    Sh,
3923    #[serde(rename = "SI")]
3924    Si,
3925    #[serde(rename = "SJ")]
3926    Sj,
3927    #[serde(rename = "SK")]
3928    Sk,
3929    #[serde(rename = "SL")]
3930    Sl,
3931    #[serde(rename = "SM")]
3932    Sm,
3933    #[serde(rename = "SN")]
3934    Sn,
3935    #[serde(rename = "SO")]
3936    So,
3937    #[serde(rename = "SR")]
3938    Sr,
3939    #[serde(rename = "SS")]
3940    Ss,
3941    #[serde(rename = "ST")]
3942    St,
3943    #[serde(rename = "SV")]
3944    Sv,
3945    #[serde(rename = "SX")]
3946    Sx,
3947    #[serde(rename = "SZ")]
3948    Sz,
3949    #[serde(rename = "TA")]
3950    Ta,
3951    #[serde(rename = "TC")]
3952    Tc,
3953    #[serde(rename = "TD")]
3954    Td,
3955    #[serde(rename = "TF")]
3956    Tf,
3957    #[serde(rename = "TG")]
3958    Tg,
3959    #[serde(rename = "TH")]
3960    Th,
3961    #[serde(rename = "TJ")]
3962    Tj,
3963    #[serde(rename = "TK")]
3964    Tk,
3965    #[serde(rename = "TL")]
3966    Tl,
3967    #[serde(rename = "TM")]
3968    Tm,
3969    #[serde(rename = "TN")]
3970    Tn,
3971    #[serde(rename = "TO")]
3972    To,
3973    #[serde(rename = "TR")]
3974    Tr,
3975    #[serde(rename = "TT")]
3976    Tt,
3977    #[serde(rename = "TV")]
3978    Tv,
3979    #[serde(rename = "TW")]
3980    Tw,
3981    #[serde(rename = "TZ")]
3982    Tz,
3983    #[serde(rename = "UA")]
3984    Ua,
3985    #[serde(rename = "UG")]
3986    Ug,
3987    #[serde(rename = "US")]
3988    Us,
3989    #[serde(rename = "UY")]
3990    Uy,
3991    #[serde(rename = "UZ")]
3992    Uz,
3993    #[serde(rename = "VA")]
3994    Va,
3995    #[serde(rename = "VC")]
3996    Vc,
3997    #[serde(rename = "VE")]
3998    Ve,
3999    #[serde(rename = "VG")]
4000    Vg,
4001    #[serde(rename = "VN")]
4002    Vn,
4003    #[serde(rename = "VU")]
4004    Vu,
4005    #[serde(rename = "WF")]
4006    Wf,
4007    #[serde(rename = "WS")]
4008    Ws,
4009    #[serde(rename = "XK")]
4010    Xk,
4011    #[serde(rename = "YE")]
4012    Ye,
4013    #[serde(rename = "YT")]
4014    Yt,
4015    #[serde(rename = "ZA")]
4016    Za,
4017    #[serde(rename = "ZM")]
4018    Zm,
4019    #[serde(rename = "ZW")]
4020    Zw,
4021    #[serde(rename = "ZZ")]
4022    Zz,
4023}
4024
4025impl PaymentLinksResourceShippingAddressCollectionAllowedCountries {
4026    pub fn as_str(self) -> &'static str {
4027        match self {
4028            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ac => "AC",
4029            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ad => "AD",
4030            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ae => "AE",
4031            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Af => "AF",
4032            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ag => "AG",
4033            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ai => "AI",
4034            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Al => "AL",
4035            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Am => "AM",
4036            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ao => "AO",
4037            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Aq => "AQ",
4038            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ar => "AR",
4039            PaymentLinksResourceShippingAddressCollectionAllowedCountries::At => "AT",
4040            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Au => "AU",
4041            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Aw => "AW",
4042            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ax => "AX",
4043            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Az => "AZ",
4044            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ba => "BA",
4045            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Bb => "BB",
4046            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Bd => "BD",
4047            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Be => "BE",
4048            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Bf => "BF",
4049            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Bg => "BG",
4050            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Bh => "BH",
4051            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Bi => "BI",
4052            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Bj => "BJ",
4053            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Bl => "BL",
4054            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Bm => "BM",
4055            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Bn => "BN",
4056            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Bo => "BO",
4057            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Bq => "BQ",
4058            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Br => "BR",
4059            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Bs => "BS",
4060            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Bt => "BT",
4061            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Bv => "BV",
4062            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Bw => "BW",
4063            PaymentLinksResourceShippingAddressCollectionAllowedCountries::By => "BY",
4064            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Bz => "BZ",
4065            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ca => "CA",
4066            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Cd => "CD",
4067            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Cf => "CF",
4068            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Cg => "CG",
4069            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ch => "CH",
4070            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ci => "CI",
4071            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ck => "CK",
4072            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Cl => "CL",
4073            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Cm => "CM",
4074            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Cn => "CN",
4075            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Co => "CO",
4076            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Cr => "CR",
4077            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Cv => "CV",
4078            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Cw => "CW",
4079            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Cy => "CY",
4080            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Cz => "CZ",
4081            PaymentLinksResourceShippingAddressCollectionAllowedCountries::De => "DE",
4082            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Dj => "DJ",
4083            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Dk => "DK",
4084            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Dm => "DM",
4085            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Do => "DO",
4086            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Dz => "DZ",
4087            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ec => "EC",
4088            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ee => "EE",
4089            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Eg => "EG",
4090            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Eh => "EH",
4091            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Er => "ER",
4092            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Es => "ES",
4093            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Et => "ET",
4094            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Fi => "FI",
4095            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Fj => "FJ",
4096            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Fk => "FK",
4097            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Fo => "FO",
4098            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Fr => "FR",
4099            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ga => "GA",
4100            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Gb => "GB",
4101            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Gd => "GD",
4102            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ge => "GE",
4103            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Gf => "GF",
4104            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Gg => "GG",
4105            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Gh => "GH",
4106            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Gi => "GI",
4107            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Gl => "GL",
4108            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Gm => "GM",
4109            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Gn => "GN",
4110            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Gp => "GP",
4111            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Gq => "GQ",
4112            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Gr => "GR",
4113            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Gs => "GS",
4114            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Gt => "GT",
4115            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Gu => "GU",
4116            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Gw => "GW",
4117            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Gy => "GY",
4118            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Hk => "HK",
4119            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Hn => "HN",
4120            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Hr => "HR",
4121            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ht => "HT",
4122            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Hu => "HU",
4123            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Id => "ID",
4124            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ie => "IE",
4125            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Il => "IL",
4126            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Im => "IM",
4127            PaymentLinksResourceShippingAddressCollectionAllowedCountries::In => "IN",
4128            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Io => "IO",
4129            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Iq => "IQ",
4130            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Is => "IS",
4131            PaymentLinksResourceShippingAddressCollectionAllowedCountries::It => "IT",
4132            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Je => "JE",
4133            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Jm => "JM",
4134            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Jo => "JO",
4135            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Jp => "JP",
4136            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ke => "KE",
4137            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Kg => "KG",
4138            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Kh => "KH",
4139            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ki => "KI",
4140            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Km => "KM",
4141            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Kn => "KN",
4142            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Kr => "KR",
4143            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Kw => "KW",
4144            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ky => "KY",
4145            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Kz => "KZ",
4146            PaymentLinksResourceShippingAddressCollectionAllowedCountries::La => "LA",
4147            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Lb => "LB",
4148            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Lc => "LC",
4149            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Li => "LI",
4150            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Lk => "LK",
4151            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Lr => "LR",
4152            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ls => "LS",
4153            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Lt => "LT",
4154            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Lu => "LU",
4155            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Lv => "LV",
4156            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ly => "LY",
4157            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ma => "MA",
4158            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Mc => "MC",
4159            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Md => "MD",
4160            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Me => "ME",
4161            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Mf => "MF",
4162            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Mg => "MG",
4163            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Mk => "MK",
4164            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ml => "ML",
4165            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Mm => "MM",
4166            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Mn => "MN",
4167            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Mo => "MO",
4168            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Mq => "MQ",
4169            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Mr => "MR",
4170            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ms => "MS",
4171            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Mt => "MT",
4172            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Mu => "MU",
4173            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Mv => "MV",
4174            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Mw => "MW",
4175            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Mx => "MX",
4176            PaymentLinksResourceShippingAddressCollectionAllowedCountries::My => "MY",
4177            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Mz => "MZ",
4178            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Na => "NA",
4179            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Nc => "NC",
4180            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ne => "NE",
4181            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ng => "NG",
4182            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ni => "NI",
4183            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Nl => "NL",
4184            PaymentLinksResourceShippingAddressCollectionAllowedCountries::No => "NO",
4185            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Np => "NP",
4186            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Nr => "NR",
4187            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Nu => "NU",
4188            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Nz => "NZ",
4189            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Om => "OM",
4190            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Pa => "PA",
4191            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Pe => "PE",
4192            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Pf => "PF",
4193            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Pg => "PG",
4194            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ph => "PH",
4195            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Pk => "PK",
4196            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Pl => "PL",
4197            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Pm => "PM",
4198            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Pn => "PN",
4199            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Pr => "PR",
4200            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ps => "PS",
4201            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Pt => "PT",
4202            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Py => "PY",
4203            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Qa => "QA",
4204            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Re => "RE",
4205            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ro => "RO",
4206            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Rs => "RS",
4207            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ru => "RU",
4208            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Rw => "RW",
4209            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Sa => "SA",
4210            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Sb => "SB",
4211            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Sc => "SC",
4212            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Se => "SE",
4213            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Sg => "SG",
4214            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Sh => "SH",
4215            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Si => "SI",
4216            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Sj => "SJ",
4217            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Sk => "SK",
4218            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Sl => "SL",
4219            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Sm => "SM",
4220            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Sn => "SN",
4221            PaymentLinksResourceShippingAddressCollectionAllowedCountries::So => "SO",
4222            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Sr => "SR",
4223            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ss => "SS",
4224            PaymentLinksResourceShippingAddressCollectionAllowedCountries::St => "ST",
4225            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Sv => "SV",
4226            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Sx => "SX",
4227            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Sz => "SZ",
4228            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ta => "TA",
4229            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Tc => "TC",
4230            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Td => "TD",
4231            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Tf => "TF",
4232            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Tg => "TG",
4233            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Th => "TH",
4234            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Tj => "TJ",
4235            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Tk => "TK",
4236            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Tl => "TL",
4237            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Tm => "TM",
4238            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Tn => "TN",
4239            PaymentLinksResourceShippingAddressCollectionAllowedCountries::To => "TO",
4240            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Tr => "TR",
4241            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Tt => "TT",
4242            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Tv => "TV",
4243            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Tw => "TW",
4244            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Tz => "TZ",
4245            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ua => "UA",
4246            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ug => "UG",
4247            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Us => "US",
4248            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Uy => "UY",
4249            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Uz => "UZ",
4250            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Va => "VA",
4251            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Vc => "VC",
4252            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ve => "VE",
4253            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Vg => "VG",
4254            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Vn => "VN",
4255            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Vu => "VU",
4256            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Wf => "WF",
4257            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ws => "WS",
4258            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Xk => "XK",
4259            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Ye => "YE",
4260            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Yt => "YT",
4261            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Za => "ZA",
4262            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Zm => "ZM",
4263            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Zw => "ZW",
4264            PaymentLinksResourceShippingAddressCollectionAllowedCountries::Zz => "ZZ",
4265        }
4266    }
4267}
4268
4269impl AsRef<str> for PaymentLinksResourceShippingAddressCollectionAllowedCountries {
4270    fn as_ref(&self) -> &str {
4271        self.as_str()
4272    }
4273}
4274
4275impl std::fmt::Display for PaymentLinksResourceShippingAddressCollectionAllowedCountries {
4276    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4277        self.as_str().fmt(f)
4278    }
4279}
4280impl std::default::Default for PaymentLinksResourceShippingAddressCollectionAllowedCountries {
4281    fn default() -> Self {
4282        Self::Ac
4283    }
4284}
4285
4286/// An enum representing the possible values of an `UpdatePaymentLinkAfterCompletion`'s `type` field.
4287#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4288#[serde(rename_all = "snake_case")]
4289pub enum UpdatePaymentLinkAfterCompletionType {
4290    HostedConfirmation,
4291    Redirect,
4292}
4293
4294impl UpdatePaymentLinkAfterCompletionType {
4295    pub fn as_str(self) -> &'static str {
4296        match self {
4297            UpdatePaymentLinkAfterCompletionType::HostedConfirmation => "hosted_confirmation",
4298            UpdatePaymentLinkAfterCompletionType::Redirect => "redirect",
4299        }
4300    }
4301}
4302
4303impl AsRef<str> for UpdatePaymentLinkAfterCompletionType {
4304    fn as_ref(&self) -> &str {
4305        self.as_str()
4306    }
4307}
4308
4309impl std::fmt::Display for UpdatePaymentLinkAfterCompletionType {
4310    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4311        self.as_str().fmt(f)
4312    }
4313}
4314impl std::default::Default for UpdatePaymentLinkAfterCompletionType {
4315    fn default() -> Self {
4316        Self::HostedConfirmation
4317    }
4318}
4319
4320/// An enum representing the possible values of an `UpdatePaymentLinkAutomaticTaxLiability`'s `type` field.
4321#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4322#[serde(rename_all = "snake_case")]
4323pub enum UpdatePaymentLinkAutomaticTaxLiabilityType {
4324    Account,
4325    #[serde(rename = "self")]
4326    Self_,
4327}
4328
4329impl UpdatePaymentLinkAutomaticTaxLiabilityType {
4330    pub fn as_str(self) -> &'static str {
4331        match self {
4332            UpdatePaymentLinkAutomaticTaxLiabilityType::Account => "account",
4333            UpdatePaymentLinkAutomaticTaxLiabilityType::Self_ => "self",
4334        }
4335    }
4336}
4337
4338impl AsRef<str> for UpdatePaymentLinkAutomaticTaxLiabilityType {
4339    fn as_ref(&self) -> &str {
4340        self.as_str()
4341    }
4342}
4343
4344impl std::fmt::Display for UpdatePaymentLinkAutomaticTaxLiabilityType {
4345    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4346        self.as_str().fmt(f)
4347    }
4348}
4349impl std::default::Default for UpdatePaymentLinkAutomaticTaxLiabilityType {
4350    fn default() -> Self {
4351        Self::Account
4352    }
4353}
4354
4355/// An enum representing the possible values of an `UpdatePaymentLinkCustomFieldsLabel`'s `type` field.
4356#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4357#[serde(rename_all = "snake_case")]
4358pub enum UpdatePaymentLinkCustomFieldsLabelType {
4359    Custom,
4360}
4361
4362impl UpdatePaymentLinkCustomFieldsLabelType {
4363    pub fn as_str(self) -> &'static str {
4364        match self {
4365            UpdatePaymentLinkCustomFieldsLabelType::Custom => "custom",
4366        }
4367    }
4368}
4369
4370impl AsRef<str> for UpdatePaymentLinkCustomFieldsLabelType {
4371    fn as_ref(&self) -> &str {
4372        self.as_str()
4373    }
4374}
4375
4376impl std::fmt::Display for UpdatePaymentLinkCustomFieldsLabelType {
4377    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4378        self.as_str().fmt(f)
4379    }
4380}
4381impl std::default::Default for UpdatePaymentLinkCustomFieldsLabelType {
4382    fn default() -> Self {
4383        Self::Custom
4384    }
4385}
4386
4387/// An enum representing the possible values of an `UpdatePaymentLinkCustomFields`'s `type` field.
4388#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4389#[serde(rename_all = "snake_case")]
4390pub enum UpdatePaymentLinkCustomFieldsType {
4391    Dropdown,
4392    Numeric,
4393    Text,
4394}
4395
4396impl UpdatePaymentLinkCustomFieldsType {
4397    pub fn as_str(self) -> &'static str {
4398        match self {
4399            UpdatePaymentLinkCustomFieldsType::Dropdown => "dropdown",
4400            UpdatePaymentLinkCustomFieldsType::Numeric => "numeric",
4401            UpdatePaymentLinkCustomFieldsType::Text => "text",
4402        }
4403    }
4404}
4405
4406impl AsRef<str> for UpdatePaymentLinkCustomFieldsType {
4407    fn as_ref(&self) -> &str {
4408        self.as_str()
4409    }
4410}
4411
4412impl std::fmt::Display for UpdatePaymentLinkCustomFieldsType {
4413    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4414        self.as_str().fmt(f)
4415    }
4416}
4417impl std::default::Default for UpdatePaymentLinkCustomFieldsType {
4418    fn default() -> Self {
4419        Self::Dropdown
4420    }
4421}
4422
4423/// An enum representing the possible values of an `UpdatePaymentLinkInvoiceCreationInvoiceDataIssuer`'s `type` field.
4424#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4425#[serde(rename_all = "snake_case")]
4426pub enum UpdatePaymentLinkInvoiceCreationInvoiceDataIssuerType {
4427    Account,
4428    #[serde(rename = "self")]
4429    Self_,
4430}
4431
4432impl UpdatePaymentLinkInvoiceCreationInvoiceDataIssuerType {
4433    pub fn as_str(self) -> &'static str {
4434        match self {
4435            UpdatePaymentLinkInvoiceCreationInvoiceDataIssuerType::Account => "account",
4436            UpdatePaymentLinkInvoiceCreationInvoiceDataIssuerType::Self_ => "self",
4437        }
4438    }
4439}
4440
4441impl AsRef<str> for UpdatePaymentLinkInvoiceCreationInvoiceDataIssuerType {
4442    fn as_ref(&self) -> &str {
4443        self.as_str()
4444    }
4445}
4446
4447impl std::fmt::Display for UpdatePaymentLinkInvoiceCreationInvoiceDataIssuerType {
4448    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4449        self.as_str().fmt(f)
4450    }
4451}
4452impl std::default::Default for UpdatePaymentLinkInvoiceCreationInvoiceDataIssuerType {
4453    fn default() -> Self {
4454        Self::Account
4455    }
4456}
4457
4458/// An enum representing the possible values of an `UpdatePaymentLinkInvoiceCreationInvoiceDataRenderingOptions`'s `amount_tax_display` field.
4459#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4460#[serde(rename_all = "snake_case")]
4461pub enum UpdatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay {
4462    ExcludeTax,
4463    IncludeInclusiveTax,
4464}
4465
4466impl UpdatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay {
4467    pub fn as_str(self) -> &'static str {
4468        match self {
4469            UpdatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay::ExcludeTax => "exclude_tax",
4470            UpdatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay::IncludeInclusiveTax => "include_inclusive_tax",
4471        }
4472    }
4473}
4474
4475impl AsRef<str> for UpdatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay {
4476    fn as_ref(&self) -> &str {
4477        self.as_str()
4478    }
4479}
4480
4481impl std::fmt::Display
4482    for UpdatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay
4483{
4484    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4485        self.as_str().fmt(f)
4486    }
4487}
4488impl std::default::Default
4489    for UpdatePaymentLinkInvoiceCreationInvoiceDataRenderingOptionsAmountTaxDisplay
4490{
4491    fn default() -> Self {
4492        Self::ExcludeTax
4493    }
4494}
4495
4496/// An enum representing the possible values of an `UpdatePaymentLink`'s `payment_method_types` field.
4497#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4498#[serde(rename_all = "snake_case")]
4499pub enum UpdatePaymentLinkPaymentMethodTypes {
4500    Affirm,
4501    AfterpayClearpay,
4502    Alipay,
4503    AuBecsDebit,
4504    BacsDebit,
4505    Bancontact,
4506    Blik,
4507    Boleto,
4508    Card,
4509    Cashapp,
4510    Eps,
4511    Fpx,
4512    Giropay,
4513    Grabpay,
4514    Ideal,
4515    Klarna,
4516    Konbini,
4517    Link,
4518    Oxxo,
4519    P24,
4520    Paynow,
4521    Paypal,
4522    Pix,
4523    Promptpay,
4524    SepaDebit,
4525    Sofort,
4526    Swish,
4527    UsBankAccount,
4528    WechatPay,
4529}
4530
4531impl UpdatePaymentLinkPaymentMethodTypes {
4532    pub fn as_str(self) -> &'static str {
4533        match self {
4534            UpdatePaymentLinkPaymentMethodTypes::Affirm => "affirm",
4535            UpdatePaymentLinkPaymentMethodTypes::AfterpayClearpay => "afterpay_clearpay",
4536            UpdatePaymentLinkPaymentMethodTypes::Alipay => "alipay",
4537            UpdatePaymentLinkPaymentMethodTypes::AuBecsDebit => "au_becs_debit",
4538            UpdatePaymentLinkPaymentMethodTypes::BacsDebit => "bacs_debit",
4539            UpdatePaymentLinkPaymentMethodTypes::Bancontact => "bancontact",
4540            UpdatePaymentLinkPaymentMethodTypes::Blik => "blik",
4541            UpdatePaymentLinkPaymentMethodTypes::Boleto => "boleto",
4542            UpdatePaymentLinkPaymentMethodTypes::Card => "card",
4543            UpdatePaymentLinkPaymentMethodTypes::Cashapp => "cashapp",
4544            UpdatePaymentLinkPaymentMethodTypes::Eps => "eps",
4545            UpdatePaymentLinkPaymentMethodTypes::Fpx => "fpx",
4546            UpdatePaymentLinkPaymentMethodTypes::Giropay => "giropay",
4547            UpdatePaymentLinkPaymentMethodTypes::Grabpay => "grabpay",
4548            UpdatePaymentLinkPaymentMethodTypes::Ideal => "ideal",
4549            UpdatePaymentLinkPaymentMethodTypes::Klarna => "klarna",
4550            UpdatePaymentLinkPaymentMethodTypes::Konbini => "konbini",
4551            UpdatePaymentLinkPaymentMethodTypes::Link => "link",
4552            UpdatePaymentLinkPaymentMethodTypes::Oxxo => "oxxo",
4553            UpdatePaymentLinkPaymentMethodTypes::P24 => "p24",
4554            UpdatePaymentLinkPaymentMethodTypes::Paynow => "paynow",
4555            UpdatePaymentLinkPaymentMethodTypes::Paypal => "paypal",
4556            UpdatePaymentLinkPaymentMethodTypes::Pix => "pix",
4557            UpdatePaymentLinkPaymentMethodTypes::Promptpay => "promptpay",
4558            UpdatePaymentLinkPaymentMethodTypes::SepaDebit => "sepa_debit",
4559            UpdatePaymentLinkPaymentMethodTypes::Sofort => "sofort",
4560            UpdatePaymentLinkPaymentMethodTypes::Swish => "swish",
4561            UpdatePaymentLinkPaymentMethodTypes::UsBankAccount => "us_bank_account",
4562            UpdatePaymentLinkPaymentMethodTypes::WechatPay => "wechat_pay",
4563        }
4564    }
4565}
4566
4567impl AsRef<str> for UpdatePaymentLinkPaymentMethodTypes {
4568    fn as_ref(&self) -> &str {
4569        self.as_str()
4570    }
4571}
4572
4573impl std::fmt::Display for UpdatePaymentLinkPaymentMethodTypes {
4574    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
4575        self.as_str().fmt(f)
4576    }
4577}
4578impl std::default::Default for UpdatePaymentLinkPaymentMethodTypes {
4579    fn default() -> Self {
4580        Self::Affirm
4581    }
4582}
4583
4584/// An enum representing the possible values of an `UpdatePaymentLinkShippingAddressCollection`'s `allowed_countries` field.
4585#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
4586#[serde(rename_all = "snake_case")]
4587pub enum UpdatePaymentLinkShippingAddressCollectionAllowedCountries {
4588    #[serde(rename = "AC")]
4589    Ac,
4590    #[serde(rename = "AD")]
4591    Ad,
4592    #[serde(rename = "AE")]
4593    Ae,
4594    #[serde(rename = "AF")]
4595    Af,
4596    #[serde(rename = "AG")]
4597    Ag,
4598    #[serde(rename = "AI")]
4599    Ai,
4600    #[serde(rename = "AL")]
4601    Al,
4602    #[serde(rename = "AM")]
4603    Am,
4604    #[serde(rename = "AO")]
4605    Ao,
4606    #[serde(rename = "AQ")]
4607    Aq,
4608    #[serde(rename = "AR")]
4609    Ar,
4610    #[serde(rename = "AT")]
4611    At,
4612    #[serde(rename = "AU")]
4613    Au,
4614    #[serde(rename = "AW")]
4615    Aw,
4616    #[serde(rename = "AX")]
4617    Ax,
4618    #[serde(rename = "AZ")]
4619    Az,
4620    #[serde(rename = "BA")]
4621    Ba,
4622    #[serde(rename = "BB")]
4623    Bb,
4624    #[serde(rename = "BD")]
4625    Bd,
4626    #[serde(rename = "BE")]
4627    Be,
4628    #[serde(rename = "BF")]
4629    Bf,
4630    #[serde(rename = "BG")]
4631    Bg,
4632    #[serde(rename = "BH")]
4633    Bh,
4634    #[serde(rename = "BI")]
4635    Bi,
4636    #[serde(rename = "BJ")]
4637    Bj,
4638    #[serde(rename = "BL")]
4639    Bl,
4640    #[serde(rename = "BM")]
4641    Bm,
4642    #[serde(rename = "BN")]
4643    Bn,
4644    #[serde(rename = "BO")]
4645    Bo,
4646    #[serde(rename = "BQ")]
4647    Bq,
4648    #[serde(rename = "BR")]
4649    Br,
4650    #[serde(rename = "BS")]
4651    Bs,
4652    #[serde(rename = "BT")]
4653    Bt,
4654    #[serde(rename = "BV")]
4655    Bv,
4656    #[serde(rename = "BW")]
4657    Bw,
4658    #[serde(rename = "BY")]
4659    By,
4660    #[serde(rename = "BZ")]
4661    Bz,
4662    #[serde(rename = "CA")]
4663    Ca,
4664    #[serde(rename = "CD")]
4665    Cd,
4666    #[serde(rename = "CF")]
4667    Cf,
4668    #[serde(rename = "CG")]
4669    Cg,
4670    #[serde(rename = "CH")]
4671    Ch,
4672    #[serde(rename = "CI")]
4673    Ci,
4674    #[serde(rename = "CK")]
4675    Ck,
4676    #[serde(rename = "CL")]
4677    Cl,
4678    #[serde(rename = "CM")]
4679    Cm,
4680    #[serde(rename = "CN")]
4681    Cn,
4682    #[serde(rename = "CO")]
4683    Co,
4684    #[serde(rename = "CR")]
4685    Cr,
4686    #[serde(rename = "CV")]
4687    Cv,
4688    #[serde(rename = "CW")]
4689    Cw,
4690    #[serde(rename = "CY")]
4691    Cy,
4692    #[serde(rename = "CZ")]
4693    Cz,
4694    #[serde(rename = "DE")]
4695    De,
4696    #[serde(rename = "DJ")]
4697    Dj,
4698    #[serde(rename = "DK")]
4699    Dk,
4700    #[serde(rename = "DM")]
4701    Dm,
4702    #[serde(rename = "DO")]
4703    Do,
4704    #[serde(rename = "DZ")]
4705    Dz,
4706    #[serde(rename = "EC")]
4707    Ec,
4708    #[serde(rename = "EE")]
4709    Ee,
4710    #[serde(rename = "EG")]
4711    Eg,
4712    #[serde(rename = "EH")]
4713    Eh,
4714    #[serde(rename = "ER")]
4715    Er,
4716    #[serde(rename = "ES")]
4717    Es,
4718    #[serde(rename = "ET")]
4719    Et,
4720    #[serde(rename = "FI")]
4721    Fi,
4722    #[serde(rename = "FJ")]
4723    Fj,
4724    #[serde(rename = "FK")]
4725    Fk,
4726    #[serde(rename = "FO")]
4727    Fo,
4728    #[serde(rename = "FR")]
4729    Fr,
4730    #[serde(rename = "GA")]
4731    Ga,
4732    #[serde(rename = "GB")]
4733    Gb,
4734    #[serde(rename = "GD")]
4735    Gd,
4736    #[serde(rename = "GE")]
4737    Ge,
4738    #[serde(rename = "GF")]
4739    Gf,
4740    #[serde(rename = "GG")]
4741    Gg,
4742    #[serde(rename = "GH")]
4743    Gh,
4744    #[serde(rename = "GI")]
4745    Gi,
4746    #[serde(rename = "GL")]
4747    Gl,
4748    #[serde(rename = "GM")]
4749    Gm,
4750    #[serde(rename = "GN")]
4751    Gn,
4752    #[serde(rename = "GP")]
4753    Gp,
4754    #[serde(rename = "GQ")]
4755    Gq,
4756    #[serde(rename = "GR")]
4757    Gr,
4758    #[serde(rename = "GS")]
4759    Gs,
4760    #[serde(rename = "GT")]
4761    Gt,
4762    #[serde(rename = "GU")]
4763    Gu,
4764    #[serde(rename = "GW")]
4765    Gw,
4766    #[serde(rename = "GY")]
4767    Gy,
4768    #[serde(rename = "HK")]
4769    Hk,
4770    #[serde(rename = "HN")]
4771    Hn,
4772    #[serde(rename = "HR")]
4773    Hr,
4774    #[serde(rename = "HT")]
4775    Ht,
4776    #[serde(rename = "HU")]
4777    Hu,
4778    #[serde(rename = "ID")]
4779    Id,
4780    #[serde(rename = "IE")]
4781    Ie,
4782    #[serde(rename = "IL")]
4783    Il,
4784    #[serde(rename = "IM")]
4785    Im,
4786    #[serde(rename = "IN")]
4787    In,
4788    #[serde(rename = "IO")]
4789    Io,
4790    #[serde(rename = "IQ")]
4791    Iq,
4792    #[serde(rename = "IS")]
4793    Is,
4794    #[serde(rename = "IT")]
4795    It,
4796    #[serde(rename = "JE")]
4797    Je,
4798    #[serde(rename = "JM")]
4799    Jm,
4800    #[serde(rename = "JO")]
4801    Jo,
4802    #[serde(rename = "JP")]
4803    Jp,
4804    #[serde(rename = "KE")]
4805    Ke,
4806    #[serde(rename = "KG")]
4807    Kg,
4808    #[serde(rename = "KH")]
4809    Kh,
4810    #[serde(rename = "KI")]
4811    Ki,
4812    #[serde(rename = "KM")]
4813    Km,
4814    #[serde(rename = "KN")]
4815    Kn,
4816    #[serde(rename = "KR")]
4817    Kr,
4818    #[serde(rename = "KW")]
4819    Kw,
4820    #[serde(rename = "KY")]
4821    Ky,
4822    #[serde(rename = "KZ")]
4823    Kz,
4824    #[serde(rename = "LA")]
4825    La,
4826    #[serde(rename = "LB")]
4827    Lb,
4828    #[serde(rename = "LC")]
4829    Lc,
4830    #[serde(rename = "LI")]
4831    Li,
4832    #[serde(rename = "LK")]
4833    Lk,
4834    #[serde(rename = "LR")]
4835    Lr,
4836    #[serde(rename = "LS")]
4837    Ls,
4838    #[serde(rename = "LT")]
4839    Lt,
4840    #[serde(rename = "LU")]
4841    Lu,
4842    #[serde(rename = "LV")]
4843    Lv,
4844    #[serde(rename = "LY")]
4845    Ly,
4846    #[serde(rename = "MA")]
4847    Ma,
4848    #[serde(rename = "MC")]
4849    Mc,
4850    #[serde(rename = "MD")]
4851    Md,
4852    #[serde(rename = "ME")]
4853    Me,
4854    #[serde(rename = "MF")]
4855    Mf,
4856    #[serde(rename = "MG")]
4857    Mg,
4858    #[serde(rename = "MK")]
4859    Mk,
4860    #[serde(rename = "ML")]
4861    Ml,
4862    #[serde(rename = "MM")]
4863    Mm,
4864    #[serde(rename = "MN")]
4865    Mn,
4866    #[serde(rename = "MO")]
4867    Mo,
4868    #[serde(rename = "MQ")]
4869    Mq,
4870    #[serde(rename = "MR")]
4871    Mr,
4872    #[serde(rename = "MS")]
4873    Ms,
4874    #[serde(rename = "MT")]
4875    Mt,
4876    #[serde(rename = "MU")]
4877    Mu,
4878    #[serde(rename = "MV")]
4879    Mv,
4880    #[serde(rename = "MW")]
4881    Mw,
4882    #[serde(rename = "MX")]
4883    Mx,
4884    #[serde(rename = "MY")]
4885    My,
4886    #[serde(rename = "MZ")]
4887    Mz,
4888    #[serde(rename = "NA")]
4889    Na,
4890    #[serde(rename = "NC")]
4891    Nc,
4892    #[serde(rename = "NE")]
4893    Ne,
4894    #[serde(rename = "NG")]
4895    Ng,
4896    #[serde(rename = "NI")]
4897    Ni,
4898    #[serde(rename = "NL")]
4899    Nl,
4900    #[serde(rename = "NO")]
4901    No,
4902    #[serde(rename = "NP")]
4903    Np,
4904    #[serde(rename = "NR")]
4905    Nr,
4906    #[serde(rename = "NU")]
4907    Nu,
4908    #[serde(rename = "NZ")]
4909    Nz,
4910    #[serde(rename = "OM")]
4911    Om,
4912    #[serde(rename = "PA")]
4913    Pa,
4914    #[serde(rename = "PE")]
4915    Pe,
4916    #[serde(rename = "PF")]
4917    Pf,
4918    #[serde(rename = "PG")]
4919    Pg,
4920    #[serde(rename = "PH")]
4921    Ph,
4922    #[serde(rename = "PK")]
4923    Pk,
4924    #[serde(rename = "PL")]
4925    Pl,
4926    #[serde(rename = "PM")]
4927    Pm,
4928    #[serde(rename = "PN")]
4929    Pn,
4930    #[serde(rename = "PR")]
4931    Pr,
4932    #[serde(rename = "PS")]
4933    Ps,
4934    #[serde(rename = "PT")]
4935    Pt,
4936    #[serde(rename = "PY")]
4937    Py,
4938    #[serde(rename = "QA")]
4939    Qa,
4940    #[serde(rename = "RE")]
4941    Re,
4942    #[serde(rename = "RO")]
4943    Ro,
4944    #[serde(rename = "RS")]
4945    Rs,
4946    #[serde(rename = "RU")]
4947    Ru,
4948    #[serde(rename = "RW")]
4949    Rw,
4950    #[serde(rename = "SA")]
4951    Sa,
4952    #[serde(rename = "SB")]
4953    Sb,
4954    #[serde(rename = "SC")]
4955    Sc,
4956    #[serde(rename = "SE")]
4957    Se,
4958    #[serde(rename = "SG")]
4959    Sg,
4960    #[serde(rename = "SH")]
4961    Sh,
4962    #[serde(rename = "SI")]
4963    Si,
4964    #[serde(rename = "SJ")]
4965    Sj,
4966    #[serde(rename = "SK")]
4967    Sk,
4968    #[serde(rename = "SL")]
4969    Sl,
4970    #[serde(rename = "SM")]
4971    Sm,
4972    #[serde(rename = "SN")]
4973    Sn,
4974    #[serde(rename = "SO")]
4975    So,
4976    #[serde(rename = "SR")]
4977    Sr,
4978    #[serde(rename = "SS")]
4979    Ss,
4980    #[serde(rename = "ST")]
4981    St,
4982    #[serde(rename = "SV")]
4983    Sv,
4984    #[serde(rename = "SX")]
4985    Sx,
4986    #[serde(rename = "SZ")]
4987    Sz,
4988    #[serde(rename = "TA")]
4989    Ta,
4990    #[serde(rename = "TC")]
4991    Tc,
4992    #[serde(rename = "TD")]
4993    Td,
4994    #[serde(rename = "TF")]
4995    Tf,
4996    #[serde(rename = "TG")]
4997    Tg,
4998    #[serde(rename = "TH")]
4999    Th,
5000    #[serde(rename = "TJ")]
5001    Tj,
5002    #[serde(rename = "TK")]
5003    Tk,
5004    #[serde(rename = "TL")]
5005    Tl,
5006    #[serde(rename = "TM")]
5007    Tm,
5008    #[serde(rename = "TN")]
5009    Tn,
5010    #[serde(rename = "TO")]
5011    To,
5012    #[serde(rename = "TR")]
5013    Tr,
5014    #[serde(rename = "TT")]
5015    Tt,
5016    #[serde(rename = "TV")]
5017    Tv,
5018    #[serde(rename = "TW")]
5019    Tw,
5020    #[serde(rename = "TZ")]
5021    Tz,
5022    #[serde(rename = "UA")]
5023    Ua,
5024    #[serde(rename = "UG")]
5025    Ug,
5026    #[serde(rename = "US")]
5027    Us,
5028    #[serde(rename = "UY")]
5029    Uy,
5030    #[serde(rename = "UZ")]
5031    Uz,
5032    #[serde(rename = "VA")]
5033    Va,
5034    #[serde(rename = "VC")]
5035    Vc,
5036    #[serde(rename = "VE")]
5037    Ve,
5038    #[serde(rename = "VG")]
5039    Vg,
5040    #[serde(rename = "VN")]
5041    Vn,
5042    #[serde(rename = "VU")]
5043    Vu,
5044    #[serde(rename = "WF")]
5045    Wf,
5046    #[serde(rename = "WS")]
5047    Ws,
5048    #[serde(rename = "XK")]
5049    Xk,
5050    #[serde(rename = "YE")]
5051    Ye,
5052    #[serde(rename = "YT")]
5053    Yt,
5054    #[serde(rename = "ZA")]
5055    Za,
5056    #[serde(rename = "ZM")]
5057    Zm,
5058    #[serde(rename = "ZW")]
5059    Zw,
5060    #[serde(rename = "ZZ")]
5061    Zz,
5062}
5063
5064impl UpdatePaymentLinkShippingAddressCollectionAllowedCountries {
5065    pub fn as_str(self) -> &'static str {
5066        match self {
5067            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ac => "AC",
5068            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ad => "AD",
5069            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ae => "AE",
5070            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Af => "AF",
5071            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ag => "AG",
5072            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ai => "AI",
5073            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Al => "AL",
5074            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Am => "AM",
5075            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ao => "AO",
5076            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Aq => "AQ",
5077            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ar => "AR",
5078            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::At => "AT",
5079            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Au => "AU",
5080            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Aw => "AW",
5081            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ax => "AX",
5082            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Az => "AZ",
5083            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ba => "BA",
5084            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Bb => "BB",
5085            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Bd => "BD",
5086            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Be => "BE",
5087            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Bf => "BF",
5088            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Bg => "BG",
5089            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Bh => "BH",
5090            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Bi => "BI",
5091            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Bj => "BJ",
5092            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Bl => "BL",
5093            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Bm => "BM",
5094            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Bn => "BN",
5095            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Bo => "BO",
5096            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Bq => "BQ",
5097            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Br => "BR",
5098            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Bs => "BS",
5099            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Bt => "BT",
5100            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Bv => "BV",
5101            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Bw => "BW",
5102            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::By => "BY",
5103            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Bz => "BZ",
5104            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ca => "CA",
5105            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Cd => "CD",
5106            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Cf => "CF",
5107            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Cg => "CG",
5108            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ch => "CH",
5109            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ci => "CI",
5110            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ck => "CK",
5111            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Cl => "CL",
5112            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Cm => "CM",
5113            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Cn => "CN",
5114            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Co => "CO",
5115            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Cr => "CR",
5116            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Cv => "CV",
5117            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Cw => "CW",
5118            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Cy => "CY",
5119            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Cz => "CZ",
5120            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::De => "DE",
5121            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Dj => "DJ",
5122            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Dk => "DK",
5123            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Dm => "DM",
5124            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Do => "DO",
5125            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Dz => "DZ",
5126            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ec => "EC",
5127            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ee => "EE",
5128            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Eg => "EG",
5129            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Eh => "EH",
5130            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Er => "ER",
5131            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Es => "ES",
5132            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Et => "ET",
5133            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Fi => "FI",
5134            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Fj => "FJ",
5135            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Fk => "FK",
5136            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Fo => "FO",
5137            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Fr => "FR",
5138            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ga => "GA",
5139            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Gb => "GB",
5140            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Gd => "GD",
5141            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ge => "GE",
5142            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Gf => "GF",
5143            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Gg => "GG",
5144            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Gh => "GH",
5145            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Gi => "GI",
5146            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Gl => "GL",
5147            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Gm => "GM",
5148            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Gn => "GN",
5149            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Gp => "GP",
5150            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Gq => "GQ",
5151            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Gr => "GR",
5152            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Gs => "GS",
5153            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Gt => "GT",
5154            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Gu => "GU",
5155            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Gw => "GW",
5156            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Gy => "GY",
5157            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Hk => "HK",
5158            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Hn => "HN",
5159            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Hr => "HR",
5160            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ht => "HT",
5161            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Hu => "HU",
5162            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Id => "ID",
5163            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ie => "IE",
5164            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Il => "IL",
5165            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Im => "IM",
5166            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::In => "IN",
5167            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Io => "IO",
5168            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Iq => "IQ",
5169            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Is => "IS",
5170            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::It => "IT",
5171            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Je => "JE",
5172            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Jm => "JM",
5173            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Jo => "JO",
5174            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Jp => "JP",
5175            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ke => "KE",
5176            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Kg => "KG",
5177            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Kh => "KH",
5178            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ki => "KI",
5179            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Km => "KM",
5180            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Kn => "KN",
5181            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Kr => "KR",
5182            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Kw => "KW",
5183            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ky => "KY",
5184            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Kz => "KZ",
5185            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::La => "LA",
5186            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Lb => "LB",
5187            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Lc => "LC",
5188            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Li => "LI",
5189            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Lk => "LK",
5190            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Lr => "LR",
5191            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ls => "LS",
5192            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Lt => "LT",
5193            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Lu => "LU",
5194            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Lv => "LV",
5195            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ly => "LY",
5196            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ma => "MA",
5197            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Mc => "MC",
5198            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Md => "MD",
5199            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Me => "ME",
5200            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Mf => "MF",
5201            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Mg => "MG",
5202            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Mk => "MK",
5203            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ml => "ML",
5204            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Mm => "MM",
5205            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Mn => "MN",
5206            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Mo => "MO",
5207            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Mq => "MQ",
5208            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Mr => "MR",
5209            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ms => "MS",
5210            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Mt => "MT",
5211            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Mu => "MU",
5212            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Mv => "MV",
5213            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Mw => "MW",
5214            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Mx => "MX",
5215            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::My => "MY",
5216            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Mz => "MZ",
5217            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Na => "NA",
5218            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Nc => "NC",
5219            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ne => "NE",
5220            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ng => "NG",
5221            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ni => "NI",
5222            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Nl => "NL",
5223            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::No => "NO",
5224            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Np => "NP",
5225            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Nr => "NR",
5226            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Nu => "NU",
5227            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Nz => "NZ",
5228            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Om => "OM",
5229            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Pa => "PA",
5230            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Pe => "PE",
5231            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Pf => "PF",
5232            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Pg => "PG",
5233            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ph => "PH",
5234            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Pk => "PK",
5235            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Pl => "PL",
5236            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Pm => "PM",
5237            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Pn => "PN",
5238            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Pr => "PR",
5239            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ps => "PS",
5240            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Pt => "PT",
5241            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Py => "PY",
5242            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Qa => "QA",
5243            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Re => "RE",
5244            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ro => "RO",
5245            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Rs => "RS",
5246            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ru => "RU",
5247            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Rw => "RW",
5248            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Sa => "SA",
5249            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Sb => "SB",
5250            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Sc => "SC",
5251            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Se => "SE",
5252            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Sg => "SG",
5253            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Sh => "SH",
5254            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Si => "SI",
5255            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Sj => "SJ",
5256            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Sk => "SK",
5257            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Sl => "SL",
5258            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Sm => "SM",
5259            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Sn => "SN",
5260            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::So => "SO",
5261            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Sr => "SR",
5262            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ss => "SS",
5263            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::St => "ST",
5264            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Sv => "SV",
5265            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Sx => "SX",
5266            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Sz => "SZ",
5267            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ta => "TA",
5268            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Tc => "TC",
5269            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Td => "TD",
5270            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Tf => "TF",
5271            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Tg => "TG",
5272            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Th => "TH",
5273            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Tj => "TJ",
5274            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Tk => "TK",
5275            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Tl => "TL",
5276            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Tm => "TM",
5277            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Tn => "TN",
5278            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::To => "TO",
5279            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Tr => "TR",
5280            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Tt => "TT",
5281            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Tv => "TV",
5282            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Tw => "TW",
5283            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Tz => "TZ",
5284            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ua => "UA",
5285            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ug => "UG",
5286            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Us => "US",
5287            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Uy => "UY",
5288            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Uz => "UZ",
5289            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Va => "VA",
5290            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Vc => "VC",
5291            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ve => "VE",
5292            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Vg => "VG",
5293            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Vn => "VN",
5294            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Vu => "VU",
5295            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Wf => "WF",
5296            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ws => "WS",
5297            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Xk => "XK",
5298            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Ye => "YE",
5299            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Yt => "YT",
5300            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Za => "ZA",
5301            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Zm => "ZM",
5302            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Zw => "ZW",
5303            UpdatePaymentLinkShippingAddressCollectionAllowedCountries::Zz => "ZZ",
5304        }
5305    }
5306}
5307
5308impl AsRef<str> for UpdatePaymentLinkShippingAddressCollectionAllowedCountries {
5309    fn as_ref(&self) -> &str {
5310        self.as_str()
5311    }
5312}
5313
5314impl std::fmt::Display for UpdatePaymentLinkShippingAddressCollectionAllowedCountries {
5315    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5316        self.as_str().fmt(f)
5317    }
5318}
5319impl std::default::Default for UpdatePaymentLinkShippingAddressCollectionAllowedCountries {
5320    fn default() -> Self {
5321        Self::Ac
5322    }
5323}
5324
5325/// An enum representing the possible values of an `UpdatePaymentLinkSubscriptionDataInvoiceSettingsIssuer`'s `type` field.
5326#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
5327#[serde(rename_all = "snake_case")]
5328pub enum UpdatePaymentLinkSubscriptionDataInvoiceSettingsIssuerType {
5329    Account,
5330    #[serde(rename = "self")]
5331    Self_,
5332}
5333
5334impl UpdatePaymentLinkSubscriptionDataInvoiceSettingsIssuerType {
5335    pub fn as_str(self) -> &'static str {
5336        match self {
5337            UpdatePaymentLinkSubscriptionDataInvoiceSettingsIssuerType::Account => "account",
5338            UpdatePaymentLinkSubscriptionDataInvoiceSettingsIssuerType::Self_ => "self",
5339        }
5340    }
5341}
5342
5343impl AsRef<str> for UpdatePaymentLinkSubscriptionDataInvoiceSettingsIssuerType {
5344    fn as_ref(&self) -> &str {
5345        self.as_str()
5346    }
5347}
5348
5349impl std::fmt::Display for UpdatePaymentLinkSubscriptionDataInvoiceSettingsIssuerType {
5350    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5351        self.as_str().fmt(f)
5352    }
5353}
5354impl std::default::Default for UpdatePaymentLinkSubscriptionDataInvoiceSettingsIssuerType {
5355    fn default() -> Self {
5356        Self::Account
5357    }
5358}
5359
5360/// An enum representing the possible values of an `UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehavior`'s `missing_payment_method` field.
5361#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
5362#[serde(rename_all = "snake_case")]
5363pub enum UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod {
5364    Cancel,
5365    CreateInvoice,
5366    Pause,
5367}
5368
5369impl UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod {
5370    pub fn as_str(self) -> &'static str {
5371        match self {
5372            UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod::Cancel => "cancel",
5373            UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod::CreateInvoice => "create_invoice",
5374            UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod::Pause => "pause",
5375        }
5376    }
5377}
5378
5379impl AsRef<str> for UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod {
5380    fn as_ref(&self) -> &str {
5381        self.as_str()
5382    }
5383}
5384
5385impl std::fmt::Display
5386    for UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod
5387{
5388    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
5389        self.as_str().fmt(f)
5390    }
5391}
5392impl std::default::Default
5393    for UpdatePaymentLinkSubscriptionDataTrialSettingsEndBehaviorMissingPaymentMethod
5394{
5395    fn default() -> Self {
5396        Self::Cancel
5397    }
5398}