UNPKG

wallee

Version:
53 lines (52 loc) 2.75 kB
import { TaxCalculationFromJSON, TaxCalculationToJSON, } from './TaxCalculation'; import { SubscriptionProductVersionStateFromJSON, SubscriptionProductVersionStateToJSON, } from './SubscriptionProductVersionState'; /** * Check if a given object implements the SubscriptionProductVersionPending interface. */ export function instanceOfSubscriptionProductVersionPending(value) { if (!('version' in value) || value['version'] === undefined) return false; return true; } export function SubscriptionProductVersionPendingFromJSON(json) { return SubscriptionProductVersionPendingFromJSONTyped(json, false); } export 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 : 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 : SubscriptionProductVersionStateFromJSON(json['state']), 'numberOfNoticePeriods': json['numberOfNoticePeriods'] == null ? undefined : json['numberOfNoticePeriods'], 'version': json['version'], }; } export function SubscriptionProductVersionPendingToJSON(json) { return SubscriptionProductVersionPendingToJSONTyped(json, false); } export function SubscriptionProductVersionPendingToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'enabledCurrencies': value['enabledCurrencies'] == null ? undefined : Array.from(value['enabledCurrencies']), 'product': value['product'], 'taxCalculation': TaxCalculationToJSON(value['taxCalculation']), 'billingCycle': value['billingCycle'], 'defaultCurrency': value['defaultCurrency'], 'name': value['name'], 'minimalNumberOfPeriods': value['minimalNumberOfPeriods'], 'comment': value['comment'], 'state': SubscriptionProductVersionStateToJSON(value['state']), 'numberOfNoticePeriods': value['numberOfNoticePeriods'], 'version': value['version'], }; }