Skip to main content

autogen_squareup/models/
list_payments_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/// ListPaymentsResponse : Defines the response returned by [ListPayments](api-endpoint:Payments-ListPayments).
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ListPaymentsResponse {
17    /// Information about errors encountered during the request.
18    #[serde(rename = "errors", skip_serializing_if = "Option::is_none")]
19    pub errors: Option<Vec<models::Error>>,
20    /// The requested list of payments.
21    #[serde(rename = "payments", skip_serializing_if = "Option::is_none")]
22    pub payments: Option<Vec<models::Payment>>,
23    /// The pagination cursor to be used in a subsequent request. If empty, this is the final response.  For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).
24    #[serde(rename = "cursor", skip_serializing_if = "Option::is_none")]
25    pub cursor: Option<String>,
26}
27
28impl ListPaymentsResponse {
29    /// Defines the response returned by [ListPayments](api-endpoint:Payments-ListPayments).
30    pub fn new() -> ListPaymentsResponse {
31        ListPaymentsResponse {
32            errors: None,
33            payments: None,
34            cursor: None,
35        }
36    }
37}
38