UNPKG

wallee

Version:
61 lines (60 loc) 3.68 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfSubscriptionLedgerEntry = instanceOfSubscriptionLedgerEntry; exports.SubscriptionLedgerEntryFromJSON = SubscriptionLedgerEntryFromJSON; exports.SubscriptionLedgerEntryFromJSONTyped = SubscriptionLedgerEntryFromJSONTyped; exports.SubscriptionLedgerEntryToJSON = SubscriptionLedgerEntryToJSON; exports.SubscriptionLedgerEntryToJSONTyped = SubscriptionLedgerEntryToJSONTyped; const ProductFeeType_1 = require("./ProductFeeType"); const SubscriptionLedgerEntryState_1 = require("./SubscriptionLedgerEntryState"); const Tax_1 = require("./Tax"); /** * Check if a given object implements the SubscriptionLedgerEntry interface. */ function instanceOfSubscriptionLedgerEntry(value) { return true; } function SubscriptionLedgerEntryFromJSON(json) { return SubscriptionLedgerEntryFromJSONTyped(json, false); } function SubscriptionLedgerEntryFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'quantity': json['quantity'] == null ? undefined : json['quantity'], 'amountExcludingTax': json['amountExcludingTax'] == null ? undefined : json['amountExcludingTax'], 'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])), 'subscriptionVersion': json['subscriptionVersion'] == null ? undefined : json['subscriptionVersion'], 'externalId': json['externalId'] == null ? undefined : json['externalId'], 'taxes': json['taxes'] == null ? undefined : (new Set(json['taxes'].map(Tax_1.TaxFromJSON))), 'feeType': json['feeType'] == null ? undefined : (0, ProductFeeType_1.ProductFeeTypeFromJSON)(json['feeType']), 'title': json['title'] == null ? undefined : json['title'], 'createdOn': json['createdOn'] == null ? undefined : (new Date(json['createdOn'])), 'version': json['version'] == null ? undefined : json['version'], 'componentReferenceName': json['componentReferenceName'] == null ? undefined : json['componentReferenceName'], 'subscriptionMetricId': json['subscriptionMetricId'] == null ? undefined : json['subscriptionMetricId'], 'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'], 'proRataCalculated': json['proRataCalculated'] == null ? undefined : json['proRataCalculated'], 'createdBy': json['createdBy'] == null ? undefined : json['createdBy'], 'componentReferenceSku': json['componentReferenceSku'] == null ? undefined : json['componentReferenceSku'], 'id': json['id'] == null ? undefined : json['id'], 'state': json['state'] == null ? undefined : (0, SubscriptionLedgerEntryState_1.SubscriptionLedgerEntryStateFromJSON)(json['state']), 'amountIncludingTax': json['amountIncludingTax'] == null ? undefined : json['amountIncludingTax'], 'discountIncludingTax': json['discountIncludingTax'] == null ? undefined : json['discountIncludingTax'], 'taxAmount': json['taxAmount'] == null ? undefined : json['taxAmount'], 'aggregatedTaxRate': json['aggregatedTaxRate'] == null ? undefined : json['aggregatedTaxRate'], }; } function SubscriptionLedgerEntryToJSON(json) { return SubscriptionLedgerEntryToJSONTyped(json, false); } function SubscriptionLedgerEntryToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'feeType': (0, ProductFeeType_1.ProductFeeTypeToJSON)(value['feeType']), 'state': (0, SubscriptionLedgerEntryState_1.SubscriptionLedgerEntryStateToJSON)(value['state']), }; }