UNPKG

wallee

Version:
44 lines (43 loc) 2.16 kB
import { SubscriptionProductComponentFromJSON, SubscriptionProductComponentToJSON, } from './SubscriptionProductComponent'; import { ProductFeeTypeFromJSON, ProductFeeTypeToJSON, } from './ProductFeeType'; import { ProductMeteredTierPricingFromJSON, ProductMeteredTierPricingToJSON, } from './ProductMeteredTierPricing'; import { SubscriptionMetricFromJSON, SubscriptionMetricToJSON, } from './SubscriptionMetric'; /** * Check if a given object implements the ProductMeteredFee interface. */ export function instanceOfProductMeteredFee(value) { return true; } export function ProductMeteredFeeFromJSON(json) { return ProductMeteredFeeFromJSONTyped(json, false); } export function ProductMeteredFeeFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'], 'component': json['component'] == null ? undefined : SubscriptionProductComponentFromJSON(json['component']), 'tierPricing': json['tierPricing'] == null ? undefined : ProductMeteredTierPricingFromJSON(json['tierPricing']), 'metric': json['metric'] == null ? undefined : SubscriptionMetricFromJSON(json['metric']), 'name': json['name'] == null ? undefined : json['name'], 'description': json['description'] == null ? undefined : json['description'], 'id': json['id'] == null ? undefined : json['id'], 'type': json['type'] == null ? undefined : ProductFeeTypeFromJSON(json['type']), 'version': json['version'] == null ? undefined : json['version'], }; } export function ProductMeteredFeeToJSON(json) { return ProductMeteredFeeToJSONTyped(json, false); } export function ProductMeteredFeeToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'component': SubscriptionProductComponentToJSON(value['component']), 'tierPricing': ProductMeteredTierPricingToJSON(value['tierPricing']), 'metric': SubscriptionMetricToJSON(value['metric']), 'type': ProductFeeTypeToJSON(value['type']), }; }