UNPKG

wallee

Version:
44 lines (43 loc) 1.74 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfSubscriptionUpdate = instanceOfSubscriptionUpdate; exports.SubscriptionUpdateFromJSON = SubscriptionUpdateFromJSON; exports.SubscriptionUpdateFromJSONTyped = SubscriptionUpdateFromJSONTyped; exports.SubscriptionUpdateToJSON = SubscriptionUpdateToJSON; exports.SubscriptionUpdateToJSONTyped = SubscriptionUpdateToJSONTyped; /** * Check if a given object implements the SubscriptionUpdate interface. */ function instanceOfSubscriptionUpdate(value) { if (!('version' in value) || value['version'] === undefined) return false; return true; } function SubscriptionUpdateFromJSON(json) { return SubscriptionUpdateFromJSONTyped(json, false); } function SubscriptionUpdateFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'description': json['description'] == null ? undefined : json['description'], 'plannedTerminationDate': json['plannedTerminationDate'] == null ? undefined : (new Date(json['plannedTerminationDate'])), 'affiliate': json['affiliate'] == null ? undefined : json['affiliate'], 'version': json['version'], }; } function SubscriptionUpdateToJSON(json) { return SubscriptionUpdateToJSONTyped(json, false); } function SubscriptionUpdateToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'description': value['description'], 'plannedTerminationDate': value['plannedTerminationDate'] == null ? undefined : ((value['plannedTerminationDate']).toISOString()), 'affiliate': value['affiliate'], 'version': value['version'], }; }