UNPKG

wallee

Version:
60 lines (59 loc) 3.33 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfSubscriptionProductVersionPending = instanceOfSubscriptionProductVersionPending; exports.SubscriptionProductVersionPendingFromJSON = SubscriptionProductVersionPendingFromJSON; exports.SubscriptionProductVersionPendingFromJSONTyped = SubscriptionProductVersionPendingFromJSONTyped; exports.SubscriptionProductVersionPendingToJSON = SubscriptionProductVersionPendingToJSON; exports.SubscriptionProductVersionPendingToJSONTyped = SubscriptionProductVersionPendingToJSONTyped; const TaxCalculation_1 = require("./TaxCalculation"); const SubscriptionProductVersionState_1 = require("./SubscriptionProductVersionState"); /** * Check if a given object implements the SubscriptionProductVersionPending interface. */ function instanceOfSubscriptionProductVersionPending(value) { if (!('version' in value) || value['version'] === undefined) return false; return true; } function SubscriptionProductVersionPendingFromJSON(json) { return SubscriptionProductVersionPendingFromJSONTyped(json, false); } function SubscriptionProductVersionPendingFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'enabledCurrencies': json['enabledCurrencies'] == null ? undefined : new Set(json['enabledCurrencies']), 'product': json['product'] == null ? undefined : json['product'], 'taxCalculation': json['taxCalculation'] == null ? undefined : (0, TaxCalculation_1.TaxCalculationFromJSON)(json['taxCalculation']), 'billingCycle': json['billingCycle'] == null ? undefined : json['billingCycle'], 'defaultCurrency': json['defaultCurrency'] == null ? undefined : json['defaultCurrency'], 'name': json['name'] == null ? undefined : json['name'], 'minimalNumberOfPeriods': json['minimalNumberOfPeriods'] == null ? undefined : json['minimalNumberOfPeriods'], 'comment': json['comment'] == null ? undefined : json['comment'], 'state': json['state'] == null ? undefined : (0, SubscriptionProductVersionState_1.SubscriptionProductVersionStateFromJSON)(json['state']), 'numberOfNoticePeriods': json['numberOfNoticePeriods'] == null ? undefined : json['numberOfNoticePeriods'], 'version': json['version'], }; } function SubscriptionProductVersionPendingToJSON(json) { return SubscriptionProductVersionPendingToJSONTyped(json, false); } function SubscriptionProductVersionPendingToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'enabledCurrencies': value['enabledCurrencies'] == null ? undefined : Array.from(value['enabledCurrencies']), 'product': value['product'], 'taxCalculation': (0, TaxCalculation_1.TaxCalculationToJSON)(value['taxCalculation']), 'billingCycle': value['billingCycle'], 'defaultCurrency': value['defaultCurrency'], 'name': value['name'], 'minimalNumberOfPeriods': value['minimalNumberOfPeriods'], 'comment': value['comment'], 'state': (0, SubscriptionProductVersionState_1.SubscriptionProductVersionStateToJSON)(value['state']), 'numberOfNoticePeriods': value['numberOfNoticePeriods'], 'version': value['version'], }; }