@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
60 lines (59 loc) • 2.71 kB
JavaScript
;
/* tslint:disable */
/* eslint-disable */
/**
* AskNews API
* AskNews API [](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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.OrganizationProfileSubscriptionToJSONTyped = exports.OrganizationProfileSubscriptionToJSON = exports.OrganizationProfileSubscriptionFromJSONTyped = exports.OrganizationProfileSubscriptionFromJSON = exports.instanceOfOrganizationProfileSubscription = void 0;
/**
* Check if a given object implements the OrganizationProfileSubscription interface.
*/
function instanceOfOrganizationProfileSubscription(value) {
if (!('status' in value) || value['status'] === undefined)
return false;
if (!('plan' in value) || value['plan'] === undefined)
return false;
return true;
}
exports.instanceOfOrganizationProfileSubscription = instanceOfOrganizationProfileSubscription;
function OrganizationProfileSubscriptionFromJSON(json) {
return OrganizationProfileSubscriptionFromJSONTyped(json, false);
}
exports.OrganizationProfileSubscriptionFromJSON = OrganizationProfileSubscriptionFromJSON;
function OrganizationProfileSubscriptionFromJSONTyped(json, ignoreDiscriminator) {
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'])),
};
}
exports.OrganizationProfileSubscriptionFromJSONTyped = OrganizationProfileSubscriptionFromJSONTyped;
function OrganizationProfileSubscriptionToJSON(json) {
return OrganizationProfileSubscriptionToJSONTyped(json, false);
}
exports.OrganizationProfileSubscriptionToJSON = OrganizationProfileSubscriptionToJSON;
function OrganizationProfileSubscriptionToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'status': value['status'],
'plan': value['plan'],
'period_start': value['periodStart'] == null ? undefined : (value['periodStart'].toISOString()),
'period_end': value['periodEnd'] == null ? undefined : (value['periodEnd'].toISOString()),
};
}
exports.OrganizationProfileSubscriptionToJSONTyped = OrganizationProfileSubscriptionToJSONTyped;