square_api_client/models/
gift_card_activity_activate.rs

1//! Model struct for GiftCardActivityActivate type
2
3use serde::{Deserialize, Serialize};
4
5use super::Money;
6
7/// Represents details about an `ACTIVATE` [gift card activity type](GiftCardActivityType).
8#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
9pub struct GiftCardActivityActivate {
10    /// The amount added to the gift card. This value is a positive integer.
11    ///
12    /// Applications that use a custom order processing system must specify this amount in the
13    /// [CreateGiftCardActivity](https://developer.squareup.com/reference/square/giftcardactivities-api/create-gift-card-activity)
14    /// request.
15    pub amount_money: Option<Money>,
16    /// The payment instrument IDs used to process the gift card purchase, such as a credit card ID
17    /// or bank account ID.
18    ///
19    /// Applications that use a custom order processing system must specify payment instrument IDs
20    /// in the
21    /// [CreateGiftCardActivity](https://developer.squareup.com/reference/square/giftcardactivities-api/create-gift-card-activity)
22    /// request. Square uses this information to perform compliance checks.
23    ///
24    /// For applications that use the Square Orders API to process payments, Square has the
25    /// necessary instrument IDs to perform compliance checks.
26    pub buyer_payment_instrument_ids: Option<Vec<String>>,
27    /// The UID of the `GIFT_CARD` line item in the order that represents the gift card purchase.
28    ///
29    /// Applications that use the Square Orders API to process orders must specify the line item UID
30    /// in the
31    /// [CreateGiftCardActivity](https://developer.squareup.com/reference/square/giftcardactivities-api/create-gift-card-activity)
32    /// request.
33    pub line_item_uid: Option<String>,
34    /// The ID of the [Order] that contains the GIFT_CARD line item.
35    ///
36    /// Applications that use the Square Orders API to process orders must specify the order ID
37    /// [CreateGiftCardActivity](https://developer.squareup.com/reference/square/giftcardactivities-api/create-gift-card-activity)
38    /// request.
39    pub order_id: Option<String>,
40    /// A client-specified ID that associates the gift card activity with an entity in another
41    /// system.
42    ///
43    /// Applications that use a custom order processing system can use this field to track
44    /// information related to an order or payment.
45    pub reference_id: Option<String>,
46}