/* 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';
/**
* Organization status data
* @export
* @interface OrganisationsOrgIdStatusGet200ResponseData
*/
export interface OrganisationsOrgIdStatusGet200ResponseData {
/**
* Whether the organization has remaining credits
* @type {boolean}
* @memberof OrganisationsOrgIdStatusGet200ResponseData
*/
hasRemainingCredits: boolean;
/**
* The number of credits available for the current billing cycle
* @type {number}
* @memberof OrganisationsOrgIdStatusGet200ResponseData
*/
billingCycleCreditAllowance: number;
/**
* The number of credits used in the current billing cycle so far
* @type {number}
* @memberof OrganisationsOrgIdStatusGet200ResponseData
*/
billingCycleCreditUsage: number;
/**
* The number of flex credits used in the current billing cycle so far
* @type {number}
* @memberof OrganisationsOrgIdStatusGet200ResponseData
*/
billingCycleFlexCreditUsage: number;
/**
* The date the current billing cycle started
* @type {string}
* @memberof OrganisationsOrgIdStatusGet200ResponseData
*/
currentBillingCycleStartDate: string;
/**
* The date the current billing cycle will end
* @type {string}
* @memberof OrganisationsOrgIdStatusGet200ResponseData
*/
currentBillingCycleEndDate: string;
/**
* The total number of members in the organization
* @type {number}
* @memberof OrganisationsOrgIdStatusGet200ResponseData
*/
totalMembers: number;
/**
*
* @type {string}
* @memberof OrganisationsOrgIdStatusGet200ResponseData
*/
id: string;
/**
* Name of the organisation
* @type {string}
* @memberof OrganisationsOrgIdStatusGet200ResponseData
*/
name: string;
/**
* Stripe customer ID for billing
* @type {string}
* @memberof OrganisationsOrgIdStatusGet200ResponseData
*/
stripeCustomerId?: string;
/**
* URL to the organisation's homepage
* @type {string}
* @memberof OrganisationsOrgIdStatusGet200ResponseData
*/
homepageUrl?: string | null;
/**
* URL to the organisation's logo
* @type {string}
* @memberof OrganisationsOrgIdStatusGet200ResponseData
*/
logoUrl?: string | null;
/**
* Creation timestamp
* @type {string}
* @memberof OrganisationsOrgIdStatusGet200ResponseData
*/
createdAt: string;
/**
* Account type
* @type {string}
* @memberof OrganisationsOrgIdStatusGet200ResponseData
*/
accountType: OrganisationsOrgIdStatusGet200ResponseDataAccountTypeEnum;
/**
* The start date of the current billing cycle.
* @type {string}
* @memberof OrganisationsOrgIdStatusGet200ResponseData
*/
billingCycleStartDate: string;
/**
* Number of flex credits available at the start of the current billing cycle.
* @type {number}
* @memberof OrganisationsOrgIdStatusGet200ResponseData
*/
billingCycleFlexCreditAllowance: number;
/**
* Last update timestamp
* @type {string}
* @memberof OrganisationsOrgIdStatusGet200ResponseData
*/
updatedAt: string;
/**
* Status of the organisation
* @type {string}
* @memberof OrganisationsOrgIdStatusGet200ResponseData
*/
status: OrganisationsOrgIdStatusGet200ResponseDataStatusEnum;
}
/**
* @export
*/
export const OrganisationsOrgIdStatusGet200ResponseDataAccountTypeEnum = {
Hobby: 'HOBBY',
Professional: 'PROFESSIONAL',
Team: 'TEAM'
} as const;
export type OrganisationsOrgIdStatusGet200ResponseDataAccountTypeEnum = typeof OrganisationsOrgIdStatusGet200ResponseDataAccountTypeEnum[keyof typeof OrganisationsOrgIdStatusGet200ResponseDataAccountTypeEnum];
/**
* @export
*/
export const OrganisationsOrgIdStatusGet200ResponseDataStatusEnum = {
Active: 'ACTIVE',
Archived: 'ARCHIVED'
} as const;
export type OrganisationsOrgIdStatusGet200ResponseDataStatusEnum = typeof OrganisationsOrgIdStatusGet200ResponseDataStatusEnum[keyof typeof OrganisationsOrgIdStatusGet200ResponseDataStatusEnum];
/**
* Check if a given object implements the OrganisationsOrgIdStatusGet200ResponseData interface.
*/
export function instanceOfOrganisationsOrgIdStatusGet200ResponseData(value: object): value is OrganisationsOrgIdStatusGet200ResponseData {
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;
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 OrganisationsOrgIdStatusGet200ResponseDataFromJSON(json: any): OrganisationsOrgIdStatusGet200ResponseData {
return OrganisationsOrgIdStatusGet200ResponseDataFromJSONTyped(json, false);
}
export function OrganisationsOrgIdStatusGet200ResponseDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganisationsOrgIdStatusGet200ResponseData {
if (json == null) {
return json;
}
return {
'hasRemainingCredits': json['hasRemainingCredits'],
'billingCycleCreditAllowance': json['billingCycleCreditAllowance'],
'billingCycleCreditUsage': json['billingCycleCreditUsage'],
'billingCycleFlexCreditUsage': json['billingCycleFlexCreditUsage'],
'currentBillingCycleStartDate': json['currentBillingCycleStartDate'],
'currentBillingCycleEndDate': json['currentBillingCycleEndDate'],
'totalMembers': json['totalMembers'],
'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 OrganisationsOrgIdStatusGet200ResponseDataToJSON(json: any): OrganisationsOrgIdStatusGet200ResponseData {
return OrganisationsOrgIdStatusGet200ResponseDataToJSONTyped(json, false);
}
export function OrganisationsOrgIdStatusGet200ResponseDataToJSONTyped(value?: OrganisationsOrgIdStatusGet200ResponseData | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'hasRemainingCredits': value['hasRemainingCredits'],
'billingCycleCreditAllowance': value['billingCycleCreditAllowance'],
'billingCycleCreditUsage': value['billingCycleCreditUsage'],
'billingCycleFlexCreditUsage': value['billingCycleFlexCreditUsage'],
'currentBillingCycleStartDate': value['currentBillingCycleStartDate'],
'currentBillingCycleEndDate': value['currentBillingCycleEndDate'],
'totalMembers': value['totalMembers'],
'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'],
};
}