Skip to main content

amazon_spapi/models/shipping_v2/
error_list.rs

1/*
2 * Amazon Shipping API
3 *
4 * The Amazon Shipping API is designed to support outbound shipping use cases both for orders originating on Amazon-owned marketplaces as well as external channels/marketplaces. With these APIs, you can request shipping rates, create shipments, cancel shipments, and track shipments.
5 *
6 * The version of the OpenAPI document: v2
7 * Contact: swa-api-core@amazon.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ErrorList : A list of error responses returned when a request is unsuccessful.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ErrorList {
17    /// Array of Errors
18    #[serde(rename = "errors")]
19    pub errors: Vec<models::shipping_v2::Error>,
20}
21
22impl ErrorList {
23    /// A list of error responses returned when a request is unsuccessful.
24    pub fn new(errors: Vec<models::shipping_v2::Error>) -> ErrorList {
25        ErrorList {
26            errors,
27        }
28    }
29}
30