UNPKG

wallee

Version:
54 lines (53 loc) 3.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfSubscriptionProductComponent = instanceOfSubscriptionProductComponent; exports.SubscriptionProductComponentFromJSON = SubscriptionProductComponentFromJSON; exports.SubscriptionProductComponentFromJSONTyped = SubscriptionProductComponentFromJSONTyped; exports.SubscriptionProductComponentToJSON = SubscriptionProductComponentToJSON; exports.SubscriptionProductComponentToJSONTyped = SubscriptionProductComponentToJSONTyped; const SubscriptionProductComponentReference_1 = require("./SubscriptionProductComponentReference"); const SubscriptionProductComponentGroup_1 = require("./SubscriptionProductComponentGroup"); const TaxClass_1 = require("./TaxClass"); /** * Check if a given object implements the SubscriptionProductComponent interface. */ function instanceOfSubscriptionProductComponent(value) { return true; } function SubscriptionProductComponentFromJSON(json) { return SubscriptionProductComponentFromJSONTyped(json, false); } function SubscriptionProductComponentFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'taxClass': json['taxClass'] == null ? undefined : (0, TaxClass_1.TaxClassFromJSON)(json['taxClass']), 'description': json['description'] == null ? undefined : json['description'], 'componentChangeWeight': json['componentChangeWeight'] == null ? undefined : json['componentChangeWeight'], 'maximalQuantity': json['maximalQuantity'] == null ? undefined : json['maximalQuantity'], 'version': json['version'] == null ? undefined : json['version'], 'minimalQuantity': json['minimalQuantity'] == null ? undefined : json['minimalQuantity'], 'reference': json['reference'] == null ? undefined : (0, SubscriptionProductComponentReference_1.SubscriptionProductComponentReferenceFromJSON)(json['reference']), 'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'], 'quantityStep': json['quantityStep'] == null ? undefined : json['quantityStep'], 'sortOrder': json['sortOrder'] == null ? undefined : json['sortOrder'], 'componentGroup': json['componentGroup'] == null ? undefined : (0, SubscriptionProductComponentGroup_1.SubscriptionProductComponentGroupFromJSON)(json['componentGroup']), 'name': json['name'] == null ? undefined : json['name'], 'id': json['id'] == null ? undefined : json['id'], 'defaultComponent': json['defaultComponent'] == null ? undefined : json['defaultComponent'], }; } function SubscriptionProductComponentToJSON(json) { return SubscriptionProductComponentToJSONTyped(json, false); } function SubscriptionProductComponentToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'taxClass': (0, TaxClass_1.TaxClassToJSON)(value['taxClass']), 'reference': (0, SubscriptionProductComponentReference_1.SubscriptionProductComponentReferenceToJSON)(value['reference']), 'componentGroup': (0, SubscriptionProductComponentGroup_1.SubscriptionProductComponentGroupToJSON)(value['componentGroup']), }; }