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
use serde::{Deserialize, Serialize};
/// The details of a one-time charge product, including its display name, price, SKU, and metadata.
///
/// [AdvancedCommerceOneTimeChargeItem](https://developer.apple.com/documentation/advancedcommerceapi/onetimechargeitem)
#[derive(Debug, Clone, Deserialize, Serialize, Hash, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct AdvancedCommerceOneTimeChargeItem {
/// The stock keeping unit (SKU) for the product.
#[serde(rename = "SKU")]
pub sku: String,
///A description of the product that doesn’t display to customers.
///
///[description](https://developer.apple.com/documentation/advancedcommerceapi/description)
pub description: String,
///The product name, suitable for display to customers.
///
///[displayName](https://developer.apple.com/documentation/advancedcommerceapi/displayname)
pub display_name: String,
/// The price, in milliunits of the currency, of the one-time charge product.
///
/// [Price](https://developer.apple.com/documentation/advancedcommerceapi/price)
pub price: i64,
}
impl AdvancedCommerceOneTimeChargeItem {
pub fn new(sku: String, description: String, display_name: String, price: i64) -> Self {
Self {
sku,
description,
display_name,
price,
}
}
}