GetOrganisationStatus200ResponseData.ts•10.2 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 { CreateOrganisation200ResponseDataHomepageUrl } from './CreateOrganisation200ResponseDataHomepageUrl.js';
import {
CreateOrganisation200ResponseDataHomepageUrlFromJSON,
CreateOrganisation200ResponseDataHomepageUrlFromJSONTyped,
CreateOrganisation200ResponseDataHomepageUrlToJSON,
CreateOrganisation200ResponseDataHomepageUrlToJSONTyped,
} from './CreateOrganisation200ResponseDataHomepageUrl.js';
import type { OrganisationAccountTypeEnum } from './OrganisationAccountTypeEnum.js';
import {
OrganisationAccountTypeEnumFromJSON,
OrganisationAccountTypeEnumFromJSONTyped,
OrganisationAccountTypeEnumToJSON,
OrganisationAccountTypeEnumToJSONTyped,
} from './OrganisationAccountTypeEnum.js';
import type { CreateOrganisation200ResponseDataLogoUrl } from './CreateOrganisation200ResponseDataLogoUrl.js';
import {
CreateOrganisation200ResponseDataLogoUrlFromJSON,
CreateOrganisation200ResponseDataLogoUrlFromJSONTyped,
CreateOrganisation200ResponseDataLogoUrlToJSON,
CreateOrganisation200ResponseDataLogoUrlToJSONTyped,
} from './CreateOrganisation200ResponseDataLogoUrl.js';
/**
* Organization status data
* @export
* @interface GetOrganisationStatus200ResponseData
*/
export interface GetOrganisationStatus200ResponseData {
[key: string]: any | any;
/**
*
* @type {string}
* @memberof GetOrganisationStatus200ResponseData
*/
id: string;
/**
* Name of the organisation
* @type {string}
* @memberof GetOrganisationStatus200ResponseData
*/
name: string;
/**
* Stripe customer ID for billing
* @type {string}
* @memberof GetOrganisationStatus200ResponseData
*/
stripeCustomerId?: string;
/**
*
* @type {CreateOrganisation200ResponseDataHomepageUrl}
* @memberof GetOrganisationStatus200ResponseData
*/
homepageUrl?: CreateOrganisation200ResponseDataHomepageUrl;
/**
*
* @type {CreateOrganisation200ResponseDataLogoUrl}
* @memberof GetOrganisationStatus200ResponseData
*/
logoUrl?: CreateOrganisation200ResponseDataLogoUrl;
/**
* Creation timestamp
* @type {string}
* @memberof GetOrganisationStatus200ResponseData
*/
createdAt: string;
/**
* Account type
* @type {OrganisationAccountTypeEnum}
* @memberof GetOrganisationStatus200ResponseData
*/
accountType: OrganisationAccountTypeEnum;
/**
* The start date of the current billing cycle.
* @type {string}
* @memberof GetOrganisationStatus200ResponseData
*/
billingCycleStartDate: string;
/**
* Number of flex credits available at the start of the current billing cycle.
* @type {number}
* @memberof GetOrganisationStatus200ResponseData
*/
billingCycleFlexCreditAllowance: number;
/**
* Last update timestamp
* @type {string}
* @memberof GetOrganisationStatus200ResponseData
*/
updatedAt: string;
/**
* Status of the organisation
* @type {string}
* @memberof GetOrganisationStatus200ResponseData
*/
status: GetOrganisationStatus200ResponseDataStatusEnum;
/**
* Whether the organization has remaining credits
* @type {boolean}
* @memberof GetOrganisationStatus200ResponseData
*/
hasRemainingCredits: boolean;
/**
* The number of credits available for the current billing cycle
* @type {number}
* @memberof GetOrganisationStatus200ResponseData
*/
billingCycleCreditAllowance: number;
/**
* The number of credits used in the current billing cycle so far
* @type {number}
* @memberof GetOrganisationStatus200ResponseData
*/
billingCycleCreditUsage: number;
/**
* The number of flex credits used in the current billing cycle so far
* @type {number}
* @memberof GetOrganisationStatus200ResponseData
*/
billingCycleFlexCreditUsage: number;
/**
* The date the current billing cycle started
* @type {string}
* @memberof GetOrganisationStatus200ResponseData
*/
currentBillingCycleStartDate: string;
/**
* The date the current billing cycle will end
* @type {string}
* @memberof GetOrganisationStatus200ResponseData
*/
currentBillingCycleEndDate: string;
/**
* The total number of members in the organization
* @type {number}
* @memberof GetOrganisationStatus200ResponseData
*/
totalMembers: number;
}
/**
* @export
*/
export const GetOrganisationStatus200ResponseDataStatusEnum = {
Active: 'ACTIVE',
Archived: 'ARCHIVED'
} as const;
export type GetOrganisationStatus200ResponseDataStatusEnum = typeof GetOrganisationStatus200ResponseDataStatusEnum[keyof typeof GetOrganisationStatus200ResponseDataStatusEnum];
/**
* Check if a given object implements the GetOrganisationStatus200ResponseData interface.
*/
export function instanceOfGetOrganisationStatus200ResponseData(value: object): value is GetOrganisationStatus200ResponseData {
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 (!('hasRemainingCredits' in value) || value['hasRemainingCredits'] === undefined) return false;
if (!('billingCycleCreditAllowance' in value) || value['billingCycleCreditAllowance'] === undefined) return false;
if (!('billingCycleCreditUsage' in value) || value['billingCycleCreditUsage'] === undefined) return false;
if (!('billingCycleFlexCreditUsage' in value) || value['billingCycleFlexCreditUsage'] === undefined) return false;
if (!('currentBillingCycleStartDate' in value) || value['currentBillingCycleStartDate'] === undefined) return false;
if (!('currentBillingCycleEndDate' in value) || value['currentBillingCycleEndDate'] === undefined) return false;
if (!('totalMembers' in value) || value['totalMembers'] === undefined) return false;
return true;
}
export function GetOrganisationStatus200ResponseDataFromJSON(json: any): GetOrganisationStatus200ResponseData {
return GetOrganisationStatus200ResponseDataFromJSONTyped(json, false);
}
export function GetOrganisationStatus200ResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetOrganisationStatus200ResponseData {
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 : CreateOrganisation200ResponseDataHomepageUrlFromJSON(json['homepageUrl']),
'logoUrl': json['logoUrl'] == null ? undefined : CreateOrganisation200ResponseDataLogoUrlFromJSON(json['logoUrl']),
'createdAt': json['createdAt'],
'accountType': OrganisationAccountTypeEnumFromJSON(json['accountType']),
'billingCycleStartDate': json['billingCycleStartDate'],
'billingCycleFlexCreditAllowance': json['billingCycleFlexCreditAllowance'],
'updatedAt': json['updatedAt'],
'status': json['status'],
'hasRemainingCredits': json['hasRemainingCredits'],
'billingCycleCreditAllowance': json['billingCycleCreditAllowance'],
'billingCycleCreditUsage': json['billingCycleCreditUsage'],
'billingCycleFlexCreditUsage': json['billingCycleFlexCreditUsage'],
'currentBillingCycleStartDate': json['currentBillingCycleStartDate'],
'currentBillingCycleEndDate': json['currentBillingCycleEndDate'],
'totalMembers': json['totalMembers'],
};
}
export function GetOrganisationStatus200ResponseDataToJSON(json: any): GetOrganisationStatus200ResponseData {
return GetOrganisationStatus200ResponseDataToJSONTyped(json, false);
}
export function GetOrganisationStatus200ResponseDataToJSONTyped(value?: GetOrganisationStatus200ResponseData | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
...value,
'id': value['id'],
'name': value['name'],
'stripeCustomerId': value['stripeCustomerId'],
'homepageUrl': CreateOrganisation200ResponseDataHomepageUrlToJSON(value['homepageUrl']),
'logoUrl': CreateOrganisation200ResponseDataLogoUrlToJSON(value['logoUrl']),
'createdAt': value['createdAt'],
'accountType': OrganisationAccountTypeEnumToJSON(value['accountType']),
'billingCycleStartDate': value['billingCycleStartDate'],
'billingCycleFlexCreditAllowance': value['billingCycleFlexCreditAllowance'],
'updatedAt': value['updatedAt'],
'status': value['status'],
'hasRemainingCredits': value['hasRemainingCredits'],
'billingCycleCreditAllowance': value['billingCycleCreditAllowance'],
'billingCycleCreditUsage': value['billingCycleCreditUsage'],
'billingCycleFlexCreditUsage': value['billingCycleFlexCreditUsage'],
'currentBillingCycleStartDate': value['currentBillingCycleStartDate'],
'currentBillingCycleEndDate': value['currentBillingCycleEndDate'],
'totalMembers': value['totalMembers'],
};
}