@ringer-tel/ivy
Version:
TypeScript SDK for Ringer APIs
112 lines (101 loc) • 3.27 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';
/**
* Core attributes defining a user.
* @export
* @interface UserCore
*/
export interface UserCore {
/**
* The user's first name.
* @type {string}
* @memberof UserCore
*/
firstName: string;
/**
* The user's last name.
* @type {string}
* @memberof UserCore
*/
lastName: string;
/**
* The user's unique email address, used for login and notifications.
* @type {string}
* @memberof UserCore
*/
email: string;
/**
* The role assigned to the user within the account (e.g., administrator, user).
* @type {string}
* @memberof UserCore
*/
role: string;
/**
* Indicates whether the user's account is active and can be used to log in.
* @type {boolean}
* @memberof UserCore
*/
active: boolean;
/**
* The user's preferred language and regional settings (e.g., "en-US").
* @type {string}
* @memberof UserCore
*/
locale: string;
}
/**
* Check if a given object implements the UserCore interface.
*/
export function instanceOfUserCore(value: object): value is UserCore {
if (!('firstName' in value) || value['firstName'] === undefined) return false;
if (!('lastName' in value) || value['lastName'] === undefined) return false;
if (!('email' in value) || value['email'] === undefined) return false;
if (!('role' in value) || value['role'] === undefined) return false;
if (!('active' in value) || value['active'] === undefined) return false;
if (!('locale' in value) || value['locale'] === undefined) return false;
return true;
}
export function UserCoreFromJSON(json: any): UserCore {
return UserCoreFromJSONTyped(json, false);
}
export function UserCoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserCore {
if (json == null) {
return json;
}
return {
'firstName': json['first_name'],
'lastName': json['last_name'],
'email': json['email'],
'role': json['role'],
'active': json['active'],
'locale': json['locale'],
};
}
export function UserCoreToJSON(json: any): UserCore {
return UserCoreToJSONTyped(json, false);
}
export function UserCoreToJSONTyped(value?: UserCore | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'first_name': value['firstName'],
'last_name': value['lastName'],
'email': value['email'],
'role': value['role'],
'active': value['active'],
'locale': value['locale'],
};
}