1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! Request struct for the Create Payment API
use serde::Serialize;
use super::{CheckoutOptions, Order, PrePopulatedData, QuickPay};
/// This is a model class for CreatePaymentLinkRequest type.
#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)]
pub struct CreatePaymentLinkRequest {
/// A unique string that identifies this [`CreatePaymentLinkRequest`]. Keys can be any valid string
/// but must be unique for every [`CreatePaymentLinkRequest`].
///
/// Note: The number of allowed characters might be less than the stated maximum, if multi-byte
/// characters are used.
///
/// For more information, see
/// [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency).
/// Max Length 192
pub idempotency_key: Option<String>,
/// A description of the payment link.
///
/// You provide this optional description that is useful in your application context.
/// It is not used anywhere.
/// Max Length 4096
pub description: Option<String>,
/// Describes an ad hoc item and price for which to generate a quick pay checkout link.
///
/// For more information, see
/// [Quick Pay Checkout](https://developer.squareup.com/docs/checkout-api/quick-pay-checkout).
pub quick_pay: Option<QuickPay>,
/// Describes the [`Order`] for which to create a checkout link.
///
/// For more information, see
/// [Square Order Checkout](https://developer.squareup.com/docs/checkout-api/square-order-checkout).
pub order: Option<Order>,
/// Describes optional fields to add to the resulting checkout page.
///
/// For more information, see
/// [Optional Checkout Configurations](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations).
pub checkout_options: Option<CheckoutOptions>,
/// Describes fields to prepopulate in the resulting checkout page.
///
/// For more information, see
/// [Prepopulate the shipping address](https://developer.squareup.com/docs/checkout-api/optional-checkout-configurations#prepopulate-the-shipping-address).
pub pre_populated_data: Option<PrePopulatedData>,
/// A note for the payment.
///
/// After processing the payment, Square adds this note to the resulting `Payment`.
/// Max Length 500
pub payment_note: Option<String>,
}