Skip to main content

amazon_spapi/models/product_fees_v0/
error.rs

1/*
2 * Selling Partner API for Product Fees
3 *
4 * The Selling Partner API for Product Fees lets you programmatically retrieve estimated fees for a product. You can then account for those fees in your pricing.
5 *
6 * The version of the OpenAPI document: v0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Error {
16    /// An error code that identifies the type of error that occurred.
17    #[serde(rename = "code")]
18    pub code: String,
19    /// A message that describes the error condition.
20    #[serde(rename = "message")]
21    pub message: String,
22    /// Additional details that can help the caller understand or fix the issue.
23    #[serde(rename = "details", skip_serializing_if = "Option::is_none")]
24    pub details: Option<String>,
25}
26
27impl Error {
28    pub fn new(code: String, message: String) -> Error {
29        Error {
30            code,
31            message,
32            details: None,
33        }
34    }
35}
36