app_store_server_library/primitives/advanced_commerce_transaction_item.rs
1use chrono::{DateTime, Utc};
2use serde::{Deserialize, Serialize};
3use crate::primitives::advanced_commerce::offer::Offer;
4use crate::primitives::advanced_commerce::refund::Refund;
5
6#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq, Hash)]
7#[serde_with::serde_as]
8#[serde(rename_all = "camelCase")]
9/// [AdvancedCommerceTransactionItem](https://developer.apple.com/documentation/appstoreserverapi/advancedcommercetransactionitem)
10pub struct AdvancedCommerceTransactionItem {
11 /// The SKU of the item.
12 ///
13 /// [SKU](https://developer.apple.com/documentation/advancedcommerceapi/sku)
14 #[serde(rename = "SKU")]
15 pub sku: String,
16
17 /// The new description for the item.
18 ///
19 /// [Description](https://developer.apple.com/documentation/advancedcommerceapi/description)
20 pub description: String,
21
22 /// The display name for the item.
23 ///
24 /// [Display Name](https://developer.apple.com/documentation/advancedcommerceapi/displayname)
25 pub display_name: String,
26
27 /// An offer for the item.
28 ///
29 /// [Offer](https://developer.apple.com/documentation/advancedcommerceapi/offer)
30 pub offer: Offer,
31
32 /// The price in milliunits.
33 ///
34 /// [Price](https://developer.apple.com/documentation/advancedcommerceapi/price)
35 pub price: i64,
36
37 pub refunds: Vec<Refund>,
38
39 #[serde_as(as = "TimestampMilliSeconds<String, Flexible>")]
40 pub revocation_date: DateTime<Utc>,
41}