Skip to main content

autogen_squareup/models/
revoke_token_request.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct RevokeTokenRequest {
16    /// The Square-issued ID for your application, which is available on the **OAuth** page in the [Developer Dashboard](https://developer.squareup.com/apps).
17    #[serde(rename = "client_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
18    pub client_id: Option<Option<String>>,
19    /// The access token of the merchant whose token you want to revoke. Do not provide a value for `merchant_id` if you provide this parameter.
20    #[serde(rename = "access_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
21    pub access_token: Option<Option<String>>,
22    /// The ID of the merchant whose token you want to revoke. Do not provide a value for `access_token` if you provide this parameter.
23    #[serde(rename = "merchant_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24    pub merchant_id: Option<Option<String>>,
25    /// If `true`, terminate the given single access token, but do not terminate the entire authorization. Default: `false`
26    #[serde(rename = "revoke_only_access_token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub revoke_only_access_token: Option<Option<bool>>,
28}
29
30impl RevokeTokenRequest {
31    pub fn new() -> RevokeTokenRequest {
32        RevokeTokenRequest {
33            client_id: None,
34            access_token: None,
35            merchant_id: None,
36            revoke_only_access_token: None,
37        }
38    }
39}
40