wallee
Version:
TypeScript/JavaScript client for wallee
51 lines (50 loc) • 2.62 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfProductMeteredFee = instanceOfProductMeteredFee;
exports.ProductMeteredFeeFromJSON = ProductMeteredFeeFromJSON;
exports.ProductMeteredFeeFromJSONTyped = ProductMeteredFeeFromJSONTyped;
exports.ProductMeteredFeeToJSON = ProductMeteredFeeToJSON;
exports.ProductMeteredFeeToJSONTyped = ProductMeteredFeeToJSONTyped;
const SubscriptionProductComponent_1 = require("./SubscriptionProductComponent");
const ProductFeeType_1 = require("./ProductFeeType");
const ProductMeteredTierPricing_1 = require("./ProductMeteredTierPricing");
const SubscriptionMetric_1 = require("./SubscriptionMetric");
/**
* Check if a given object implements the ProductMeteredFee interface.
*/
function instanceOfProductMeteredFee(value) {
return true;
}
function ProductMeteredFeeFromJSON(json) {
return ProductMeteredFeeFromJSONTyped(json, false);
}
function ProductMeteredFeeFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'],
'component': json['component'] == null ? undefined : (0, SubscriptionProductComponent_1.SubscriptionProductComponentFromJSON)(json['component']),
'tierPricing': json['tierPricing'] == null ? undefined : (0, ProductMeteredTierPricing_1.ProductMeteredTierPricingFromJSON)(json['tierPricing']),
'metric': json['metric'] == null ? undefined : (0, SubscriptionMetric_1.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 : (0, ProductFeeType_1.ProductFeeTypeFromJSON)(json['type']),
'version': json['version'] == null ? undefined : json['version'],
};
}
function ProductMeteredFeeToJSON(json) {
return ProductMeteredFeeToJSONTyped(json, false);
}
function ProductMeteredFeeToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'component': (0, SubscriptionProductComponent_1.SubscriptionProductComponentToJSON)(value['component']),
'tierPricing': (0, ProductMeteredTierPricing_1.ProductMeteredTierPricingToJSON)(value['tierPricing']),
'metric': (0, SubscriptionMetric_1.SubscriptionMetricToJSON)(value['metric']),
'type': (0, ProductFeeType_1.ProductFeeTypeToJSON)(value['type']),
};
}