UNPKG

wallee

Version:
44 lines (43 loc) 2.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfSubscriptionCreateRequest = instanceOfSubscriptionCreateRequest; exports.SubscriptionCreateRequestFromJSON = SubscriptionCreateRequestFromJSON; exports.SubscriptionCreateRequestFromJSONTyped = SubscriptionCreateRequestFromJSONTyped; exports.SubscriptionCreateRequestToJSON = SubscriptionCreateRequestToJSON; exports.SubscriptionCreateRequestToJSONTyped = SubscriptionCreateRequestToJSONTyped; const SubscriptionComponentReferenceConfiguration_1 = require("./SubscriptionComponentReferenceConfiguration"); const SubscriptionPending_1 = require("./SubscriptionPending"); /** * Check if a given object implements the SubscriptionCreateRequest interface. */ function instanceOfSubscriptionCreateRequest(value) { return true; } function SubscriptionCreateRequestFromJSON(json) { return SubscriptionCreateRequestFromJSONTyped(json, false); } function SubscriptionCreateRequestFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'componentConfigurations': json['componentConfigurations'] == null ? undefined : (new Set(json['componentConfigurations'].map(SubscriptionComponentReferenceConfiguration_1.SubscriptionComponentReferenceConfigurationFromJSON))), 'product': json['product'] == null ? undefined : json['product'], 'currency': json['currency'] == null ? undefined : json['currency'], 'subscription': json['subscription'] == null ? undefined : (0, SubscriptionPending_1.SubscriptionPendingFromJSON)(json['subscription']), }; } function SubscriptionCreateRequestToJSON(json) { return SubscriptionCreateRequestToJSONTyped(json, false); } function SubscriptionCreateRequestToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'componentConfigurations': value['componentConfigurations'] == null ? undefined : (Array.from(value['componentConfigurations']).map(SubscriptionComponentReferenceConfiguration_1.SubscriptionComponentReferenceConfigurationToJSON)), 'product': value['product'], 'currency': value['currency'], 'subscription': (0, SubscriptionPending_1.SubscriptionPendingToJSON)(value['subscription']), }; }