ListOrganisations200ResponseDataInner.ts•7.67 kB
/* tslint:disable */
/* eslint-disable */
/**
* Squad API
* API for managing Squad resources
*
* The version of the OpenAPI document: 4.0.0
* Contact: help@meetsquad.ai
*
* 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.js';
import type { ListOrganisations200ResponseDataInnerLogoUrl } from './ListOrganisations200ResponseDataInnerLogoUrl.js';
import {
ListOrganisations200ResponseDataInnerLogoUrlFromJSON,
ListOrganisations200ResponseDataInnerLogoUrlFromJSONTyped,
ListOrganisations200ResponseDataInnerLogoUrlToJSON,
ListOrganisations200ResponseDataInnerLogoUrlToJSONTyped,
} from './ListOrganisations200ResponseDataInnerLogoUrl.js';
import type { OrganisationAccountTypeEnum } from './OrganisationAccountTypeEnum.js';
import {
OrganisationAccountTypeEnumFromJSON,
OrganisationAccountTypeEnumFromJSONTyped,
OrganisationAccountTypeEnumToJSON,
OrganisationAccountTypeEnumToJSONTyped,
} from './OrganisationAccountTypeEnum.js';
import type { ListOrganisations200ResponseDataInnerHomepageUrl } from './ListOrganisations200ResponseDataInnerHomepageUrl.js';
import {
ListOrganisations200ResponseDataInnerHomepageUrlFromJSON,
ListOrganisations200ResponseDataInnerHomepageUrlFromJSONTyped,
ListOrganisations200ResponseDataInnerHomepageUrlToJSON,
ListOrganisations200ResponseDataInnerHomepageUrlToJSONTyped,
} from './ListOrganisations200ResponseDataInnerHomepageUrl.js';
/**
*
* @export
* @interface ListOrganisations200ResponseDataInner
*/
export interface ListOrganisations200ResponseDataInner {
[key: string]: any | any;
/**
*
* @type {string}
* @memberof ListOrganisations200ResponseDataInner
*/
id: string;
/**
* Name of the organisation
* @type {string}
* @memberof ListOrganisations200ResponseDataInner
*/
name: string;
/**
* Stripe customer ID for billing
* @type {string}
* @memberof ListOrganisations200ResponseDataInner
*/
stripeCustomerId?: string;
/**
*
* @type {ListOrganisations200ResponseDataInnerHomepageUrl}
* @memberof ListOrganisations200ResponseDataInner
*/
homepageUrl?: ListOrganisations200ResponseDataInnerHomepageUrl;
/**
*
* @type {ListOrganisations200ResponseDataInnerLogoUrl}
* @memberof ListOrganisations200ResponseDataInner
*/
logoUrl?: ListOrganisations200ResponseDataInnerLogoUrl;
/**
* Creation timestamp
* @type {string}
* @memberof ListOrganisations200ResponseDataInner
*/
createdAt: string;
/**
* Account type
* @type {OrganisationAccountTypeEnum}
* @memberof ListOrganisations200ResponseDataInner
*/
accountType: OrganisationAccountTypeEnum;
/**
* The start date of the current billing cycle.
* @type {string}
* @memberof ListOrganisations200ResponseDataInner
*/
billingCycleStartDate: string;
/**
* Number of flex credits available at the start of the current billing cycle.
* @type {number}
* @memberof ListOrganisations200ResponseDataInner
*/
billingCycleFlexCreditAllowance: number;
/**
* Last update timestamp
* @type {string}
* @memberof ListOrganisations200ResponseDataInner
*/
updatedAt: string;
/**
* Status of the organisation
* @type {string}
* @memberof ListOrganisations200ResponseDataInner
*/
status: ListOrganisations200ResponseDataInnerStatusEnum;
/**
* Number of unprocessed insight items
* @type {number}
* @memberof ListOrganisations200ResponseDataInner
*/
unprocessedFeedbackCount: number;
}
/**
* @export
*/
export const ListOrganisations200ResponseDataInnerStatusEnum = {
Active: 'ACTIVE',
Archived: 'ARCHIVED'
} as const;
export type ListOrganisations200ResponseDataInnerStatusEnum = typeof ListOrganisations200ResponseDataInnerStatusEnum[keyof typeof ListOrganisations200ResponseDataInnerStatusEnum];
/**
* Check if a given object implements the ListOrganisations200ResponseDataInner interface.
*/
export function instanceOfListOrganisations200ResponseDataInner(value: object): value is ListOrganisations200ResponseDataInner {
if (!('id' in value) || value['id'] === undefined) return false;
if (!('name' in value) || value['name'] === undefined) return false;
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
if (!('accountType' in value) || value['accountType'] === undefined) return false;
if (!('billingCycleStartDate' in value) || value['billingCycleStartDate'] === undefined) return false;
if (!('billingCycleFlexCreditAllowance' in value) || value['billingCycleFlexCreditAllowance'] === undefined) return false;
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
if (!('status' in value) || value['status'] === undefined) return false;
if (!('unprocessedFeedbackCount' in value) || value['unprocessedFeedbackCount'] === undefined) return false;
return true;
}
export function ListOrganisations200ResponseDataInnerFromJSON(json: any): ListOrganisations200ResponseDataInner {
return ListOrganisations200ResponseDataInnerFromJSONTyped(json, false);
}
export function ListOrganisations200ResponseDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListOrganisations200ResponseDataInner {
if (json == null) {
return json;
}
return {
...json,
'id': json['id'],
'name': json['name'],
'stripeCustomerId': json['stripeCustomerId'] == null ? undefined : json['stripeCustomerId'],
'homepageUrl': json['homepageUrl'] == null ? undefined : ListOrganisations200ResponseDataInnerHomepageUrlFromJSON(json['homepageUrl']),
'logoUrl': json['logoUrl'] == null ? undefined : ListOrganisations200ResponseDataInnerLogoUrlFromJSON(json['logoUrl']),
'createdAt': json['createdAt'],
'accountType': OrganisationAccountTypeEnumFromJSON(json['accountType']),
'billingCycleStartDate': json['billingCycleStartDate'],
'billingCycleFlexCreditAllowance': json['billingCycleFlexCreditAllowance'],
'updatedAt': json['updatedAt'],
'status': json['status'],
'unprocessedFeedbackCount': json['unprocessedFeedbackCount'],
};
}
export function ListOrganisations200ResponseDataInnerToJSON(json: any): ListOrganisations200ResponseDataInner {
return ListOrganisations200ResponseDataInnerToJSONTyped(json, false);
}
export function ListOrganisations200ResponseDataInnerToJSONTyped(value?: ListOrganisations200ResponseDataInner | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
...value,
'id': value['id'],
'name': value['name'],
'stripeCustomerId': value['stripeCustomerId'],
'homepageUrl': ListOrganisations200ResponseDataInnerHomepageUrlToJSON(value['homepageUrl']),
'logoUrl': ListOrganisations200ResponseDataInnerLogoUrlToJSON(value['logoUrl']),
'createdAt': value['createdAt'],
'accountType': OrganisationAccountTypeEnumToJSON(value['accountType']),
'billingCycleStartDate': value['billingCycleStartDate'],
'billingCycleFlexCreditAllowance': value['billingCycleFlexCreditAllowance'],
'updatedAt': value['updatedAt'],
'status': value['status'],
'unprocessedFeedbackCount': value['unprocessedFeedbackCount'],
};
}