UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
49 lines (48 loc) 1.53 kB
/* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API * * The version of the OpenAPI document: 0.18.6 * 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. */ /** * Check if a given object implements the UserProfileSubscription interface. */ export function instanceOfUserProfileSubscription(value) { if (!('status' in value)) return false; if (!('plan' in value)) return false; return true; } export function UserProfileSubscriptionFromJSON(json) { return UserProfileSubscriptionFromJSONTyped(json, false); } export function UserProfileSubscriptionFromJSONTyped(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'])), }; } export function UserProfileSubscriptionToJSON(value) { 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()), }; }