UNPKG

wallee

Version:
42 lines (41 loc) 2.2 kB
import { SubscriptionPeriodBillStateFromJSON, SubscriptionPeriodBillStateToJSON, } from './SubscriptionPeriodBillState'; import { SubscriptionVersionFromJSON, SubscriptionVersionToJSON, } from './SubscriptionVersion'; /** * Check if a given object implements the SubscriptionPeriodBill interface. */ export function instanceOfSubscriptionPeriodBill(value) { return true; } export function SubscriptionPeriodBillFromJSON(json) { return SubscriptionPeriodBillFromJSONTyped(json, false); } export function SubscriptionPeriodBillFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'], 'periodStartDate': json['periodStartDate'] == null ? undefined : (new Date(json['periodStartDate'])), 'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])), 'subscriptionVersion': json['subscriptionVersion'] == null ? undefined : SubscriptionVersionFromJSON(json['subscriptionVersion']), 'effectivePeriodEndDate': json['effectivePeriodEndDate'] == null ? undefined : (new Date(json['effectivePeriodEndDate'])), 'language': json['language'] == null ? undefined : json['language'], 'id': json['id'] == null ? undefined : json['id'], 'state': json['state'] == null ? undefined : SubscriptionPeriodBillStateFromJSON(json['state']), 'createdOn': json['createdOn'] == null ? undefined : (new Date(json['createdOn'])), 'plannedPeriodEndDate': json['plannedPeriodEndDate'] == null ? undefined : (new Date(json['plannedPeriodEndDate'])), 'version': json['version'] == null ? undefined : json['version'], }; } export function SubscriptionPeriodBillToJSON(json) { return SubscriptionPeriodBillToJSONTyped(json, false); } export function SubscriptionPeriodBillToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'subscriptionVersion': SubscriptionVersionToJSON(value['subscriptionVersion']), 'state': SubscriptionPeriodBillStateToJSON(value['state']), }; }