hermes_ebay_sell_inventory/models/specification.rs
1/*
2 * Inventory API
3 *
4 * The Inventory API is used to create and manage inventory, and then to publish and manage this inventory on an eBay marketplace. There are also methods in this API that will convert eligible, active eBay listings into the Inventory API model.
5 *
6 * The version of the OpenAPI document: 1.18.4
7 * Contact: your-email@example.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Specification : This type is used to specify product aspects for which variations within an inventory item group vary, and the order in which they appear in the listing. For example, t-shirts in an inventory item group may be available in multiple sizes and colors.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Specification {
17 /// This is the name of product variation aspect. Typically, for clothing, typical aspect names are <code>\"Size\"</code> and <code>\"Color\"</code>. Product variation aspects are not required immediately upon creating an inventory item group, but these aspects will be required before a multiple-variation listing containing this inventory item group is published. For each product variation aspect that is specified through the <strong>specifications</strong> container, one <strong>name</strong> value is required and two or more variations of this aspect are required through the <strong>values</strong> array.<br><br><span class=\"tablenote\"> <strong>Note:</strong> Each member of the inventory item group should have these same aspect names specified through the <strong>product.aspects</strong> container when the inventory item is created with the <strong>createOrReplaceInventoryItem</strong> or <strong>bulkCreateOrReplaceInventoryItem</strong> call. </span><br><div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"<b><span style="color: #dd1e31;" class="mcFormatColor">Important! </span></b>\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span>Publish offer note: This field is required before an offer can be published to create an active listing. </p></span></div><br><strong>Max Length</strong>: 40
18 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
19 pub name: Option<String>,
20 /// This is an array of values pertaining to the corresponding product variation aspect (specified in the <strong>name</strong> field). Below is a sample of how these values will appear under a <strong>specifications</strong> container: <br> <pre><code>\"specifications\": [{<br> \"name\": \"Size\",<br> \"values\": [\"Small\",<br> \"Medium\",<br> \"Large\"]<br> },<br> { <br> \"name\": \"Color\",<br> \"values\": [\"Blue\",<br> \"White\",<br> \"Red\"] <br> }] </pre></code><span class=\"tablenote\"> <strong>Note:</strong> Each member of the inventory item group should have these same aspect names, and each individual inventory item should have each variation of the product aspect values specified through the <strong>product.aspects</strong> container when the inventory item is created with the <strong>createOrReplaceInventoryItem</strong> or <strong>bulkCreateOrReplaceInventoryItem</strong> call. </span><br><div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"<b><span style="color: #dd1e31;" class="mcFormatColor">Important! </span></b>\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span>Publish offer note: This array is required and at least one value that matches the corresponding aspect name must be specified.</p></span></div><br><strong>Max Length</strong>: 50
21 #[serde(rename = "values", skip_serializing_if = "Option::is_none")]
22 pub values: Option<Vec<String>>,
23}
24
25impl Specification {
26 /// This type is used to specify product aspects for which variations within an inventory item group vary, and the order in which they appear in the listing. For example, t-shirts in an inventory item group may be available in multiple sizes and colors.
27 pub fn new() -> Specification {
28 Specification {
29 name: None,
30 values: None,
31 }
32 }
33}
34