hermes_ebay_sell_analytics/models/error.rs
1/*
2 * Analytics API
3 *
4 * The <i>Analytics API</i> provides data and information about a seller and their eBay business. <br><br>The resources and methods in this API let sellers review information on their listing performance, metrics on their customer service performance, and details on their eBay seller performance rating. <br><br>The three resources in the Analytics API provide the following data and information: <ul><li><b>Customer Service Metric</b> – Returns benchmark data and a metric rating pertaining to a seller's customer service performance as compared to other seller's in the same peer group.</li> <li><b>Traffic Report</b> – Returns data and information that shows how buyers are engaging with a seller's listings.</li> <li><b>Seller Standards Profile</b> – Returns information pertaining to a seller's profile rating.</li></ul> Sellers can use the data and information returned by the various Analytics API methods to determine where they can make improvements to increase sales and how they might improve their seller status as viewed by eBay buyers. <br><br>For details on using this API, see <a href=\"/api-docs/sell/static/performance/analyzing-performance.html\" title=\"Selling Integration Guide\">Analyzing seller performance</a>.
5 *
6 * The version of the OpenAPI document: 1.3.2
7 * Contact: your-email@example.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Error : Type that defines the fields that can be returned in an error.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Error {
17 /// Identifies whether the error was in the REQUEST or happened when running the APPLICATION.
18 #[serde(rename = "category", skip_serializing_if = "Option::is_none")]
19 pub category: Option<String>,
20 /// The primary system where the error occurred. This is relevant for application errors. For Analytics errors, it always has the value <code>API_ANALYTICS</code>.
21 #[serde(rename = "domain", skip_serializing_if = "Option::is_none")]
22 pub domain: Option<String>,
23 /// A positive integer that uniquely identifies the specific error condition that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms. Traffic report error IDs range from 50001 to 50500.
24 #[serde(rename = "errorId", skip_serializing_if = "Option::is_none")]
25 pub error_id: Option<i32>,
26 /// Identifies specific request elements associated with the error, if any. inputRefId's response is format specific. For JSON, use <i>JSONPath</i> notation.
27 #[serde(rename = "inputRefIds", skip_serializing_if = "Option::is_none")]
28 pub input_ref_ids: Option<Vec<String>>,
29 /// A more detailed explanation of the error than given in the <code>message</code> error field.
30 #[serde(rename = "longMessage", skip_serializing_if = "Option::is_none")]
31 pub long_message: Option<String>,
32 /// Information on how to correct the problem, in the end user's terms and language where applicable. Its value is at most 50 characters long. If applicable, the value is localized in the end user's requested locale.
33 #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
34 pub message: Option<String>,
35 /// Identifies specific response elements associated with the error, if any. Path format is the same as <code>inputRefId</code>.
36 #[serde(rename = "outputRefIds", skip_serializing_if = "Option::is_none")]
37 pub output_ref_ids: Option<Vec<String>>,
38 /// This optional list of name/value pairs that contain context-specific <code>ErrorParameter</code> objects, with each item in the list being a parameter (or input field name) that caused an error condition. Each <code>ErrorParameter</code> object consists of two fields, a <code>name</code> and a <code>value</code>.
39 #[serde(rename = "parameters", skip_serializing_if = "Option::is_none")]
40 pub parameters: Option<Vec<models::ErrorParameter>>,
41 /// If present, indicates which subsystem in which the error occurred.
42 #[serde(rename = "subdomain", skip_serializing_if = "Option::is_none")]
43 pub subdomain: Option<String>,
44}
45
46impl Error {
47 /// Type that defines the fields that can be returned in an error.
48 pub fn new() -> Error {
49 Error {
50 category: None,
51 domain: None,
52 error_id: None,
53 input_ref_ids: None,
54 long_message: None,
55 message: None,
56 output_ref_ids: None,
57 parameters: None,
58 subdomain: None,
59 }
60 }
61}
62