square_api_client/models/create_card_request.rs
1//! Request struct for the Create Card API
2
3use serde::Serialize;
4
5use super::Card;
6
7/// This is a model class for CreateCardRequest type.
8#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)]
9pub struct CreateCardRequest {
10 /// A unique string that identifies this CreateCard request. Keys can be any valid string and
11 /// must be unique for every request. Max: 45 characters See [Idempotency
12 /// keys](https://developer.squareup.com/docs/basics/api101/idempotency) for more information.
13 pub idempotency_key: String,
14 /// The ID of the source which represents the card information to be stored. This can be a card
15 /// nonce or a payment id.
16 pub source_id: String,
17 /// An identifying token generated by
18 /// [Payments.verifyBuyer()](https://developer.squareup.com/reference/sdks/web/payments/objects/Payments#Payments.verifyBuyer).
19 /// Verification tokens encapsulate customer device information and 3-D Secure challenge results
20 /// to indicate that Square has verified the buyer identity. See the [SCA
21 /// Overview](https://developer.squareup.com/docs/sca-overview).
22 pub verification_token: Option<String>,
23 /// Represents the payment details of a card to be used for payments. These details are
24 /// determined by the payment token generated by Web Payments SDK.
25 pub card: Card,
26}