UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
92 lines (81 loc) 2.82 kB
/* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API [![status](https://status.asknews.app/api/badge/2/status?style=for-the-badge)](https://status.asknews.app/status/prod) * * The version of the OpenAPI document: 0.24.22 * Contact: contact@emergentmethods.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'; /** * * @export * @interface OrganizationProfileSubscription */ export interface OrganizationProfileSubscription { /** * * @type {string} * @memberof OrganizationProfileSubscription */ status: string; /** * * @type {string} * @memberof OrganizationProfileSubscription */ plan: string; /** * * @type {Date} * @memberof OrganizationProfileSubscription */ periodStart?: Date | null; /** * * @type {Date} * @memberof OrganizationProfileSubscription */ periodEnd?: Date | null; } /** * Check if a given object implements the OrganizationProfileSubscription interface. */ export function instanceOfOrganizationProfileSubscription(value: object): value is OrganizationProfileSubscription { if (!('status' in value) || value['status'] === undefined) return false; if (!('plan' in value) || value['plan'] === undefined) return false; return true; } export function OrganizationProfileSubscriptionFromJSON(json: any): OrganizationProfileSubscription { return OrganizationProfileSubscriptionFromJSONTyped(json, false); } export function OrganizationProfileSubscriptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrganizationProfileSubscription { if (json == null) { return json; } return { 'status': json['status'], 'plan': json['plan'], 'periodStart': json['period_start'] == null ? undefined : (new Date(json['period_start'])), 'periodEnd': json['period_end'] == null ? undefined : (new Date(json['period_end'])), }; } export function OrganizationProfileSubscriptionToJSON(json: any): OrganizationProfileSubscription { return OrganizationProfileSubscriptionToJSONTyped(json, false); } export function OrganizationProfileSubscriptionToJSONTyped(value?: OrganizationProfileSubscription | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'status': value['status'], 'plan': value['plan'], 'period_start': value['periodStart'] == null ? undefined : ((value['periodStart'] as any).toISOString()), 'period_end': value['periodEnd'] == null ? undefined : ((value['periodEnd'] as any).toISOString()), }; }