/* tslint:disable */
/* eslint-disable */
/**
* Squad API
* API for managing Squad resources
*
* The version of the OpenAPI document: 2.4.1
*
*
* 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';
/**
* Organisation data
* @export
* @interface Organisation
*/
export interface Organisation {
/**
*
* @type {string}
* @memberof Organisation
*/
id: string;
/**
* Name of the organisation
* @type {string}
* @memberof Organisation
*/
name: string;
/**
* Stripe customer ID for billing
* @type {string}
* @memberof Organisation
*/
stripeCustomerId?: string;
/**
* URL to the organisation's homepage
* @type {string}
* @memberof Organisation
*/
homepageUrl?: string | null;
/**
* URL to the organisation's logo
* @type {string}
* @memberof Organisation
*/
logoUrl?: string | null;
/**
* Creation timestamp
* @type {string}
* @memberof Organisation
*/
createdAt: string;
/**
* Account type
* @type {string}
* @memberof Organisation
*/
accountType: OrganisationAccountTypeEnum;
/**
* The start date of the current billing cycle.
* @type {string}
* @memberof Organisation
*/
billingCycleStartDate: string;
/**
* Number of flex credits available at the start of the current billing cycle.
* @type {number}
* @memberof Organisation
*/
billingCycleFlexCreditAllowance: number;
/**
* Last update timestamp
* @type {string}
* @memberof Organisation
*/
updatedAt: string;
/**
* Status of the organisation
* @type {string}
* @memberof Organisation
*/
status: OrganisationStatusEnum;
}
/**
* @export
*/
export const OrganisationAccountTypeEnum = {
Hobby: 'HOBBY',
Professional: 'PROFESSIONAL',
Team: 'TEAM'
} as const;
export type OrganisationAccountTypeEnum = typeof OrganisationAccountTypeEnum[keyof typeof OrganisationAccountTypeEnum];
/**
* @export
*/
export const OrganisationStatusEnum = {
Active: 'ACTIVE',
Archived: 'ARCHIVED'
} as const;
export type OrganisationStatusEnum = typeof OrganisationStatusEnum[keyof typeof OrganisationStatusEnum];
/**
* Check if a given object implements the Organisation interface.
*/
export function instanceOfOrganisation(value: object): value is Organisation {
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;
return true;
}
export function OrganisationFromJSON(json: any): Organisation {
return OrganisationFromJSONTyped(json, false);
}
export function OrganisationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Organisation {
if (json == null) {
return json;
}
return {
'id': json['id'],
'name': json['name'],
'stripeCustomerId': json['stripeCustomerId'] == null ? undefined : json['stripeCustomerId'],
'homepageUrl': json['homepageUrl'] == null ? undefined : json['homepageUrl'],
'logoUrl': json['logoUrl'] == null ? undefined : json['logoUrl'],
'createdAt': json['createdAt'],
'accountType': json['accountType'],
'billingCycleStartDate': json['billingCycleStartDate'],
'billingCycleFlexCreditAllowance': json['billingCycleFlexCreditAllowance'],
'updatedAt': json['updatedAt'],
'status': json['status'],
};
}
export function OrganisationToJSON(json: any): Organisation {
return OrganisationToJSONTyped(json, false);
}
export function OrganisationToJSONTyped(value?: Organisation | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'name': value['name'],
'stripeCustomerId': value['stripeCustomerId'],
'homepageUrl': value['homepageUrl'],
'logoUrl': value['logoUrl'],
'createdAt': value['createdAt'],
'accountType': value['accountType'],
'billingCycleStartDate': value['billingCycleStartDate'],
'billingCycleFlexCreditAllowance': value['billingCycleFlexCreditAllowance'],
'updatedAt': value['updatedAt'],
'status': value['status'],
};
}