@ringer-tel/ivy
Version:
TypeScript SDK for Ringer APIs
85 lines (74 loc) • 2.54 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* Ringer Business API
* This API provides comprehensive endpoints for the Ringer Business system. It includes functionality for managing customer accounts, addresses, sites, phone numbers, payments, users, and other business resources. Operations typically require authentication and appropriate permissions.
*
* The version of the OpenAPI document: 1.0.5
* Contact: support@ringer.tel
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
/**
* Parameters for revoking an OAuth 2.0 token.
* @export
* @interface RevokeRequest
*/
export interface RevokeRequest {
/**
* The access token or refresh token to be revoked.
* @type {string}
* @memberof RevokeRequest
*/
token: string;
/**
* The client ID of the application making the revocation request.
* @type {string}
* @memberof RevokeRequest
*/
clientId: string;
/**
* The client secret of the application making the revocation request.
* @type {string}
* @memberof RevokeRequest
*/
clientSecret: string;
}
/**
* Check if a given object implements the RevokeRequest interface.
*/
export function instanceOfRevokeRequest(value: object): value is RevokeRequest {
if (!('token' in value) || value['token'] === undefined) return false;
if (!('clientId' in value) || value['clientId'] === undefined) return false;
if (!('clientSecret' in value) || value['clientSecret'] === undefined) return false;
return true;
}
export function RevokeRequestFromJSON(json: any): RevokeRequest {
return RevokeRequestFromJSONTyped(json, false);
}
export function RevokeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RevokeRequest {
if (json == null) {
return json;
}
return {
'token': json['token'],
'clientId': json['client_id'],
'clientSecret': json['client_secret'],
};
}
export function RevokeRequestToJSON(json: any): RevokeRequest {
return RevokeRequestToJSONTyped(json, false);
}
export function RevokeRequestToJSONTyped(value?: RevokeRequest | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'token': value['token'],
'client_id': value['clientId'],
'client_secret': value['clientSecret'],
};
}