UNPKG

wallee

Version:
36 lines (35 loc) 1.71 kB
import { SubscriptionComponentReferenceConfigurationFromJSON, SubscriptionComponentReferenceConfigurationToJSON, } from './SubscriptionComponentReferenceConfiguration'; /** * Check if a given object implements the SubscriptionUpdateRequest interface. */ export function instanceOfSubscriptionUpdateRequest(value) { return true; } export function SubscriptionUpdateRequestFromJSON(json) { return SubscriptionUpdateRequestFromJSONTyped(json, false); } export function SubscriptionUpdateRequestFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'componentConfigurations': json['componentConfigurations'] == null ? undefined : (new Set(json['componentConfigurations'].map(SubscriptionComponentReferenceConfigurationFromJSON))), 'product': json['product'] == null ? undefined : json['product'], 'currency': json['currency'] == null ? undefined : json['currency'], 'respectTerminationPeriod': json['respectTerminationPeriod'] == null ? undefined : json['respectTerminationPeriod'], }; } export function SubscriptionUpdateRequestToJSON(json) { return SubscriptionUpdateRequestToJSONTyped(json, false); } export function SubscriptionUpdateRequestToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'componentConfigurations': value['componentConfigurations'] == null ? undefined : (Array.from(value['componentConfigurations']).map(SubscriptionComponentReferenceConfigurationToJSON)), 'product': value['product'], 'currency': value['currency'], 'respectTerminationPeriod': value['respectTerminationPeriod'], }; }