hermes_ebay_buy_order/models/error.rs
1/*
2 * Order API
3 *
4 * <span class=\"tablenote\"><b>Note:</b> The Order API (v2) currently only supports the guest payment/checkout flow. If you need to support member payment/checkout flow, use the <a href=\"/api-docs/buy/order_v1/resources/methods\">v1_beta version</a> of the Order API.</span><br><br><span class=\"tablenote\"><b>Note:</b> This is a <a href=\"https://developer.ebay.com/api-docs/static/versioning.html#limited\" target=\"_blank\"><img src=\"/cms/img/docs/partners-api.svg\" class=\"legend-icon partners-icon\" alt=\"Limited Release\" title=\"Limited Release\" />(Limited Release)</a> API available only to select developers approved by business units.</span><br><br>The Order API provides interfaces that let shoppers pay for items. It also returns payment and shipping status of the order.
5 *
6 * The version of the OpenAPI document: v2.1.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 : A type that defines the fields for the error messages.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Error {
17 /// This string value indicates the error category. There are three categories of errors: request errors, application errors, and system errors.
18 #[serde(rename = "category", skip_serializing_if = "Option::is_none")]
19 pub category: Option<String>,
20 /// The name of the primary system where the error occurred. This is relevant for application errors.
21 #[serde(rename = "domain", skip_serializing_if = "Option::is_none")]
22 pub domain: Option<String>,
23 /// A unique code that identifies the particular error or warning that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms.
24 #[serde(rename = "errorId", skip_serializing_if = "Option::is_none")]
25 pub error_id: Option<i32>,
26 /// An array of reference IDs that identify the specific request elements most closely associated to the error or warning, if any.
27 #[serde(rename = "inputRefIds", skip_serializing_if = "Option::is_none")]
28 pub input_ref_ids: Option<Vec<String>>,
29 /// A detailed description of the condition that caused the error or warning, and information on what what must be done to correct the problem.
30 #[serde(rename = "longMessage", skip_serializing_if = "Option::is_none")]
31 pub long_message: Option<String>,
32 /// A description of the condition that caused the error or warning.
33 #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
34 pub message: Option<String>,
35 /// An array of reference IDs that identify the specific response elements most closely associated to the error or warning, if any.
36 #[serde(rename = "outputRefIds", skip_serializing_if = "Option::is_none")]
37 pub output_ref_ids: Option<Vec<String>>,
38 /// An array of warning and error messages that return one or more variables contextual information about the error or warning. This is often the field or value that triggered the error or warning.
39 #[serde(rename = "parameters", skip_serializing_if = "Option::is_none")]
40 pub parameters: Option<Vec<models::ErrorParameter>>,
41 /// The name of the subdomain in which the error or warning occurred.
42 #[serde(rename = "subdomain", skip_serializing_if = "Option::is_none")]
43 pub subdomain: Option<String>,
44}
45
46impl Error {
47 /// A type that defines the fields for the error messages.
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