Skip to main content

autogen_squareup/models/
list_loyalty_programs_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/// ListLoyaltyProgramsResponse : A response that contains all loyalty programs.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ListLoyaltyProgramsResponse {
17    /// Any errors that occurred during the request.
18    #[serde(rename = "errors", skip_serializing_if = "Option::is_none")]
19    pub errors: Option<Vec<models::Error>>,
20    /// A list of `LoyaltyProgram` for the merchant.
21    #[serde(rename = "programs", skip_serializing_if = "Option::is_none")]
22    pub programs: Option<Vec<models::LoyaltyProgram>>,
23}
24
25impl ListLoyaltyProgramsResponse {
26    /// A response that contains all loyalty programs.
27    pub fn new() -> ListLoyaltyProgramsResponse {
28        ListLoyaltyProgramsResponse {
29            errors: None,
30            programs: None,
31        }
32    }
33}
34