ynab_api_async_fork/models/error_response.rs
1/*
2 * YNAB API Endpoints
3 *
4 * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com
5 *
6 * The version of the OpenAPI document: 1.72.1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ErrorResponse {
16 #[serde(rename = "error")]
17 pub error: crate::models::ErrorDetail,
18}
19
20impl ErrorResponse {
21 pub fn new(error: crate::models::ErrorDetail) -> ErrorResponse {
22 ErrorResponse {
23 error,
24 }
25 }
26}
27
28