Skip to main content

autogen_squareup/models/
retrieve_card_response.rs

1/*
2 * Square
3 *
4 * Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.
5 *
6 * The version of the OpenAPI document: 2.0
7 * Contact: developers@squareup.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// RetrieveCardResponse : Defines the fields that are included in the response body of a request to the [RetrieveCard](api-endpoint:Cards-RetrieveCard) endpoint.  Note: if there are errors processing the request, the card field will not be present.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RetrieveCardResponse {
17    /// Information on errors encountered during the request.
18    #[serde(rename = "errors", skip_serializing_if = "Option::is_none")]
19    pub errors: Option<Vec<models::Error>>,
20    #[serde(rename = "card", skip_serializing_if = "Option::is_none")]
21    pub card: Option<Box<models::Card>>,
22}
23
24impl RetrieveCardResponse {
25    /// Defines the fields that are included in the response body of a request to the [RetrieveCard](api-endpoint:Cards-RetrieveCard) endpoint.  Note: if there are errors processing the request, the card field will not be present.
26    pub fn new() -> RetrieveCardResponse {
27        RetrieveCardResponse {
28            errors: None,
29            card: None,
30        }
31    }
32}
33